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

Re: [PATCH] x86/S3: Drop {save,restore}_rest_processor_state() completely


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 29 Apr 2020 14:36:58 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@xxxxxxxxxx; spf=Pass smtp.mailfrom=Andrew.Cooper3@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 29 Apr 2020 13:37:10 +0000
  • Ironport-sdr: 2feEWLwWUHRi30tXrRzHurej/4D2KF04Cptc3lgFLQeKkd1qyiHmijGF+BkHK1HuIjPOzovalv 7lu0WELBsIag/SOE6o3Z2K2Xw0Idkxy8ofrlVaUc1hMjpDFp0JT8ht5v1gYOP7tcKIEbt/TyLZ aHjW2pWkHt7Qq8GfV7Xwy/eseTXKCbCBu+cug8w0lgMw424a4qG1Q8a2wBeiNa+ZWXklx2+i1G Npy69wrFCN8YIYCyooAcD6s8jI1osLoUhCyx0Cw7k6JLAlAKsUtr6cEGuYuvFF9g1rN3ZzYsFq 9y4=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxx>
>> 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.

~Andrew



 


Rackspace

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