x86/svm: Fold nsvm_{wr,rd}msr() into svm_msr_{read,write}_intercept()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 10 Dec 2018 11:58:03 +0000 (11:58 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 22 Jul 2020 14:10:57 +0000 (15:10 +0100)
commit26707b747feb5d707f659989c0f8f2e847e8020a
tree59e743514da4fcf0ed1e87ebc78a8d000321bc7a
parentf3885e8c3ceaef101e466466e879e97103ecce18
x86/svm: Fold nsvm_{wr,rd}msr() into svm_msr_{read,write}_intercept()

... to simplify the default cases.

There are multiple errors with the handling of these three MSRs, but they are
deliberately not addressed at this point.

This removes the dance converting -1/0/1 into X86EMUL_*, allowing for the
removal of the 'ret' variable.

While cleaning this up, drop the gdprintk()'s for #GP conditions, and the
'result' variable from svm_msr_write_intercept() as it is never modified.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/hvm/svm/nestedsvm.c
xen/arch/x86/hvm/svm/svm.c
xen/include/asm-x86/hvm/svm/nestedsvm.h