On Fri, Apr 14, 2023 at 03:14:47PM -0600, Jim Fehlig wrote:
> It's quite difficult, if not impossible, to create a working aarch64 VM
> using the current default machine type of 'integratorcp'. Change the
> default to the more appropriate and virtualization friendly 'virt'
> machine type.
>
> Signed-off-by: Jim Fehlig <jfeh...@suse.com>
> ---
>  src/qemu/qemu_capabilities.c                       |  2 +-
>  tests/domaincapsdata/qemu_4.2.0.aarch64.xml        | 14 ++++++++++----
>  tests/domaincapsdata/qemu_5.0.0.aarch64.xml        | 14 ++++++++++----
>  tests/domaincapsdata/qemu_5.2.0.aarch64.xml        | 14 ++++++++++----
>  tests/domaincapsdata/qemu_6.0.0.aarch64.xml        | 14 ++++++++++----
>  tests/domaincapsdata/qemu_6.2.0.aarch64.xml        | 14 ++++++++++----
>  .../domaincapsdata/qemu_7.0.0-hvf.aarch64+hvf.xml  |  6 ++++--
>  tests/domaincapsdata/qemu_7.0.0.aarch64.xml        | 14 ++++++++++----
>  tests/qemucapabilitiesdata/caps_4.2.0_aarch64.xml  |  4 ++--
>  tests/qemucapabilitiesdata/caps_5.0.0_aarch64.xml  |  8 ++++----
>  tests/qemucapabilitiesdata/caps_5.2.0_aarch64.xml  |  8 ++++----
>  tests/qemucapabilitiesdata/caps_6.0.0_aarch64.xml  |  8 ++++----
>  tests/qemucapabilitiesdata/caps_6.2.0_aarch64.xml  |  8 ++++----
>  .../caps_7.0.0_aarch64+hvf.xml                     |  8 ++++----
>  tests/qemucapabilitiesdata/caps_7.0.0_aarch64.xml  |  8 ++++----
>  15 files changed, 91 insertions(+), 53 deletions(-)
>
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index ea6821e99f..9ec283db63 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -2690,7 +2690,7 @@ static const char *preferredMachines[] =
>      "integratorcp", /* VIR_ARCH_ARMV7L */
>      "integratorcp", /* VIR_ARCH_ARMV7B */
>
> -    "integratorcp", /* VIR_ARCH_AARCH64 */
> +    "virt", /* VIR_ARCH_AARCH64 */

Looks good and the changes to the capabilities data make sense.

However, I see no reason to limit the changes to a single Arm
architecture (aarch64) when the other ones (armv7l, armv7b) can
benefit from a better machine type default in the same way.

I have confirmed that creating an integratorcp VM on those
architectures poses the same challenges as it does on aarch64, and
that using virt is a great way to overcome them.

So, please change the default machine type to virt for armv7l and
armv7b too.

Note that I'm leaving armv6l out of the discussion here because it
already behaves slightly differently from other Arm architectures,
and also at this point there's probably no use for it except maybe
emulating the original Raspberry Pi. Let's focus on changes that have
a meaningful impact :)

-- 
Andrea Bolognani / Red Hat / Virtualization

Reply via email to