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>
This commit is contained in:
parent
1b3337bb1d
commit
79095ef717
|
@ -608,7 +608,7 @@ void pcie_add_capability(PCIDevice *dev,
|
||||||
|
|
||||||
assert(offset >= PCI_CONFIG_SPACE_SIZE);
|
assert(offset >= PCI_CONFIG_SPACE_SIZE);
|
||||||
assert(offset < offset + size);
|
assert(offset < offset + size);
|
||||||
assert(offset + size < PCIE_CONFIG_SPACE_SIZE);
|
assert(offset + size <= PCIE_CONFIG_SPACE_SIZE);
|
||||||
assert(size >= 8);
|
assert(size >= 8);
|
||||||
assert(pci_is_express(dev));
|
assert(pci_is_express(dev));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue