aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2013-02-24 08:11:34 -0500
committerGleb Natapov <gleb@redhat.com>2013-02-27 08:46:07 -0500
commit957c897e8cf5a26abbce1a1a38833251339d596d (patch)
treebf6b810b6ab683412a16c753e3a7d4a06140aacc /arch/x86/kvm/vmx.c
parent36c3cc422b7c5d3cd84cbac769758b197e08f221 (diff)
KVM: nVMX: Use cached exit reason
No need to re-read what vmx_vcpu_run already picked up for us. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 3a58c1b8764e..f7d2242e5d00 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -6082,10 +6082,10 @@ static bool nested_vmx_exit_handled_cr(struct kvm_vcpu *vcpu,
6082 */ 6082 */
6083static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu) 6083static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
6084{ 6084{
6085 u32 exit_reason = vmcs_read32(VM_EXIT_REASON);
6086 u32 intr_info = vmcs_read32(VM_EXIT_INTR_INFO); 6085 u32 intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
6087 struct vcpu_vmx *vmx = to_vmx(vcpu); 6086 struct vcpu_vmx *vmx = to_vmx(vcpu);
6088 struct vmcs12 *vmcs12 = get_vmcs12(vcpu); 6087 struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
6088 u32 exit_reason = vmx->exit_reason;
6089 6089
6090 if (vmx->nested.nested_run_pending) 6090 if (vmx->nested.nested_run_pending)
6091 return 0; 6091 return 0;
@@ -7399,7 +7399,7 @@ static void prepare_vmcs12(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12)
7399 7399
7400 /* update exit information fields: */ 7400 /* update exit information fields: */
7401 7401
7402 vmcs12->vm_exit_reason = vmcs_read32(VM_EXIT_REASON); 7402 vmcs12->vm_exit_reason = to_vmx(vcpu)->exit_reason;
7403 vmcs12->exit_qualification = vmcs_readl(EXIT_QUALIFICATION); 7403 vmcs12->exit_qualification = vmcs_readl(EXIT_QUALIFICATION);
7404 7404
7405 vmcs12->vm_exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO); 7405 vmcs12->vm_exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);