[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <559AA7FA.5010804@arm.com>
Date: Mon, 6 Jul 2015 17:08:26 +0100
From: Andre Przywara <andre.przywara@....com>
To: Paolo Bonzini <pbonzini@...hat.com>,
Pavel Fedin <p.fedin@...sung.com>,
"'Christoffer Dall'" <christoffer.dall@...aro.org>
Cc: "'Eric Auger'" <eric.auger@...aro.org>,
"eric.auger@...com" <eric.auger@...com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Marc Zyngier <Marc.Zyngier@....com>,
"kvmarm@...ts.cs.columbia.edu" <kvmarm@...ts.cs.columbia.edu>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/7] KVM: api: add kvm_irq_routing_extended_msi
On 06/07/15 16:54, Paolo Bonzini wrote:
>
>
> On 06/07/2015 17:37, Andre Przywara wrote:
>> Wouldn't:
>> if (kvm_vm_check_extension(s, KVM_CAP_MSI_DEVID)) {
>> kroute.flags = KVM_MSI_VALID_DEVID;
>> kroute.u.msi.devid = (pci_bus_num(dev->bus) << 8) | dev->devfn;
>> }
>>
>> be saner (without a global variable)?
>> That would make the interface more consistent, with a new flag being
>> protected by a new capability.
>
> I agree that your version is niceer, but you still need to cache the
> kvm_vm_check_extension result... in a global variable. :)
I used a static variable in a wrapper function in kvmtool ;-)
TBH my argument wasn't so much about global variables (just saw that
QEMU seems to use them already), but more about a consistent and
architecture agnostic interface.
Ciao!
Andre.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists