Re: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-12-01 Thread Paolo Bonzini
On 30/11/2015 15:38, Cornelia Huck wrote: > It obviously > requires an irqchip; but if you need some configuration/enablement > beforehand, you'll get different values depending on when you retrieve > the cap. So does KVM_CAP_IRQFD mean "irqfds are available in principle" > or "everything has

RE: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-12-01 Thread Pavel Fedin
'Marc Zyngier'; > 'Christoffer Dall'; > 'Gleb Natapov'; 'Paolo Bonzini' > Subject: Re: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on > KVM_CAP_IRQCHIP > > On Mon, 30 Nov 2015 15:41:20 +0300 > Pavel Fedin <p.fe...@samsung.com> wrote: > > > Hello! > >

RE: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-11-30 Thread Pavel Fedin
Hello! > > case KVM_CAP_INTERNAL_ERROR_DATA: > > #ifdef CONFIG_HAVE_KVM_MSI > > case KVM_CAP_SIGNAL_MSI: > > + /* Fallthrough */ > > #endif > > + case KVM_CAP_CHECK_EXTENSION_VM: > > + return 1; > > #ifdef CONFIG_HAVE_KVM_IRQFD > > case KVM_CAP_IRQFD: > >

Re: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-11-30 Thread Cornelia Huck
On Mon, 30 Nov 2015 14:56:38 +0300 Pavel Fedin wrote: > Hello! > > > > case KVM_CAP_INTERNAL_ERROR_DATA: > > > #ifdef CONFIG_HAVE_KVM_MSI > > > case KVM_CAP_SIGNAL_MSI: > > > + /* Fallthrough */ > > > #endif > > > + case KVM_CAP_CHECK_EXTENSION_VM: > > > +

Re: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-11-30 Thread Cornelia Huck
On Mon, 30 Nov 2015 12:40:45 +0300 Pavel Fedin wrote: > Now at least ARM is able to determine whether the machine has > virtualization support for irqchip or not at runtime. Obviously, > irqfd requires irqchip. > > Signed-off-by: Pavel Fedin > --- >

[PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-11-30 Thread Pavel Fedin
Now at least ARM is able to determine whether the machine has virtualization support for irqchip or not at runtime. Obviously, irqfd requires irqchip. Signed-off-by: Pavel Fedin --- virt/kvm/kvm_main.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

RE: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-11-30 Thread Pavel Fedin
Hello! > > Thank you for the note, i didn't know about irqchip-specific capability > > codes. There's the > > same issue with PowerPC, now i > > understand why there's no KVM_CAP_IRQCHIP for them. Because they have > > KVM_CAP_IRQ_MPIC and > > KVM_CAP_IRQ_XICS, similar to S390. > > But isn't

Re: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-11-30 Thread Cornelia Huck
On Mon, 30 Nov 2015 15:41:20 +0300 Pavel Fedin wrote: > Hello! > > > > Thank you for the note, i didn't know about irqchip-specific capability > > > codes. There's the > > > same issue with PowerPC, now i > > > understand why there's no KVM_CAP_IRQCHIP for them. Because

RE: [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP

2015-11-30 Thread Pavel Fedin
Hello! > > b) I simply drop it as it is, because current qemu knows about the > > dependency and does not > try to use irqfd without irqchip, > > because there's simply no use for them. But, well, perhaps there would be > > an exception in > vhost, i don't remember testing it. > > Wouldn't