x86/pv: allow reading FEATURE_CONTROL MSR
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 15 Sep 2020 08:21:09 +0000 (10:21 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 15 Sep 2020 08:21:09 +0000 (10:21 +0200)
commit39ab598c50a2b539f376adc363d684c2df6c8dd7
tree0a5b1146c0beff0d9d0d2ff3eb078b252d1c0c98
parenta4cbe0f3b47656ea125922fd48d394731a0163fd
x86/pv: allow reading FEATURE_CONTROL MSR

Linux PV guests will attempt to read the FEATURE_CONTROL MSR, so move
the handling done in VMX code into guest_rdmsr as it can be shared
between PV and HVM guests that way.

Note that there's a slight behavior change and attempting to read the
MSR when no features are available will result in a fault.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/msr.c