[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 09/88] pci: Use bus master address space for deliver
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 09/88] pci: Use bus master address space for delivering MSI/MSI-X messages |
Date: |
Thu, 8 Jan 2015 11:33:13 -0600 |
From: Jan Kiszka <address@hidden>
The spec says (and real HW confirms this) that, if the bus master bit
is 0, the device will not generate any PCI accesses. MSI and MSI-X
messages fall among these, so we should use the corresponding address
space to deliver them. This will prevent delivery if bus master support
is disabled.
Cc: address@hidden
Signed-off-by: Jan Kiszka <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
(cherry picked from commit cc943c36faa192cd4b32af8fe5edb31894017d35)
Signed-off-by: Michael Roth <address@hidden>
---
hw/pci/msi.c | 2 +-
hw/pci/msix.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/pci/msi.c b/hw/pci/msi.c
index a4a3040..52d2313 100644
--- a/hw/pci/msi.c
+++ b/hw/pci/msi.c
@@ -291,7 +291,7 @@ void msi_notify(PCIDevice *dev, unsigned int vector)
"notify vector 0x%x"
" address: 0x%"PRIx64" data: 0x%"PRIx32"\n",
vector, msg.address, msg.data);
- stl_le_phys(&address_space_memory, msg.address, msg.data);
+ stl_le_phys(&dev->bus_master_as, msg.address, msg.data);
}
/* Normally called by pci_default_write_config(). */
diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index 5c49bfc..20ae476 100644
--- a/hw/pci/msix.c
+++ b/hw/pci/msix.c
@@ -439,7 +439,7 @@ void msix_notify(PCIDevice *dev, unsigned vector)
msg = msix_get_message(dev, vector);
- stl_le_phys(&address_space_memory, msg.address, msg.data);
+ stl_le_phys(&dev->bus_master_as, msg.address, msg.data);
}
void msix_reset(PCIDevice *dev)
--
1.9.1
- [Qemu-devel] Patch Round-up for stable 2.1.3, freeze on 2015-01-14, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 02/88] qdev: Add cleanup logic in device_set_realized() to avoid resource leak, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 04/88] xhci PCIe endpoint migration compatibility fix, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 01/88] qdev: Use NULL instead of local_err for qbus_child unrealize, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 03/88] exec: file_ram_alloc(): print error when prealloc fails, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 10/88] virtio-pci: enable bus master for old guests, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 05/88] Introduce cpu_clean_all_dirty, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 08/88] kvmclock: Add comment explaining why we need cpu_clean_all_dirty(), Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 09/88] pci: Use bus master address space for delivering MSI/MSI-X messages,
Michael Roth <=
- [Qemu-devel] [PATCH 07/88] kvmclock: Ensure time in migration never goes backward, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 06/88] kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 12/88] hw/arm/virt: fix pl011 and pl031 irq flags, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 13/88] gdbstub: init mon_chr through qemu_chr_alloc, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 14/88] qapi: add visit_start_union and visit_end_union, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 11/88] spapr_pci: map the MSI window in each PHB, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 15/88] qapi: dealloc visitor, implement visit_start_union, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 16/88] tests: add QMP input visitor test for unions with no discriminator, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 17/88] qemu-iotests: Test missing "driver" key for blockdev-add, Michael Roth, 2015/01/08
- [Qemu-devel] [PATCH 18/88] monitor: Reset HMP mon->rs in CHR_EVENT_OPEN, Michael Roth, 2015/01/08