Proxmox VE wants to use microvm with PCIe and ACPI for long-lived Linux guests, i.e. like Linux containers but with better isolation. Our cluster upgrades and host maintenance rely on live migrating guests to hosts that already run a newer QEMU, which is currently not really possible with microvm, as it is not versioned.
When microvm was added, versioning was ruled out on purpose [1], as it targeted short-lived guests. Since then, Paolo noted that microvm could start having versioned variants [2]. So this series adds microvm-X.Y machine types, starting with 12.0, as 11.2 is already in freeze. Noteworthy points that migth be up for discussion: - Following Paolo preference [2], "microvm" does not become an alias of the latest version, rather, it is left as it is. Unversioned machine types are meant to be a moving target [2], which includes defaulting to the latest version of a CPU model. The versioned types need a fixed default and use version 1, like pc and q35 do, and an alias cannot differ from the type it refers to. - The x86 CPU compat properties are part of pc_compat_X_Y in hw/i386/pc.c, which is only built with CONFIG_PC. Once microvm-12.0 needs them, they would have to move, for example to hw/i386/x86-common.c (but I'm happy to use another place, just say the word). - With KVM, microvm uses the host's physical address width, so migration also needs the same width on both hosts. This is not new, the series only documents it for now. Tested with the x86_64 CPU model and migration functional tests, bios-tables-test and qom-test, and by live migrating Linux guests on microvm-12.0 with TCG and KVM. [1] https://lore.kernel.org/qemu-devel/[email protected]/ [2] https://lore.kernel.org/qemu-devel/[email protected]/ Thomas Lamprecht (2): hw/i386/microvm: make the default CPU model version a class field hw/i386/microvm: add versioned machine types docs/system/i386/microvm.rst | 21 ++++++++- hw/i386/microvm.c | 47 ++++++++++++++++++- include/hw/i386/microvm.h | 3 ++ .../x86_64/test_cpu_model_versions.py | 41 ++++++++++++++++ 4 files changed, 110 insertions(+), 2 deletions(-) base-commit: f71afb409a87c4ecd0f9d63a5963eb645dfab780 -- 2.47.3
