On Tue, May 20, 2025 at 11:28:33PM -0700, Sean Kamath wrote:
> Just wondering if anyone else has tried to install OpenBSD 7.7 (cd77.iso) under UTM (QEMU) emulation of X86_64 on Apple Silicon, and, if so, did they get it to work?
>
> When booting with defaults ("Standard PC (Q35 + ICH9, 2009)"), the error is:
>
> uhub1: device problem, disabling port 1
> uhub1: device problem, disabling port 2
> uhub1: device problem, disabling port 3
> Softraid0 at root
> scsibus1 at softraid0: 256 targets
> root on rd0a swap on rdOb dump on rd0b
> WARNING: CHECK AND RESET THE DATE!
> fatal privileged instruction fault in supervisor mode
> trap type 0 code 0 rip ffffffff8121d9ac cs 8 rflags 10046 cr2 ffff80002d9530[cut off]
> gsbase Oxffffffff8195eff0 kgsbase Ox0
> panic: trap type 0, code=0, pc=ffffffff8121d9ac
> syncing disks… done
>
> Switching to "Standard PC (i440FX + PIIX, 1996)", there's no long pause as it disables the uhub1 ports, but fails similarly:
>
>
> root on rd0a swap on rdOb dump on rd0b
> WARNING: CHECK AND RESET THE DATE!
> fatal privileged instruction fault in supervisor mode
> trap type 0 code 0 rip ffffffff8121d9ac cs 8 rflags 10046 cr2 ffff80002dd52000 cpl 0 rsp
> gsbase Oxffffffff8195eff0 kgsbase Dx0
> panic: trap type 0, code=0, pc=ffffffff8121d9ac syncing disks... done
> dump to dev 17,1 not possible
> rebooting...
>
> So, kinda similar.
>
> I tried a few other settings, but all end with "fatal privileged instruction ...".
>
> If anyone has gotten this to work? My google-fu is not strong enough to find anyone who has (or, more likely tried and failed, since it's much less likely people post if it just works).
>
> Sean
ffffffff8121d9ac: 66 0f ae bc c7 00 15 00 00 clflushopt 0x1500(%rdi,%rax,8)
Looks like we are blindly using clflushopt in the skl/avx case in this handler.
The SDM says we should only do that if CPUID says that instruction is available
but I don't see us checking that.
I'd recommend just changing the cpu type to something older (pre skylake). It's
really not going to matter since you're doing 100% emulation here and the
performance is going to be pretty awful in any case.
-ml
No comments:
Post a Comment