summaryrefslogtreecommitdiffstats
path: root/hw/pci
diff options
context:
space:
mode:
authorChen Fan2016-02-19 17:42:27 +0100
committerAlex Williamson2016-02-19 17:42:27 +0100
commit79095ef717957e24dbcba026bb21f5990ceace88 (patch)
tree4140efb447ea31c811c44c514e18bb66548d4017 /hw/pci
parentMerge remote-tracking branch 'remotes/armbru/tags/pull-error-2016-02-19' into... (diff)
downloadqemu-79095ef717957e24dbcba026bb21f5990ceace88.tar.gz
qemu-79095ef717957e24dbcba026bb21f5990ceace88.tar.xz
qemu-79095ef717957e24dbcba026bb21f5990ceace88.zip
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));