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

2020-04-29 Thread Jan Beulich
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/trampo

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

2020-04-29 Thread Andrew Cooper
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_protmod

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

2020-04-29 Thread Jan Beulich
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 >>>

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

2020-04-29 Thread Andrew Cooper
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 befor

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

2020-04-29 Thread Jan Beulich
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

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

2020-04-29 Thread Andrew Cooper
There is no need to save/restore FS/GS/XCR0 state. It will be handled suitably on the context switch away from the idle. The CR4 restoration in restore_rest_processor_state() was actually fighting later code in enter_state() which tried to keep CR4.MCE clear until everything was set up. Delete t