Linux KVM/arm64 development list
 help / color / mirror / Atom feed
* [PATCH 0/3] KVM: Unify mmu_memory_cache functionality across architectures
@ 2019-01-28 14:48 Christoffer Dall
  2019-01-28 14:48 ` [PATCH 1/3] KVM: x86: Move mmu_memory_cache functions to common code Christoffer Dall
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Christoffer Dall @ 2019-01-28 14:48 UTC (permalink / raw)
  To: kvm
  Cc: Marc Zyngier, James Hogan, Joerg Roedel, Anshuman Khandual,
	Paul Mackerras, Christian Borntraeger, Paolo Bonzini, kvmarm

We currently have duplicated functionality for the mmu_memory_cache used
to pre-allocate memory for the page table manipulation code which cannot
allocate memory while holding spinlocks.  This functionality is
duplicated across x86, arm/arm64, and mips.

There were recently a debate of modifying the arm code to be more in
line with the x86 code and some discussions around changing the page
flags used for allocation.  This series should make it easier to take a
uniform approach across architectures.

While there's not a huge amount of code sharing, we come out with a net
gain.

Only tested on arm/arm64, and only compile-tested on x86 and mips.

Christoffer Dall (3):
  KVM: x86: Move mmu_memory_cache functions to common code
  KVM: arm/arm64: Move to common kvm_mmu_memcache infrastructure
  KVM: mips: Move to common kvm_mmu_memcache infrastructure

 arch/arm/include/asm/kvm_host.h      | 13 +---
 arch/arm/include/asm/kvm_mmu.h       |  2 +-
 arch/arm/include/asm/kvm_types.h     | 10 +++
 arch/arm64/include/asm/kvm_host.h    | 13 +---
 arch/arm64/include/asm/kvm_mmu.h     |  2 +-
 arch/arm64/include/asm/kvm_types.h   | 11 ++++
 arch/mips/include/asm/kvm_host.h     | 15 +----
 arch/mips/include/asm/kvm_types.h    | 10 +++
 arch/mips/kvm/mips.c                 |  2 +-
 arch/mips/kvm/mmu.c                  | 54 +++-------------
 arch/powerpc/include/asm/kvm_types.h |  5 ++
 arch/s390/include/asm/kvm_types.h    |  5 ++
 arch/x86/include/asm/kvm_host.h      | 17 +----
 arch/x86/include/asm/kvm_types.h     | 10 +++
 arch/x86/kvm/mmu.c                   | 97 ++++++----------------------
 arch/x86/kvm/paging_tmpl.h           |  4 +-
 include/linux/kvm_host.h             |  9 +++
 include/linux/kvm_types.h            | 12 ++++
 virt/kvm/arm/arm.c                   |  2 +-
 virt/kvm/arm/mmu.c                   | 68 +++++--------------
 virt/kvm/kvm_main.c                  | 58 +++++++++++++++++
 21 files changed, 189 insertions(+), 230 deletions(-)
 create mode 100644 arch/arm/include/asm/kvm_types.h
 create mode 100644 arch/arm64/include/asm/kvm_types.h
 create mode 100644 arch/mips/include/asm/kvm_types.h
 create mode 100644 arch/powerpc/include/asm/kvm_types.h
 create mode 100644 arch/s390/include/asm/kvm_types.h
 create mode 100644 arch/x86/include/asm/kvm_types.h

-- 
2.18.0

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

end of thread, other threads:[~2019-01-29 14:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-28 14:48 [PATCH 0/3] KVM: Unify mmu_memory_cache functionality across architectures Christoffer Dall
2019-01-28 14:48 ` [PATCH 1/3] KVM: x86: Move mmu_memory_cache functions to common code Christoffer Dall
2019-01-28 16:19   ` Sean Christopherson
2019-01-29 14:25     ` Christoffer Dall
2019-01-28 14:48 ` [PATCH 2/3] KVM: arm/arm64: Move to common kvm_mmu_memcache infrastructure Christoffer Dall
2019-01-28 14:48 ` [PATCH 3/3] KVM: mips: " Christoffer Dall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox