From: Paolo Bonzini <pbonzini@redhat.com>
To: Sean Christopherson <seanjc@google.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH 2/4] KVM: VMX: prepare sync_pir_to_irr for running with APICv disabled
Date: Tue, 30 Nov 2021 09:31:05 +0100 [thread overview]
Message-ID: <64c3e26a-1f58-c121-3a42-38e70fb6f77e@redhat.com> (raw)
In-Reply-To: <YaVQxZ42Ve6JNIzt@google.com>
On 11/29/21 23:14, Sean Christopherson wrote:
> Heh, maybe s/max_irr_updated/new_pir_found or so? This is a bit weird:
>
> 1. Update max_irr
> 2. max_irr_updated = false
Sounds good (I went for got_posted_interrupt).
>> }
>> - vmx_hwapic_irr_update(vcpu, max_irr);
>> +
>> + /*
>> + * If virtual interrupt delivery is not in use, the interrupt
>> + * will be processed via KVM_REQ_EVENT, not RVI. This can happen
>
> I'd strongly prefer to phrase this as a command, e.g. "process the interrupt via
> KVM_REQ_EVENT". "will be processed" makes it sound like some other flow is
> handling the event, which confused me.
What I wanted to convey is that the interrupt is not processed yet, and
the vmentry might have to be canceled. I changed it to
* Newly recognized interrupts are injected via either virtual
interrupt
* delivery (RVI) or KVM_REQ_EVENT. Virtual interrupt delivery is
* disabled in two cases:
> * 1) If L2 is running and the vCPU has a new pending interrupt. If L1
> * wants to exit on interrupts, KVM_REQ_EVENT is needed to synthesize a
> * VM-Exit to L1. If L1 doesn't want to exit, the interrupt is injected
> * into L2, but KVM doesn't use virtual interrupt delivery to inject
> * interrupts into L2, and so KVM_REQ_EVENT is again needed.
> *
> * 2) If APICv is disabled for this vCPU, assigned devices may still
> * attempt to post interrupts. The posted interrupt vector will cause
> * a VM-Exit and the subsequent entry will call sync_pir_to_irr.
> */
Applied these.
Paolo
next prev parent reply other threads:[~2021-11-30 8:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-23 0:43 [PATCH 0/4] KVM: VMX: process posted interrupts on APICv-disable vCPUs Paolo Bonzini
2021-11-23 0:43 ` [PATCH 1/4] KVM: x86: ignore APICv if LAPIC is not enabled Paolo Bonzini
2021-11-25 1:36 ` Sean Christopherson
2021-11-29 23:32 ` David Matlack
2021-11-30 7:50 ` Maxim Levitsky
2021-11-23 0:43 ` [PATCH 2/4] KVM: VMX: prepare sync_pir_to_irr for running with APICv disabled Paolo Bonzini
2021-11-29 22:14 ` Sean Christopherson
2021-11-30 8:31 ` Paolo Bonzini [this message]
2021-11-29 23:34 ` David Matlack
2021-11-30 7:57 ` Maxim Levitsky
2021-11-23 0:43 ` [PATCH 3/4] KVM: x86: check PIR even for vCPUs with disabled APICv Paolo Bonzini
2021-11-29 23:39 ` David Matlack
2021-11-30 7:58 ` Maxim Levitsky
2021-11-23 0:43 ` [PATCH 4/4] KVM: x86: Use a stable condition around all VT-d PI paths Paolo Bonzini
2021-11-29 23:41 ` David Matlack
2021-11-30 8:05 ` Maxim Levitsky
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=64c3e26a-1f58-c121-3a42-38e70fb6f77e@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=seanjc@google.com \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®