-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenBSD 7.0 Guest crashes QEMULauncher #3197
Comments
@agraf this seems to be an assertion failure on https://github.com/qemu/qemu/blob/master/target/arm/hvf/hvf.c#L1159 Have you hit this before? Can you explain the reasoning for that assertion? Thanks. |
This means that an instruction was accessing MMIO space that is not predecoded by hardware. Neither KVM not QEMU's hvf implementation emulate instructions for MMIO exits; they merely take the hardware exit info and act accordingly. does the same guest run fine on KVM? |
@agraf No issues on my x86 virtualization host (running KVM). |
I think we need ARM64 KVM to test. Unfortunately I don’t have easy access to hardware (haven’t tried AsahiLinux so idk if it supports KVM). |
This is an ARM specific issue. Please check on aarch64 KVM (Raspberry Pi 4 for example). |
Looking at the latest from here: http://ftp.luis.uni-hannover.de/openbsd/snapshots/arm64/
So from what I can see, OpenBSD is trying to issue a "cache line clear" instruction (memset(0) optimization) on the serial port registers. That is not a good idea ... :). |
So is this an OpenBSD issue? @agraf |
Yes, I've seen that. I actually think this is a cache line clean and invalidate instruction. And my reading of the ARMv8 ARM says that it should be perfectly fine to issue those on device memory. May still not be a good idea, but our kernel cleans any page that is mapped non-cachable because it might have been mapped cachable in the past. It works on real hardware though. |
I posted a possible workaround for this in QEMU: https://patchwork.kernel.org/project/qemu-devel/patch/20211025191349.52992-1-agraf@csgraf.de/ |
Apple's Hypervisor.Framework forwards cache operations as MMIO traps into user space. For MMIO however, these have no meaning: There is no cache attached to them. So let's just treat cache data exits as nops. This fixes OpenBSD booting as guest. Reported-by: AJ Barris <AwlsomeAlex@github.com> Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reference: utmapp/UTM#3197 Message-Id: <20211026071241.74889-1-agraf@csgraf.de> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Describe the issue
OpenBSD 7.0 crashes UTM/QEMULauncher
Configuration
Went to run VM via miniroot.img, got to boot loader, typed in 'set tty fb0', then VM crashes.
Crash log
QEMULauncher.log
Debug log
debug.log
Upload VM
config.plist.txt
The text was updated successfully, but these errors were encountered: