qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCHv2 RFC] qemu/msix: remove msix_supported safety flag
@ 2009-06-21 17:04 Michael S. Tsirkin
  0 siblings, 0 replies; only message in thread
From: Michael S. Tsirkin @ 2009-06-21 17:04 UTC (permalink / raw)
  To: Paul Brook, Avi Kivity, qemu-devel, Carsten Otte, kvm,
	Rusty Russell, virtualization, Christian Borntraeger, Blue Swirl,
	Anthony Liguori, Glauber Costa

Don't add an option for platforms to disable MSI-X in all devices.
Paul Brook will find and fix all platforms that have broken MSI-X
emulation.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---

This patch on top of my msix series v6 is a bit tongue in cheek: it
shows what can be done and Paul seems to think it's a good idea. So even
though I don't necessarily agree, I'll let others decide on it.

Changes since v1:
  rebased on top of MSIXv6.

 hw/apic.c |    1 -
 hw/msix.c |    7 -------
 hw/msix.h |    2 --
 3 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/hw/apic.c b/hw/apic.c
index 3bcab46..2ac87d1 100644
--- a/hw/apic.c
+++ b/hw/apic.c
@@ -965,7 +965,6 @@ int apic_init(CPUState *env)
     s->cpu_env = env;
 
     apic_reset(s);
-    msix_supported = 1;
 
     /* XXX: mapping more APICs at the same memory location */
     if (apic_io_memory == 0) {
diff --git a/hw/msix.c b/hw/msix.c
index 773581f..6eb51c3 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -59,9 +59,6 @@
 #define DEBUG(fmt, ...) do { } while(0)
 #endif
 
-/* Flag for interrupt controller to declare MSI-X support */
-int msix_supported;
-
 /* Add MSI-X capability to the config space for the device. */
 /* Given a bar and its size, add MSI-X table on top of it
  * and fill MSI-X capability in the config space.
@@ -227,10 +224,6 @@ int msix_init(struct PCIDevice *dev, unsigned short nentries,
               unsigned bar_nr, unsigned bar_size)
 {
     int ret;
-    /* Nothing to do if MSI is not supported by interrupt controller */
-    if (!msix_supported)
-        return -ENOTSUP;
-
     if (nentries > MSIX_MAX_ENTRIES)
         return -EINVAL;
 
diff --git a/hw/msix.h b/hw/msix.h
index 3427778..27f2dad 100644
--- a/hw/msix.h
+++ b/hw/msix.h
@@ -29,6 +29,4 @@ void msix_notify(PCIDevice *dev, unsigned vector);
 
 void msix_reset(PCIDevice *dev);
 
-extern int msix_supported;
-
 #endif
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-21 17:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-21 17:04 [Qemu-devel] [PATCHv2 RFC] qemu/msix: remove msix_supported safety flag Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).