qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership
@ 2013-06-02 15:43 Paolo Bonzini
  2013-06-02 15:43 ` [Qemu-devel] [PATCH 01/15] memory: add getter/setter for owner Paolo Bonzini
                   ` (15 more replies)
  0 siblings, 16 replies; 29+ messages in thread
From: Paolo Bonzini @ 2013-06-02 15:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Liu Ping Fan, jan.kiszka

Now that the DMA APIs are unified, we move closer and closer to breaking
memory access from the BQL dependency.  This series adds an API to
reference/unreference memory regions, which is not really needed only
for BQL-less memory access: the big lock can already be dropped between
address_space_map and the corresponding unmap, and the last patch fixes
potential problems in this area if the DMA destination is hot-unplugged.
Lockless memory access only makes things a bit worse.

Reference counting the region piggybacks on reference counting of a QOM
object, the "owner" of the region.  The owner API is designed so that
it will be called as little as possible.  Unowned subregions will get a
region if memory_region_set_owner is called after the subregion is added.
This is in general the common case already; often setting the owner can
be delegated to a bus-specific API that already takes a DeviceState
(for example pci_register_bar or sysbus_init_mmio).

I'll be leaving soon for a few days of vacation, hence I'm not
sending a pull request for the previous part yet.

Paolo

Paolo Bonzini (15):
  memory: add getter/setter for owner
  memory: add ref/unref
  memory: add ref/unref calls
  exec: add a reference to the region returned by address_space_translate
  pci: set owner for BARs
  sysbus: set owner for MMIO regions
  acpi: add memory_region_set_owner calls
  misc: add memory_region_set_owner calls
  isa/portio: allow setting an owner
  vga: add memory_region_set_owner calls
  pci-assign: add memory_region_set_owner calls
  vfio: add memory_region_set_owner calls
  exec: check MRU in qemu_ram_addr_from_host
  memory: return MemoryRegion from qemu_ram_addr_from_host
  memory: ref/unref memory across address_space_map/unmap

 exec.c                                | 79 ++++++++++++++++++++++++++---------
 hw/acpi/ich9.c                        |  1 +
 hw/acpi/piix4.c                       |  5 +++
 hw/char/serial-pci.c                  |  1 +
 hw/core/loader.c                      |  1 +
 hw/core/sysbus.c                      |  2 +
 hw/display/cirrus_vga.c               | 19 ++++++---
 hw/display/exynos4210_fimd.c          |  6 +++
 hw/display/framebuffer.c              | 12 +++---
 hw/display/qxl.c                      |  6 ++-
 hw/display/vga-isa-mm.c               |  2 +-
 hw/display/vga-isa.c                  |  4 +-
 hw/display/vga-pci.c                  |  5 ++-
 hw/display/vga.c                      | 19 ++++++---
 hw/display/vga_int.h                  |  9 ++--
 hw/display/vmware_vga.c               |  4 +-
 hw/i386/kvm/pci-assign.c              | 11 +++++
 hw/i386/kvmvapic.c                    |  1 +
 hw/isa/apm.c                          |  1 +
 hw/isa/isa-bus.c                      |  2 +
 hw/misc/pc-testdev.c                  |  7 ++++
 hw/misc/vfio.c                        | 10 +++++
 hw/pci/pci.c                          |  2 +
 hw/virtio/dataplane/hostmem.c         |  7 ++++
 hw/virtio/vhost.c                     |  2 +
 hw/virtio/virtio-balloon.c            |  1 +
 hw/xen/xen_pt.c                       |  4 ++
 include/exec/cpu-common.h             |  2 +-
 include/exec/ioport.h                 |  3 ++
 include/exec/memory.h                 | 51 +++++++++++++++++++++-
 include/hw/virtio/dataplane/hostmem.h |  1 +
 ioport.c                              | 10 +++++
 kvm-all.c                             |  2 +
 memory.c                              | 51 ++++++++++++++++++++++
 target-arm/kvm.c                      |  2 +
 target-i386/kvm.c                     |  4 +-
 target-sparc/mmu_helper.c             |  1 +
 xen-all.c                             |  2 +
 38 files changed, 301 insertions(+), 51 deletions(-)

-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2013-06-03 11:05 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-02 15:43 [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 01/15] memory: add getter/setter for owner Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 02/15] memory: add ref/unref Paolo Bonzini
2013-06-02 15:58   ` Peter Maydell
2013-06-03  6:49     ` Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 03/15] memory: add ref/unref calls Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 04/15] exec: add a reference to the region returned by address_space_translate Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 05/15] pci: set owner for BARs Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 06/15] sysbus: set owner for MMIO regions Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 07/15] acpi: add memory_region_set_owner calls Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 08/15] misc: " Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 09/15] isa/portio: allow setting an owner Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 10/15] vga: add memory_region_set_owner calls Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 11/15] pci-assign: " Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 12/15] vfio: " Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 13/15] exec: check MRU in qemu_ram_addr_from_host Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 14/15] memory: return MemoryRegion from qemu_ram_addr_from_host Paolo Bonzini
2013-06-02 16:04   ` Peter Maydell
2013-06-03  6:40     ` Paolo Bonzini
2013-06-03 10:51       ` Paolo Bonzini
2013-06-02 15:43 ` [Qemu-devel] [PATCH 15/15] memory: ref/unref memory across address_space_map/unmap Paolo Bonzini
2013-06-02 16:12 ` [Qemu-devel] [PATCH 00/15] Memory/IOMMU patches part 4: region ownership Peter Maydell
2013-06-03  6:47   ` Paolo Bonzini
2013-06-03  9:22     ` Peter Maydell
2013-06-03  9:40       ` Paolo Bonzini
2013-06-03  9:58         ` Peter Maydell
2013-06-03 10:12           ` Paolo Bonzini
2013-06-03 10:25             ` Peter Maydell
2013-06-03 11:05               ` Paolo Bonzini

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).