On 25/04/2019 14:21, Jan Beulich wrote: >>>> On 19.04.19 at 10:50, <fionali...@zhaoxin.com> wrote: >> When executing SYSEXIT or SYSENTRY in Zhaoxin CPU, CPU needs to > SYSENTER > >> --- a/xen/arch/x86/x86_64/traps.c >> +++ b/xen/arch/x86/x86_64/traps.c >> @@ -334,7 +334,8 @@ void subarch_percpu_traps_init(void) >> (unsigned long)lstar_enter); >> stub_va += offset; >> >> - if ( boot_cpu_data.x86_vendor & (X86_VENDOR_INTEL | X86_VENDOR_CENTAUR) >> ) >> + if ( boot_cpu_data.x86_vendor & >> + (X86_VENDOR_INTEL | X86_VENDOR_CENTAUR | X86_VENDOR_SHANGHAI) ) >> { >> /* SYSENTER entry. */ >> wrmsrl(MSR_IA32_SYSENTER_ESP, stack_bottom); > How is this hunk related to the title of the change? I think the > title wants to be adjusted. > > Furthermore for all of the changes done, wouldn't we better > switch to use cpu_has_sep? init_amd() as well as default_init() > already clear this flag. Andrew, thoughts?
I wondered exactly that after queuing this patch, but didn't get around to experimenting. We have to be a little careful with the ordering of operations. cpu_has_sep is visible in CPUID but needs clobbering in AMD/Hygon before cpu_has_sep is safe to use (although for the MSRs, it should be safe). ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel