Re: [Xen-devel] [PATCH] x86/apic: Improve current_local_apic_mode()

2020-02-18 Thread Jan Beulich
On 14.02.2020 18:59, Andrew Cooper wrote: > On 28/01/2020 14:10, Jan Beulich wrote: >> On 28.01.2020 13:52, Andrew Cooper wrote: >>> boot_cpu_has(X86_FEATURE_X2APIC) doesn't need checking to interpret >>> APIC_BASE_EXTD. >> Hmm, the comment you remove ... >> >>> --- a/xen/arch/x86/apic.c >>> +++ b/

Re: [Xen-devel] [PATCH] x86/apic: Improve current_local_apic_mode()

2020-02-14 Thread Andrew Cooper
On 28/01/2020 14:10, Jan Beulich wrote: > On 28.01.2020 13:52, Andrew Cooper wrote: >> boot_cpu_has(X86_FEATURE_X2APIC) doesn't need checking to interpret >> APIC_BASE_EXTD. > Hmm, the comment you remove ... > >> --- a/xen/arch/x86/apic.c >> +++ b/xen/arch/x86/apic.c >> @@ -1534,18 +1534,14 @@ void

Re: [Xen-devel] [PATCH] x86/apic: Improve current_local_apic_mode()

2020-01-28 Thread Jan Beulich
On 28.01.2020 13:52, Andrew Cooper wrote: > boot_cpu_has(X86_FEATURE_X2APIC) doesn't need checking to interpret > APIC_BASE_EXTD. Hmm, the comment you remove ... > --- a/xen/arch/x86/apic.c > +++ b/xen/arch/x86/apic.c > @@ -1534,18 +1534,14 @@ void __init record_boot_APIC_mode(void) > /* Look at

Re: [Xen-devel] [PATCH] x86/apic: Improve current_local_apic_mode()

2020-01-28 Thread Wei Liu
On Tue, Jan 28, 2020 at 12:52:16PM +, Andrew Cooper wrote: > boot_cpu_has(X86_FEATURE_X2APIC) doesn't need checking to interpret > APIC_BASE_EXTD. > > Also take the opportunity to optimise the generated assembly by not using > rdmsrl(). GCC isn't clever enough to spot that it can drop the shi

[Xen-devel] [PATCH] x86/apic: Improve current_local_apic_mode()

2020-01-28 Thread Andrew Cooper
boot_cpu_has(X86_FEATURE_X2APIC) doesn't need checking to interpret APIC_BASE_EXTD. Also take the opportunity to optimise the generated assembly by not using rdmsrl(). GCC isn't clever enough to spot that it can drop the shift and or to put %eax in the higher half of msr_contents. No functional