target/i386: add compat for migrating error code
If cpu->env.has_error_code is true, backwards migration of a VM from a QEMU binary with commit 27535e9cca to a QEMU binary without commit 27535e9cca will fail: > kvm: error while loading state for instance 0x0 of device 'cpu' In practice, wrongly setting the error code to 0 on the target is often unproblematic, so additionally checking error_code != 0 in cpu_errcode_needed() is not enough to mitigate the issue. Instead, add proper machine version compat handling. Cc: qemu-stable@nongnu.org Fixes: 27535e9cca ("target/i386: Add support for save/load of exception error code") Signed-off-by: Fiona Ebner <f.ebner@proxmox.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20260310154348.495332-1-f.ebner@proxmox.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>