All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] FPSIMD restore bypass and protecting
@ 2021-03-04 11:54 Andrew Scull
  2021-03-04 11:54 ` [PATCH 01/10] KVM: arm64: Leave KVM_ARM64_DEBUG_DIRTY updates to the host Andrew Scull
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Andrew Scull @ 2021-03-04 11:54 UTC (permalink / raw)
  To: kvmarm; +Cc: kernel-team, maz, catalin.marinas, will, Dave.Martin

This series build towards protecting of FPSIMD state in protected KVM.
Most of the series is refactoring to create separation between host and
hyp for when that is needed.

There was the need to track where a vcpu last loaded its FPSIMD state so
I've also made use of this to avoid needless reloading of vcpu FPSIMD
state when that's possible. I don't know if this makes any performance
difference and don't know what a meaningful benchmark would be to
measure against so help and advice on this front would be appreciated.

The last patch in the series is concerned with the protecting of a
protected VM's FPSIMD state. It will depend on knowing which vcpus are
protected and having a stage 2 over the host but demonstrates the
trapping and lazy switching that I had in mind.

The series has, so far, only been lightly tested on qemu with paranoia
running on the host and in the vcpu.

It applies atop 5.12-rc.

This is similar, but much evolved, version of a series sent out last
year:
https://lore.kernel.org/r/20200713210505.2959828-1-ascull@google.com/

Andrew Scull (10):
  KVM: arm64: Leave KVM_ARM64_DEBUG_DIRTY updates to the host
  KVM: arm64: Synchronize vcpu FPSIMD in the host
  KVM: arm64: Unmap host task thread flags from hyp
  KVM: arm64: Support smp_processor_id() in nVHE hyp
  KVM: arm64: Track where vcpu FP state was last loaded
  KVM: arm64: Avoid needlessly reloading guest FP state
  KVM: arm64: Separate host and hyp vcpu FP flags
  KVM: arm64: Pass the arch run struct explicitly
  KVM: arm64: Use hyp-private run struct in protected mode
  RFC: KVM: arm64: Manage FPSIMD state at EL2 for protected vCPUs

 arch/arm64/include/asm/fpsimd.h           |   1 +
 arch/arm64/include/asm/kvm_host.h         |  46 +++++++---
 arch/arm64/include/asm/kvm_hyp.h          |   1 +
 arch/arm64/kernel/fpsimd.c                |  11 ++-
 arch/arm64/kvm/arm.c                      |   8 +-
 arch/arm64/kvm/debug.c                    |   2 +
 arch/arm64/kvm/fpsimd.c                   |  69 +++++++++++----
 arch/arm64/kvm/hyp/include/hyp/debug-sr.h |   2 -
 arch/arm64/kvm/hyp/include/hyp/switch.h   |  57 ++++++------
 arch/arm64/kvm/hyp/nvhe/hyp-main.c        |  24 ++++++
 arch/arm64/kvm/hyp/nvhe/hyp-smp.c         |   2 +
 arch/arm64/kvm/hyp/nvhe/switch.c          | 100 ++++++++++++++++++----
 arch/arm64/kvm/hyp/vhe/switch.c           |   8 +-
 13 files changed, 249 insertions(+), 82 deletions(-)

-- 
2.30.1.766.gb4fecdf3b7-goog

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

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

end of thread, other threads:[~2021-03-12 11:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 11:54 [PATCH 00/10] FPSIMD restore bypass and protecting Andrew Scull
2021-03-04 11:54 ` [PATCH 01/10] KVM: arm64: Leave KVM_ARM64_DEBUG_DIRTY updates to the host Andrew Scull
2021-03-04 11:54 ` [PATCH 02/10] KVM: arm64: Synchronize vcpu FPSIMD in " Andrew Scull
2021-03-04 11:54 ` [PATCH 03/10] KVM: arm64: Unmap host task thread flags from hyp Andrew Scull
2021-03-04 11:54 ` [PATCH 04/10] KVM: arm64: Support smp_processor_id() in nVHE hyp Andrew Scull
2021-03-11 10:35   ` Quentin Perret
2021-03-12 11:20     ` Andrew Scull
2021-03-12 11:27       ` Andrew Scull
2021-03-04 11:54 ` [PATCH 05/10] KVM: arm64: Track where vcpu FP state was last loaded Andrew Scull
2021-03-11 10:37   ` Quentin Perret
2021-03-11 10:40     ` Quentin Perret
2021-03-04 11:54 ` [PATCH 06/10] KVM: arm64: Avoid needlessly reloading guest FP state Andrew Scull
2021-03-04 11:54 ` [PATCH 07/10] KVM: arm64: Separate host and hyp vcpu FP flags Andrew Scull
2021-03-04 11:54 ` [PATCH 08/10] KVM: arm64: Pass the arch run struct explicitly Andrew Scull
2021-03-04 11:54 ` [PATCH 09/10] KVM: arm64: Use hyp-private run struct in protected mode Andrew Scull
2021-03-04 11:54 ` [PATCH 10/10] RFC: KVM: arm64: Manage FPSIMD state at EL2 for protected vCPUs Andrew Scull

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.