1.8: virt_kvm: Set flags to accept values in set_activity (#4014) - #4119
Open
Steven Malis (smalis-msft) wants to merge 1 commit into
Open
1.8: virt_kvm: Set flags to accept values in set_activity (#4014)#4119Steven Malis (smalis-msft) wants to merge 1 commit into
Steven Malis (smalis-msft) wants to merge 1 commit into
Conversation
On KVM the nmi_pending and interrupt_shadow values ignored by set_vcpu_events unless flags are specified saying to accept them. This is because these values can be modified by other processors asynchronously, and the caller may not want to accidentally overwrite these. In our case when these values are true we do in fact want them to be set, so pass in the flags to do so. However when they're false, we don't want to accidentally clear a signal from another VP, so check first. (cherry picked from commit b08a7c8)
Contributor
There was a problem hiding this comment.
Pull request overview
This backport updates KVM x86_64 VP activity-state handling so set_vcpu_events explicitly marks nmi_pending and interrupt_shadow as valid when they are being set, matching KVM’s semantics around asynchronously-updated fields.
Changes:
- Destructures
vp::Activityfields locally inset_activityfor clearer use. - Sets
kvm_vcpu_events.flagsto includeKVM_VCPUEVENT_VALID_NMI_PENDINGandKVM_VCPUEVENT_VALID_SHADOWwhen the corresponding values aretrue.
Steven Malis (smalis-msft)
enabled auto-merge (squash)
July 31, 2026 17:20
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.
Backport of #4014 to
release/1.8.2607.The cherry-pick of b08a7c8 applied cleanly onto
release/1.8.2607with no conflicts and no manual edits.Original PR: #4014
This backport PR was created by an AI agent (GitHub Copilot) on behalf of Steven Malis (@smalis-msft).