[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 21/37] pcie: Remove redundant test in pcie_mmcfg_data
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 21/37] pcie: Remove redundant test in pcie_mmcfg_data_{read, write}() |
Date: |
Thu, 16 May 2019 08:19:56 -0400 |
From: David Gibson <address@hidden>
These functions have an explicit test for accesses above the device's
config size. But pci_host_config_{read,write}_common() which they're
about to call already have checks against the config space limit and
do the right thing. So, remove the redundant tests.
Signed-off-by: David Gibson <address@hidden>
Message-Id: <address@hidden>
---
hw/pci/pcie_host.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/hw/pci/pcie_host.c b/hw/pci/pcie_host.c
index 553db56778..1ee4945a6d 100644
--- a/hw/pci/pcie_host.c
+++ b/hw/pci/pcie_host.c
@@ -47,11 +47,6 @@ static void pcie_mmcfg_data_write(void *opaque, hwaddr
mmcfg_addr,
}
addr = PCIE_MMCFG_CONFOFFSET(mmcfg_addr);
limit = pci_config_size(pci_dev);
- if (limit <= addr) {
- /* conventional pci device can be behind pcie-to-pci bridge.
- 256 <= addr < 4K has no effects. */
- return;
- }
pci_host_config_write_common(pci_dev, addr, limit, val, len);
}
@@ -70,11 +65,6 @@ static uint64_t pcie_mmcfg_data_read(void *opaque,
}
addr = PCIE_MMCFG_CONFOFFSET(mmcfg_addr);
limit = pci_config_size(pci_dev);
- if (limit <= addr) {
- /* conventional pci device can be behind pcie-to-pci bridge.
- 256 <= addr < 4K has no effects. */
- return ~0x0;
- }
return pci_host_config_read_common(pci_dev, addr, limit, len);
}
--
MST
- [Qemu-devel] [PULL 13/37] acpi/pcihp: Add a few more trace points related to unplug, (continued)
- [Qemu-devel] [PULL 13/37] acpi/pcihp: Add a few more trace points related to unplug, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 14/37] q35: acpi: do not create dummy MCFG table, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 15/37] do not call vhost_net_cleanup() on running net from char user event, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 16/37] hw/arm/virt-acpi-build: remove unnecessary variable mcfg_start, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 17/37] i386, acpi: remove mcfg_ prefix in AcpiMcfgInfo members, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 18/37] hw/arm/virt-acpi-build: pass AcpiMcfgInfo to build_mcfg(), Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 19/37] hw/acpi: Consolidate build_mcfg to pci.c, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 20/37] libvhost-user: fix bad vu_log_write, Michael S. Tsirkin, 2019/05/16
- [Qemu-devel] [PULL 21/37] pcie: Remove redundant test in pcie_mmcfg_data_{read, write}(),
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 22/37] pci: Simplify pci_bus_is_root(), Michael S. Tsirkin, 2019/05/16
- Re: [Qemu-devel] [PULL 00/37] pci, pc, virtio: features, fixes, Peter Maydell, 2019/05/16
- Re: [Qemu-devel] [PULL 00/37] pci, pc, virtio: features, fixes, Philippe Mathieu-Daudé, 2019/05/16
- Re: [Qemu-devel] [PULL 00/37] pci, pc, virtio: features, fixes, Philippe Mathieu-Daudé, 2019/05/16
- Re: [Qemu-devel] [PULL 00/37] pci, pc, virtio: features, fixes, Wei Yang, 2019/05/16
- Re: [Qemu-devel] [PULL 00/37] pci, pc, virtio: features, fixes, Philippe Mathieu-Daudé, 2019/05/17
- Re: [Qemu-devel] [PULL 00/37] pci, pc, virtio: features, fixes, Thomas Huth, 2019/05/17
- Re: [Qemu-devel] [PULL 00/37] pci, pc, virtio: features, fixes, Philippe Mathieu-Daudé, 2019/05/17
- Re: [Qemu-devel] [PULL 00/37] pci, pc, virtio: features, fixes, Wei Yang, 2019/05/16