Skip to content

pciinit: fix overflow when bar allocation

Isaku Yamahata qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesIn review
  2. v22 patches 4 repliesSuperseded
  3. v12 patches 4 repliesSuperseded

Changes in v3 from the cover letter

- use [first, last] instead of [start, end)

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2pci: introduce pci_region to manage pci io/memory/prefmemory regions.Makefile src/pci_region.c src/util.h+108 -10 replies
2/2pciinit: use pci_region functions.src/pciinit.c+60 -620 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 0/2] pciinit: fix overflow when bar allocation

Changes v2 -> v3:
- use [first, last] instead of [start, end)

Changes v1 -> v2:
- add comment.

Patch description:
This patch set fixes PCI bar allocation when bar overflow occured. I checked if pmm_alloc facility can be used, but it doesn't suit for pci bar allocation. So I resulted in new API, pci_region which encapsulates region allocation and overflow checks.
The first patch introduces pci_region, and the second patch fixes the overflow case with pci_region.

Isaku Yamahata (2):
pci: introduce pci_region to manage pci io/memory/prefmemory regions.
pciinit: use pci_region functions.

 Makefile         |    3 +-
 src/pci_region.c |   77 ++++++++++++++++++++++++++++++++++
 src/pciinit.c    |  122 ++++++++++++++++++++++++++---------------------------
 src/util.h       |   29 +++++++++++++
 4 files changed, 168 insertions(+), 63 deletions(-)
 create mode 100644 src/pci_region.c