]> xenbits.xensource.com Git - xen.git/commit
x86/pv: Simplify emulation for the 64bit base MSRs
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 4 Sep 2020 14:25:09 +0000 (15:25 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 29 Sep 2020 12:46:13 +0000 (13:46 +0100)
commit5dba8c2f23049aa68b777a9e7e9f76c12dd00012
treef8c1518237172f780059e3431a2822f8e01f5289
parentcbe69ba3e8e0499fac73cb91caebb8732e08f577
x86/pv: Simplify emulation for the 64bit base MSRs

is_pv_32bit_domain() is an expensive predicate, but isn't used for speculative
safety in this case.  Swap to checking the Long Mode bit in the CPUID policy,
which is the architecturally correct behaviour.

is_canonical_address() is currently moderately simple, but it will become more
complicated when 5-level support is added.  Rearrange write_msr() to collapse
the common checks.

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