From: Gleb Natapov <gleb@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>,
"Nadav Har'El" <nyh@math.technion.ac.il>
Subject: Re: [PATCH v2 1/5] KVM: nVMX: Fix injection of PENDING_INTERRUPT and NMI_WINDOW exits to L1
Date: Sun, 17 Mar 2013 15:47:01 +0200 [thread overview]
Message-ID: <20130317134701.GJ11223@redhat.com> (raw)
In-Reply-To: <dc3b74709bcc4163ec3b6276f482d0400ecec290.1363429383.git.jan.kiszka@web.de>
On Sat, Mar 16, 2013 at 11:23:15AM +0100, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Check if the interrupt or NMI window exit is for L1 by testing if it has
> the corresponding controls enabled. This is required when we allow
> direct injection from L0 to L2
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Gleb Natapov <gleb@redhat.com>
> ---
> arch/x86/kvm/vmx.c | 9 ++-------
> 1 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index ad978a6..126d047 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -6111,14 +6111,9 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
> case EXIT_REASON_TRIPLE_FAULT:
> return 1;
> case EXIT_REASON_PENDING_INTERRUPT:
> + return nested_cpu_has(vmcs12, CPU_BASED_VIRTUAL_INTR_PENDING);
> case EXIT_REASON_NMI_WINDOW:
> - /*
> - * prepare_vmcs02() set the CPU_BASED_VIRTUAL_INTR_PENDING bit
> - * (aka Interrupt Window Exiting) only when L1 turned it on,
> - * so if we got a PENDING_INTERRUPT exit, this must be for L1.
> - * Same for NMI Window Exiting.
> - */
> - return 1;
> + return nested_cpu_has(vmcs12, CPU_BASED_VIRTUAL_NMI_PENDING);
> case EXIT_REASON_TASK_SWITCH:
> return 1;
> case EXIT_REASON_CPUID:
> --
> 1.7.3.4
--
Gleb.
next prev parent reply other threads:[~2013-03-17 13:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-16 10:23 [PATCH v2 0/5] KVM: nVMX: Make direct IRQ/NMI injection work Jan Kiszka
2013-03-16 10:23 ` [PATCH v2 1/5] KVM: nVMX: Fix injection of PENDING_INTERRUPT and NMI_WINDOW exits to L1 Jan Kiszka
2013-03-17 13:47 ` Gleb Natapov [this message]
2013-03-16 10:23 ` [PATCH v2 2/5] KVM: nVMX: Rework event injection and recovery Jan Kiszka
2013-03-17 13:45 ` Gleb Natapov
2013-03-17 15:02 ` Jan Kiszka
2013-03-17 15:14 ` Gleb Natapov
2013-03-17 15:17 ` Jan Kiszka
2013-03-17 15:19 ` Gleb Natapov
2013-03-16 10:23 ` [PATCH v2 3/5] KVM: VMX: Move vmx_nmi_allowed after vmx_set_nmi_mask Jan Kiszka
2013-03-16 10:23 ` [PATCH v2 4/5] KVM: nVMX: Fix conditions for interrupt injection Jan Kiszka
2013-03-16 10:23 ` [PATCH v2 5/5] KVM: nVMX: Fix conditions for NMI injection Jan Kiszka
2013-03-16 10:42 ` [PATCH v2 0/5] KVM: nVMX: Make direct IRQ/NMI injection work Jan Kiszka
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=20130317134701.GJ11223@redhat.com \
--to=gleb@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=nyh@math.technion.ac.il \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.