Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallbacks to -cpu max on native arch platforms that have an accelerator but do not support -cpu host #913

Merged
merged 1 commit into from
Jun 20, 2022
Merged

Fallbacks to -cpu max on native arch platforms that have an accelerator but do not support -cpu host #913

merged 1 commit into from
Jun 20, 2022

Conversation

iamleot
Copy link
Contributor

@iamleot iamleot commented Jun 19, 2022

On platforms that have an accelerator but -cpu host is not available fallbacks to -cpu max that enables all features supported by the accelerator in the current host.

This was noticed on NetBSD. What actually happened is that in qemu.Cmdline() if nothing adjust the CPU we will ends up with:

if strings.HasPrefix(cpu, "qemu64") {

where -accel is currently hardcoded to tcg later in:

args = appendArgsIfNoConflict(args, "-accel", "tcg,thread=multi,tb-size=512")
.

And so no host accelerator is used in such case.

On platforms that have an accelerator but `-cpu host' is not available
fallback to `-cpu max' that enables all features supported by the
accelerator in the current host.

Signed-off-by: Leonardo Taccari <[email protected]>
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit 1d5e023 into lima-vm:master Jun 20, 2022
@AkihiroSuda AkihiroSuda added this to the vNext milestone Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants