Skip to content

gok vm: use cpu:host instead of named variants#100

Open
damdo wants to merge 1 commit intogokrazy:mainfrom
damdo:fix-gok-vm-for-qemu-10
Open

gok vm: use cpu:host instead of named variants#100
damdo wants to merge 1 commit intogokrazy:mainfrom
damdo:fix-gok-vm-for-qemu-10

Conversation

@damdo
Copy link
Copy Markdown
Contributor

@damdo damdo commented Apr 21, 2026

I was seeing this error when running gok vm from macos.

qemu-system-aarch64: Invalid CPU model: cortex-a72

Which is due this series of qemu changes: https://patchew.org/QEMU/20231129042012.277831-1-gshan@redhat.com/#:~:text=157%20deletions(%2D)-,%5BPATCH%20v8%200%2F9%5D%20Unified%20CPU%20type%20check,been%20queued%20to%20the%20branch.

This is what the docs state:

A note about CPU models and KVM
Named CPU models generally do not work with KVM. There are a few cases that do work, e.g. using the named CPU model cortex-a57 with KVM on a seattle host, but mostly if KVM is enabled the host CPU type must be used. This means the guest is provided all the same CPU features as the host CPU type has. And, for this reason, the host CPU type should enable all CPU features that the host has by default. Indeed it’s even a bit strange to allow disabling CPU features that the host has when using the host CPU type, but in the absence of CPU models it’s the best we can do if we want to launch guests without all the host’s CPU features enabled.

This validation was ignored in qemu 9 and made strict in 10

ref: https://www.qemu.org/docs/master/system/arm/cpu-features.html

I was seeing this error when running `gok vm` from macos.
```
qemu-system-aarch64: Invalid CPU model: cortex-a72
```
Which is due this series of qemu changes: https://patchew.org/QEMU/20231129042012.277831-1-gshan@redhat.com/#:~:text=157%20deletions(%2D)-,%5BPATCH%20v8%200%2F9%5D%20Unified%20CPU%20type%20check,been%20queued%20to%20the%20branch.

This is what the docs state:

A note about CPU models and KVM
Named CPU models generally do not work with KVM. There are a few cases that do work, e.g. using the named CPU model cortex-a57 with KVM on a seattle host, but mostly if KVM is enabled the host CPU type must be used. This means the guest is provided all the same CPU features as the host CPU type has. And, for this reason, the host CPU type should enable all CPU features that the host has by default. Indeed it’s even a bit strange to allow disabling CPU features that the host has when using the host CPU type, but in the absence of CPU models it’s the best we can do if we want to launch guests without all the host’s CPU features enabled.

This validation was ignored in qemu 9 and made strict in 10

ref: https://www.qemu.org/docs/master/system/arm/cpu-features.html
@damdo
Copy link
Copy Markdown
Contributor Author

damdo commented Apr 21, 2026

cc. @stapelberg

@damdo
Copy link
Copy Markdown
Contributor Author

damdo commented Apr 23, 2026

Closing and reopening to kick off testing again

@damdo damdo closed this Apr 23, 2026
@damdo damdo reopened this Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant