| Summary: | ffs_sbget: panic: Unregistered use of FPU in kernel | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Alex Richardson <arichardson> |
| Component: | kern | Assignee: | Alex Richardson <arichardson> |
| Status: | Closed Not A Bug | ||
| Severity: | Affects Only Me | CC: | cem, fs, kib |
| Priority: | --- | Keywords: | crash |
| Version: | CURRENT | ||
| Hardware: | Any | ||
| OS: | Any | ||
| URL: | https://bugs.launchpad.net/qemu/+bug/1916269 | ||
| Bug Depends on: | |||
| Bug Blocks: | 263979 | ||
|
Description
Alex Richardson
2021-02-18 11:01:09 UTC
If you turn off acceleration, or use different hypervisor or bare metal, do you see the same problem? I believe this is a hypervisor bug, OS cannot/should not do anything there. This seems to happen with TCG as well, so it's not KVM. Possibly a generic QEMU bug then? Note: this is QEMU running with as `qemu-system-x86_64 -M accel=tcg -cpu Nehalem -smp 8 -m 2048 -nographic -drive if=none,file=/local/scratch/alr48/cheri/output/freebsd-amd64.img,id=drv,format=raw -device virtio-blk-pci,drive=drv`, so possibly related to the -smp option. I have not seen it without QEMU's smp flag. Note that CRC32 instruction is qualified on SSE4.2, but it does not use any of FPU registers. It operates on GPR so it does not require saving user context before executing in kernel. It should not even cause #NM (Device Not Available) exception at all, according to SDM. Adding fpu_kern_enter() around it would hugely hit non-buggy environments like bare metal or non-buggy hypervisors. Try to report it to QEMU devs. I just had a look at the QEMU TCG code for crc32 and it does not seem like it can raise anything other than #UD. Unless of course there is a bug in the decoding logic and it is treating <+126>: crc32q %rsi,%rbx as a different instruction. GDB says the raw bytes are as follows: 0xffffffff8105a4de <+126>: f2 48 0f 38 f1 de crc32q %rsi,%rbx 0xffffffff8105a4e4 <+132>: f2 48 0f 38 f1 ca crc32q %rdx,%rcx. So this does sound like it must be a QEMU bug. Reported upstream as https://bugs.launchpad.net/qemu/+bug/1916269 ^Triage: Assign to committer that resolved |