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

Re: [Xen-devel] [PATCH 03/13] libx86: Share struct cpuid_policy with userspace



On Tue, Jul 03, 2018 at 09:55:16PM +0100, Andrew Cooper wrote:
> From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> 
> No functional change.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Wei Liu <wei.liu2@xxxxxxxxxx>
> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> CC: Sergey Dyasli <sergey.dyasli@xxxxxxxxxx>
> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> ---
>  tools/libxc/xc_cpuid_x86.c             |   2 +
>  tools/tests/x86_emulator/x86-emulate.h |   2 +
>  xen/include/asm-x86/cpuid.h            | 219 
> ---------------------------------
>  xen/include/xen/libx86/cpuid.h         | 219 
> +++++++++++++++++++++++++++++++++
>  4 files changed, 223 insertions(+), 219 deletions(-)
> 
> diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
> index 06f104d..5ee4a2d 100644
> --- a/tools/libxc/xc_cpuid_x86.c
> +++ b/tools/libxc/xc_cpuid_x86.c
> @@ -27,6 +27,8 @@
>  #include <xen/hvm/params.h>
>  #include <xen-tools/libs.h>
>  
> +#define MAX(x, y) ((x) > (y) ? (x) : (y))
> +

It appears that this is more suitable to be put into
include/xen-tools/libs.h

>  #include <xen/libx86/cpuid.h>
>  
>  enum {
> diff --git a/tools/tests/x86_emulator/x86-emulate.h 
> b/tools/tests/x86_emulator/x86-emulate.h
> index c5e85de..b204901 100644
> --- a/tools/tests/x86_emulator/x86-emulate.h
> +++ b/tools/tests/x86_emulator/x86-emulate.h
> @@ -21,6 +21,8 @@
>  
>  #define ARRAY_SIZE(a) (sizeof(a) / sizeof(*(a)))
>  
> +#define MAX(x, y) ((x) > (y) ? (x) : (y))
> +

And with that libs.h included here you can also delete the BUILD_BUG_ON
in this file.

This can be done either in the next version or as a follow-up patch if
that's easier.

In any case:

Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>

_______________________________________________
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®.