All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v4 00/11] pc-dimm: factor out MemoryDevice
@ 2018-04-23 16:51 David Hildenbrand
  2018-04-23 16:51 ` [Qemu-devel] [PATCH v4 01/11] pc-dimm: factor out MemoryDevice interface David Hildenbrand
                   ` (11 more replies)
  0 siblings, 12 replies; 21+ messages in thread
From: David Hildenbrand @ 2018-04-23 16:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-s390x, Michael S . Tsirkin, Igor Mammedov, Marcel Apfelbaum,
	Paolo Bonzini, Richard Henderson, Eduardo Habkost, David Gibson,
	Markus Armbruster, qemu-ppc, Pankaj Gupta, Alexander Graf,
	David Hildenbrand

Right now we can only map PCDIMM/NVDIMM into guest address space. In the
future, we might want to do the same for virtio devices - e.g.
virtio-pmem or virtio-mem. Especially, they should be able to live side
by side to each other.

E.g. the virto based memory devices regions will not be exposed via ACPI
and friends. They will be detected just like other virtio devices and
indicate the applicable memory region. This makes it possible to also use
them on architectures without memory device detection support (e.g. s390x).

Let's factor out the memory device code into a MemoryDevice interface.

Please note that the "slots" assignment code is not relevant for memory
devices that will not be exposed via ACPI or similar. That's why that
part won't be exposed. KVM/vhost "slots" for memory regions are still
necessary but don't have to be manually specified (e.g. the slot number
doesn't mather).

So we are basically converting the hotplug memory region to a memory device
region. I have patches that also set up such a region for s390x.

v3 -> v4:
- "pc-dimm: factor out MemoryDevice interface"
-- dropped the "errp" parameter from the interface functions
-- made as many pointers const as I could :)
-- s/built/build/
- machine: make MemoryHotplugState accessible via the machine
-- State now kept via a pointer, not queried.
-- Added patches that rename the type and cleanup the terminology for
   spapr and pc
- Split up the big "pc-dimm: factor out address space logic into MemoryDevice
  code" into sub patches
--  We now pass the machine to the pc-dimm and MemoryDevice plug/unplug
    functions, so we can avoid qdev_get_machine()
-- Moved some checks around as requested by Igor
- Added a patch to make maxmem not depend on slots

v2 -> v3:
- "pc-dimm: factor out MemoryDevice interface"
--> Lookup both classes when comparing (David Gibson)

v1 -> v2:
- Fix compile issues on ppc (still untested  )


David Hildenbrand (11):
  pc-dimm: factor out MemoryDevice interface
  machine: make MemoryHotplugState accessible via the machine
  pc-dimm: no need to pass the memory region
  pc-dimm: pass in the machine and to the MemoryHotplugState
  pc-dimm: factor out address search into MemoryDevice code
  pc-dimm: factor out capacity and slot checks into MemoryDevice
  pc-dimm: move actual plug/unplug of a memory region to MemoryDevice
  machine: rename MemoryHotplugState to DeviceMemoryState
  pc: rename "hotplug memory" terminology to "device memory"
  spapr: rename "hotplug memory" terminology to "device memory"
  vl: allow 'maxmem' without 'slot'

 hw/i386/acpi-build.c                         |   7 +-
 hw/i386/pc.c                                 |  65 +++---
 hw/mem/Makefile.objs                         |   1 +
 hw/mem/memory-device.c                       | 275 ++++++++++++++++++++++++
 hw/mem/pc-dimm.c                             | 304 +++++++--------------------
 hw/ppc/spapr.c                               |  65 +++---
 hw/ppc/spapr_hcall.c                         |   7 +-
 hw/ppc/spapr_rtas_ddw.c                      |   5 +-
 include/hw/boards.h                          |  12 ++
 include/hw/i386/pc.h                         |   3 +-
 include/hw/mem/memory-device.h               |  51 +++++
 include/hw/mem/pc-dimm.h                     |  27 +--
 include/hw/ppc/spapr.h                       |   5 +-
 numa.c                                       |   3 +-
 qmp.c                                        |   4 +-
 stubs/Makefile.objs                          |   2 +-
 stubs/{qmp_pc_dimm.c => qmp_memory_device.c} |   4 +-
 vl.c                                         |  19 +-
 18 files changed, 506 insertions(+), 353 deletions(-)
 create mode 100644 hw/mem/memory-device.c
 create mode 100644 include/hw/mem/memory-device.h
 rename stubs/{qmp_pc_dimm.c => qmp_memory_device.c} (61%)

-- 
2.14.3

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

end of thread, other threads:[~2018-05-14  6:31 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23 16:51 [Qemu-devel] [PATCH v4 00/11] pc-dimm: factor out MemoryDevice David Hildenbrand
2018-04-23 16:51 ` [Qemu-devel] [PATCH v4 01/11] pc-dimm: factor out MemoryDevice interface David Hildenbrand
2018-04-23 16:51 ` [Qemu-devel] [PATCH v4 02/11] machine: make MemoryHotplugState accessible via the machine David Hildenbrand
2018-05-04 19:26   ` Eduardo Habkost
2018-05-05  5:34     ` Marcel Apfelbaum
2018-05-07  8:42     ` [Qemu-devel] [qemu-s390x] " David Hildenbrand
2018-05-10 16:57     ` [Qemu-devel] " Paolo Bonzini
2018-05-10 17:52       ` Eduardo Habkost
2018-05-14  6:31         ` Markus Armbruster
2018-04-23 16:51 ` [Qemu-devel] [PATCH v4 03/11] pc-dimm: no need to pass the memory region David Hildenbrand
2018-04-23 16:51 ` [Qemu-devel] [PATCH v4 04/11] pc-dimm: pass in the machine and to the MemoryHotplugState David Hildenbrand
2018-04-23 16:51 ` [Qemu-devel] [PATCH v4 05/11] pc-dimm: factor out address search into MemoryDevice code David Hildenbrand
2018-04-23 16:51 ` [Qemu-devel] [PATCH v4 06/11] pc-dimm: factor out capacity and slot checks into MemoryDevice David Hildenbrand
2018-04-23 16:51 ` [Qemu-devel] [PATCH v4 07/11] pc-dimm: move actual plug/unplug of a memory region to MemoryDevice David Hildenbrand
2018-04-23 16:51 ` [Qemu-devel] [PATCH v4 08/11] machine: rename MemoryHotplugState to DeviceMemoryState David Hildenbrand
2018-04-23 16:51 ` [Qemu-devel] [PATCH v4 09/11] pc: rename "hotplug memory" terminology to "device memory" David Hildenbrand
2018-04-23 16:51 ` [Qemu-devel] [PATCH v4 10/11] spapr: " David Hildenbrand
2018-04-23 23:29   ` David Gibson
2018-04-23 16:51 ` [Qemu-devel] [PATCH v4 11/11] vl: allow 'maxmem' without 'slot' David Hildenbrand
2018-04-23 17:40 ` [Qemu-devel] [PATCH v4 00/11] pc-dimm: factor out MemoryDevice Michael S. Tsirkin
2018-04-23 20:47   ` Eduardo Habkost

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.