Split kvm_update_cpuid_runtime()
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest7 patches 0 repliesNew
- v1 RFC9 patches 4 repliesSuperseded
Changes in v2 from the cover letter
Reorders patch set, let each extracted function with its caller in a patch. Also, added a helper function guest_cpuid_change(), which is the extraction of the common code.
Patches in v2 No applies recorded yet
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/7] Split kvm_update_cpuid_runtime()
kvm_update_cpuid_runtime() is currently called by various functions for the purpose of updating vCPU's cpuid entries, due to specific runtime changes, e.g. CR4 bits changes, XCR0 bits changes, etc. Each of them actually just needs to update 1 ~ 2 CPUID entries. But current kvm_update_cpuid_runtime() packages all. Given finding a target CPUID entry need to go through all CPUID entries, calling kvm_update_cpuid_runtime() is a waste for each cause.
This patch set splits kvm_update_cpuid_runtime() into pieces according to different updating causes.
Then let various callers call their specific necessary kvm_xxx_update_cpuid(). This patch set also refactors kvm_vcpu_after_set_cpuid().
This not only significantly saves each caller's time, but also eliminates unnecessary couplings.
---
Change Log
v2:
Reorders patch set, let each extracted function with its caller in a patch. Also, added a helper function guest_cpuid_change(), which is the extraction of the common code.
Robert Hoo (7):
kvm: x86: Extract kvm_apic_base_update_cpuid() from
kvm_update_cpuid_runtime()
kvm: x86: Extract kvm_xcr0_update_cpuid() from
kvm_update_cpuid_runtime()
kvm: x86: Extract kvm_osxsave_update_cpuid() and
kvm_pke_update_cpuid() from kvm_update_cpuid_runtime()
kvm: x86: Extract kvm_mwait_update_cpuid() from
kvm_update_cpuid_runtime()
[Trivial] kvm: x86: cpuid_query_maxphyaddr(): Use a simple 'e' instead
of misleading 'best', as the variable name
kvm: x86: Refactor kvm_vcpu_after_set_cpuid()
kvm: x86: Remove kvm_update_cpuid_runtime()
arch/x86/kvm/cpuid.c | 148 ++++++++++++++++++++++++++++++--------------------- arch/x86/kvm/cpuid.h | 7 ++- arch/x86/kvm/lapic.c | 2 +- arch/x86/kvm/x86.c | 29 ++++++---- 4 files changed, 113 insertions(+), 73 deletions(-)
Signature · 1 line
1.8.3.1