lkml.org 
[lkml]   [2021]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] KVM: x86: accept userspace interrupt only if no event is injected
Date
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

\
 
 \ /
  Last update: 2021-07-27 23:11    [W:0.035 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site