All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC V2 PATCH 0/8] selftests: KVM: SEV: selftests for fd-based private memory
@ 2022-08-30 22:42 Vishal Annapurve
  2022-08-30 22:42 ` [RFC V2 PATCH 1/8] selftests: kvm: x86_64: Add support for pagetable tracking Vishal Annapurve
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Vishal Annapurve @ 2022-08-30 22:42 UTC (permalink / raw)
  To: x86, kvm, linux-kernel, linux-kselftest
  Cc: pbonzini, vkuznets, wanpengli, jmattson, joro, tglx, mingo, bp,
	dave.hansen, hpa, shuah, yang.zhong, drjones, ricarkol,
	aaronlewis, wei.w.wang, kirill.shutemov, corbet, hughd, jlayton,
	bfields, akpm, chao.p.peng, yu.c.zhang, jun.nakajima,
	dave.hansen, michael.roth, qperret, steven.price, ak, david,
	luto, vbabka, marcorr, erdemaktas, pgonda, nikunj, seanjc,
	diviness, maz, dmatlack, axelrasmussen, maciej.szmigiero,
	mizhang, bgardon, Vishal Annapurve

This series implements selftests executing SEV VMs to target the feature
floated by Chao via:
https://lore.kernel.org/linux-mm/20220706082016.2603916-12-chao.p.peng@linux.intel.com/T/

Below changes aim to test the fd based approach for guest private memory
in context of SEV VMs executing on AMD SEV compatible platforms.

sev_private_mem_test.c file adds selftest to access private memory from the
guest via private/shared accesses and checking if the contents can be
leaked to/accessed by vmm via shared memory view before/after conversions.

To allow SEV/SEV-ES VMs to toggle the encryption bit during memory
conversion, support is added for mapping guest pagetables to guest va
ranges and passing the mapping information to guests via shared pages.

This series has dependency on following patch series:
1) V7 series patches from Chao mentioned above.
2) https://lore.kernel.org/lkml/20220810152033.946942-1-pgonda@google.com/T/#u
  - Series posted by Peter containing patches from Michael and Sean
3) https://lore.kernel.org/lkml/Ywa9T+jKUpaHLu%2Fl@google.com/T/
  - Series posted for similar selftests executing non-confidential VMs.

Github link for the patches posted as part of this series:
https://github.com/vishals4gh/linux/commits/sev_upm_selftests_rfcv2

Vishal Annapurve (8):
  selftests: kvm: x86_64: Add support for pagetable tracking
  kvm: Add HVA range operator
  arch: x86: sev: Populate private memory fd during LAUNCH_UPDATE_DATA
  selftests: kvm: sev: Support memslots with private memory
  selftests: kvm: Update usage of private mem lib for SEV VMs
  selftests: kvm: Support executing SEV VMs with private memory
  selftests: kvm: Refactor testing logic for private memory
  selftests: kvm: Add private memory test for SEV VMs

 arch/x86/kvm/svm/sev.c                        |  99 ++++++-
 include/linux/kvm_host.h                      |   8 +
 tools/testing/selftests/kvm/.gitignore        |   1 +
 tools/testing/selftests/kvm/Makefile          |   2 +
 .../selftests/kvm/include/kvm_util_base.h     | 105 +++++++
 .../kvm/include/x86_64/private_mem.h          |  10 +-
 .../include/x86_64/private_mem_test_helper.h  |  13 +
 .../selftests/kvm/include/x86_64/sev.h        |   2 +
 tools/testing/selftests/kvm/lib/kvm_util.c    |  78 ++++-
 .../selftests/kvm/lib/x86_64/private_mem.c    | 189 ++++++++++--
 .../kvm/lib/x86_64/private_mem_test_helper.c  | 273 ++++++++++++++++++
 .../selftests/kvm/lib/x86_64/processor.c      |  32 ++
 tools/testing/selftests/kvm/lib/x86_64/sev.c  |  15 +-
 .../selftests/kvm/x86_64/private_mem_test.c   | 246 +---------------
 .../kvm/x86_64/sev_private_mem_test.c         |  21 ++
 virt/kvm/kvm_main.c                           |  87 +++++-
 16 files changed, 880 insertions(+), 301 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/include/x86_64/private_mem_test_helper.h
 create mode 100644 tools/testing/selftests/kvm/lib/x86_64/private_mem_test_helper.c
 create mode 100644 tools/testing/selftests/kvm/x86_64/sev_private_mem_test.c

-- 
2.37.2.672.g94769d06f0-goog


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

end of thread, other threads:[~2022-08-30 22:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-30 22:42 [RFC V2 PATCH 0/8] selftests: KVM: SEV: selftests for fd-based private memory Vishal Annapurve
2022-08-30 22:42 ` [RFC V2 PATCH 1/8] selftests: kvm: x86_64: Add support for pagetable tracking Vishal Annapurve
2022-08-30 22:42 ` [RFC V2 PATCH 2/8] kvm: Add HVA range operator Vishal Annapurve
2022-08-30 22:42 ` [RFC V2 PATCH 3/8] arch: x86: sev: Populate private memory fd during LAUNCH_UPDATE_DATA Vishal Annapurve
2022-08-30 22:42 ` [RFC V2 PATCH 4/8] selftests: kvm: sev: Support memslots with private memory Vishal Annapurve
2022-08-30 22:42 ` [RFC V2 PATCH 5/8] selftests: kvm: Update usage of private mem lib for SEV VMs Vishal Annapurve
2022-08-30 22:42 ` [RFC V2 PATCH 6/8] selftests: kvm: Support executing SEV VMs with private memory Vishal Annapurve
2022-08-30 22:42 ` [RFC V2 PATCH 7/8] selftests: kvm: Refactor testing logic for " Vishal Annapurve
2022-08-30 22:42 ` [RFC V2 PATCH 8/8] selftests: kvm: Add private memory test for SEV VMs Vishal Annapurve

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.