From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH] KVM: SVM: Always clear interrupt shadow in skip_emulated_instruction Date: Tue, 16 Feb 2010 10:46:31 +0100 Message-ID: <4B7A6977.4020308@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: kvm , Gleb Natapov To: Avi Kivity , Marcelo Tosatti Return-path: Received: from david.siemens.de ([192.35.17.14]:21646 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756847Ab0BPJqt (ORCPT ); Tue, 16 Feb 2010 04:46:49 -0500 Sender: kvm-owner@vger.kernel.org List-ID: emulate_instruction(EMULTYPE_SKIP) does not clear the shadow (only full emulation does), so we have to do this here. Signed-off-by: Jan Kiszka --- arch/x86/kvm/svm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 52f78dd..84c838d 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -282,6 +282,7 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); + svm_set_interrupt_shadow(vcpu, 0); if (!svm->next_rip) { if (emulate_instruction(vcpu, 0, 0, EMULTYPE_SKIP) != EMULATE_DONE) @@ -293,7 +294,6 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu) __func__, kvm_rip_read(vcpu), svm->next_rip); kvm_rip_write(vcpu, svm->next_rip); - svm_set_interrupt_shadow(vcpu, 0); } static int has_svm(void)