From: "Roedel, Joerg" <Joerg.Roedel@amd.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"avi@redhat.com" <avi@redhat.com>,
"mtosatti@redhat.com" <mtosatti@redhat.com>,
"agraf@suse.de" <agraf@suse.de>
Subject: Re: [PATCHv2] SVM: do not generate "external interrupt exit" if other exit is pending
Date: Mon, 20 Sep 2010 10:51:49 +0200 [thread overview]
Message-ID: <20100920085149.GM7972@amd.com> (raw)
In-Reply-To: <20100920081532.GG3008@redhat.com>
On Mon, Sep 20, 2010 at 04:15:32AM -0400, Gleb Natapov wrote:
> Nested SVM checks for external interrupt after injecting nested exception.
> In case there is external interrupt pending the code generates "external
> interrupt exit" and overwrites previous exit info. If previously injected
> exception already generated exit it will be lost.
>
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Acked-by: Joerg Roedel <joerg.roedel@amd.com>
> ---
> v1->v2
> - Added comment
>
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index 43f5558..ca778d5 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -1707,6 +1707,14 @@ static inline bool nested_svm_intr(struct vcpu_svm *svm)
> if (!(svm->vcpu.arch.hflags & HF_HIF_MASK))
> return false;
>
> + /*
> + * if vmexit was already requested (by intercepted exception
> + * for instance) do not overwrite it with "external interrupt"
> + * vmexit.
> + */
> + if (svm->nested.exit_required)
> + return false;
> +
> svm->vmcb->control.exit_code = SVM_EXIT_INTR;
> svm->vmcb->control.exit_info_1 = 0;
> svm->vmcb->control.exit_info_2 = 0;
> --
> Gleb.
>
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
next prev parent reply other threads:[~2010-09-20 9:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-20 8:15 [PATCHv2] SVM: do not generate "external interrupt exit" if other exit is pending Gleb Natapov
2010-09-20 8:51 ` Roedel, Joerg [this message]
2010-09-20 19:06 ` Marcelo Tosatti
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=20100920085149.GM7972@amd.com \
--to=joerg.roedel@amd.com \
--cc=agraf@suse.de \
--cc=avi@redhat.com \
--cc=gleb@redhat.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