msix: fix irqchip breakage
PATCH 1/1 msix: fix irqchip breakage
msix.c doesn't include linux kvm header anymore, so IRQCHIP macro is never defined, which resulted in a broken msix support. As a fix, stub out kvm_set_irq and remove the remaining ifdefs.
Signed-off-by Michael S. Tsirkin <[email protected]>
--- hw/msix.c | 2 -- kvm-stub.c | 6 ++++++ kvm.h | 2 ++ qemu-kvm.h | 1 - 4 files changed, 8 insertions(+), 3 deletions(-)
hw/msix.c +0 -2
@@ -509,12 +509,10 @@ void msix_notify(PCIDevice *dev, unsigned vector)return ; } -#ifdef KVM_CAP_IRQCHIP if (kvm_enabled () &&kvm_irqchip_in_kernel ()) {kvm_set_irq (dev->msix_irq_entries[vector].gsi,1 ,NULL );return ; } -#endif address =pci_get_long (table_entry +MSIX_MSG_UPPER_ADDR ); address = (address <<32 ) |pci_get_long (table_entry +MSIX_MSG_ADDR );
kvm-stub.c +6 -0
@@ -176,3 +176,9 @@ int kvm_commit_irq_routes(void) {return -ENOSYS ; } + +int kvm_set_irq (int irq,int level,int *status) +{ +assert (0 ); +return -ENOSYS ; +}
kvm.h +2 -0
@@ -214,4 +214,6 @@ int kvm_commit_irq_routes(void);int kvm_irqchip_in_kernel (void ); +int kvm_set_irq (int irq,int level,int *status); +#endif
qemu-kvm.h +0 -1
@@ -785,7 +785,6 @@ void kvm_load_lapic(CPUState *env);void kvm_hpet_enable_kpit (void );void kvm_hpet_disable_kpit (void ); -int kvm_set_irq (int irq,int level,int *status);int kvm_physical_memory_set_dirty_tracking (int enable);
Signature · 1 line
1.7.3-rc1
Marcelo Tosatti
AppliedQuoted 5 lines · Michael S. Tsirkin
msix.cdoesn't include linux kvm header anymore, so IRQCHIP macro is never defined, which resulted in a broken msix support. As a fix, stub outkvm_set_irqand remove the remaining ifdefs.
Quoted 7 lines
Signed-off-by Michael S. Tsirkin <[email protected]>--- hw/msix.c | 2 -- kvm-stub.c | 6 ++++++ kvm.h | 2 ++ qemu-kvm.h | 1 - 4 files changed, 8 insertions(+), 3 deletions(-)
Applied both, thanks.