[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [v11 03/15] pcie: modify the capability size assert
From: |
Chen Fan |
Subject: |
[Qemu-devel] [v11 03/15] pcie: modify the capability size assert |
Date: |
Wed, 24 Jun 2015 17:45:56 +0800 |
Device's Offset and size can reach PCIE_CONFIG_SPACE_SIZE,
fix the corresponding assert.
Signed-off-by: Chen Fan <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>
---
hw/pci/pcie.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 1463e65..6cdd4a1 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -595,7 +595,7 @@ void pcie_add_capability(PCIDevice *dev,
assert(offset >= PCI_CONFIG_SPACE_SIZE);
assert(offset < offset + size);
- assert(offset + size < PCIE_CONFIG_SPACE_SIZE);
+ assert(offset + size <= PCIE_CONFIG_SPACE_SIZE);
assert(size >= 8);
assert(pci_is_express(dev));
--
1.9.3
- [Qemu-devel] [v11 00/15] vfio-pci: pass the aer error to guest, Chen Fan, 2015/06/24
- [Qemu-devel] [v11 04/15] vfio: make the 4 bytes aligned for capability size, Chen Fan, 2015/06/24
- [Qemu-devel] [v11 01/15] vfio: extract vfio_get_hot_reset_info as a single function, Chen Fan, 2015/06/24
- [Qemu-devel] [v11 03/15] pcie: modify the capability size assert,
Chen Fan <=
- [Qemu-devel] [v11 02/15] vfio: squeeze out vfio_pci_do_hot_reset for support bus reset, Chen Fan, 2015/06/24
- [Qemu-devel] [v11 05/15] vfio: add pcie extanded capability support, Chen Fan, 2015/06/24
- [Qemu-devel] [v11 06/15] aer: impove pcie_aer_init to support vfio device, Chen Fan, 2015/06/24
- [Qemu-devel] [v11 09/15] pci: add bus reset_notifiers callbacks for host bus reset, Chen Fan, 2015/06/24
- [Qemu-devel] [v11 10/15] vfio: add sec_bus_reset notifier to notify physical bus reset is needed, Chen Fan, 2015/06/24
- [Qemu-devel] [v11 11/15] vfio: modify vfio_pci_hot_reset to support bus reset, Chen Fan, 2015/06/24
- [Qemu-devel] [v11 08/15] vfio: add check host bus reset is support or not, Chen Fan, 2015/06/24
- [Qemu-devel] [v11 12/15] vfio: do hot bus reset when do virtual secondary bus reset, Chen Fan, 2015/06/24
- [Qemu-devel] [v11 13/15] pcie_aer: expose pcie_aer_msg() interface, Chen Fan, 2015/06/24
- [Qemu-devel] [v11 07/15] vfio: add aer support for vfio device, Chen Fan, 2015/06/24