On Mon, Jul 10, 2017 at 04:27:35PM +0100, Peter Maydell wrote: > On 1 July 2017 at 17:47, Andrew Jones <drjo...@redhat.com> wrote: > > When adding a PMU with a userspace irqchip we only do the INIT > > stage of the device creation. > > Can you explain why? My assumption would be that either > (a) we don't need the kernel's PMU, in which case don't > create it at all, or > (b) we do need the kernel's PMU, so we should both create > and INIT it. > > If we do one but not the other then we've left a half > created and unusable PMU device in the kernel, haven't we? >
I should have renamed the 'create' function to 'set_irq', then it would make sense, because after the split done by this patch 'create' only sets the irq, which can only be done with an in-kernel irqchip. Both irqchip types still require INIT though, see kernel doc Documentation/virtual/kvm/devices/vcpu.txt. I'll send a v2 that renames the create function. But, before I do, assuming the rename, do you have another comments on this or the next patch? We might as well batch all the changes :-) Thanks, drew