From: Gleb Natapov <gleb@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: SVM: Always clear interrupt shadow in skip_emulated_instruction
Date: Tue, 16 Feb 2010 12:04:29 +0200 [thread overview]
Message-ID: <20100216100429.GD2995@redhat.com> (raw)
In-Reply-To: <4B7A6977.4020308@siemens.com>
On Tue, Feb 16, 2010 at 10:46:31AM +0100, Jan Kiszka wrote:
> 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 <jan.kiszka@siemens.com>
Obviously correct.
> ---
> 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)
--
Gleb.
prev parent reply other threads:[~2010-02-16 10:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-16 9:46 [PATCH] KVM: SVM: Always clear interrupt shadow in skip_emulated_instruction Jan Kiszka
2010-02-16 10:04 ` Gleb Natapov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100216100429.GD2995@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox