Skip to content

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
microsoft:release/1.8.2607from
smalis-msft:backport-1.8-pr4014
Open

1.8: virt_kvm: Set flags to accept values in set_activity (#4014)#4119
Steven Malis (smalis-msft) wants to merge 1 commit into
microsoft:release/1.8.2607from
smalis-msft:backport-1.8-pr4014

Conversation

@smalis-msft

Copy link
Copy Markdown
Contributor

Backport of #4014 to release/1.8.2607.

The cherry-pick of b08a7c8 applied cleanly onto release/1.8.2607 with 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).

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)
Copilot AI review requested due to automatic review settings July 31, 2026 17:17
@smalis-msft
Steven Malis (smalis-msft) requested a review from a team as a code owner July 31, 2026 17:17
@smalis-msft Steven Malis (smalis-msft) added the release_1.8.2607 Targets the release/1.8.2607 branch. label Jul 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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::Activity fields locally in set_activity for clearer use.
  • Sets kvm_vcpu_events.flags to include KVM_VCPUEVENT_VALID_NMI_PENDING and KVM_VCPUEVENT_VALID_SHADOW when the corresponding values are true.

Comment thread vmm_core/virt_kvm/src/arch/x86_64/vp_state.rs
@smalis-msft
Steven Malis (smalis-msft) enabled auto-merge (squash) July 31, 2026 17:20
@github-actions

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_1.8.2607 Targets the release/1.8.2607 branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants