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

Re: [Xen-devel] [PATCH v3 5/5] x86/domctl: Implement XEN_DOMCTL_get_cpu_policy



On Mon, Nov 05, 2018 at 11:16:40AM +0000, Andrew Cooper wrote:
> From: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx>
> 
> This finally (after literally years of work!) marks the point where the
> toolstack can ask the hypervisor for the current CPUID configuration of a
> specific domain.
> 
> Introduce a new flask access vector and update the default policies.
> 
> Also extend xen-cpuid's --policy mode to be able to take a domid and dump a
> specific domains CPUID and MSR policy.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx>

Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

> diff --git a/tools/misc/xen-cpuid.c b/tools/misc/xen-cpuid.c
> index 95ed853..2c41031 100644
> --- a/tools/misc/xen-cpuid.c
> +++ b/tools/misc/xen-cpuid.c
> @@ -3,6 +3,8 @@
>  #include <err.h>
>  #include <getopt.h>
>  #include <string.h>
> +#include <errno.h>
> +#include <limits.h>
>  
>  #include <xenctrl.h>
>  
> @@ -309,11 +311,13 @@ int main(int argc, char **argv)
>  {
>      enum { MODE_UNKNOWN, MODE_INFO, MODE_DETAIL, MODE_INTERPRET, MODE_POLICY 
> }
>      mode = MODE_UNKNOWN;
> +    int domid = -1;

Would it be better to use DOMID_INVALID instead of -1?

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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