summary refs log tree commit diff stats
path: root/python/scripts/vendor.py
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2023-07-11 17:34:44 +0200
committerDavid Hildenbrand <david@redhat.com>2023-07-12 09:27:31 +0200
commit92a8ee1b594244a82d4c955eab907034f8953f8b (patch)
tree5ddebb91d74600e3793832ada290e15d3d9a0ac8 /python/scripts/vendor.py
parentaac44204bc6d2a062c2e1658fe6a02a67f55b9e6 (diff)
downloadfocaccia-qemu-92a8ee1b594244a82d4c955eab907034f8953f8b.tar.gz
focaccia-qemu-92a8ee1b594244a82d4c955eab907034f8953f8b.zip
virtio-mem: Prepare for device unplug support
In many cases, blindly unplugging a virtio-mem device is problematic. We
can only safely remove a device once:
* The guest is not expecting to be able to read unplugged memory
  (unplugged-inaccessible == on)
* The virtio-mem device does not have memory plugged (size == 0)
* The virtio-mem device does not have outstanding requests to the VM to
  plug memory (requested-size == 0)

So let's add a callback to the virtio-mem device class to check for that.
We'll wire-up virtio-mem-pci next.

Message-ID: <20230711153445.514112-7-david@redhat.com>
Tested-by: Mario Casquero <mcasquer@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'python/scripts/vendor.py')
0 files changed, 0 insertions, 0 deletions