Open
Conversation
115959f to
c0b6d85
Compare
2fd74d8 to
4bb478d
Compare
Member
Author
|
The first patch is temporary workaround for #152 |
Collaborator
|
The CI machine was updated, so I think the first commit is not required anymore. |
b344d2a to
e62e2e6
Compare
Member
Author
Done |
acatangiu
previously approved these changes
Nov 23, 2021
Add method to query KVM_CAP_X86_DISABLE_EXITS for x86 platforms. Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
Kvm::check_extension_int() may return negative value as error code, so Kvm::get_max_vcpus() and Kvm::get_max_vcpu_id() should handle the error cases. Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
acatangiu
approved these changes
Dec 6, 2021
| /// Returns the "disable idle exiting" capability. | ||
| /// | ||
| /// The `KVM_CAP_X86_DISABLE_EXITS` capability provides userspace with per-VM capability | ||
| /// to not intercept MWAIT/HLT/PAUSE/CSTATE, which means though instructions won't cause |
Collaborator
There was a problem hiding this comment.
Suggested change
| /// to not intercept MWAIT/HLT/PAUSE/CSTATE, which means though instructions won't cause | |
| /// to not intercept MWAIT/HLT/PAUSE/CSTATE, which means such instructions won't cause |
or these
lauralt
reviewed
Dec 7, 2021
Comment on lines
+636
to
+637
| assert!(disable_exits & KVM_X86_DISABLE_EXITS_HLT != 0); | ||
| assert!(disable_exits & KVM_X86_DISABLE_EXITS_PAUSE != 0); |
Collaborator
There was a problem hiding this comment.
Running this test on my laptop fails, should we check here for some capability before doing the asserts? Maybe this way we can also have a test case for get_disable_exits returning 0.
Comment on lines
+261
to
+265
| if x > 0 { | ||
| x as u32 | ||
| } else { | ||
| 0 | ||
| } |
There was a problem hiding this comment.
This can be slightly simplified.
Suggested change
| if x > 0 { | |
| x as u32 | |
| } else { | |
| 0 | |
| } | |
| u32::try_from(x).unwrap_or(0) |
Member
|
@jiangliu are you still interested in getting some of these changes merged? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enhance the kvm-ioctls with: