From: Avi Kivity <avi@redhat.com>
To: qemu-devel@nongnu.org
Cc: kvm@vger.kernel.org
Subject: [Qemu-devel] [RFC v3 00/56] Memory API
Date: Sun, 10 Jul 2011 21:14:13 +0300 [thread overview]
Message-ID: <1310321709-30770-1-git-send-email-avi@redhat.com> (raw)
New in this version:
- use opaque instead of container_of() in memory callbacks
- turns out those container_of()s were hindering reuse
- I/O space access via memory API
- PCI fully converted
- except bridge, which actually benefits most from the conversion
- ioeventfd support
Caveats:
- some devices still grab a global memory region instead of inheriting
it from their bus. Seen in the code as #include "exec-memory.h"
- the conversion from separate b/w/l functions to a single function with a
size argument sometimes yields ugly dispatch functions. In some cases
I eliminated them, in others I left it to the device maintainer.
I also have an idea now how to kill off the page descriptor - use a page
table like x86, but with no offset bits, have a variable tree height and
allow any level to be a "large page". This results in most accesses
terminating after one or two lookups. MMIO will tend to take more (three to
five, depending on tree width), but they will be cached.
The subpage logic can be completely eliminated with this.
Avi Kivity (56):
Hierarchical memory region API
memory: implement dirty tracking
memory: merge adjacent segments of a single memory region
Internal interfaces for memory API
memory: abstract address space operations
memory: rename MemoryRegion::has_ram_addr to ::terminates
memory: late initialization of ram_addr
memory: I/O address space support
exec.c: initialize memory map
ioport: register ranges by byte aligned addresses always
pc: grab system_memory
pc: convert pc_memory_init() to memory API
pc: move global memory map out of pc_init1() and into its callers
pci: pass address space to pci bus when created
pci: add MemoryRegion based BAR management API
sysbus: add MemoryRegion based memory management API
usb-ohci: convert to MemoryRegion
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
exec.c: fix initialization of system I/O memory region
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
memory: add ioeventfd support
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: concert 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()
Makefile.target | 1 +
exec-memory.h | 28 ++
exec.c | 29 ++
hw/ac97.c | 126 +++++--
hw/apb_pci.c | 3 +
hw/bonito.c | 5 +-
hw/cirrus_vga.c | 460 ++++++++----------------
hw/cuda.c | 6 +-
hw/e1000.c | 113 +++----
hw/eepro100.c | 181 ++--------
hw/es1370.c | 62 +++-
hw/escc.c | 42 +--
hw/escc.h | 2 +-
hw/grackle_pci.c | 9 +-
hw/gt64xxx.c | 6 +-
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 | 50 ++-
hw/ide/pci.c | 25 +-
hw/ide/pci.h | 19 +-
hw/ide/piix.c | 63 +++-
hw/ide/via.c | 64 +++-
hw/intel-hda.c | 49 ++-
hw/isa.h | 2 +
hw/isa_mmio.c | 67 ++--
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 | 14 +-
hw/ne2000.c | 77 +++--
hw/ne2000.h | 8 +-
hw/openpic.c | 81 ++---
hw/openpic.h | 2 +-
hw/pc.c | 62 ++-
hw/pc.h | 11 +-
hw/pc_piix.c | 24 +-
hw/pci.c | 104 +++---
hw/pci.h | 30 +-
hw/pci_host.h | 1 +
hw/pci_internals.h | 2 +
hw/pcnet-pci.c | 98 ++++--
hw/pcnet.h | 4 +-
hw/piix_pci.c | 17 +-
hw/ppc4xx_pci.c | 6 +-
hw/ppc_mac.h | 30 +-
hw/ppc_newworld.c | 35 +-
hw/ppc_oldworld.c | 28 +-
hw/ppc_prep.c | 3 +-
hw/ppce500_pci.c | 7 +-
hw/prep_pci.c | 9 +-
hw/prep_pci.h | 5 +-
hw/qxl-render.c | 2 +-
hw/qxl.c | 125 +++----
hw/qxl.h | 6 +-
hw/rtl8139.c | 170 +++------
hw/sh_pci.c | 6 +-
hw/sun4u.c | 53 ++--
hw/sysbus.c | 27 ++-
hw/sysbus.h | 3 +
hw/unin_pci.c | 18 +-
hw/usb-ehci.c | 53 ++--
hw/usb-ohci.c | 42 +--
hw/usb-uhci.c | 56 +++-
hw/versatile_pci.c | 2 +
hw/vga-isa-mm.c | 61 +++-
hw/vga-isa.c | 11 +-
hw/vga-pci.c | 27 +--
hw/vga.c | 178 ++++------
hw/vga_int.h | 19 +-
hw/virtio-pci.c | 99 +++---
hw/virtio-pci.h | 3 +-
hw/vmware_vga.c | 175 +++++----
hw/wdt_i6300esb.c | 59 +++-
hw/xen_platform.c | 109 ++++--
ioport.c | 4 +-
memory.c | 1050 ++++++++++++++++++++++++++++++++++++++++++++++++++++
memory.h | 224 +++++++++++
87 files changed, 3403 insertions(+), 2184 deletions(-)
create mode 100644 exec-memory.h
create mode 100644 memory.c
create mode 100644 memory.h
--
1.7.5.3
next reply other threads:[~2011-07-10 18:15 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-10 18:14 Avi Kivity [this message]
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 01/56] Hierarchical memory region API Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 02/56] memory: implement dirty tracking Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 03/56] memory: merge adjacent segments of a single memory region Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 04/56] Internal interfaces for memory API Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 05/56] memory: abstract address space operations Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 06/56] memory: rename MemoryRegion::has_ram_addr to ::terminates Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 07/56] memory: late initialization of ram_addr Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 08/56] memory: I/O address space support Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 09/56] exec.c: initialize memory map Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 10/56] ioport: register ranges by byte aligned addresses always Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 11/56] pc: grab system_memory Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 12/56] pc: convert pc_memory_init() to memory API Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 13/56] pc: move global memory map out of pc_init1() and into its callers Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 14/56] pci: pass address space to pci bus when created Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 15/56] pci: add MemoryRegion based BAR management API Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 16/56] sysbus: add MemoryRegion based memory " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 17/56] usb-ohci: convert to MemoryRegion Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 18/56] pci: add API to get a BAR's mapped address Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 19/56] vmsvga: don't remember pci BAR address in callback any more Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 20/56] vga: convert vga and its derivatives to the memory API Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 21/56] cirrus: simplify mmio BAR access functions Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 22/56] cirrus: simplify bitblt " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 23/56] cirrus: simplify vga window mmio " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 24/56] vga: " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 25/56] cirrus: simplify linear framebuffer " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 26/56] Integrate I/O memory regions into qemu Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 27/56] exec.c: fix initialization of system I/O memory region Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 28/56] pci: pass I/O address space to new PCI bus Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 29/56] pci: allow I/O BARs to be registered with pci_register_bar_region() Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 30/56] rtl8139: convert to memory API Avi Kivity
2011-07-12 22:41 ` Alex Williamson
2011-07-12 22:47 ` Alex Williamson
2011-07-13 6:52 ` Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 31/56] ac97: " Avi Kivity
2011-07-10 20:33 ` malc
2011-07-11 1:42 ` Anthony Liguori
2011-07-11 6:49 ` Avi Kivity
2011-07-11 10:47 ` Avi Kivity
2011-07-11 22:03 ` malc
2011-07-12 7:14 ` Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 32/56] e1000: " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 33/56] eepro100: " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 34/56] es1370: " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 35/56] ide: " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 36/56] memory: add ioeventfd support Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 37/56] ivshmem: convert to memory API Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 38/56] virtio-pci: " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 39/56] ahci: " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 40/56] intel-hda: " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 41/56] lsi53c895a: " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 42/56] ppc: " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 43/56] ne2000: " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 44/56] pcnet: " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 45/56] i6300esb: " Avi Kivity
2011-07-10 18:14 ` [Qemu-devel] [RFC v3 46/56] isa-mmio: concert " Avi Kivity
2011-07-10 18:15 ` [Qemu-devel] [RFC v3 47/56] sun4u: convert " Avi Kivity
2011-07-10 18:15 ` [Qemu-devel] [RFC v3 48/56] ehci: " Avi Kivity
2011-07-10 18:15 ` [Qemu-devel] [RFC v3 49/56] uhci: " Avi Kivity
2011-07-10 18:15 ` [Qemu-devel] [RFC v3 50/56] xen-platform: " Avi Kivity
2011-07-10 18:15 ` [Qemu-devel] [RFC v3 51/56] msix: " Avi Kivity
2011-07-10 18:15 ` [Qemu-devel] [RFC v3 52/56] pci: remove pci_register_bar_simple() Avi Kivity
2011-07-10 18:15 ` [Qemu-devel] [RFC v3 53/56] pci: convert pci rom to memory API Avi Kivity
2011-07-10 18:15 ` [Qemu-devel] [RFC v3 54/56] pci: remove pci_register_bar() Avi Kivity
2011-07-10 18:15 ` [Qemu-devel] [RFC v3 55/56] pci: fold BAR mapping function into its caller Avi Kivity
2011-07-10 18:15 ` [Qemu-devel] [RFC v3 56/56] pci: rename pci_register_bar_region() to pci_register_bar() Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1310321709-30770-1-git-send-email-avi@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).