kvmarm.lists.cs.columbia.edu archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/9]  KVM: Move x86 init ops to separate struct
@ 2020-03-21 20:25 Sean Christopherson
  2020-03-21 20:25 ` [PATCH v3 1/9] KVM: Pass kvm_init()'s opaque param to additional arch funcs Sean Christopherson
                   ` (8 more replies)
  0 siblings, 9 replies; 25+ messages in thread
From: Sean Christopherson @ 2020-03-21 20:25 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: linux-arm-kernel, Wanpeng Li, Janosch Frank, kvm,
	David Hildenbrand, Marc Zyngier, Joerg Roedel, Cornelia Huck,
	linux-mips, Sean Christopherson, linux-kernel, Paul Mackerras,
	Christian Borntraeger, kvm-ppc, Vitaly Kuznetsov, kvmarm,
	Jim Mattson

The non-x86 part of this series is wholly contained in patch 01.  Compared
to other recent kvm-wide changes, this one is very straightforward (famous
last words).

Like a few other architectures, e.g. PPC, x86 uses a set of global hooks
to call back into vendor code on demand.  A handlful of the x86 hooks are
used only within the scope of kvm_init().  This series moves the init-only
hooks to a separate struct, partly to clean up the code a bit, but mainly
so that the runtime hooks can be made available only after the x86 vendor
has completed its ->hardware_setup().  While working on a different series
I spent a fair bit of time scratching my as to why a kvm_x86_ops wasn't
working, and eventually realized VMX's callback wasn't "ready" because the
vmcs_config hadn't yet been populated.

Due to lack of a cross-compiling setup, the non-x86 changes in patch 01
are untested.

v3:
 - Rebase to kvm/queue, d55c9d4009c7 ("KVM: nSVM: check for EFER ... ").
   Conflicts galore, but all mechanical in nature.
 - Drop an SVM patch that was obsoleted by kvm/queue.
 - Collect an ack. [Marc]

v2:
  - Rebase to kvm/queue, 2c2787938512 ("KVM: selftests: Stop ...")
  - Collect tags. [Cornelia]
  - Add a patch to make kvm_x86_ops its own instance and copy
    {vmx,svm}_x86_ops by value, which saves a memory access on every
    invocation of a kvm_x86_ops hook. [Paolo]
  - Add patches to tag {vmx,svm}_x86_ops as __initdata after they're
    copied by value.


Sean Christopherson (9):
  KVM: Pass kvm_init()'s opaque param to additional arch funcs
  KVM: x86: Move init-only kvm_x86_ops to separate struct
  KVM: VMX: Move hardware_setup() definition below vmx_x86_ops
  KVM: VMX: Configure runtime hooks using vmx_x86_ops
  KVM: x86: Set kvm_x86_ops only after ->hardware_setup() completes
  KVM: x86: Copy kvm_x86_ops by value to eliminate layer of indirection
  KVM: x86: Drop __exit from kvm_x86_ops' hardware_unsetup()
  KVM: VMX: Annotate vmx_x86_ops as __initdata
  KVM: SVM: Annotate svm_x86_ops as __initdata

 arch/mips/kvm/mips.c            |   4 +-
 arch/powerpc/kvm/powerpc.c      |   4 +-
 arch/s390/kvm/kvm-s390.c        |   4 +-
 arch/x86/include/asm/kvm_host.h |  33 +--
 arch/x86/kvm/cpuid.c            |   4 +-
 arch/x86/kvm/hyperv.c           |   8 +-
 arch/x86/kvm/kvm_cache_regs.h   |  10 +-
 arch/x86/kvm/lapic.c            |  30 +--
 arch/x86/kvm/mmu.h              |   8 +-
 arch/x86/kvm/mmu/mmu.c          |  32 +--
 arch/x86/kvm/pmu.c              |  30 +--
 arch/x86/kvm/pmu.h              |   2 +-
 arch/x86/kvm/svm.c              |  19 +-
 arch/x86/kvm/trace.h            |   4 +-
 arch/x86/kvm/vmx/nested.c       |  17 +-
 arch/x86/kvm/vmx/nested.h       |   3 +-
 arch/x86/kvm/vmx/vmx.c          | 371 ++++++++++++++++----------------
 arch/x86/kvm/x86.c              | 370 +++++++++++++++----------------
 arch/x86/kvm/x86.h              |   4 +-
 include/linux/kvm_host.h        |   4 +-
 virt/kvm/arm/arm.c              |   4 +-
 virt/kvm/kvm_main.c             |  18 +-
 22 files changed, 507 insertions(+), 476 deletions(-)

-- 
2.24.1

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2020-03-24  8:17 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-21 20:25 [PATCH v3 0/9] KVM: Move x86 init ops to separate struct Sean Christopherson
2020-03-21 20:25 ` [PATCH v3 1/9] KVM: Pass kvm_init()'s opaque param to additional arch funcs Sean Christopherson
2020-03-24  1:18   ` Paul Mackerras
2020-03-21 20:25 ` [PATCH v3 2/9] KVM: x86: Move init-only kvm_x86_ops to separate struct Sean Christopherson
2020-03-23 12:10   ` Vitaly Kuznetsov
2020-03-23 15:29     ` Sean Christopherson
2020-03-23 16:24       ` Vitaly Kuznetsov
2020-03-23 16:31         ` Sean Christopherson
2020-03-23 19:47         ` Paolo Bonzini
2020-03-21 20:25 ` [PATCH v3 3/9] KVM: VMX: Move hardware_setup() definition below vmx_x86_ops Sean Christopherson
2020-03-23 12:12   ` Vitaly Kuznetsov
2020-03-21 20:25 ` [PATCH v3 4/9] KVM: VMX: Configure runtime hooks using vmx_x86_ops Sean Christopherson
2020-03-23 12:27   ` Vitaly Kuznetsov
2020-03-23 16:23     ` Sean Christopherson
2020-03-23 20:00     ` Paolo Bonzini
2020-03-21 20:25 ` [PATCH v3 5/9] KVM: x86: Set kvm_x86_ops only after ->hardware_setup() completes Sean Christopherson
2020-03-21 20:26 ` [PATCH v3 6/9] KVM: x86: Copy kvm_x86_ops by value to eliminate layer of indirection Sean Christopherson
2020-03-23 12:44   ` Vitaly Kuznetsov
2020-03-23 15:38     ` Sean Christopherson
2020-03-21 20:26 ` [PATCH v3 7/9] KVM: x86: Drop __exit from kvm_x86_ops' hardware_unsetup() Sean Christopherson
2020-03-23 12:46   ` Vitaly Kuznetsov
2020-03-21 20:26 ` [PATCH v3 8/9] KVM: VMX: Annotate vmx_x86_ops as __initdata Sean Christopherson
2020-03-23 12:48   ` Vitaly Kuznetsov
2020-03-21 20:26 ` [PATCH v3 9/9] KVM: SVM: Annotate svm_x86_ops " Sean Christopherson
2020-03-23 12:48   ` Vitaly Kuznetsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).