@@ -1499,6 +1499,17 @@ long arch_do_domctl(
break;
}
+ case XEN_DOMCTL_PSR_CAT_OP_GET_L2_CBM:
+ {
+ uint32_t val;
+
+ ret = psr_get_val(d, domctl->u.psr_cat_op.target,
+ &val, PSR_CBM_TYPE_L2);
+ domctl->u.psr_cat_op.data = val;
+ copyback = 1;
+ break;
+ }
+
default:
ret = -EOPNOTSUPP;
break;
@@ -470,6 +470,7 @@ static struct feat_props l3_cdp_props = {
static struct feat_props l2_cat_props = {
.cos_num = 1,
.get_feat_info = cat_get_feat_info,
+ .get_val = cat_get_val,
};
static void __init parse_psr_bool(char *s, char *value, char *feature,
@@ -1138,6 +1138,7 @@ struct xen_domctl_psr_cat_op {
#define XEN_DOMCTL_PSR_CAT_OP_SET_L3_DATA 3
#define XEN_DOMCTL_PSR_CAT_OP_GET_L3_CODE 4
#define XEN_DOMCTL_PSR_CAT_OP_GET_L3_DATA 5
+#define XEN_DOMCTL_PSR_CAT_OP_GET_L2_CBM 7
uint32_t cmd; /* IN: XEN_DOMCTL_PSR_CAT_OP_* */
uint32_t target; /* IN */
uint64_t data; /* IN/OUT */
This patch implements L2 CAT get value flow and interface in domctl. Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com> --- v10: - remove cast in domctl. (suggested by Jan Beulich) v9: - reuse 'cat_get_val' for L2 CAT to reduce redundant codes (suggested by Roger Pau) - changes about 'uint64_t' to 'uint32_t'. (suggested by Jan Beulich) v5: - remove type check in callback function. (suggested by Jan Beulich) v4: - create this patch because of codes architecture change. (suggested by Jan Beulich) --- xen/arch/x86/domctl.c | 11 +++++++++++ xen/arch/x86/psr.c | 1 + xen/include/public/domctl.h | 1 + 3 files changed, 13 insertions(+)