Assertion `no_aa32 || ({ ARMCPU *cpu_ = (cpu); isar_feature_arm_div(&cpu_->isar); })' failed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The following assertion:
assert(no_aa32 || cpu_isar_
introduced in commit 0f8d06f16c9d ("target/arm: Conditionalize some
asserts on aarch32 support", 2018-11-02), fails for me. I intended to
launch a 32-bit ARM guest (with KVM acceleration) on my AArch64 host
(APM Mustang A3).
Libvirt generated the following QEMU command line:
> LC_ALL=C \
> PATH=/usr/
> QEMU_AUDIO_DRV=none \
> /opt/qemu-
> -name guest=f28.
> -S \
> -object secret,
> -machine virt-4.
> -cpu host,aarch64=off \
> -drive file=/root/
> -drive file=/var/
> -m 8192 \
> -realtime mlock=off \
> -smp 8,sockets=
> -uuid d525042e-
> -no-user-config \
> -nodefaults \
> -chardev socket,
> -mon chardev=
> -rtc base=utc \
> -no-shutdown \
> -boot strict=on \
> -device pcie-root-
> -device pcie-root-
> -device pcie-root-
> -device pcie-root-
> -device pcie-root-
> -device pcie-root-
> -device qemu-xhci,
> -device virtio-
> -device virtio-
> -drive file=/var/
> -device scsi-hd,
> -drive file=/var/
> -device scsi-hd,
> -netdev tap,fd=
> -device virtio-
> -chardev pty,id=charserial0 \
> -serial chardev:charserial0 \
> -chardev socket,
> -device virtserialport,
> -device usb-tablet,
> -device usb-kbd,
> -vnc 127.0.0.1:0 \
> -device virtio-
> -object rng-random,
> -device virtio-
> -msg timestamp=on
and then I got:
> qemu-system-
> arm_cpu_realizefn: Assertion `no_aa32 || ({ ARMCPU *cpu_ = (cpu);
> isar_feature_
QEMU was built at commit 8dc7fd56dd4f ("Merge remote-tracking branch
'remotes/
2019-05-23).
(Originally reported on the mailing list in the following thread:
<http://<email address hidden>>.)
Changed in qemu: | |
status: | New → In Progress |
This happens because: get_host_ cpu_features( ) is extremely minimalist
* the host kernel is older than 4.15 and does not expose ID registers to userspace via the KVM_GET_ONE_REG ioctl
* our fallback set of ID register values in target/arm/kvm64.c kvm_arm_
* the consistency checks on ID register values in arm_cpu_realizefn() are made unconditionally, rather than only if we're using TCG
https:/ /patchwork. ozlabs. org/patch/ 1133724/ is a fix for this which takes the approach of only asserting if we're using TCG, since that's really the case we're guarding for problems with and the only one that's a bug in QEMU (as opposed to an issue with the host kernel or host CPU).