All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/3] arm/arm64: KVM: Random selection of cache related fixes
@ 2015-01-21 18:39 Marc Zyngier
  2015-01-21 18:39 ` [PATCH v3 1/3] arm/arm64: KVM: Use set/way op trapping to track the state of the caches Marc Zyngier
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Marc Zyngier @ 2015-01-21 18:39 UTC (permalink / raw)
  To: Christoffer Dall, kvm, kvmarm; +Cc: Peter Maydell, Steve Capper

This small series fixes a number of issues that Christoffer and I have
been trying to nail down for a while, having to do with the host dying
under load (swapping), and also with the way we deal with caches in
general (and with set/way operation in particular):

- The first one changes the way we handle cache ops by set/way,
  basically turning them into VA ops for the whole memory. This allows
  platforms with system caches to boot a 32bit zImage, for example.

- The second one fixes a corner case that could happen if the guest
  used an uncached mapping (or had its caches off) while the host was
  swapping it out (and using a cache-coherent IO subsystem).

- Finally, the last one fixes this stability issue when the host was
  swapping, by using a kernel mapping for cache maintenance instead of
  the userspace one.

With these patches (and both the TLB invalidation and HCR fixes that
are on their way to mainline), the APM platform seems much more robust
than it previously was. Fingers crossed.

The first round of review has generated a lot of traffic about
ASID-tagged icache management for guests, but I've decided not to
address this issue as part of this series. The code is broken already,
and there isn't any virtualization capable, ASID-tagged icache core in
the wild, AFAIK. I'll try to revisit this in another series, once I
have wrapped my head around it (or someone beats me to it).

Based on 3.19-rc5, tested on Juno, X-Gene, TC-2 and Cubietruck.

Also at git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git kvm-arm64/mm-fixes-3.19

* From v2: [2]
- Reworked the algorithm that tracks the state of the guest's caches,
  as there is some cases I didn't anticipate. In the end, the
  algorithm is simpler.

* From v1: [1]
- Dropped Steve's patch after discussion with Andrea
- Refactor set/way support to avoid code duplication, better comments
- Much improved comments in patch #2, courtesy of Christoffer

[1]: http://www.spinics.net/lists/kvm-arm/msg13008.html
[2]: http://www.spinics.net/lists/kvm-arm/msg13161.html

Marc Zyngier (3):
  arm/arm64: KVM: Use set/way op trapping to track the state of the
    caches
  arm/arm64: KVM: Invalidate data cache on unmap
  arm/arm64: KVM: Use kernel mapping to perform invalidation on page
    fault

 arch/arm/include/asm/kvm_emulate.h   |  10 +++
 arch/arm/include/asm/kvm_host.h      |   3 -
 arch/arm/include/asm/kvm_mmu.h       |  77 +++++++++++++---
 arch/arm/kvm/arm.c                   |  10 ---
 arch/arm/kvm/coproc.c                |  64 +++-----------
 arch/arm/kvm/coproc_a15.c            |   2 +-
 arch/arm/kvm/coproc_a7.c             |   2 +-
 arch/arm/kvm/mmu.c                   | 164 ++++++++++++++++++++++++++++++-----
 arch/arm/kvm/trace.h                 |  39 +++++++++
 arch/arm64/include/asm/kvm_emulate.h |  10 +++
 arch/arm64/include/asm/kvm_host.h    |   3 -
 arch/arm64/include/asm/kvm_mmu.h     |  34 ++++++--
 arch/arm64/kvm/sys_regs.c            |  75 +++-------------
 13 files changed, 321 insertions(+), 172 deletions(-)

-- 
2.1.4


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

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-21 18:39 [PATCH v3 0/3] arm/arm64: KVM: Random selection of cache related fixes Marc Zyngier
2015-01-21 18:39 ` [PATCH v3 1/3] arm/arm64: KVM: Use set/way op trapping to track the state of the caches Marc Zyngier
2015-01-26 22:58   ` Christoffer Dall
2015-01-27 11:21     ` Marc Zyngier
2015-01-27 13:17       ` Christoffer Dall
2015-01-27 13:44         ` Marc Zyngier
2015-01-29 13:40           ` Christoffer Dall
2015-01-21 18:39 ` [PATCH v3 2/3] arm/arm64: KVM: Invalidate data cache on unmap Marc Zyngier
2015-01-29 14:02   ` Christoffer Dall
2015-01-21 18:39 ` [PATCH v3 3/3] arm/arm64: KVM: Use kernel mapping to perform invalidation on page fault Marc Zyngier
2015-01-29 14:28   ` Christoffer Dall
2015-01-26 17:09 ` [PATCH v3 0/3] arm/arm64: KVM: Random selection of cache related fixes Andrew Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.