macpine: Unable to create an instance
Whenever I try to create an instance I am getting the following error message:
qemu-system-x86_64: Property 'host-x86_64-cpu.pdpe1gb=on' not found
I also tried to use -a aarch64
but this time I got ssh handshake failed error. I rather prefer to use host CPU (x86_64) though anyways. Do I have to enable cpu.pdpe1gb
feature somehow or there’s something else that’s causing the issue. Any pointers would be appreciated!
My host machine is: MacBook Pro 2019 (Intel model)
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 20
I’m not sure if this is related but, https://manpages.ubuntu.com/manpages/kinetic/en/man7/qemu-cpu-models.7.html
I couldn’t find qemu documentation regarding
host
cpu model, though some other resources also pointed out that by default, thehost
model tries to approximate the host cpu.This is really odd because according to QEMU docs on pdpe1gb
sysctl
could work. I’ll try this option withsyscall.Sysctl
from the standard library.What about using
sysctl -a
to determine if the system supports 1 GB pages then setting the flag accordingly?Also, when I tested without setting
pdpe1gb
flag, the VM was created with 1gb pages support. I am not 100% sure, but what if qemu enables it by default if the device supports 1gb pages?Host
VM
I also tested with
host,pdpe1gb=off
previously, which did worked. But, 1gb pages were not enabled (see above table).@maxzinkus looking into it now.
@themisir could you run the following on your host to check if it supports supper pages (mac’s version of huge pages)
echo "#include <mach/vm_statistics.h>" | gcc -dM -E - | grep VM_FLAGS_SUPERPAGE_SIZE_
Awesome! It looks like the flag format may be incorrect in macpine, and while the commit that fixed some x64 architectures (which didn’t support 1GB pages, I guess?) broke it for x64 machines which do support it.
@idroz when you get a chance, we should figure out when 1GB pages need to be disabled (if ever any more?) and use the
=off
format rather than the-
format to achieve it.Thanks again @themisir for a truly excellent bug report with the additional detail.
I updated the table with regarding
pdpe1gb
support information for each configuration. Looks like unless explicitly disabled withpdpe1gb=off
flag it’s enabled by default.I played a bit with those options.
I tried reverting changes been made using those commits:
It worked with both
host,-pdpe1gb
andhost
values, but not with thehost,-pdpe1gb=on
value which is the current state.I also tried with the
host,pdpe1gb=on
value, which also worked.host,-pdpe1gb=on
host
host,pdpe1gb
host,pdpe1gb=on
host,pdpe1gb=off
In conclusion, I am not sure how this change may affect the current user base. Also, I am not that good with qemu stuff. So, I am leaving to you guys to choose what next needs to be done.