Open ethindp opened 3 years ago
When running a custom OS in QEMU, an immediate VCPU shutdown request occurs when using -cpu max and setting the accelerator to hax.
So when you remove -cpu max
it works?
It does. However, -cpu max is (supposed) to emulate all features supported by the accelerator, so I suspect its one of the CPU features that QEMU is trying to emulate that's causing the problem. And the HAXM accelerator doesn't have the host CPU choice, so I can't exactly emulate my host processor.
On 3/25/21, nevilad @.***> wrote:
When running a custom OS in QEMU, an immediate VCPU shutdown request occurs when using -cpu max and setting the accelerator to hax.
So when you remove
-cpu max
it works?-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/intel/haxm/issues/354#issuecomment-806440353
-- Signed, Ethin D. Probst
Same here, and trying "-cpu qemu64 -accel hax" - just freezes / super slows win7x64 during boot qemu 6.2, host win11, E5-2690 cpu
I have the same issue here, with an extra warning in output, I will avoid adding a new issue as this seems to be the same.
To Reproduce
Steps to reproduce the behavior:
qemu-system-x86_64 -machine type=pc,accel=hax -cpu max -smp 6,cores=3,threads=2,sockets=1 -m 6144 -k en -rtc base=localtime -net nic,model=virtio-net-pci -net user,hostname=virtual,hostfwd=tcp::1433-:1433,hostfwd=tcp::3389-:3389 -name virtual -usb -device usb-mouse -device virtio-serial -drive file=hdd50g.qcow2,if=virtio,index=0,media=disk -drive file=Win10_21H2_EnglishInternational_x64.iso,index=0,media=cdrom -drive file=virtio-win-0.1.196.iso,index=1,media=cdrom
Output
HAX is working and emulator runs in fast virt mode.
qemu-system-x86_64: warning: This family of AMD CPU doesn't support hyperthreading(2)
Please configure -smp options properly or try enabling topoext feature.
VCPU shutdown request
VCPU shutdown request
When I remove -smp
or use -smp {any integer}
it reproduces the exact same output @ethindp reported
Describe the Bug
Summary:
When running a custom OS in QEMU, an immediate VCPU shutdown request occurs when using
-cpu max
and setting the accelerator tohax
.Host Environment
Guest Environment
To Reproduce
Steps to reproduce the behavior:
qemu-system-x86_64 -drive format=raw,file=bootimage-kernel.bin -no-reboot -drive file=disk.img,if=none,id=NVME01 -device nvme,drive=NVME01,serial=0001 -m 4G -usb -rtc base=utc,clock=host -cpu max -smp cpus=8 -M q35 -name kernel -s -d trace:pci_*,trace:apic_* -D qemu.log -nographic -accel hax
Expected Behavior
Expectation: Qemu should note that it is using HAX, then I should see SeaBIOS and then my kernel booting up properly.
Reproducibility
I believe that this issue has a high degree of reproducibility.
Diagnostic Information
Host crash dump: No host crash dump generated
HAXM log: Log is attached
Android Emulator or QEMU log:
Screenshots: None
Additional context
I am developing my own operating system. The files to boot it, along with the HAXM logs, are available in this file: haxm-crash-20210324.tar.gz
The files in the archive are as follows:
bootimage-kernel.bin
: the image required to boot the operating system, which is justkernel
with a custom bootloader.kernel
: an ELF executable of the compiled kernel binary (not bootable) in case you would like to debug the image