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

Default qemu flags for Windows amd64 #15851

Merged
merged 1 commit into from
Oct 28, 2022

Conversation

arixmkii
Copy link
Contributor

@arixmkii arixmkii commented Sep 18, 2022

Windows specific QEMU defaults are prominently missing from code as of now. This adds set of opts compatible with Hyper-V accelerator and selects Hyper-V as accelerator. This doesn't yet enable QEMU support on windows, so, no new test required for now.

-cpu host is not available for whpx accel, so, to stay target agnostic it is needed to either use base and enable cpu options one by one, or go with max and disable ones, which cause problems.

This PR sets cpu to max,vmx=off,monitor=off. It was experimentally discovered in this experiment #13006

  • vmx=off prevents QEMU from immediately crashing trying to initialize hypervizor;
  • monitor=off prevents kernel panic during FCOS boot sequence.

Tested with:

  • TigerLake (11th generation Intel Core) laptop platform with Win11 Pro
  • Skylake (6h generation Intel Core) desktop (own build) with Win10 Pro (see details below)

For Skylake I had to add tsc=off. This was also needed if using target Skylake-Client (though it should be a match with the host). And even for SandyBridge target. So, I suspect that this to be an issue with CPU, BIOS, Logical Board combination and don't see that this should go into defaults. Also, Skylake CPUs are aged already considered legacy and even not capable to work with Win11 and should not dictate the defaults for future version of SW (personal opinion here).

[NO NEW TESTS NEEDED]

Signed-off-by: Arthur Sengileyev [email protected]

Does this PR introduce a user-facing change?

None

@rhatdan
Copy link
Member

rhatdan commented Sep 19, 2022

@n1hility @baude @gbraad PTAL

@rhatdan
Copy link
Member

rhatdan commented Sep 19, 2022

Thanks @arixmkii. I added the [NO NEW TESTS NEEDED] flag, you will need to repush to get this to pass tests.

@github-actions
Copy link

A friendly reminder that this PR had no activity for 30 days.

Signed-off-by: Arthur Sengileyev <[email protected]>
@arixmkii
Copy link
Contributor Author

Rebased to latest main after 4.3.0 release.

@rhatdan
Copy link
Member

rhatdan commented Oct 20, 2022

@n1hility @baude @gbraad PTAL

@rhatdan
Copy link
Member

rhatdan commented Oct 28, 2022

@n1hility @baude @gbraad PTAL

)

func (v *MachineVM) addArchOptions() []string {
opts := []string{"-machine", "q35,accel=whpx:tcg", "-cpu", "max,vmx=off,monitor=off"}
Copy link
Member

Choose a reason for hiding this comment

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

minor nit: Could you add a comment here explaining like you did in the PR why certain flags have to be disabled and maybe a bug ref if you think its pertinent (e.g. https://gitlab.com/qemu-project/qemu/-/issues/628 for vmx=off)

Copy link
Member

Choose a reason for hiding this comment

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

can be in a later PR if you prefer, not blocking to me

@n1hility
Copy link
Member

/approve LGTM

@rhatdan
Copy link
Member

rhatdan commented Oct 28, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 28, 2022
@rhatdan
Copy link
Member

rhatdan commented Oct 28, 2022

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 28, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: arixmkii, n1hility, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 28, 2022
@openshift-merge-robot openshift-merge-robot merged commit 5eacf6c into containers:main Oct 28, 2022
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
@arixmkii arixmkii deleted the win_qemu_settings branch March 1, 2024 13:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants