On 2015-01-08 11:32, Paolo Bonzini wrote: > These are needed for KVM changes in 3.18. > > Recent kernels added a separate feature word for XSAVE features, and KVM's > CPUID code is relying on the new definition. Except for cpu_has_xsaves, > it's never accessing the feature itself: wrap cpu_has_xsaves with > kvm_cpu_has_xsaves, and then there is no problem with out-of-bounds > accesses. > > Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> > --- > external-module-compat-comm.h | 4 ++++ > external-module-compat.c | 11 +++++++++++ > sync | 14 ++++++++++++-- > x86/external-module-compat.h | 37 +++++++++++++++++++++++++++++++++++++ > 4 files changed, 64 insertions(+), 2 deletions(-) > ... > diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h > index dec53b6..87cf76a 100644 > --- a/x86/external-module-compat.h > +++ b/x86/external-module-compat.h > @@ -428,6 +428,23 @@ static inline int rdmsrl_safe(unsigned msr, unsigned long long *p) > #define X86_FEATURE_MPX (9*32+14) /* Memory Protection Extension */ > #endif > > +#if X86_FEATURE_XSAVEOPT < 10 * 32 > +#undef X86_FEATURE_XSAVEOPT > +#endif > +#define X86_FEATURE_XSAVEOPT (10*32+0) /* XSAVEOPT instruction */ This causes redefinition warnings if the condition is not met. Was the plan to put the define before the #endif? Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html