diff options
author | Chen Fan <chen.fan.fnst@cn.fujitsu.com> | 2016-02-19 09:42:27 -0700 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:45:30 -0600 |
commit | 9544d1ebfd9987501a7a098c1a241d80c2889c15 (patch) | |
tree | be64eea6b48d9d0e9a6365e04494514c86c080b6 | |
parent | a702e1dfc8dd0fa30241e5e365ad57501acb4a28 (diff) | |
download | hqemu-9544d1ebfd9987501a7a098c1a241d80c2889c15.zip hqemu-9544d1ebfd9987501a7a098c1a241d80c2889c15.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>
-rw-r--r-- | hw/pci/pcie.c | 2 |
1 files changed, 1 insertions, 1 deletions
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)); |