Skip to content

Add initial GHCB support for SEV-ES selftests

Peter Gonda kvm linux-kselftest lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Add GHCB with setters and getterstools/testing/selftests/kvm/Makefile tools/testing/selftests/kvm/include/x86_64/svm.h+107 -11 reply
2/6Add arch specific additional guest pagestools/testing/selftests/kvm/include/kvm_util_base.h tools/testing/selftests/kvm/lib/kvm_util.c+15 -40 replies
3/6Add vm_vaddr_alloc_pages_shared()tools/testing/selftests/kvm/include/kvm_util_base.h tools/testing/selftests/kvm/lib/kvm_util.c+7 -00 replies
4/6Add GHCB allocations and helperstools/testing/selftests/kvm/include/x86_64/sev.h tools/testing/selftests/kvm/lib/x86_64/processor.c tools/testing/selftests/kvm/lib/x86_64/sev.c+87 -03 replies
5/6Add is_sev_enabled() helperstools/testing/selftests/kvm/include/x86_64/sev.h tools/testing/selftests/kvm/lib/x86_64/sev.c tools/testing/selftests/kvm/x86_64/sev_smoke_test.c+16 -31 reply
6/6Add ability for SEV-ES guests to use ucalls via GHCBtools/testing/selftests/kvm/include/x86_64/sev.h tools/testing/selftests/kvm/lib/x86_64/sev.c tools/testing/selftests/kvm/lib/x86_64/ucall.c +1 more+84 -191 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] Add initial GHCB support for SEV-ES selftests

Adding GHCB support for selftests. Very similar code to the ucall functionality, I didn't refactor anything common out since I was unsure with just two instances that is required. If pulling out common code between those two is preferred please let me know. The series only adds a single usage of the GHCB which is a special outsb GHCB exit to allow for passing the 64-bit ucall pointer. In future series we can test more GHCB functionality of KVM. I'd like to base some SNP smoke tests off of this and the current SEV selftest work.

base-commit: 40e09b3ccfacc640d58e1e3d6b8f29b2db0a9848

Cc Vishal Annapurve <[email protected]>
Cc Ackerley Tng <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Claudio Imbrenda <[email protected]>
Cc Sean Christopherson <[email protected]>
Cc Carlos Bilbao <[email protected]>
Cc Tom Lendacky <[email protected]>
Cc Michael Roth <[email protected]>

Peter Gonda (6):
Add GHCB with setters and getters
Add arch specific additional guest pages Add vm_vaddr_alloc_pages_shared()
Add GHCB allocations and helpers
Add is_sev_enabled() helpers
Add ability for SEV-ES guests to use ucalls via GHCB

 tools/testing/selftests/kvm/Makefile          |   2 +-
 .../selftests/kvm/include/kvm_util_base.h     |   4 +
 .../selftests/kvm/include/x86_64/sev.h        |   7 +
 .../selftests/kvm/include/x86_64/svm.h        | 106 +++++++++++++
 tools/testing/selftests/kvm/lib/kvm_util.c    |  22 ++-
 .../selftests/kvm/lib/x86_64/processor.c      |   8 +
 tools/testing/selftests/kvm/lib/x86_64/sev.c  | 149 ++++++++++++++++++
 .../testing/selftests/kvm/lib/x86_64/ucall.c  |  17 ++
 .../selftests/kvm/x86_64/sev_smoke_test.c     |  22 +--
 9 files changed, 313 insertions(+), 24 deletions(-)
Signature · 1 line
2.44.0.478.gd926399ef9-goog