All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>, Wei Liu <wl@xen.org>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH] x86/S3: Drop {save,restore}_rest_processor_state() completely
Date: Wed, 29 Apr 2020 15:43:01 +0200	[thread overview]
Message-ID: <f13578bf-2143-f63d-1ffb-9b83579fd4b8@suse.com> (raw)
In-Reply-To: <afb3cf2d-5d8d-0f4a-b75f-069191871f87@citrix.com>

On 29.04.2020 15:36, Andrew Cooper wrote:
> On 29/04/2020 14:25, Jan Beulich wrote:
>> On 29.04.2020 13:32, Andrew Cooper wrote:
>>> On 29/04/2020 12:16, Jan Beulich wrote:
>>>> On 29.04.2020 13:09, Andrew Cooper wrote:
>>>>> --- a/xen/arch/x86/boot/trampoline.S
>>>>> +++ b/xen/arch/x86/boot/trampoline.S
>>>>> @@ -91,6 +91,11 @@ trampoline_protmode_entry:
>>>>>          and     %edi,%edx
>>>>>          wrmsr
>>>>>  1:
>>>>> +        /* Set up PAT before enabling paging. */
>>>>> +        mov     $XEN_MSR_PAT & 0xffffffff, %eax
>>>>> +        mov     $XEN_MSR_PAT >> 32, %edx
>>>>> +        mov     $MSR_IA32_CR_PAT, %ecx
>>>>> +        wrmsr
>>>> Doesn't this also eliminate the need for cpu_init() doing this?
>>>> If you agree with that one also dropped
>>>> Reviewed-by: Jan Beulich <jbeulich@suse.com>
>>> That doesn't cover the BSP on either the legacy or EFI paths.
>> The legacy path, afaict, uses it:
>>
>> .Lskip_realmode:
>>         /* EBX == 0 indicates we are the BP (Boot Processor). */
>>         xor     %ebx,%ebx
>>
>>         /* Jump to the common bootstrap entry point. */
>>         jmp     trampoline_protmode_entry
> 
> Oh, of course.
> 
>> The xen.efi entry path really should have the change you make
>> mirrored anyway.
> 
> Are you happy for it to go in efi_arch_post_exit_boot()?  We don't
> disable paging, but that is the point where we switch from the EFI
> pagetables to Xen's.

Yes, that's the most "symmetrical" place, I think.

Jan


      reply	other threads:[~2020-04-29 13:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 11:09 [PATCH] x86/S3: Drop {save, restore}_rest_processor_state() completely Andrew Cooper
2020-04-29 11:16 ` [PATCH] x86/S3: Drop {save,restore}_rest_processor_state() completely Jan Beulich
2020-04-29 11:32   ` Andrew Cooper
2020-04-29 13:25     ` Jan Beulich
2020-04-29 13:36       ` Andrew Cooper
2020-04-29 13:43         ` Jan Beulich [this message]

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=f13578bf-2143-f63d-1ffb-9b83579fd4b8@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --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.