x86: L2 CAT: implement set value flow.

This patch implements L2 CAT set value related callback function
and domctl interface.

Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Yi Sun authored and Jan Beulich committed 2017-08-03 12:38:12 +02:00
1 parent 84577fbd5a
commit a29ea3bb5b
3 files changed
+8

No files matched your search

+6
View File
@@ -1462,6 +1462,12 @@ long arch_do_domctl(
PSR_CBM_TYPE_L3_DATA);
break;
case XEN_DOMCTL_PSR_CAT_OP_SET_L2_CBM:
ret = psr_set_val(d, domctl->u.psr_cat_op.target,
domctl->u.psr_cat_op.data,
PSR_CBM_TYPE_L2);
break;
case XEN_DOMCTL_PSR_CAT_OP_GET_L3_CBM:
ret = psr_get_val(d, domctl->u.psr_cat_op.target,
&val32, PSR_CBM_TYPE_L3);
+1
View File
@@ -408,6 +408,7 @@ static const struct feat_props l3_cdp_props = {
/* L2 CAT props */
static void l2_cat_write_msr(unsigned int cos, uint32_t val, enum cbm_type type)
{
wrmsrl(MSR_IA32_PSR_L2_MASK(cos), val);
}
static const struct feat_props l2_cat_props = {
+1
View File
@@ -1142,6 +1142,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_SET_L2_CBM 6
#define XEN_DOMCTL_PSR_CAT_OP_GET_L2_CBM 7
uint32_t cmd; /* IN: XEN_DOMCTL_PSR_CAT_OP_* */
uint32_t target; /* IN */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.