lkml.org 
[lkml]   [2023]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 07/11] KVM: x86: add a delayed hardware NMI injection interface
From
On 2/1/2023 2:42 AM, Sean Christopherson wrote:
> On Sat, Jan 28, 2023, Sean Christopherson wrote:
>> On Tue, Nov 29, 2022, Maxim Levitsky wrote:
>>> @@ -10015,13 +10022,34 @@ static void process_nmi(struct kvm_vcpu *vcpu)
>>> * Otherwise, allow two (and we'll inject the first one immediately).
>>> */
>>> if (static_call(kvm_x86_get_nmi_mask)(vcpu) || vcpu->arch.nmi_injected)
>>> - limit = 1;
>>> + limit--;
>>> +
>>> + /* Also if there is already a NMI hardware queued to be injected,
>>> + * decrease the limit again
>>> + */
>>
>> /*
>> * Block comment ...
>> */
>>
>>> + if (static_call(kvm_x86_get_hw_nmi_pending)(vcpu))
>>
>> I'd prefer "is_hw_nmi_pending()" over "get", even if it means not pairing with
>> "set". Though I think that's a good thing since they aren't perfect pairs.
>
> Thinking more, I vote for s/hw_nmi/vnmi. "hardware" usually means actual hardware,
> i.e. a pending NMI for the host.

Ah!,. better.

Thanks,
Santosh

\
 
 \ /
  Last update: 2023-03-27 00:14    [W:0.069 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site