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

Re: [Xen-devel] [PATCH] x86/suspend: Simplify system table handling on resume



On 12.08.2019 20:21, Andrew Cooper wrote:
> load_TR() is used exclusively in the resume path, but jumps through a lot of
> unnecessary hoops.
> 
> As suspend/resume is strictly on CPU0 in idle context, the correct GDT to use
> is boot_gdt, which means it doesn't need saving on suspend.  Similarly, the
> correct IDT to use can be derived, and the LDT is guaranteed to be NUL.
> 
> The TR is still correct in the GDT, but needs the busy bit clearing before we
> can reload it.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Wei Liu <wl@xxxxxxx>
> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> 
> A slightly different option would be to call load_system_tables() rather than
> opencoding part of it in restore_rest_processor_state().  However, that is
> more setup than is necessary.  Thoughts?

This might indeed be better (despite the parts not needed on this
path), as it would further centralize the handling. Of course only
as long as there's no (significant) change needed to the function
in order to be used here.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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