summaryrefslogtreecommitdiff
path: root/hw/pci
diff options
context:
space:
mode:
authorChen Fan <chen.fan.fnst@cn.fujitsu.com>2016-02-19 09:42:27 -0700
committerAlex Williamson <alex.williamson@redhat.com>2016-02-19 09:42:27 -0700
commit79095ef717957e24dbcba026bb21f5990ceace88 (patch)
tree4140efb447ea31c811c44c514e18bb66548d4017 /hw/pci
parent1b3337bb1d1c3125a2140c47629f36540ac57605 (diff)
downloadqemu-79095ef717957e24dbcba026bb21f5990ceace88.tar.gz
pcie: modify the capability size assert
Device's Offset and size can reach PCIE_CONFIG_SPACE_SIZE, fix the corresponding assert. Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/pci')
-rw-r--r--hw/pci/pcie.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 435a6cfd57..4aca0c5912 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));