[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ad1ede19-3b48-818a-5c6e-bab37e5c5539@intel.com>
Date: Tue, 3 May 2022 10:44:50 +0800
From: Zeng Guang <guang.zeng@...el.com>
To: Paolo Bonzini <pbonzini@...hat.com>,
"Christopherson,, Sean" <seanjc@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"Luck, Tony" <tony.luck@...el.com>,
Kan Liang <kan.liang@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
Kim Phillips <kim.phillips@....com>,
Jarkko Sakkinen <jarkko@...nel.org>,
Jethro Beekman <jethro@...tanix.com>,
"Huang, Kai" <kai.huang@...el.com>
Cc: "x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Hu, Robert" <robert.hu@...el.com>,
"Gao, Chao" <chao.gao@...el.com>
Subject: Re: [PATCH v9 9/9] KVM: VMX: enable IPI virtualization
On 5/3/2022 12:16 AM, Paolo Bonzini wrote:
> On 4/19/22 17:45, Zeng Guang wrote:
>> +static bool vmx_can_use_pi_wakeup(struct kvm_vcpu *vcpu)
>> +{
>> + /*
>> + * If a blocked vCPU can be the target of posted interrupts,
>> + * switching notification vector is needed so that kernel can
>> + * be informed when an interrupt is posted and get the chance
>> + * to wake up the blocked vCPU. For now, using posted interrupt
>> + * for vCPU wakeup when IPI virtualization or VT-d PI can be
>> + * enabled.
>> + */
>> + return vmx_can_use_ipiv(vcpu) || vmx_can_use_vtd_pi(vcpu->kvm);
>> +}
> Slightly more accurate name and comment:
>
> static bool vmx_needs_pi_wakeup(struct kvm_vcpu *vcpu)
> {
> /*
> * The default posted interrupt vector does nothing when
> * invoked outside guest mode. Return whether a blocked vCPU
> * can be the target of posted interrupts, as is the case when
> * using either IPI virtualization or VT-d PI, so that the
> * notification vector is switched to the one that calls
> * back to the pi_wakeup_handler() function.
> */
> return vmx_can_use_ipiv(vcpu) || vmx_can_use_vtd_pi(vcpu->kvm);
> }
>
>
> Paolo
Thanks. It's much accurate and better to describe the functionality of
this API.
I will change it.
Powered by blists - more mailing lists