qemu/msix: remove msix_supported safety flag
RFC PATCH v2 1/1 qemu/msix: remove msix_supported safety flag
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 <[email protected]>
---
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(-)
hw/apic.c +0 -1
@@ -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 ) {
hw/msix.c +0 -7
@@ -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 ;
hw/msix.h +0 -2
@@ -29,6 +29,4 @@ void msix_notify(PCIDevice *dev, unsigned vector);void msix_reset (PCIDevice *dev); -extern int msix_supported; -#endif
Signature · 1 line
1.6.2.2