[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emulating SVE on non-SVE host with qemu-system-aarch64
From: |
Mitchell Augustin |
Subject: |
Re: Emulating SVE on non-SVE host with qemu-system-aarch64 |
Date: |
Tue, 7 Jan 2025 16:08:04 -0600 |
> You don't say what your command line is..
Sorry, meant to include that, although I think I may have figured out
my issue after looking through the docs more.
I am trying to launch a VM with libvirt/virt-install, using the
following options (now with sve-default-vector-length removed):
virt-install --name ${VM} --memory $((18*1024)) --graphics
vnc,listen=0.0.0.0 --noautoconsole \
--console pty,target_type=serial --vcpus 4,cpuset=0-3 \
--machine virt --osinfo name=ubuntunoble \
--cdrom /vms/ubuntu-24.04-live-server-arm64.iso \
--disk /vms/${VM}-vda.qcow2 --disk /vms/${VM}-seed.qcow2
--import --qemu-commandline="-cpu neoverse-v1"
I forgot to mention that I also am using KVM on the host, which it
seems is probably my issue:
> If KVM is enabled then only vector lengths that the host CPU type support may
> be enabled. If SVE is not supported by the host, then no sve* properties may
> be enabled
With the above command, I see this when trying to launch the VM:
qemu-system-aarch64: target/arm/cpu64.c:72: arm_cpu_sve_finalize:
Assertion `!cpu_isar_feature(aa64_sve, cpu)' failed.
I initially tried the same command with --qemu-commandline="-cpu max"
instead, and while it did boot, it could not run any sve programs.
So it seems like I will just need to do this without KVM on my
non-sve-supporting host. Let me know if you agree.
Thanks,
On Tue, Jan 7, 2025 at 4:29 AM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Mon, 6 Jan 2025 at 21:54, Mitchell Augustin
> <mitchell.augustin@canonical.com> wrote:
> > I see that we can run programs built with SVE on non-SVE-supporting
> > hosts via `qemu-aarch64 -cpu max,sve-default-vector-length=256` (from
> > the arm docs:
> > https://learn.arm.com/learning-paths/servers-and-cloud-computing/sve/sve_armie/),
> > but I am having trouble figuring out a way to apply this to a full
> > system VM launched with `qemu-system-aarch64`. On the same host
> > machine on which I am able to run a program compiled with SVE using
> > `qemu-aarch64`, trying to launch a system VM with these parameters
> > errors out: "qemu-system-aarch64: can't apply global
> > max-arm-cpu.sve-default-vector-length=256: Property
> > 'max-arm-cpu.sve-default-vector-length' not found"
>
> You don't say what your command line is...
>
> > Is emulating sve on qemu-system-aarch64 with a non-sve host supported,
> > and if so, would someone be able to point me to some info on the
> > correct way to configure that?
>
> Yes, for emulation we don't care about the host CPU architecture
> at all, so this works fine. There's probably just a minor
> problem with the command line options you're trying.
>
> In particular, the sve-default-vector-length property is for
> user-mode emulation only. With system emulation, you're going to
> be booting a complete guest kernel, and you should configure
> the default-vector-length for userspace programs the same
> way you would for booting a kernel on real SVE hardware,
> by setting its /proc/sys/abi/sve_default_vector_length .
>
> -- PMM
--
Mitchell Augustin
Software Engineer - Ubuntu Partner Engineering
Email:mitchell.augustin@canonical.com
Location:United States of America
canonical.com
ubuntu.com