Message ID | 1506160104-5890-7-git-send-email-yi.y.sun@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
>>> On 23.09.17 at 11:48, <yi.y.sun@linux.intel.com> wrote: > This patch implements get value domctl interface for MBA. > > Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com> > Reviewed-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index 18cae88..22650d7 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -1496,6 +1496,13 @@ long arch_do_domctl( copyback = true; break; + case XEN_DOMCTL_PSR_GET_MBA_THRTL: + ret = psr_get_val(d, domctl->u.psr_alloc.target, + &val32, PSR_TYPE_MBA_THRTL); + domctl->u.psr_alloc.data = val32; + copyback = true; + break; + default: ret = -EOPNOTSUPP; break; diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index 0c6f6ae..ec6d2de 100644 --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -1156,6 +1156,7 @@ struct xen_domctl_psr_alloc { #define XEN_DOMCTL_PSR_GET_L3_DATA 5 #define XEN_DOMCTL_PSR_SET_L2_CBM 6 #define XEN_DOMCTL_PSR_GET_L2_CBM 7 +#define XEN_DOMCTL_PSR_GET_MBA_THRTL 9 uint32_t cmd; /* IN: XEN_DOMCTL_PSR_* */ uint32_t target; /* IN */ uint64_t data; /* IN/OUT */