lkml.org 
[lkml]   [2021]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] KVM: x86: Use a stable condition around all VT-d PI paths
From
On 11/16/21 18:42, Sean Christopherson wrote:
>> + return kvm_arch_has_assigned_device(kvm) &&
>> + irq_remapping_cap(IRQ_POSTING_CAP) &&
>> + irqchip_in_kernel(kvm) && enable_apicv;
> Bad indentation/alignment.

What is even the right indentation? I'd just wrap everything in
parentheses but then check patch complains "return is not a function"
(NSS), so I went for two tabs and called it a day.

> Not that it's likely to matter, but would it make sense to invert the checks so
> that they're short-circuited on the faster KVM checks? E.g. fastest to slowest:
>
> return irqchip_in_kernel(kvm) && enable_apic &&
> kvm_arch_has_assigned_device(kvm) &&
> irq_remapping_cap(IRQ_POSTING_CAP);

Sure, why not.

Paolo

\
 
 \ /
  Last update: 2021-11-16 18:58    [W:0.062 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site