Skip to content

Remove cpu_get_physical_page_desc()

Avi Kivity kvm qemu-devel xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest23 patches 25 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/23memory: introduce memory_region_find()memory.c memory.h+94 -07 replies
2/23sysbus: add sysbus_address_space()hw/sysbus.c hw/sysbus.h+6 -00 replies
3/23memory: add memory_region_is_ram()memory.c memory.h+18 -00 replies
4/23framebuffer: drop use of cpu_get_physical_page_desc()hw/framebuffer.c hw/framebuffer.h hw/milkymist-vgafb.c +3 more+27 -240 replies
5/23memory: add memory_region_is_rom()memory.c memory.h+14 -00 replies
6/23loader: remove calls to cpu_get_physical_page_desc()hw/loader.c+5 -40 replies
7/23framebuffer: drop use of cpu_physical_sync_dirty_bitmap()hw/framebuffer.c+1 -10 replies
8/23memory: replace cpu_physical_sync_dirty_bitmap() with a memory APIarch_init.c cpu-all.h exec-obsolete.h +2 more+19 -70 replies
9/23memory: add API for observing updates to the physical memory mapexec.c memory.c memory.h+144 -00 replies
10/23memory: add memory_region_is_logging()memory.c memory.h+14 -00 replies
11/23kvm: switch kvm slots to use host virtual address instead of ram_addr_tkvm-all.c kvm.h memory.c +1 more+25 -210 replies
12/23fixup: listener fixesmemory.c+4 -32 replies
13/23kvm: convert to MemoryListener APIkvm-all.c+70 -377 replies
14/23vhost: convert to MemoryListener APIhw/vhost.c hw/vhost.h+96 -334 replies
15/23xen, vga: add API for registering the framebufferhw/vga.c hw/xen.h xen-all.c +1 more+15 -00 replies
16/23memory: temporarily add memory_region_get_ram_addr()memory.c memory.h+16 -00 replies
17/23xen: convert to MemoryListener APItrace-events xen-all.c+81 -582 replies
18/23memory: remove CPUPhysMemoryClientcpu-all.h cpu-common.h exec-obsolete.h +2 more+5 -2080 replies
19/23kvm: avoid cpu_get_physical_page_desc()kvm-all.c+10 -170 replies
20/23vhost: avoid cpu_get_physical_page_desc()hw/vhost.c hw/vhost.h+41 -82 replies
21/23virtio-balloon: avoid cpu_get_physical_page_desc()hw/virtio-balloon.c+10 -40 replies
22/23sparc: avoid cpu_get_physical_page_desc()target-sparc/mmu_helper.c+4 -10 replies
23/23Remove cpu_get_physical_page_desc()cpu-common.h exec.c+0 -120 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 00/23] Remove cpu_get_physical_page_desc()

cpu_get_physical_page_desc() exposes the internals of the memory core to callers; as such it prevents the refactoring planned there. This patchset converts all callers memory API equivalents and removes the function.

The conversion leaves a lot of potential for further cleanups; the MemoryListener API (which replaces CPUPhysMemoryClient) guarantees matched range_add and range_del calls, so the need to handle splitting is removed. This is left for later.

Please review and test, especially the vhost and Xen parts, which I only build tested.

Also available from:

git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git memory/page_desc

Avi Kivity (23):
memory: introduce memory_region_find()
sysbus: add sysbus_address_space()
memory: add memory_region_is_ram()
framebuffer: drop use of cpu_get_physical_page_desc()
memory: add memory_region_is_rom()
loader: remove calls to cpu_get_physical_page_desc()
framebuffer: drop use of cpu_physical_sync_dirty_bitmap()
memory: replace cpu_physical_sync_dirty_bitmap() with a memory API
memory: add API for observing updates to the physical memory map
memory: add memory_region_is_logging()
kvm: switch kvm slots to use host virtual address instead of
ram_addr_t
fixup: listener fixes
kvm: convert to MemoryListener API
vhost: convert to MemoryListener API
xen, vga: add API for registering the framebuffer
memory: temporarily add memory_region_get_ram_addr()
xen: convert to MemoryListener API
memory: remove CPUPhysMemoryClient
kvm: avoid cpu_get_physical_page_desc()
vhost: avoid cpu_get_physical_page_desc()
virtio-balloon: avoid cpu_get_physical_page_desc()
sparc: avoid cpu_get_physical_page_desc()
Remove cpu_get_physical_page_desc()

 arch_init.c               |    6 +-
 cpu-all.h                 |    9 --
 cpu-common.h              |   24 ------
 exec.c                    |  175 +---------------------------------------
 hw/framebuffer.c          |   32 +++----
 hw/framebuffer.h          |    3 +
 hw/loader.c               |    9 +-
 hw/milkymist-vgafb.c      |    2 +-
 hw/omap_lcdc.c            |    4 +-
 hw/pl110.c                |    2 +-
 hw/pxa2xx_lcd.c           |   10 ++-
 hw/sysbus.c               |    5 +
 hw/sysbus.h               |    1 +
 hw/vga.c                  |    2 +
 hw/vhost.c                |  167 ++++++++++++++++++++++++++++++---------
 hw/vhost.h                |    5 +-
 hw/virtio-balloon.c       |   14 +++-
 hw/xen.h                  |    3 +
 kvm-all.c                 |  151 +++++++++++++++++++++--------------
 kvm.h                     |    4 +-
 memory.c                  |  193 ++++++++++++++++++++++++++++++++++++++++++---
 memory.h                  |  127 +++++++++++++++++++++++++++++
 target-i386/kvm.c         |    7 +-
 target-sparc/mmu_helper.c |    5 +-
 trace-events              |    2 +-
 xen-all.c                 |  143 ++++++++++++++++++++-------------
 xen-stub.c                |    4 +
 27 files changed, 695 insertions(+), 414 deletions(-)
Signature · 1 line
1.7.7.1