On Tue, Jun 27, 2017 at 03:59:51PM +0200, Andrew Jones wrote: > On Tue, Jun 27, 2017 at 03:00:10PM +0200, Alexander Graf wrote: > > > > + /* XXX PMU IRQ is missing */ > > > > > > So I was wondering why you chose not to wire up the PMU in order to finish > > > > Because the PMU IRQ is only available from the machine file, so it'll need > > some more plumbing to get the qemu_irq object available from kvm.c. > > OK, I just wrote a patch based on this patch for the PMU and will post it > in a second. > > > > > > this off, since I knew KVM has commit 3dbbdf78636e "KVM: arm/arm64: Report > > > PMU overflow interrupts to userspace irqchip", which I presume should > > > allow the PMU to work too. However, attempting to start a guest with > > > -machine virt,accel=kvm,kernel-irqchip=off -cpu host,pmu=on doesn't provide > > > it a PMU. AFAICT, that's only because KVM still has > > > > > > /* > > > * We currently require an in-kernel VGIC to use the PMU emulation, > > > * because we do not support forwarding PMU overflow interrupts to > > > * userspace yet. > > > */ > > > if (!irqchip_in_kernel(vcpu->kvm) || !vgic_initialized(vcpu->kvm)) > > > return -ENODEV; > > > > > > in kvm_arm_pmu_v3_init(). Anyone know why that wasn't removed with > > > 3dbbdf78636e? Eh, I missed a2befacf5094 "KVM: arm64: Allow creating the PMU without the in-kernel GIC", which is still in kvmarm/queue, not yet in Linus master. I'll have to revisit the QEMU patch I wrote to make sure it still makes sense. drew