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, Stas Sergeev <stsp2@yandex.ru>
Subject: Re: [PATCH v2] KVM: x86: accept userspace interrupt only if no event is injected
Date: Tue, 27 Jul 2021 23:08:38 +0200 [thread overview]
Message-ID: <9ae42cf8-e3e5-b8aa-ba86-d680feb09830@redhat.com> (raw)
In-Reply-To: <YQBzgtBXZ4SIz9jF@google.com>
On 27/07/21 22:58, Sean Christopherson wrote:
>> ---
>> arch/x86/kvm/x86.c | 12 +++++++++++-
>> 1 file changed, 11 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
>> index 4116567f3d44..5e921f1e00db 100644
>> --- a/arch/x86/kvm/x86.c
>> +++ b/arch/x86/kvm/x86.c
>> @@ -4358,8 +4358,18 @@ static int kvm_cpu_accept_dm_intr(struct kvm_vcpu *vcpu)
>>
>> static int kvm_vcpu_ready_for_interrupt_injection(struct kvm_vcpu *vcpu)
>> {
>> + /*
>> + * Do not cause an interrupt window exit if an exception
>> + * is pending or an event needs reinjection; userspace
>> + * might want to inject the interrupt manually using KVM_SET_REGS
>> + * or KVM_SET_SREGS. For that to work, we must be at an
>> + * instruction boundary and with no events half-injected.
>> + */
>> return kvm_arch_interrupt_allowed(vcpu) &&
>> - kvm_cpu_accept_dm_intr(vcpu);
>> + kvm_cpu_accept_dm_intr(vcpu) &&
>
> Opportunistically align this indentation?
Yep, good idea.
>> + !kvm_event_needs_reinjection(vcpu)
>
> Missing &&, apparently the mysterious cherry-pick didn't go so well :-)
Well, yeah. The only way I can excuse myself, is by not being the kind
of person that yells for such stupid things...
Paolo
prev parent reply other threads:[~2021-07-27 21:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-27 17:06 [PATCH v2] KVM: x86: accept userspace interrupt only if no event is injected Paolo Bonzini
2021-07-27 20:58 ` Sean Christopherson
2021-07-27 21:08 ` Paolo Bonzini [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=9ae42cf8-e3e5-b8aa-ba86-d680feb09830@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 \
--cc=stsp2@yandex.ru \
/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