Re: [PATCH v2 0/6] qemu: Use memory-backend-* for regular guest memory
On 9/17/20 6:35 AM, Michal Privoznik wrote: v2 of: https://www.redhat.com/archives/libvir-list/2020-September/msg00023.html diff to v1: - I've dropped the capability (patch 5/7 in the original set) and am relying on qemu providing default-ram-id. I've tested migration from a daemon with these patches to a daemon without and also vice versa and it worked. Reviewed-by: Daniel Henrique Barboza FYI, patch 01 doesn't apply in master after 63af8fdeb2f6. It's a trivial conflict to solve though (just switch places between mem-path and prealloc). Thanks, DHB Michal Prívozník (6): qemuBuildMemoryBackendProps: Move @prealloc setting to backend agnostic part qemuBuildMemoryBackendProps: Respect //memoryBacking/allocation/@mode=immediate qemuBuildMemoryBackendProps: Prealloc mem for memfd backend qemuBuildMemoryBackendProps: Fix const correctness qemu: Track default-ram-id machine attribute qemu: Use memory-backend-* for regular guest memory src/qemu/qemu_capabilities.c | 35 +++- src/qemu/qemu_capabilities.h | 3 + src/qemu/qemu_capspriv.h | 3 +- src/qemu/qemu_command.c | 96 +++-- src/qemu/qemu_command.h | 4 +- src/qemu/qemu_monitor.c | 1 + src/qemu/qemu_monitor.h | 1 + src/qemu/qemu_monitor_json.c | 11 + .../caps_5.2.0.x86_64.xml | 196 +- .../blkdeviotune-group-num.x86_64-latest.args | 3 +- ...blkdeviotune-max-length.x86_64-latest.args | 3 +- .../blkdeviotune-max.x86_64-latest.args | 3 +- .../channel-unix-guestfwd.x86_64-latest.args | 3 +- .../console-virtio-unix.x86_64-latest.args| 3 +- .../controller-virtio-scsi.x86_64-latest.args | 3 +- ...-Icelake-Server-pconfig.x86_64-latest.args | 3 +- .../cpu-translation.x86_64-latest.args| 3 +- .../cputune-cpuset-big-id.x86_64-latest.args | 3 +- .../disk-aio-io_uring.x86_64-latest.args | 3 +- .../disk-aio.x86_64-latest.args | 3 +- ...-backing-chains-noindex.x86_64-latest.args | 3 +- .../disk-cache.x86_64-latest.args | 4 +- .../disk-cdrom-bus-other.x86_64-latest.args | 3 +- ...m-empty-network-invalid.x86_64-latest.args | 3 +- .../disk-cdrom-network.x86_64-latest.args | 3 +- .../disk-cdrom-tray.x86_64-latest.args| 3 +- .../disk-cdrom.x86_64-latest.args | 3 +- .../disk-copy_on_read.x86_64-latest.args | 3 +- .../disk-detect-zeroes.x86_64-latest.args | 3 +- .../disk-discard.x86_64-latest.args | 3 +- .../disk-error-policy.x86_64-latest.args | 3 +- .../disk-floppy-q35-2_11.x86_64-latest.args | 4 +- .../disk-floppy-q35-2_9.x86_64-latest.args| 4 +- .../disk-floppy.x86_64-latest.args| 3 +- .../disk-network-gluster.x86_64-latest.args | 3 +- .../disk-network-http.x86_64-latest.args | 3 +- .../disk-network-iscsi.x86_64-latest.args | 3 +- .../disk-network-nbd.x86_64-latest.args | 3 +- .../disk-network-rbd.x86_64-latest.args | 3 +- .../disk-network-sheepdog.x86_64-latest.args | 3 +- ...isk-network-source-auth.x86_64-latest.args | 3 +- ...isk-network-tlsx509-nbd.x86_64-latest.args | 3 +- .../disk-nvme.x86_64-latest.args | 3 +- .../disk-readonly-disk.x86_64-latest.args | 3 +- .../disk-scsi-device-auto.x86_64-latest.args | 3 +- .../disk-scsi.x86_64-latest.args | 3 +- .../disk-shared.x86_64-latest.args| 3 +- .../disk-slices.x86_64-latest.args| 3 +- ...irtio-scsi-reservations.x86_64-latest.args | 3 +- .../eoi-disabled.x86_64-latest.args | 3 +- .../eoi-enabled.x86_64-latest.args| 3 +- .../floppy-drive-fat.x86_64-latest.args | 3 +- .../qemuxml2argvdata/fs9p.x86_64-latest.args | 3 +- .../genid-auto.x86_64-latest.args | 3 +- .../qemuxml2argvdata/genid.x86_64-latest.args | 3 +- ...egl-headless-rendernode.x86_64-latest.args | 3 +- .../graphics-egl-headless.x86_64-latest.args | 3 +- ...pice-gl-auto-rendernode.x86_64-latest.args | 3 +- ...graphics-vnc-tls-secret.x86_64-latest.args | 3 +- .../graphics-vnc-tls.x86_64-latest.args | 3 +- ...tdev-mdev-display-ramfb.x86_64-latest.args | 3 +- ...play-spice-egl-headless.x86_64-latest.args | 3 +- ...ev-display-spice-opengl.x86_64-latest.args | 3 +- ...isplay-vnc-egl-headless.x86_64-latest.args | 3 +- ...ostdev-mdev-display-vnc.x86_64-latest.args | 3 +- .../hostdev-scsi-lsi.x86_64-latest.args | 3 +- ...ostdev-scsi-virtio-scsi.x86_64-latest.args | 3 +- .../qemuxml2argvdata/hugepages-memaccess.args | 30 +-- .../hugepages-memaccess2.args | 12 +- .../hugepages-numa-nodeset-part.args
[PATCH v2 0/6] qemu: Use memory-backend-* for regular guest memory
v2 of: https://www.redhat.com/archives/libvir-list/2020-September/msg00023.html diff to v1: - I've dropped the capability (patch 5/7 in the original set) and am relying on qemu providing default-ram-id. I've tested migration from a daemon with these patches to a daemon without and also vice versa and it worked. Michal Prívozník (6): qemuBuildMemoryBackendProps: Move @prealloc setting to backend agnostic part qemuBuildMemoryBackendProps: Respect //memoryBacking/allocation/@mode=immediate qemuBuildMemoryBackendProps: Prealloc mem for memfd backend qemuBuildMemoryBackendProps: Fix const correctness qemu: Track default-ram-id machine attribute qemu: Use memory-backend-* for regular guest memory src/qemu/qemu_capabilities.c | 35 +++- src/qemu/qemu_capabilities.h | 3 + src/qemu/qemu_capspriv.h | 3 +- src/qemu/qemu_command.c | 96 +++-- src/qemu/qemu_command.h | 4 +- src/qemu/qemu_monitor.c | 1 + src/qemu/qemu_monitor.h | 1 + src/qemu/qemu_monitor_json.c | 11 + .../caps_5.2.0.x86_64.xml | 196 +- .../blkdeviotune-group-num.x86_64-latest.args | 3 +- ...blkdeviotune-max-length.x86_64-latest.args | 3 +- .../blkdeviotune-max.x86_64-latest.args | 3 +- .../channel-unix-guestfwd.x86_64-latest.args | 3 +- .../console-virtio-unix.x86_64-latest.args| 3 +- .../controller-virtio-scsi.x86_64-latest.args | 3 +- ...-Icelake-Server-pconfig.x86_64-latest.args | 3 +- .../cpu-translation.x86_64-latest.args| 3 +- .../cputune-cpuset-big-id.x86_64-latest.args | 3 +- .../disk-aio-io_uring.x86_64-latest.args | 3 +- .../disk-aio.x86_64-latest.args | 3 +- ...-backing-chains-noindex.x86_64-latest.args | 3 +- .../disk-cache.x86_64-latest.args | 4 +- .../disk-cdrom-bus-other.x86_64-latest.args | 3 +- ...m-empty-network-invalid.x86_64-latest.args | 3 +- .../disk-cdrom-network.x86_64-latest.args | 3 +- .../disk-cdrom-tray.x86_64-latest.args| 3 +- .../disk-cdrom.x86_64-latest.args | 3 +- .../disk-copy_on_read.x86_64-latest.args | 3 +- .../disk-detect-zeroes.x86_64-latest.args | 3 +- .../disk-discard.x86_64-latest.args | 3 +- .../disk-error-policy.x86_64-latest.args | 3 +- .../disk-floppy-q35-2_11.x86_64-latest.args | 4 +- .../disk-floppy-q35-2_9.x86_64-latest.args| 4 +- .../disk-floppy.x86_64-latest.args| 3 +- .../disk-network-gluster.x86_64-latest.args | 3 +- .../disk-network-http.x86_64-latest.args | 3 +- .../disk-network-iscsi.x86_64-latest.args | 3 +- .../disk-network-nbd.x86_64-latest.args | 3 +- .../disk-network-rbd.x86_64-latest.args | 3 +- .../disk-network-sheepdog.x86_64-latest.args | 3 +- ...isk-network-source-auth.x86_64-latest.args | 3 +- ...isk-network-tlsx509-nbd.x86_64-latest.args | 3 +- .../disk-nvme.x86_64-latest.args | 3 +- .../disk-readonly-disk.x86_64-latest.args | 3 +- .../disk-scsi-device-auto.x86_64-latest.args | 3 +- .../disk-scsi.x86_64-latest.args | 3 +- .../disk-shared.x86_64-latest.args| 3 +- .../disk-slices.x86_64-latest.args| 3 +- ...irtio-scsi-reservations.x86_64-latest.args | 3 +- .../eoi-disabled.x86_64-latest.args | 3 +- .../eoi-enabled.x86_64-latest.args| 3 +- .../floppy-drive-fat.x86_64-latest.args | 3 +- .../qemuxml2argvdata/fs9p.x86_64-latest.args | 3 +- .../genid-auto.x86_64-latest.args | 3 +- .../qemuxml2argvdata/genid.x86_64-latest.args | 3 +- ...egl-headless-rendernode.x86_64-latest.args | 3 +- .../graphics-egl-headless.x86_64-latest.args | 3 +- ...pice-gl-auto-rendernode.x86_64-latest.args | 3 +- ...graphics-vnc-tls-secret.x86_64-latest.args | 3 +- .../graphics-vnc-tls.x86_64-latest.args | 3 +- ...tdev-mdev-display-ramfb.x86_64-latest.args | 3 +- ...play-spice-egl-headless.x86_64-latest.args | 3 +- ...ev-display-spice-opengl.x86_64-latest.args | 3 +- ...isplay-vnc-egl-headless.x86_64-latest.args | 3 +- ...ostdev-mdev-display-vnc.x86_64-latest.args | 3 +- .../hostdev-scsi-lsi.x86_64-latest.args | 3 +- ...ostdev-scsi-virtio-scsi.x86_64-latest.args | 3 +- .../qemuxml2argvdata/hugepages-memaccess.args | 30 +-- .../hugepages-memaccess2.args | 12 +- .../hugepages-numa-nodeset-part.args | 5 +- .../hugepages-numa-nodeset.args | 20 +- .../hugepages-nvdimm.x86_64-latest.args | 15 +- tests/qemuxml2argvdata/hugepages-shared.args | 24 +-- .../hyperv-off.x86_64-latest.args | 3 +- .../hyperv-panic.x86_64-latest.args | 3 +- .../hyperv-stimer-direct.x86_64-latest.args