[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 03/14] x86emul: abstract out XCRn accesses
>>> On 15.03.18 at 14:35, <andrew.cooper3@xxxxxxxxxx> wrote: > On 15/03/18 13:04, Jan Beulich wrote: >> static inline void x86_emul_hw_exception( >> --- a/xen/arch/x86/x86_emulate.c >> +++ b/xen/arch/x86/x86_emulate.c >> @@ -42,3 +42,50 @@ >> }) >> >> #include "x86_emulate/x86_emulate.c" >> + >> +int x86emul_read_xcr(unsigned int reg, uint64_t *val, >> + struct x86_emulate_ctxt *ctxt) >> +{ >> + switch ( reg ) >> + { >> + case 0: >> + *val = current->arch.xcr0; >> + return X86EMUL_OKAY; >> + >> + case 1: >> + if ( cpu_has_xgetbv1 && current->domain->arch.cpuid->xstate.xgetbv1 >> ) > > You can drop the cpu_has_xgetbv1 part of this test. The CPUID policy > derivation logic won't allow xstate.xgetbv1 to be set without > cpu_has_xgetbv1 Hmm, I wasn't sure: Is that already the case? I thought auditing of what the tool stack provides is only planned. > Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Thanks, but please clarify the above. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |