lkml.org 
[lkml]   [2021]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH v3 16/59] KVM: x86: Add per-VM flag to disable direct IRQ injection
On Fri, Nov 26, 2021 at 3:44 PM <isaku.yamahata@intel.com> wrote:

> static int dm_request_for_irq_injection(struct kvm_vcpu *vcpu)
> {
> return vcpu->run->request_interrupt_window &&
> + !vcpu->kvm->arch.irq_injection_disallowed &&
> likely(!pic_in_kernel(vcpu->kvm));
> }


Just judged superficially by the function names, it seems that the
logic is better to be put in kvm_cpu_accept_dm_intr() or some deeper
function nested in kvm_cpu_accept_dm_intr().

The function name will tell us that the interrupt is not injected
because the CPU doesn't accept it. And it will also have an effect
that vcpu->run->ready_for_interrupt_injection will always be false
which I think is better to have for TDX.

>
> --
> 2.25.1
>

\
 
 \ /
  Last update: 2021-11-29 03:53    [W:1.793 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site