From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>, FionaLi-oc <fionali-oc@zhaoxin.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
cobechen@zhaoxin.com, Wei Liu <wei.liu2@citrix.com>,
Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH 2/2 v2] x86/acpi: Improve suspend and resume process for Zhaoxin CPU
Date: Thu, 25 Apr 2019 14:25:25 +0100 [thread overview]
Message-ID: <89dcdf84-214d-d100-e2a1-8bd151f215bd@citrix.com> (raw)
In-Reply-To: <5CC1B46B0200007800229134@prv1-mh.provo.novell.com>
On 25/04/2019 14:21, Jan Beulich wrote:
>>>> On 19.04.19 at 10:50, <fionali-oc@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
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>, FionaLi-oc <fionali-oc@zhaoxin.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
cobechen@zhaoxin.com, Wei Liu <wei.liu2@citrix.com>,
Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH 2/2 v2] x86/acpi: Improve suspend and resume process for Zhaoxin CPU
Date: Thu, 25 Apr 2019 14:25:25 +0100 [thread overview]
Message-ID: <89dcdf84-214d-d100-e2a1-8bd151f215bd@citrix.com> (raw)
Message-ID: <20190425132525.XwmBcPfZ0huNzrIekzYit7vTm1iNWAEIIRBMMig6OSY@z> (raw)
In-Reply-To: <5CC1B46B0200007800229134@prv1-mh.provo.novell.com>
On 25/04/2019 14:21, Jan Beulich wrote:
>>>> On 19.04.19 at 10:50, <fionali-oc@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
next prev parent reply other threads:[~2019-04-25 13:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-19 8:50 [PATCH 2/2 v2] x86/acpi: Improve suspend and resume process for Zhaoxin CPU FionaLi-oc
2019-04-19 8:50 ` [Xen-devel] " FionaLi-oc
2019-04-19 10:16 ` Andrew Cooper
2019-04-19 10:16 ` [Xen-devel] " Andrew Cooper
2019-04-25 13:21 ` Jan Beulich
2019-04-25 13:21 ` [Xen-devel] " Jan Beulich
2019-04-25 13:25 ` Andrew Cooper [this message]
2019-04-25 13:25 ` Andrew Cooper
2019-04-25 13:37 ` Jan Beulich
2019-04-25 13:37 ` [Xen-devel] " Jan Beulich
2019-04-25 13:42 ` Andrew Cooper
2019-04-25 13:42 ` [Xen-devel] " Andrew Cooper
2019-04-26 9:55 ` FionaLi-oc
2019-04-26 9:55 ` [Xen-devel] " FionaLi-oc
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=89dcdf84-214d-d100-e2a1-8bd151f215bd@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=cobechen@zhaoxin.com \
--cc=fionali-oc@zhaoxin.com \
--cc=roger.pau@citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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.