[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 06/15] x86: implement get value interface for MBA



On Tue, Sep 05, 2017 at 05:32:28PM +0800, Yi Sun wrote:
> This patch implements get value domctl interface for MBA.
> 
> Signed-off-by: Yi Sun <yi.y.sun@xxxxxxxxxxxxxxx>
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> ---
> v3:
>     - change 'PSR_VAL_TYPE_MBA' to 'PSR_TYPE_MBA_THRTL'.
>       (suggested by Roger Pau Monné)
> ---
>  xen/arch/x86/domctl.c       | 7 +++++++
>  xen/include/public/domctl.h | 1 +
>  2 files changed, 8 insertions(+)
> 
> diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
> index 696eff2..7902af7 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_ALLOC_GET_MBA_THRTL:
> +            ret = psr_get_val(d, domctl->u.psr_alloc.target,
> +                              &val32, PSR_TYPE_MBA_THRTL);
> +            domctl->u.psr_alloc.data = val32;

Hm, why does psr_get_val take a uint32_t * instead of a uint64_t *? So
that you can directly pass &domctl->u.psr_alloc.data.

Or the other way around, why is domctl->u.psr_alloc.data a uint64_t
instead of a uint32_t?

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.