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

arch-x86: Improve KVM set XCR #1138

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

abmerop
Copy link
Member

@abmerop abmerop commented May 15, 2024

This adds two failsafes which may cause a panic on some machines. First, check the host machine has the KVM XCR capability before calling getXCRs or setXCRs. Second, ensure the x87 bit, which must always be one, will always return at least one by modifying the return value in readMiscReg.

Change-Id: I5e778acc926a47443ef6cef29fabd84eb69bb9ba

@abmerop abmerop added the bug label May 15, 2024
@abmerop abmerop added this to the v24.0 milestone May 15, 2024
@mattsinc mattsinc self-requested a review May 15, 2024 15:59
Copy link
Contributor

@mattsinc mattsinc left a comment

Choose a reason for hiding this comment

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

@v-ramadas : FYI

Copy link
Contributor

@powerjg powerjg left a comment

Choose a reason for hiding this comment

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

I am blocking this change until we reconcile it with #1127

There have been multiple KVM changes and some combination has broken KVM on some machines. We need to sort this out before we make more changes to KVM.

If this fixes #1126, that would be great. Please let us know.

cc: @andysan @nmosier @Harshil2107

This adds two failsafes which may cause a panic on some machines. First,
check the host machine has the KVM XCR capability before calling getXCRs
or setXCRs. Second, ensure the x87 bit, which must always be one, will
always return at least one by modifying the return value in readMiscReg.

Change-Id: I5e778acc926a47443ef6cef29fabd84eb69bb9ba
@ivanaamit ivanaamit dismissed powerjg’s stale review May 20, 2024 17:21

This PR actually fixes the current bug.

@ivanaamit ivanaamit merged commit 82318e8 into gem5:develop May 20, 2024
35 of 44 checks passed
@abmerop abmerop deleted the kvm-xcr-guards branch May 20, 2024 17:33
BobbyRBruce pushed a commit to BobbyRBruce/gem5 that referenced this pull request May 25, 2024
This adds two failsafes which may cause a panic on some machines. First,
check the host machine has the KVM XCR capability before calling getXCRs
or setXCRs. Second, ensure the x87 bit, which must always be one, will
always return at least one by modifying the return value in readMiscReg.

Change-Id: I5e778acc926a47443ef6cef29fabd84eb69bb9ba
BobbyRBruce pushed a commit to BobbyRBruce/gem5 that referenced this pull request Jun 7, 2024
This adds two failsafes which may cause a panic on some machines. First,
check the host machine has the KVM XCR capability before calling getXCRs
or setXCRs. Second, ensure the x87 bit, which must always be one, will
always return at least one by modifying the return value in readMiscReg.

Change-Id: I5e778acc926a47443ef6cef29fabd84eb69bb9ba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants