KVM: x86: Factor out x86 instruction emulation with decoding
authorWei Huang <wei.huang2@amd.com>
Tue, 26 Jan 2021 08:18:28 +0000 (03:18 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Feb 2021 10:27:27 +0000 (05:27 -0500)
commit4aa2691dcbd38ce1c461188799d863398dd2865d
treec6061aadf5a188296a95c3d7edad8e6edafaa7c5
parent9a3ecd5e2aa10af18d0d5a055122d6cc0b0944c7
KVM: x86: Factor out x86 instruction emulation with decoding

Move the instruction decode part out of x86_emulate_instruction() for it
to be used in other places. Also kvm_clear_exception_queue() is moved
inside the if-statement as it doesn't apply when KVM are coming back from
userspace.

Co-developed-by: Bandan Das <bsd@redhat.com>
Signed-off-by: Bandan Das <bsd@redhat.com>
Signed-off-by: Wei Huang <wei.huang2@amd.com>
Message-Id: <20210126081831.570253-2-wei.huang2@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c
arch/x86/kvm/x86.h