x86/hvm: Improve hvm_set_guest_pat() code generation
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 12 Jan 2022 13:54:12 +0000 (13:54 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 13 Jan 2022 15:19:43 +0000 (15:19 +0000)
commit9ce0a5e207f3968e65d0af33a15bee5bdf5c8a7f
tree427441aa3c940cd1bff0b19f93894221a65ebaa3
parentddf820e1d6e82051be95eeb30a570426423e4f9f
x86/hvm: Improve hvm_set_guest_pat() code generation

This is a fastpath on virtual vmentry/exit, and forcing guest_pat to be
spilled to the stack is bad.  Performing the shift in a register is far more
efficient.

Drop the (IMO useless) log message.  MSR_PAT only gets altered on boot, and a
bad value will be entirely evident in the ensuing #GP backtrace.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/hvm.c