Skip to content

KVM: cpuid: fix KVM_GET_EMULATED_CPUID implementation

Emanuele Giuseppe Esposito kvm linux-doc linux-kselftest lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 1 replyIn review
  2. v44 patches 2 repliesSuperseded
  3. v34 patches 3 repliesSuperseded

Changes in v5 from the cover letter

- Better comment in cpuid.c (patch 1)

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4KVM: x86: Fix a spurious -E2BIG in KVM_GET_EMULATED_CPUIDarch/x86/kvm/cpuid.c+16 -170 replies
2/4Documentation: KVM: update KVM_GET_EMULATED_CPUID ioctl descriptionDocumentation/virt/kvm/api.rst+4 -60 replies
3/4selftests: add kvm_get_emulated_cpuid to processor.htools/testing/selftests/kvm/include/x86_64/processor.h tools/testing/selftests/kvm/lib/x86_64/processor.c+34 -00 replies
4/4selftests: KVM: extend get_cpuid_test to include KVM_GET_EMULATED_CPUIDtools/testing/selftests/kvm/x86_64/get_cpuid_test.c+88 -20 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchVitaly KuznetsovSean Christopherson
1/4R-b R-b
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 v5 thread

Cover letter [PATCH v5 0/4] KVM: cpuid: fix KVM_GET_EMULATED_CPUID implementation

This series aims to clarify the behavior of the KVM_GET_EMULATED_CPUID ioctl, and fix a corner case where -E2BIG is returned when the nent field of struct kvm_cpuid2 is matching the amount of emulated entries that kvm returns.

Patch 1 proposes the nent field fix to cpuid.c,
patch 2 updates the ioctl documentation accordingly and patches 3 and 4 extend the x86_64/get_cpuid_test.c selftest to check the intended behavior of KVM_GET_EMULATED_CPUID.

---
v5:
- Better comment in cpuid.c (patch 1)

Emanuele Giuseppe Esposito (4):
KVM: x86: Fix a spurious -E2BIG in KVM_GET_EMULATED_CPUID
Documentation: KVM: update KVM_GET_EMULATED_CPUID ioctl description
selftests: add kvm_get_emulated_cpuid to processor.h
selftests: KVM: extend get_cpuid_test to include
KVM_GET_EMULATED_CPUID

 Documentation/virt/kvm/api.rst                | 10 +--
 arch/x86/kvm/cpuid.c                          | 33 ++++---
 .../selftests/kvm/include/x86_64/processor.h  |  1 +
 .../selftests/kvm/lib/x86_64/processor.c      | 33 +++++++
 .../selftests/kvm/x86_64/get_cpuid_test.c     | 90 ++++++++++++++++++-
 5 files changed, 142 insertions(+), 25 deletions(-)
Signature · 1 line
2.30.2