Skip to content

Refactor vcpu creation flow of x86 arch

Xiaoyao Li kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4KVM: VMX: rename {vmx,nested_vmx}_vcpu_setup functionsarch/x86/kvm/vmx/nested.c arch/x86/kvm/vmx/nested.h arch/x86/kvm/vmx/vmx.c+5 -84 replies
2/4KVM: VMX: Setup MSR bitmap only when has msr_bitmap capabilityarch/x86/kvm/vmx/vmx.c+20 -192 replies
3/4KVM: X86: Refactor kvm_arch_vcpu_createarch/x86/include/asm/kvm_host.h arch/x86/kvm/svm.c arch/x86/kvm/vmx/vmx.c +1 more+102 -871 reply
4/4KVM: X86: Make vcpu's FPU allocation a common functionarch/x86/kvm/svm.c arch/x86/kvm/vmx/vmx.c arch/x86/kvm/x86.c+24 -360 replies

Reviews trailers per patch

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

PatchKrish Sadhukhan
1/4R-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 v1 thread

Cover letter [PATCH 0/4] Refactor vcpu creation flow of x86 arch

When reading the vcpu creationg flow of vmx, I find it hard to follow since it mixes the data structure allocation and initilization together.

This series tries to make the vcpu creation flow more clear that first allocating data structure and then initializing them. In this way, it helps move FPU allocation to generic x86 code (Patch 4).

This series intends to do no functional change. I just tested it with kvm_unit_tests for vmx since I have no AMD machine at hand.

Xiaoyao Li (4):
KVM: VMX: rename {vmx,nested_vmx}_vcpu_setup functions
KVM: VMX: Setup MSR bitmap only when has msr_bitmap capability
KVM: X86: Refactor kvm_arch_vcpu_create
KVM: X86: Make vcpu's FPU allocation a common function

 arch/x86/include/asm/kvm_host.h |   1 +
 arch/x86/kvm/svm.c              |  81 ++++++---------
 arch/x86/kvm/vmx/nested.c       |   2 +-
 arch/x86/kvm/vmx/nested.h       |   2 +-
 arch/x86/kvm/vmx/vmx.c          | 173 ++++++++++++++------------------
 arch/x86/kvm/x86.c              |  40 ++++++++
 6 files changed, 150 insertions(+), 149 deletions(-)
Signature · 1 line
2.19.1