Skip to content

KVM: x86: APICv fixes

Sean Christopherson kvm lkml 2 versions – Applied

Status from this message: Queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 1 replyApplied
  2. v14 patches 7 repliesSuperseded

Changes in v2 from the cover letter

- Collect reviews. [Maxim]
- Reword patch 2's changelog to make it clear that ignoring vmcs02 is perfectly ok. [Maxim]

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/4KVM: x86: Tag APICv DISABLE inhibit, not ABSENT, if APICv is disabledarch/x86/kvm/x86.c+1 -10 replies
2/4KVM: nVMX: Defer APICv updates while L2 is active until L1 is activearch/x86/kvm/vmx/nested.c arch/x86/kvm/vmx/vmx.c arch/x86/kvm/vmx/vmx.h+11 -00 replies
3/4KVM: x86: Pend KVM_REQ_APICV_UPDATE during vCPU creation to fix a racearch/x86/kvm/x86.c+14 -10 replies
4/4KVM: x86: Skip KVM_GUESTDBG_BLOCKIRQ APICv update if APICv is disabledarch/x86/kvm/x86.c+3 -00 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchMaxim Levitsky
1/4R-b
2/4
3/4R-b
4/4R-b

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] KVM: x86: APICv fixes

Patch 1 is brown paper bag fix for a copy+paste bug (thankfully from this cycle).

Patch 2 fixes a nVMX + APICv bug where KVM essentially corrupts vmcs02 if an APICv update arrives while L2 is running. Found when testing a slight variation of patch 3.

Patch 3 fixes a race where an APICv update that occurs while a vCPU is being created will fail to notify that vCPU due it not yet being visible to the updater.

Patch 4 is a minor optimization/cleanup found by inspection when digging into everything else.

v2:
- Collect reviews. [Maxim]
- Reword patch 2's changelog to make it clear that ignoring vmcs02 is perfectly ok. [Maxim]

v1: https://lore.kernel.org/all/[email protected]

Sean Christopherson (4):
KVM: x86: Tag APICv DISABLE inhibit, not ABSENT, if APICv is disabled
KVM: nVMX: Defer APICv updates while L2 is active until L1 is active
KVM: x86: Pend KVM_REQ_APICV_UPDATE during vCPU creation to fix a race
KVM: x86: Skip KVM_GUESTDBG_BLOCKIRQ APICv update if APICv is disabled

 arch/x86/kvm/vmx/nested.c |  5 +++++
 arch/x86/kvm/vmx/vmx.c    |  5 +++++
 arch/x86/kvm/vmx/vmx.h    |  1 +
 arch/x86/kvm/x86.c        | 20 ++++++++++++++++++--
 4 files changed, 29 insertions(+), 2 deletions(-)

base-commit: 150866cd0ec871c765181d145aa0912628289c8a

Signature · 1 line
2.36.0.rc0.470.gd361397f0d-goog