* [PATCH] msix: fix irqchip breakage
@ 2010-10-20 5:09 Michael S. Tsirkin
2010-10-20 17:37 ` Marcelo Tosatti
0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2010-10-20 5:09 UTC (permalink / raw)
To: Marcelo Tosatti, kvm
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 <mst@redhat.com>
---
hw/msix.c | 2 --
kvm-stub.c | 6 ++++++
kvm.h | 2 ++
qemu-kvm.h | 1 -
4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/hw/msix.c b/hw/msix.c
index f12e4aa..4b6133d 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -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);
diff --git a/kvm-stub.c b/kvm-stub.c
index 3c2deec..aeee3c0 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -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;
+}
diff --git a/kvm.h b/kvm.h
index d484a3f..74dfa48 100644
--- a/kvm.h
+++ b/kvm.h
@@ -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
diff --git a/qemu-kvm.h b/qemu-kvm.h
index 9c08ab4..c6f5632 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -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);
--
1.7.3-rc1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] msix: fix irqchip breakage
2010-10-20 5:09 [PATCH] msix: fix irqchip breakage Michael S. Tsirkin
@ 2010-10-20 17:37 ` Marcelo Tosatti
0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2010-10-20 17:37 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: kvm
On Wed, Oct 20, 2010 at 07:09:37AM +0200, Michael S. Tsirkin wrote:
> 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 <mst@redhat.com>
> ---
> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-20 17:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-20 5:09 [PATCH] msix: fix irqchip breakage Michael S. Tsirkin
2010-10-20 17:37 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox