From: "Xin Li (Talons)" <xin.li@citrix.com>
To: Juergen Gross <jgross@suse.com>
Cc: Xin Li <talons.lee@gmail.com>,
Sergey Dyasli <sergey.dyasli@citrix.com>,
Igor Druzhinin <igor.druzhinin@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
Andrew Cooper <Andrew.Cooper3@citrix.com>
Subject: Re: [PATCH v1] restore the fake x2apic value for cpuid
Date: Mon, 3 Dec 2018 11:15:45 +0000 [thread overview]
Message-ID: <1543835744784.88128@citrix.com> (raw)
In-Reply-To: <a1251ffb-897f-a8be-0ceb-b6b64c7bf25a@suse.com>
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@suse.com>
Sent: Monday, December 3, 2018 3:03 PM
To: Xin Li; xen-devel@lists.xen.org
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@citrix.com>
>>
>> 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@citrix.com>
>
> 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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-12-03 11:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-22 7:18 [PATCH v1] restore the fake x2apic value for cpuid Xin Li
2018-12-03 7:00 ` Juergen Gross
2018-12-03 7:03 ` Juergen Gross
2018-12-03 11:15 ` Xin Li (Talons) [this message]
2018-12-03 11:40 ` Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1543835744784.88128@citrix.com \
--to=xin.li@citrix.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=igor.druzhinin@citrix.com \
--cc=jgross@suse.com \
--cc=sergey.dyasli@citrix.com \
--cc=talons.lee@gmail.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.