[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/4] pcie: modify the capability size assert
From: |
Cao jin |
Subject: |
[Qemu-devel] [PATCH 1/4] pcie: modify the capability size assert |
Date: |
Thu, 4 Feb 2016 09:31:05 +0800 |
From: Chen Fan <address@hidden>
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>
Reviewed-by: Michael S. Tsirkin <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 435a6cf..4aca0c5 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -608,7 +608,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] [PATCH 0/4] vfio-pci: pass the aer error to guest, part1, Cao jin, 2016/02/03
- [Qemu-devel] [PATCH 1/4] pcie: modify the capability size assert,
Cao jin <=
- [Qemu-devel] [PATCH 2/4] vfio: make the 4 bytes aligned for capability size, Cao jin, 2016/02/03
- [Qemu-devel] [PATCH 4/4] pcie_aer: expose pcie_aer_msg() interface, Cao jin, 2016/02/03
- [Qemu-devel] [PATCH 3/4] aer: impove pcie_aer_init to support vfio device, Cao jin, 2016/02/03
- Re: [Qemu-devel] [PATCH 0/4] vfio-pci: pass the aer error to guest, part1, Michael S. Tsirkin, 2016/02/04