Skip to content

Memory API, batch 2: PCI devices

Avi Kivity kvm qemu-devel 4 versions – Applied

Status from this message: Applied all. Thanks for taking this on, the results are very nice!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest39 patches 16 repliesApplied
  2. v339 patches 39 repliesSuperseded
  3. v238 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v139 patches24 repliesSuperseded

Changes in v4 from the cover letter

- dropped virtio-pci config patch; will be fixed outside this patchset if necessary
- minor style fixes

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/39memory: rename PORTIO_END to PORTIO_END_OF_LISTmemory.h+1 -11 reply
2/39pci: add API to get a BAR's mapped addresshw/pci.c hw/pci.h+6 -00 replies
3/39vmsvga: don't remember pci BAR address in callback any morehw/vmware_vga.c+6 -60 replies
4/39vga: convert vga and its derivatives to the memory APIhw/cirrus_vga.c hw/qxl-render.c hw/qxl.c +7 more+437 -4350 replies
5/39cirrus: simplify mmio BAR access functionshw/cirrus_vga.c+8 -700 replies
6/39cirrus: simplify bitblt BAR access functionshw/cirrus_vga.c+13 -680 replies
7/39cirrus: simplify vga window mmio access functionshw/cirrus_vga.c+11 -680 replies
8/39vga: simplify vga window mmio access functionshw/cirrus_vga.c hw/vga.c hw/vga_int.h+12 -520 replies
9/39cirrus: simplify linear framebuffer access functionshw/cirrus_vga.c+8 -660 replies
10/39Integrate I/O memory regions into qemuexec-memory.h exec.c+15 -00 replies
11/39pci: pass I/O address space to new PCI bushw/apb_pci.c hw/bonito.c hw/grackle_pci.c +17 more+91 -380 replies
12/39pci: allow I/O BARs to be registered with pci_register_bar_region()hw/pci.c hw/pci.h hw/pci_internals.h+26 -210 replies
13/39rtl8139: convert to memory APIhw/rtl8139.c+38 -340 replies
14/39ac97: convert to memory APIhw/ac97.c+52 -371 reply
15/39e1000: convert to memory APIhw/e1000.c+48 -660 replies
16/39eepro100: convert to memory APIhw/eepro100.c+37 -1450 replies
17/39es1370: convert to memory APIhw/es1370.c+25 -181 reply
18/39ide: convert to memory APIhw/ide/cmd646.c hw/ide/pci.c hw/ide/pci.h +2 more+261 -1200 replies
19/39ivshmem: convert to memory APIhw/ivshmem.c+50 -980 replies
20/39virtio-pci: convert to memory APIhw/virtio-pci.c hw/virtio-pci.h+28 -451 reply
20/39virtio-pci: convert to memory APIhw/virtio-pci.c hw/virtio-pci.h+27 -450 replies
21/39ahci: convert to memory APIhw/ide/ahci.c hw/ide/ahci.h hw/ide/ich.c+15 -210 replies
22/39intel-hda: convert to memory APIhw/intel-hda.c+19 -160 replies
23/39lsi53c895a: convert to memory APIhw/lsi53c895a.c+56 -2022 replies
24/39ppc: convert to memory APIhw/cuda.c hw/escc.c hw/escc.h +12 more+201 -2172 replies
25/39ne2000: convert to memory APIhw/ne2000-isa.c hw/ne2000.c hw/ne2000.h+58 -400 replies
26/39pcnet: convert to memory APIhw/lance.c hw/pcnet-pci.c hw/pcnet.h+61 -486 replies
27/39i6300esb: convert to memory APIhw/wdt_i6300esb.c+29 -140 replies
28/39isa-mmio: convert to memory APIhw/isa.h hw/isa_mmio.c+16 -150 replies
29/39sun4u: convert to memory APIhw/sun4u.c+23 -280 replies
30/39ehci: convert to memory APIhw/usb-ehci.c+9 -270 replies
31/39uhci: convert to memory APIhw/usb-uhci.c+28 -140 replies
32/39xen-platform: convert to memory APIhw/xen_platform.c+50 -330 replies
33/39msix: convert to memory APIhw/ivshmem.c hw/msix.c hw/msix.h +3 more+42 -580 replies
34/39pci: remove pci_register_bar_simple()hw/pci.c hw/pci.h+0 -200 replies
35/39pci: convert pci rom to memory APIhw/pci.c hw/pci.h+9 -140 replies
36/39pci: remove pci_register_bar()hw/pci.c hw/pci.h+17 -280 replies
37/39pci: fold BAR mapping function into its callerhw/pci.c hw/pci.h+9 -170 replies
38/39pci: rename pci_register_bar_region() to pci_register_bar()hw/ac97.c hw/cirrus_vga.c hw/e1000.c +26 more+68 -890 replies
39/39pci: remove support for pre memory API BARshw/pci.c+2 -310 replies

Reviews trailers per patch

All 40 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchRichard HendersonAnthony LiguoriMichael S. Tsirkin
SeriesA-b
1/39R-b
2/39R-b
3/39R-b R-b
4/39R-b
5/39R-b
6/39R-b R-b
7/39R-b R-b
8/39R-b R-b
9/39R-b R-b
10/39R-b
11/39R-b R-b
12/39R-b R-b
13/39R-b R-b
14/39R-b R-b
15/39R-b R-b
16/39R-b R-b
17/39R-b R-b
18/39R-b R-b
19/39R-b R-b
20/39R-b R-b R-b R-b
20/39R-b R-b R-b R-b
21/39R-b R-b
22/39R-b R-b
23/39R-b R-b
24/39R-b R-b
25/39R-b
26/39R-b R-b
27/39R-b R-b
28/39R-b R-b
29/39R-b
30/39R-b R-b
31/39R-b R-b
32/39R-b R-b
33/39R-b R-b
34/39R-b R-b
35/39R-b R-b
36/39R-b R-b
37/39R-b R-b
38/39R-b R-b
39/39R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v4 thread

Cover letter [PATCH v4 00/39] Memory API, batch 2: PCI devices

This is a mostly mindless conversion of all QEMU PCI devices to the memory API. After this patchset is applied, it is no longer possible to create a PCI device using the old API.

An immediate benefit is that PCI BARs that overlap each other are now handled
correctly: currently, the sequence

map BAR 0
map BAR 1 at an overlapping address
unmap either BAR 0 or BAR 1

will leave a hole where the overlap exists. With the patchset, the memory map is restored correctly.

Note that overlaps of PCI BARs with memory or non-PCI resources are still not resolved correctly; this will be fixed later on.

The vga patches have ugly intermediate states; however the result is fairly clean.

Changes from v3:
- dropped virtio-pci config patch; will be fixed outside this patchset if necessary
- minor style fixes

Changes from v2:
- added patch from Michael simplifying virtio-pci config setup

Changes from v1:
- cmd646 type fix
- folded a fixlet into its parent

Avi Kivity (39):
memory: rename PORTIO_END to PORTIO_END_OF_LIST
pci: add API to get a BAR's mapped address
vmsvga: don't remember pci BAR address in callback any more
vga: convert vga and its derivatives to the memory API
cirrus: simplify mmio BAR access functions
cirrus: simplify bitblt BAR access functions
cirrus: simplify vga window mmio access functions
vga: simplify vga window mmio access functions
cirrus: simplify linear framebuffer access functions Integrate I/O memory regions into qemu
pci: pass I/O address space to new PCI bus
pci: allow I/O BARs to be registered with pci_register_bar_region()
rtl8139: convert to memory API
ac97: convert to memory API
e1000: convert to memory API
eepro100: convert to memory API
es1370: convert to memory API
ide: convert to memory API
ivshmem: convert to memory API
virtio-pci: convert to memory API
ahci: convert to memory API
intel-hda: convert to memory API
lsi53c895a: convert to memory API
ppc: convert to memory API
ne2000: convert to memory API
pcnet: convert to memory API
i6300esb: convert to memory API
isa-mmio: convert to memory API
sun4u: convert to memory API
ehci: convert to memory API
uhci: convert to memory API
xen-platform: convert to memory API
msix: convert to memory API
pci: remove pci_register_bar_simple()
pci: convert pci rom to memory API
pci: remove pci_register_bar()
pci: fold BAR mapping function into its caller
pci: rename pci_register_bar_region() to pci_register_bar()
pci: remove support for pre memory API BARs

 exec-memory.h      |    5 +
 exec.c             |   10 ++
 hw/ac97.c          |   88 ++++++-----
 hw/apb_pci.c       |    1 +
 hw/bonito.c        |    1 +
 hw/cirrus_vga.c    |  459 ++++++++++++++++-----------------------------------
 hw/cuda.c          |    6 +-
 hw/e1000.c         |  113 ++++++--------
 hw/eepro100.c      |  181 ++++-----------------
 hw/es1370.c        |   43 +++--
 hw/escc.c          |   42 +++---
 hw/escc.h          |    2 +-
 hw/grackle_pci.c   |    8 +-
 hw/gt64xxx.c       |    4 +-
 hw/heathrow_pic.c  |   29 ++--
 hw/ide.h           |    2 +-
 hw/ide/ahci.c      |   31 ++--
 hw/ide/ahci.h      |    2 +-
 hw/ide/cmd646.c    |  204 +++++++++++++++---------
 hw/ide/ich.c       |    3 +-
 hw/ide/macio.c     |   36 +++--
 hw/ide/pci.c       |   25 ++--
 hw/ide/pci.h       |   19 ++-
 hw/ide/piix.c      |   63 ++++++--
 hw/ide/via.c       |   64 ++++++--
 hw/intel-hda.c     |   35 +++--
 hw/isa.h           |    2 +
 hw/isa_mmio.c      |   29 ++--
 hw/ivshmem.c       |  158 +++++++------------
 hw/lance.c         |   31 ++--
 hw/lsi53c895a.c    |  257 +++++++-----------------------
 hw/mac_dbdma.c     |   32 ++--
 hw/mac_dbdma.h     |    4 +-
 hw/mac_nvram.c     |   39 ++---
 hw/macio.c         |   73 ++++-----
 hw/msix.c          |   64 +++-----
 hw/msix.h          |    6 +-
 hw/ne2000-isa.c    |   13 +--
 hw/ne2000.c        |   77 ++++++---
 hw/ne2000.h        |    8 +-
 hw/openpic.c       |   81 +++++-----
 hw/openpic.h       |    2 +-
 hw/pc.h            |    4 +-
 hw/pc_piix.c       |    6 +-
 hw/pci.c           |  133 +++++-----------
 hw/pci.h           |   26 ++--
 hw/pci_internals.h |    3 +-
 hw/pcnet-pci.c     |   74 +++++----
 hw/pcnet.h         |    4 +-
 hw/piix_pci.c      |   14 +-
 hw/ppc4xx_pci.c    |    1 +
 hw/ppc_mac.h       |   27 ++--
 hw/ppc_newworld.c  |   34 ++--
 hw/ppc_oldworld.c  |   27 ++--
 hw/ppc_prep.c      |    2 +-
 hw/ppce500_pci.c   |    7 +-
 hw/prep_pci.c      |    8 +-
 hw/prep_pci.h      |    4 +-
 hw/qxl-render.c    |    2 +-
 hw/qxl.c           |  129 ++++++----------
 hw/qxl.h           |    6 +-
 hw/rtl8139.c       |   70 ++++----
 hw/sh_pci.c        |    4 +-
 hw/sun4u.c         |   53 +++----
 hw/unin_pci.c      |   16 ++-
 hw/usb-ehci.c      |   36 +---
 hw/usb-ohci.c      |    2 +-
 hw/usb-uhci.c      |   41 +++--
 hw/versatile_pci.c |    2 +-
 hw/vga-isa-mm.c    |   46 ++++--
 hw/vga-isa.c       |   10 +-
 hw/vga-pci.c       |   27 +---
 hw/vga.c           |  178 +++++++-------------
 hw/vga_int.h       |   18 +--
 hw/virtio-pci.c    |   86 ++++------
 hw/virtio-pci.h    |    3 +-
 hw/vmware_vga.c    |  153 +++++++++---------
 hw/wdt_i6300esb.c  |   43 ++++--
 hw/xen_platform.c  |   82 ++++++----
 memory.h           |    2 +-
 80 files changed, 1650 insertions(+), 2085 deletions(-)
Signature · 1 line
1.7.5.3