On 2/15/23 15:12, Richard W.M. Jones wrote:
As with the prior commit, prefer -cpu host for all guests (except when we have more information from the source hypervisor). Although there is the disadvantage that -cpu host is non-migratable, in practice it would be very difficult to live migrate a host launched using direct qemu commands.
Note that after this change, gcaps_arch_min_version is basically an informational field. No output uses it, but it will appear in debug output and there's the possibility we might use it for a future output mode. --- output/output_qemu.ml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/output/output_qemu.ml b/output/output_qemu.ml index 491906ebf9..d1028a9cc3 100644 --- a/output/output_qemu.ml +++ b/output/output_qemu.ml @@ -175,10 +175,9 @@ module QEMU = struct
arg "-m" (Int64.to_string (source.s_memory /^ 1024L /^ 1024L));
- (match source.s_cpu_model, guestcaps.gcaps_arch_min_version with - | None, 0 -> () - | None, _ -> arg "-cpu" "host" - | Some model, _ -> arg "-cpu" model + (match source.s_cpu_model with + | None -> arg "-cpu" "host" + | Some model -> arg "-cpu" model );
if source.s_vcpu > 1 then (
Reviewed-by: Laszlo Ersek <lersek@redhat.com> (again in expectation of this being squashed / reworked into the sole version-2 patch)