vmx_write_mem: mmu_gva_to_gpa failed when using hvf

Bug #1838390 reported by James Smart
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
QEMU
Expired
Undecided
Unassigned

Bug Description

Installed qemu 4.0.0 by homebrew, used below commands:

1. qemu-img create -f raw arch-vm.img 100G
2. qemu-system-x86_64 -show-cursor -only-migratable -nodefaults -boot order=d -cdrom archlinux-2019.07.01-x86_64.iso -cpu host -device virtio-keyboard -device virtio-mouse -device virtio-tablet -drive file=arch-vm.img,format=raw,if=virtio -m 4096 -machine q35,accel=hvf,vmport=off -nic user,ipv6=off,model=virtio -smp 4,sockets=1,cores=2,threads=2 -soundhw hda -vga virtio

Displayed bootloader menu successfully, select "Boot Arch Linux" then crashed with message: vmx_write_mem: mmu_gva_to_gpa ffff91953b540000 failed.

Use tcg accelerator has no problem but very slow.

See attachment for full crash report.

Tags: hvf macos
Revision history for this message
James Smart (smartrejames) wrote :
Revision history for this message
Felipe Franciosi (felipe-1) wrote :

Also happens to me on a freshly built Qemu master (tip 23919ddfd561).
MBP15,2 OSX 10.14.6

Qemu command line:
qemu/x86_64-softmmu/qemu-system-x86_64 -cpu host -accel hvf -m 4G -smp 8 -vga std -nographic -vnc :1 -netdev user,id=net0 -device e1000e,netdev=net0 buster.qcow

Guest works fine until I try to build a linux-stable tree with "make -j8".

Revision history for this message
Jimmy (jimmyj) wrote :

Ubuntu 18.04 VM crashes after login. Works when the RAM is 4 Gb. Posting this here as the error message looked very similar.

qemu-system-x86_64 -m 6G -vga virtio -show-cursor -usb -device usb-tablet -enable-kvm -drive file=~/QEMU/ubuntu-desktop-18.04.qcow2,if=virtio -accel hvf -cpu host

Crashed with below message
vmx_write_mem: mmu_gva_to_gpa ffff97ccb8dbe000 failed
Abort trap: 6

Revision history for this message
Jimmy (jimmyj) wrote :

Crash report

Revision history for this message
Jordan Williams (jwillikers) wrote :

I think I was able to fix this crash by specifying the exact host model for the cpu argument.

1. Determine the CPU type of the host machine.

$ sysctl -a | grep machdep.cpu.brand_string
machdep.cpu.brand_string: Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz

2. Find the matching CPU model supported by QEMU.

$ qemu-system-x86_64 -cpu help

This CPU corresponds to "x86 Haswell-v4" in this instance.

3. Substitute the CPU model in the QEMU command.

$ qemu-system-x86_64 -cpu Haswell-v4 ...

Revision history for this message
Jordan Williams (jwillikers) wrote :

Related StackOverflow question: https://stackoverflow.com/q/60231203/9835303

Revision history for this message
Thomas Huth (th-huth) wrote :

The QEMU project is currently considering to move its bug tracking to
another system. For this we need to know which bugs are still valid
and which could be closed already. Thus we are setting older bugs to
"Incomplete" now.

If you still think this bug report here is valid, then please switch
the state back to "New" within the next 60 days, otherwise this report
will be marked as "Expired". Or please mark it as "Fix Released" if
the problem has been solved with a newer version of QEMU already.

Thank you and sorry for the inconvenience.

Changed in qemu:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for QEMU because there has been no activity for 60 days.]

Changed in qemu:
status: Incomplete → Expired
Revision history for this message
Daniel Kolakowski (dandee) wrote :

It still happens to me when I try to run Haiku builds on my macos 10.14.
* QEMU emulator version 7.0.0

Command line:
qemu-system-x86_64 -machine q35,accel=hvf -cpu host -smp 4 -m 2048 -vga vmware -boot menu=on -drive file="haiku-minimum.mmc",if=none,format=raw,id=x0 -device ide-hd,drive=x0,bus=ide.0 -usb -device qemu-xhci,id=xhci -device usb-mouse -device usb-kbd -serial stdio -rtc clock=vm,base=localtime

Output:
[ipro1000] (em) Link is up 1000 Mbps Full Duplex
framebuffer: init_hardware()
vmx_write_mem: mmu_gva_to_gpa ffffffff853b3000 failed
[1] 82284 abort qemu-system-x86_64 -machine q35,accel=hvf -cpu host -smp 4 -m 2048 -vga vmwar

Haiku boots most of the way and crashes when trying to show desktop. Same happens with -vga virtio and with -vga option completely removed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.