From: Rohitashv Kumar <[email protected]> Mark the latest machine of an x86 family that is not itself the default (i.e. q35, while i440fx is the default) as the fallback default machine.
When QEMU is built without the i440fx/pc machine (e.g. via a custom --with-devices-x86_64 configuration), x86_64/i386 previously had no default machine and required an explicit -machine argument. With this change q35 becomes the default in that configuration, while normal builds that include i440fx are unaffected. Signed-off-by: Rohitashv Kumar <[email protected]> --- include/hw/i386/pc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index d4b6d3ed..3e54d781 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -306,6 +306,8 @@ extern const size_t pc_compat_4_1_len; mc->init = MACHINE_VER_SYM(init, namesym, __VA_ARGS__); \ MACHINE_VER_DEPRECATION(__VA_ARGS__); \ mc->is_default = isdefault; \ + /* latest non-default family machine (e.g. q35) is the fallback default */ \ + mc->is_default_fallback = (malias != NULL) && !isdefault; \ mc->alias = malias; \ } \ static const TypeInfo MACHINE_VER_SYM(info, namesym, __VA_ARGS__) = \ -- 2.47.3
