On 25/03/20 07:47, Olaf Hering wrote:
> To cover both the existing and the broken case of 'xenfv' in a single
> qemu binary, a new compatibility variant of 'xenfv-qemu4' must be added
> which targets domUs started with qemu-4.0, qemu-4.1 and qemu-4.2. The
> existing 'xenfv' restores compatibility of qemu5+ with qemu2/3.

As mentioned earlier, this is not enough, because migration support is
just the tip of the iceberg.  If you want migration to work, the machine
type must present consistent hardware across all QEMU versions.

The xenfv-qemu4 machine type is still presenting different hardware than
QEMU 4.x (see hw_compat_4_2/hw_compat_4_1/hw_compat_4_0 - what QEMU 4.x
version are you interested in?).  Likewise the xenfv machine type is
still presenting different hardware than QEMU 3.x (same as the above,
plus hw_compat_3_1 and pc_compat_3_1).

Paolo

> ---
>  hw/i386/pc_piix.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index e6756216f9..ef23da88d9 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -948,11 +948,26 @@ DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa,
>  
>  
>  #ifdef CONFIG_XEN
> +static void xenfv_qemu_4_x_machine_options(MachineClass *m)
> +{
> +    m->desc = "Xen Fully-virtualized PC (qemu 4.x compat)";
> +    m->max_cpus = HVM_MAX_VCPUS;
> +    m->default_machine_opts = "accel=xen";
> +    m->smbus_no_migration_support = false;
> +}
> +
> +DEFINE_PC_MACHINE(xenfv_qemu4, "xenfv-qemu4", pc_xen_hvm_init,
> +                  xenfv_qemu_4_x_machine_options);
> +
>  static void xenfv_machine_options(MachineClass *m)
>  {
> +    PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
> +
>      m->desc = "Xen Fully-virtualized PC";
>      m->max_cpus = HVM_MAX_VCPUS;
>      m->default_machine_opts = "accel=xen";
> +    m->smbus_no_migration_support = true;
> +    pcmc->pvh_enabled = false;
>  }
>  
>  DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,
> 


Reply via email to