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.coop...@citrix.com>
> ---
> CC: Jan Beulich <jbeul...@suse.com>
> CC: Wei Liu <w...@xen.org>
> CC: Roger Pau Monné <roger....@citrix.com>
> 
> 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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to