KVM: SVM: Clear exit_info for injected INTR exits
authorJoerg Roedel <joerg.roedel@amd.com>
Wed, 24 Feb 2010 17:59:19 +0000 (18:59 +0100)
committerAvi Kivity <avi@redhat.com>
Sun, 25 Apr 2010 10:53:26 +0000 (13:53 +0300)
When injecting an vmexit.intr into the nested hypervisor
there might be leftover values in the exit_info fields.
Clear them to not confuse nested hypervisors.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/svm.c

index 631d2e544491ad450029677c0b59dc8fd7d1e3f4..38f1fceefea1cd71a1831e19ac1d78a586ba3c11 100644 (file)
@@ -1491,7 +1491,9 @@ static inline bool nested_svm_intr(struct vcpu_svm *svm)
        if (!(svm->vcpu.arch.hflags & HF_HIF_MASK))
                return false;
 
-       svm->vmcb->control.exit_code = SVM_EXIT_INTR;
+       svm->vmcb->control.exit_code   = SVM_EXIT_INTR;
+       svm->vmcb->control.exit_info_1 = 0;
+       svm->vmcb->control.exit_info_2 = 0;
 
        if (svm->nested.intercept & 1ULL) {
                /*