On Wed, 2015-12-16 at 21:24 +0000, Andrew Cooper wrote:
> When generating a VM featureset, clearing individual features is
> problematic
> if a feature has dependent features.
> 
> Instead of disabling individual features, collect all disabling together
> in
> sanitise_featureset(), and perform deep dependency removal on the result,
> to
> remove all impacted features.
> 
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
> ---
> CC: Ian Campbell <ian.campb...@citrix.com>
> CC: Ian Jackson <ian.jack...@eu.citrix.com>
> CC: Wei Liu <wei.l...@citrix.com>
> ---
>  tools/libxc/xc_cpuid_x86.c | 144 +++++++++++++++++++++----------------
> --------
>  1 file changed, 67 insertions(+), 77 deletions(-)
> 
> diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
> index 3f39306..6c8995f 100644
> --- a/tools/libxc/xc_cpuid_x86.c
> +++ b/tools/libxc/xc_cpuid_x86.c
> @@ -21,14 +21,15 @@
>  
>  #include <stdlib.h>
>  #include <stdbool.h>
> +#include <limits.h>
>  #include "xc_private.h"
> -#include <xen/arch-x86/featureset.h>
> +#include "cpuid-private.h"
>  #include <xen/hvm/params.h>
>  #include <xen/sysctl.h>
>  
>  #define bitmaskof(idx)      (1u << ((idx) & 31))
> -#define clear_bit(idx, dst) ((dst) &= ~bitmaskof(idx))
> -#define set_bit(idx, dst)   ((dst) |=  bitmaskof(idx))
> +#define clear_feature(idx, dst) ((dst) &= ~bitmaskof(idx))
> +#define set_feature(idx, dst)   ((dst) |=  bitmaskof(idx))

Heh.


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

Reply via email to