diff options
author | Andrew Cooper <andrew.cooper3@citrix.com> | 2017-09-20 17:33:59 +0000 |
---|---|---|
committer | Andrew Cooper <andrew.cooper3@citrix.com> | 2018-09-24 16:25:37 +0100 |
commit | 229b94878717e22c0f228625bbcddd53f7d8654d (patch) | |
tree | d7fc816eeaf6234ec7e8f7d04bf942f6913ffcce /xen/arch/x86/msr.c | |
parent | bd7099a674819c0709bd058793adea2e76b42a6b (diff) |
x86/viridan: Clean up Viridian MSR infrastructure
Rename the functions to guest_{rd,wr}msr_viridian() for consistency, and
because the _regs() suffix isn't very appropriate.
Update them to take a vcpu pointer rather than presuming that they act on
current, which is safe for all implemented operations, and switch their return
ABI to use X86EMUL_*.
The default cases no longer need to deal with MSRs out of the Viridian range,
but drop the printks to debug builds only and identify the value attempting to
be written.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Sergey Dyasli <sergey.dyasli@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Diffstat (limited to 'xen/arch/x86/msr.c')
-rw-r--r-- | xen/arch/x86/msr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xen/arch/x86/msr.c b/xen/arch/x86/msr.c index 6fe3ad7a16..5b2887d543 100644 --- a/xen/arch/x86/msr.c +++ b/xen/arch/x86/msr.c @@ -150,8 +150,7 @@ int guest_rdmsr(const struct vcpu *v, uint32_t msr, uint64_t *val) case 0x40000000 ... 0x400001ff: if ( is_viridian_domain(d) ) { - ret = (rdmsr_viridian_regs(msr, val) - ? X86EMUL_OKAY : X86EMUL_EXCEPTION); + ret = guest_rdmsr_viridian(v, msr, val); break; } @@ -278,8 +277,7 @@ int guest_wrmsr(struct vcpu *v, uint32_t msr, uint64_t val) case 0x40000000 ... 0x400001ff: if ( is_viridian_domain(d) ) { - ret = (wrmsr_viridian_regs(msr, val) - ? X86EMUL_OKAY : X86EMUL_EXCEPTION); + ret = guest_wrmsr_viridian(v, msr, val); break; } |