Skip to content

Fix a race between posted interrupt delivery and migration in a nested VM

Mingwei Zhang kvm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 10 repliesIn review
  2. v15 patches 22 repliesSuperseded

Changes in v2 from the cover letter

- Replace the original vmcs12 bug fix patch into one that processes nested state pages request in a common function [paolo].
- Update the commit messages [seanjc, oupton].
- Remove vcpu_run_interruptable(), use __vcpu_run() instead [seanjc].
- Fix format issue in prepare_posted_intr_desc() [seanjc].
- Rebase to kvm/queue.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4KVM: x86: move the event handling of KVM_REQ_GET_VMCS12_PAGES into a common functionarch/x86/kvm/x86.c+23 -67 replies
2/4KVM: selftests: Save/restore vAPIC state in migration teststools/testing/selftests/kvm/include/kvm_util_base.h tools/testing/selftests/kvm/include/x86_64/processor.h tools/testing/selftests/kvm/lib/x86_64/processor.c+13 -00 replies
3/4KVM: selftests: Add support for posted interrupt handling in L2tools/testing/selftests/kvm/include/x86_64/vmx.h tools/testing/selftests/kvm/lib/x86_64/vmx.c+24 -02 replies
4/4KVM: selftests: Test if posted interrupt delivery race with migrationtools/testing/selftests/kvm/.gitignore tools/testing/selftests/kvm/Makefile tools/testing/selftests/kvm/x86_64/vmx_migrate_pi_pending.c+293 -01 reply

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchOliver Upton
1/4Originally-by
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/4] Fix a race between posted interrupt delivery and migration in a nested VM

This patch set aims to fix a race condition between posted interrupt delivery and migration for a nested VM. In particular, we proves that when a nested vCPU is halted and just migrated, it will lose a posted interrupt from another vCPU in the same VM.

Changelog:

v1 -> v2:
- Replace the original vmcs12 bug fix patch into one that processes nested state pages request in a common function [paolo].
- Update the commit messages [seanjc, oupton].
- Remove vcpu_run_interruptable(), use __vcpu_run() instead [seanjc].
- Fix format issue in prepare_posted_intr_desc() [seanjc].
- Rebase to kvm/queue.

v1 link:
- https://lore.kernel.org/lkml/[email protected]/t/

Jim Mattson (1):
KVM: selftests: Test if posted interrupt delivery race with migration

Mingwei Zhang (3):
KVM: x86: move the event handling of KVM_REQ_GET_VMCS12_PAGES into a
common function
KVM: selftests: Save/restore vAPIC state in migration tests
KVM: selftests: Add support for posted interrupt handling in L2

 arch/x86/kvm/x86.c                            |  29 +-
 tools/testing/selftests/kvm/.gitignore        |   1 +
 tools/testing/selftests/kvm/Makefile          |   1 +
 .../selftests/kvm/include/kvm_util_base.h     |  10 +
 .../selftests/kvm/include/x86_64/processor.h  |   1 +
 .../selftests/kvm/include/x86_64/vmx.h        |  10 +
 .../selftests/kvm/lib/x86_64/processor.c      |   2 +
 tools/testing/selftests/kvm/lib/x86_64/vmx.c  |  14 +
 .../kvm/x86_64/vmx_migrate_pi_pending.c       | 291 ++++++++++++++++++
 9 files changed, 353 insertions(+), 6 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/x86_64/vmx_migrate_pi_pending.c

base-commit: 372d07084593dc7a399bf9bee815711b1fb1bcf2

Signature · 1 line
2.37.2.672.g94769d06f0-goog