Skip to content

Add logical CPU to KVM_EXIT_FAIL_ENTRY info

Jim Mattson kvm 4 versions – Applied

Status from this message: Queued, thanks. (It would have been fine to squash patches 3-5-6

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 1 replyApplied
  2. v34 patches 8 repliesSuperseded
  3. v21 patch 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch3 repliesSuperseded

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/6kvm: svm: Prefer vcpu->cpu to raw_smp_processor_id()arch/x86/kvm/svm/svm.c+3 -60 replies
2/6kvm: svm: Always set svm->last_cpu on VMRUNarch/x86/kvm/svm/sev.c arch/x86/kvm/svm/svm.c+1 -10 replies
3/6kvm: vmx: Add last_cpu to struct vcpu_vmxarch/x86/kvm/vmx/vmx.c arch/x86/kvm/vmx/vmx.h+4 -00 replies
4/6kvm: x86: Add "last CPU" to some KVM_EXIT informationDocumentation/virt/kvm/api.rst arch/x86/kvm/svm/svm.c arch/x86/kvm/vmx/vmx.c +2 more+15 -30 replies
5/6kvm: x86: Move last_cpu into kvm_vcpu_arch as last_vmentry_cpuarch/x86/include/asm/kvm_host.h arch/x86/kvm/svm/sev.c arch/x86/kvm/svm/svm.c +3 more+13 -160 replies
6/6kvm: x86: Set last_vmentry_cpu in vcpu_enter_guestarch/x86/kvm/svm/svm.c arch/x86/kvm/vmx/vmx.c arch/x86/kvm/x86.c+1 -20 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchOliver UptonPeter Shier
1/6R-b
2/6R-b R-b
3/6R-b R-b
4/6R-b R-b
5/6R-b R-b
6/6R-b R-b

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

Read the v4 thread

Cover letter [PATCH v4 0/6] Add logical CPU to KVM_EXIT_FAIL_ENTRY info

It's been about 6 months since v2. Sorry for the delay. Initially, this was a single patch to add information to KVM_EXIT_FAIL_ENTRY to help identify a defective CPU. It has gotten a little more complicated, since Peter Shier pointed out that the vCPU thread may have migrated between the time of failure and the KVM exit. Fortunately, the SEV folks started to make the necessary information available with "last_cpu," but only on AMD and only with SEV. The current version expands upon that by making "last_cpu" available in all configurations on AMD and Intel.

v2: Use vcpu->cpu rather than raw_smp_processor_id() (Liran).
v3: Record the last logical processor to run the vCPU thread (Peter).
Add the "last CPU" information to KVM_EXIT_INTERNAL_ERROR exits as well as KVM_EXIT_FAIL_ENTRY [except for "EMULATION" errors]. (Liran & Paolo).
v4: Move last_cpu into kvm_vcpu_arch as last_vmentry_cpu, and set this
field in vcpu_enter_guest (Sean).

Jim Mattson (6):
kvm: svm: Prefer vcpu->cpu to raw_smp_processor_id()
kvm: svm: Always set svm->last_cpu on VMRUN
kvm: vmx: Add last_cpu to struct vcpu_vmx
kvm: x86: Add "last CPU" to some KVM_EXIT information
kvm: x86: Move last_cpu into kvm_vcpu_arch as last_vmentry_cpu
kvm: x86: Set last_vmentry_cpu in vcpu_enter_guest

 Documentation/virt/kvm/api.rst  |  1 +
 arch/x86/include/asm/kvm_host.h |  3 +++
 arch/x86/kvm/svm/sev.c          |  3 +--
 arch/x86/kvm/svm/svm.c          | 13 ++++++-------
 arch/x86/kvm/svm/svm.h          |  3 ---
 arch/x86/kvm/vmx/vmx.c          | 10 ++++++++--
 arch/x86/kvm/x86.c              |  2 ++
 include/uapi/linux/kvm.h        |  2 ++
 8 files changed, 23 insertions(+), 14 deletions(-)
Signature · 1 line
2.27.0.rc2.251.g90737beb825-goog