All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH RFC 00/10] qdev: Hotplug handler chaining + virtio-pmem
@ 2019-01-16 11:35 David Hildenbrand
  2019-01-16 11:35 ` [Qemu-devel] [PATCH RFC 01/10] qdev: Let the hotplug_handler_unplug() caller delete the device David Hildenbrand
                   ` (10 more replies)
  0 siblings, 11 replies; 30+ messages in thread
From: David Hildenbrand @ 2019-01-16 11:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: Dr . David Alan Gilbert, Michael S . Tsirkin, Igor Mammedov,
	Marcel Apfelbaum, Paolo Bonzini, Richard Henderson,
	Eduardo Habkost, David Gibson, Cornelia Huck, Halil Pasic,
	Christian Borntraeger, David Hildenbrand, Collin Walling,
	Eric Blake, Markus Armbruster, qemu-ppc, qemu-s390x

This series implements supprt for hotplug handler chaining (proposed
by Igor), something that is necessary to turn selected virtio devices into
memory devices. Planned devices inlude virtio-mem and virtio-pmem. The
current prototype of virtio-pmem is included.

The machine hotplug handler can intercept hotplug handler calls
to properly prepare/teardown the memory device part of a device. Control
is then passed on to the actual bus hotplug handler. So the default hotplug
handler is effectively overwritten to make interception possible.

It is based on the following patches/series
- [PULL v2 01/49] pci/pcie: stop plug/unplug if the slot is locked
-- Soon upstream
- [PATCH v1] pc: Use hotplug_handler_(plug|unplug|unplug_request)
-- Queued by Paolo
- [PATCH v2 0/6] s390x/pci: hotplug handler fixes and reworks
-- Partially queued

Patch 1-3 are the preparations for hotplug handler chaining. The remaining
patches are a modified prototype of virtio-pmem.

I modified Pankajs work to work with this series. virtio-pmem is included
as it was requested during review of previous preparations to showcase a
real user, so we can discuss if this is good enough for us or if we have
to do further changes.

More details about virtio-pmem (including the Linux guest driver side)
can be found at:
    https://lkml.org/lkml/2018/7/13/102
    https://lkml.org/lkml/2019/1/9/756

Example: defining a simple virtio-pmem device (on /dev/zero for simplicity):

    qemu-system-x86_64 \
     -machine pc \
     -monitor stdio \
     -m 8G,maxmem=20G \
     -object memory-backend-file,id=mem1,mem-path=/dev/zero,size=4G \
     -device virtio-pmem-pci,id=vp1,memdev=mem1

QEMU 3.0.50 monitor - type 'help' for more information
(qemu) info memory-devices
Memory device [virtio-pmem]: "vp1"
  memaddr: 0x240000000
  size: 4294967296
  memdev: /objects/mem1

(qemu) info memory_size_summary
base memory: 8589934592
plugged memory: 4294967296


David Hildenbrand (7):
  qdev: Let the hotplug_handler_unplug() caller delete the device
  qdev: Provide qdev_get_bus_hotplug_handler()
  virtio-pci: Allow to specify additional interfaces for the base type
  hmp: Handle virtio-pmem when printing memory device infos
  numa: Handle virtio-pmem in NUMA stats
  pc: Support for PCI based memory devices
  pc: Enable support for virtio-pmem

Igor Mammedov (1):
  qdev: Let machine hotplug handler to override bus hotplug handler

Pankaj Gupta (2):
  virtio-pmem: Prototype
  virtio-pci: Proxy for virtio-pmem

 default-configs/i386-softmmu.mak            |   1 +
 hmp.c                                       |  27 +--
 hw/acpi/cpu.c                               |   1 +
 hw/acpi/memory_hotplug.c                    |   1 +
 hw/acpi/pcihp.c                             |   3 +-
 hw/core/qdev.c                              |  19 +-
 hw/i386/pc.c                                |  95 +++++++++-
 hw/pci/pcie.c                               |   3 +-
 hw/pci/shpc.c                               |   3 +-
 hw/ppc/spapr.c                              |   4 +-
 hw/ppc/spapr_pci.c                          |   3 +-
 hw/s390x/css-bridge.c                       |   2 +-
 hw/s390x/s390-pci-bus.c                     |  13 +-
 hw/virtio/Makefile.objs                     |   3 +
 hw/virtio/virtio-pci.c                      |   1 +
 hw/virtio/virtio-pci.h                      |  15 ++
 hw/virtio/virtio-pmem-pci.c                 | 129 +++++++++++++
 hw/virtio/virtio-pmem.c                     | 189 ++++++++++++++++++++
 include/hw/qdev-core.h                      |  12 ++
 include/hw/virtio/virtio-pmem.h             |  54 ++++++
 include/standard-headers/linux/virtio_ids.h |   1 +
 numa.c                                      |  24 +--
 qapi/misc.json                              |  26 ++-
 qdev-monitor.c                              |   9 +-
 24 files changed, 588 insertions(+), 50 deletions(-)
 create mode 100644 hw/virtio/virtio-pmem-pci.c
 create mode 100644 hw/virtio/virtio-pmem.c
 create mode 100644 include/hw/virtio/virtio-pmem.h

-- 
2.17.2

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

end of thread, other threads:[~2019-01-21 17:16 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-16 11:35 [Qemu-devel] [PATCH RFC 00/10] qdev: Hotplug handler chaining + virtio-pmem David Hildenbrand
2019-01-16 11:35 ` [Qemu-devel] [PATCH RFC 01/10] qdev: Let the hotplug_handler_unplug() caller delete the device David Hildenbrand
2019-01-18  9:58   ` Igor Mammedov
2019-01-18 12:41     ` David Hildenbrand
2019-01-18 15:05       ` Igor Mammedov
2019-01-16 11:35 ` [Qemu-devel] [PATCH RFC 02/10] qdev: Let machine hotplug handler to override bus hotplug handler David Hildenbrand
2019-01-16 11:35 ` [Qemu-devel] [PATCH RFC 03/10] qdev: Provide qdev_get_bus_hotplug_handler() David Hildenbrand
2019-01-16 18:41   ` [Qemu-devel] [Qemu-ppc] " Murilo Opsfelder Araujo
2019-01-17 12:16     ` David Hildenbrand
2019-01-18 10:07   ` [Qemu-devel] " Igor Mammedov
2019-01-16 11:35 ` [Qemu-devel] [PATCH RFC 04/10] virtio-pmem: Prototype David Hildenbrand
2019-01-16 14:46   ` Eric Blake
2019-01-17 12:18     ` David Hildenbrand
2019-01-21 11:52     ` David Hildenbrand
2019-01-21 12:02       ` Dr. David Alan Gilbert
2019-01-21 13:31         ` David Hildenbrand
2019-01-21 17:15           ` Eric Blake
2019-01-16 19:20   ` [Qemu-devel] [Qemu-ppc] " Murilo Opsfelder Araujo
2019-01-17 12:23     ` David Hildenbrand
2019-01-16 11:35 ` [Qemu-devel] [PATCH RFC 05/10] virtio-pci: Allow to specify additional interfaces for the base type David Hildenbrand
2019-01-16 11:35 ` [Qemu-devel] [PATCH RFC 06/10] virtio-pci: Proxy for virtio-pmem David Hildenbrand
2019-01-16 11:35 ` [Qemu-devel] [PATCH RFC 07/10] hmp: Handle virtio-pmem when printing memory device infos David Hildenbrand
2019-01-16 11:35 ` [Qemu-devel] [PATCH RFC 08/10] numa: Handle virtio-pmem in NUMA stats David Hildenbrand
2019-01-16 11:35 ` [Qemu-devel] [PATCH RFC 09/10] pc: Support for PCI based memory devices David Hildenbrand
2019-01-18 10:20   ` Igor Mammedov
2019-01-18 12:53     ` David Hildenbrand
2019-01-18 14:37       ` Igor Mammedov
2019-01-21 10:31         ` David Hildenbrand
2019-01-16 11:35 ` [Qemu-devel] [PATCH RFC 10/10] pc: Enable support for virtio-pmem David Hildenbrand
2019-01-16 11:41 ` [Qemu-devel] [PATCH RFC 00/10] qdev: Hotplug handler chaining + virtio-pmem David Hildenbrand

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.