From: Mario Casquero <mcasquer@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
Eduardo Habkost <eduardo@habkost.net>,
"Michael S. Tsirkin" <mst@redhat.com>,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
Igor Mammedov <imammedo@redhat.com>,
qemu-arm@nongnu.org, Gavin Shan <gshan@redhat.com>
Subject: Re: [PATCH v3 0/7] virtio-mem: Device unplug support
Date: Tue, 11 Jul 2023 16:19:22 +0200 [thread overview]
Message-ID: <CAMXpfWsD9_UvB6cez9oKZt9PREkVALhX0sQ=Qyok78juME78jQ@mail.gmail.com> (raw)
In-Reply-To: <20230710100714.228867-1-david@redhat.com>
This series has been successfully tested by QE. Start a VM, plug a
virtio-mem device, resize the device (adding memory) and verify that
the virtio-mem device cannot be unplugged. Finally, resize the device
(removing all the memory) and check that it can be unplugged
seamlessly.
Tested-by: Mario Casquero <mcasquer@redhat.com>
On Mon, Jul 10, 2023 at 12:07 PM David Hildenbrand <david@redhat.com> wrote:
>
> Any further comments? IMHO this is pretty straight forward. I'll wait
> a bit longer for more feedback.
>
>
> One limitation of virtio-mem is that we cannot currently unplug virtio-mem
> devices that have all memory unplugged from the VM.
>
> Let's properly handle forced unplug (as can be triggered by the VM) and
> add support for ordinary unplug (requests) of virtio-mem devices that are
> in a compatible state (no legacy mode, no plugged memory, no plug request).
>
> Briefly tested on both, x86_64 and aarch64.
>
> v2 -> v3:
> - "virtio-md-pci: New parent type for virtio-mem-pci and virtio-pmem-pci"
> -> Add MAINTAINERS entry
>
> v1 -> v2:
> - Reduce code duplication and implement it in a cleaner way using a
> new abstract virtio-md-pci parent class
> - "virtio-md-pci: New parent type for virtio-mem-pci and virtio-pmem-pci"
> -> Added, use a new aprent type like virtio-input-pci
> - "pc: Factor out (un)plug handling of virtio-md-pci devices"
> -> Added, factor it cleanly out
> - "arm/virt: Use virtio-md-pci (un)plug functions"
> -> Added, reduce code duplciation
> - "virtio-md-pci: Handle unplug of virtio based memory devices"
> -> More generic without any device-specifics
> - "virtio-md-pci: Support unplug requests for compatible devices"
> -> More generic without any device-specifics
> - "virtio-mem: Prepare for device unplug support"
> -> Use callback, separated from virtio-mem-pci device change
> - "virtio-mem-pci: Device unplug support"
> -> Use callback, separated from virtio-mem device change
>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Richard Henderson <richard.henderson@linaro.org>
> Cc: Eduardo Habkost <eduardo@habkost.net>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: qemu-arm@nongnu.org
> Cc: Gavin Shan <gshan@redhat.com>
> Cc: Mario Casquero <mcasquer@redhat.com>
>
> David Hildenbrand (7):
> virtio-md-pci: New parent type for virtio-mem-pci and virtio-pmem-pci
> pc: Factor out (un)plug handling of virtio-md-pci devices
> arm/virt: Use virtio-md-pci (un)plug functions
> virtio-md-pci: Handle unplug of virtio based memory devices
> virtio-md-pci: Support unplug requests for compatible devices
> virtio-mem: Prepare for device unplug support
> virtio-mem-pci: Device unplug support
>
> MAINTAINERS | 6 ++
> hw/arm/virt.c | 81 +++-------------
> hw/i386/pc.c | 90 +++---------------
> hw/virtio/Kconfig | 8 +-
> hw/virtio/meson.build | 1 +
> hw/virtio/virtio-md-pci.c | 151 ++++++++++++++++++++++++++++++
> hw/virtio/virtio-mem-pci.c | 54 +++++++++--
> hw/virtio/virtio-mem-pci.h | 6 +-
> hw/virtio/virtio-mem.c | 25 +++++
> hw/virtio/virtio-pmem-pci.c | 5 +-
> hw/virtio/virtio-pmem-pci.h | 6 +-
> include/hw/virtio/virtio-md-pci.h | 44 +++++++++
> include/hw/virtio/virtio-mem.h | 1 +
> 13 files changed, 311 insertions(+), 167 deletions(-)
> create mode 100644 hw/virtio/virtio-md-pci.c
> create mode 100644 include/hw/virtio/virtio-md-pci.h
>
> --
> 2.41.0
>
next prev parent reply other threads:[~2023-07-11 14:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 10:07 [PATCH v3 0/7] virtio-mem: Device unplug support David Hildenbrand
2023-07-10 10:07 ` [PATCH v3 1/7] virtio-md-pci: New parent type for virtio-mem-pci and virtio-pmem-pci David Hildenbrand
2023-07-10 10:07 ` [PATCH v3 2/7] pc: Factor out (un)plug handling of virtio-md-pci devices David Hildenbrand
2023-07-10 10:07 ` [PATCH v3 3/7] arm/virt: Use virtio-md-pci (un)plug functions David Hildenbrand
2023-07-10 21:40 ` Michael S. Tsirkin
2023-07-11 8:32 ` David Hildenbrand
2023-07-11 8:47 ` Michael S. Tsirkin
2023-07-11 9:22 ` David Hildenbrand
2023-07-11 9:55 ` David Hildenbrand
2023-07-10 10:07 ` [PATCH v3 4/7] virtio-md-pci: Handle unplug of virtio based memory devices David Hildenbrand
2023-07-10 10:07 ` [PATCH v3 5/7] virtio-md-pci: Support unplug requests for compatible devices David Hildenbrand
2023-07-10 10:07 ` [PATCH v3 6/7] virtio-mem: Prepare for device unplug support David Hildenbrand
2023-07-10 10:07 ` [PATCH v3 7/7] virtio-mem-pci: Device " David Hildenbrand
2023-07-11 14:19 ` Mario Casquero [this message]
2023-07-11 15:31 ` [PATCH v3 0/7] virtio-mem: " David Hildenbrand
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='CAMXpfWsD9_UvB6cez9oKZt9PREkVALhX0sQ=Qyok78juME78jQ@mail.gmail.com' \
--to=mcasquer@redhat.com \
--cc=david@redhat.com \
--cc=eduardo@habkost.net \
--cc=gshan@redhat.com \
--cc=imammedo@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).