[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v1] restore the fake x2apic value for cpuid



Hi Juergen,
    thanks for your comments.

   Are you suggesting to call apic_is_x2apic_enabled() in __x2apic_disable()?
   but I think that's exact what changed due to the fake xen_cpuid value.
   Doing so will probably still see the EXTD bit on, and call wrmsrl to disable 
x2apic.
   
log for linux4.4:
check_x2apic()
[ 0.000000] xen_read_msr_safe native read: fee00d00
[ 0.000000] clear X2APIC_ENABLE
[ 0.000000] xen_read_msr_safe cpuid: fee00900
[ 0.000000] x2apic_enabled cpu_has_x2apic: 0 apic_is_x2apic_enabled: 0

log for linux4.19:
[ 0.000817] xen_read_msr_safe native read: fee00d00
[ 0.000819] xen_read_msr_safe cpuid: *fee00d00 * //X2APIC_ENABLE not cleared
[ 0.000820] x2apic_enabled X86_FEATURE_X2APIC: 0 apic_is_x2apic_enabled: 1

________________________________________
From: Juergen Gross <jgross@xxxxxxxx>
Sent: Monday, December 3, 2018 3:03 PM
To: Xin Li; xen-devel@xxxxxxxxxxxxx
Cc: Xin Li (Talons); Sergey Dyasli; Andrew Cooper; Igor Druzhinin
Subject: Re: [Xen-devel] [PATCH v1] restore the fake x2apic value for cpuid

On 03/12/2018 08:00, Juergen Gross wrote:
> On 22/11/2018 08:18, Xin Li wrote:
>> From: Talons Lee <xin.li@xxxxxxxxxx>
>>
>> Commit e657fcc clears cpu x2apic capability bit instead of using fake
>> cpuid value. However, with cpuid x2apic bit on, xen_read_msr_safe() will
>> not clear the EXTD bit, which leads to uncessary msr write trying to
>> disable x2apic in __x2apic_disable(). So restore the fake x2apic value.
>>
>> Signed-off-by: Talons Lee <xin.li@xxxxxxxxxx>
>
> Wouldn't it be easier to use just rdmsr_safe() in __x2apic_disable()
> instead?

Sorry, just seeing it now: using apic_is_x2apic_enabled() might be even
better. Same in __x2apic_enable().


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.