* [PATCH V6 0/7] KVM: selftests: Add simple SEV test
@ 2023-01-10 17:03 Peter Gonda
0 siblings, 0 replies; 5+ messages in thread
From: Peter Gonda @ 2023-01-10 17:03 UTC (permalink / raw)
To: kvm
Cc: Peter Gonda, linux-kernel, marcorr, seanjc, michael.roth,
thomas.lendacky, joro, pbonzini, andrew.jones, vannapurve,
Ackerly Tng
This patch series continues the work Michael Roth has done in supporting
SEV guests in selftests. It continues on top of the work Sean
Christopherson has sent to support ucalls from SEV guests. Along with a
very simple version of the SEV selftests Michael originally proposed.
V6
* Updated SEV VM create function based on Seanjc's feedback and new
changes to VM creation functions.
* Removed pte_me_mask based on feedback.
* Fixed s_bit usage based on TDX
* Fixed bugs and took Ackerly's code for enc_region setup code.
V5
* Rebase onto seanjc@'s latest ucall pool series.
* More review changes based on seanjc:
** use protected instead of encrypted outside of SEV specific files
** Swap memcrypt struct for kvm_vm_arch arch specific struct
** Make protected page table data agnostic of address bit stealing specifics
of SEV
** Further clean up for SEV library to just vm_sev_create_one_vcpu()
* Due to large changes moved more authorships from mroth@ to pgonda@. Gave
originally-by tags to mroth@ as suggested by Seanjc for this.
V4
* Rebase ontop of seanjc@'s latest Ucall Pool series:
https://lore.kernel.org/linux-arm-kernel/20220825232522.3997340-8-seanjc@google.com/
* Fix up review comments from seanjc
* Switch authorship on 2 patches because of significant changes, added
* Michael as suggested-by or originally-by.
V3
* Addressed more of andrew.jones@ in ucall patches.
* Fix build in non-x86 archs.
V2
* Dropped RFC tag
* Correctly separated Sean's ucall patches into 2 as originally
intended.
* Addressed andrew.jones@ in ucall patches.
* Fixed ucall pool usage to work for other archs
V1
* https://lore.kernel.org/all/20220715192956.1873315-1-pgonda@google.com/
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: marcorr@google.com
Cc: seanjc@google.com
Cc: michael.roth@amd.com
Cc: thomas.lendacky@amd.com
Cc: joro@8bytes.org
Cc: pbonzini@redhat.com
Cc: andrew.jones@linux.dev
Cc: vannapurve@google.com
Cc: Ackerly Tng <ackerleytng@google.com>
Michael Roth (2):
KVM: selftests: sparsebit: add const where appropriate
KVM: selftests: add support for protected vm_vaddr_* allocations
Peter Gonda (5):
KVM: selftests: add hooks for managing protected guest memory
KVM: selftests: handle protected bits in page tables
KVM: selftests: add library for creating/interacting with SEV guests
KVM: selftests: Update ucall pool to allocate from shared memory
KVM: selftests: Add simple sev vm testing
tools/arch/arm64/include/asm/kvm_host.h | 7 +
tools/arch/riscv/include/asm/kvm_host.h | 7 +
tools/arch/s390/include/asm/kvm_host.h | 7 +
tools/arch/x86/include/asm/kvm_host.h | 14 +
tools/testing/selftests/kvm/.gitignore | 84 ++++++
tools/testing/selftests/kvm/Makefile | 4 +-
.../selftests/kvm/include/kvm_util_base.h | 49 +++-
.../testing/selftests/kvm/include/sparsebit.h | 36 +--
.../selftests/kvm/include/x86_64/processor.h | 1 +
.../selftests/kvm/include/x86_64/sev.h | 27 ++
tools/testing/selftests/kvm/lib/kvm_util.c | 66 ++++-
tools/testing/selftests/kvm/lib/sparsebit.c | 48 ++--
.../testing/selftests/kvm/lib/ucall_common.c | 2 +-
.../selftests/kvm/lib/x86_64/processor.c | 62 ++++-
tools/testing/selftests/kvm/lib/x86_64/sev.c | 254 ++++++++++++++++++
.../selftests/kvm/x86_64/sev_all_boot_test.c | 84 ++++++
16 files changed, 685 insertions(+), 67 deletions(-)
create mode 100644 tools/arch/arm64/include/asm/kvm_host.h
create mode 100644 tools/arch/riscv/include/asm/kvm_host.h
create mode 100644 tools/arch/s390/include/asm/kvm_host.h
create mode 100644 tools/arch/x86/include/asm/kvm_host.h
create mode 100644 tools/testing/selftests/kvm/include/x86_64/sev.h
create mode 100644 tools/testing/selftests/kvm/lib/x86_64/sev.c
create mode 100644 tools/testing/selftests/kvm/x86_64/sev_all_boot_test.c
--
2.39.0.314.g84b9a713c41-goog
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V6 0/7] KVM: selftests: Add simple SEV test
2023-01-10 17:50 Peter Gonda
2023-01-18 20:50 ` Sean Christopherson
@ 2023-03-24 19:05 ` Sean Christopherson
1 sibling, 0 replies; 5+ messages in thread
From: Sean Christopherson @ 2023-03-24 19:05 UTC (permalink / raw)
To: Peter Gonda
Cc: kvm, linux-kernel, marcorr, michael.roth, thomas.lendacky, joro,
pbonzini, andrew.jones, vannapurve, Ackerley Tng
On Tue, Jan 10, 2023, Peter Gonda wrote:
> This patch series continues the work Michael Roth has done in supporting
> SEV guests in selftests. It continues on top of the work Sean
> Christopherson has sent to support ucalls from SEV guests. Along with a
> very simple version of the SEV selftests Michael originally proposed.
...
> Michael Roth (2):
> KVM: selftests: sparsebit: add const where appropriate
> KVM: selftests: add support for protected vm_vaddr_* allocations
>
> Peter Gonda (5):
> KVM: selftests: add hooks for managing protected guest memory
> KVM: selftests: handle protected bits in page tables
> KVM: selftests: add library for creating/interacting with SEV guests
> KVM: selftests: Update ucall pool to allocate from shared memory
> KVM: selftests: Add simple sev vm testing
Lot's of non-trivial feedback. To help move things along, I pushed a completely
untested (probably doesn't compile) branch to
https://github.com/sean-jc/linux/tree/x86/sev_selftests_for_peter
that has most of the feedback incorporated. Feel free to massage/rework things
as needed (and again, it needs testing+polishing), my goal is purely to avoid you
having to duplicate what I've already done as part of working through the review.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V6 0/7] KVM: selftests: Add simple SEV test
2023-01-18 20:50 ` Sean Christopherson
@ 2023-01-20 16:43 ` Peter Gonda
0 siblings, 0 replies; 5+ messages in thread
From: Peter Gonda @ 2023-01-20 16:43 UTC (permalink / raw)
To: Sean Christopherson
Cc: kvm, linux-kernel, marcorr, michael.roth, thomas.lendacky, joro,
pbonzini, andrew.jones, vannapurve, Ackerley Tng
On Wed, Jan 18, 2023 at 1:50 PM Sean Christopherson <seanjc@google.com> wrote:
>
> On Tue, Jan 10, 2023, Peter Gonda wrote:
> > This patch series continues the work Michael Roth has done in supporting
> > SEV guests in selftests. It continues on top of the work Sean
> > Christopherson has sent to support ucalls from SEV guests. Along with a
> > very simple version of the SEV selftests Michael originally proposed.
>
> I got two copies of this series. AFAICT, the only difference is that LKML is
> Cc'd on the second send. When resending an _identical_ series, e.g. because you
> forgot to Cc' someone or because mails got lost in transit, add RESEND in between
> the square braces in the subject of all patches so as not to confuse folks that
> get both (or multiple) copies.
Will do. My mistake, sorry.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V6 0/7] KVM: selftests: Add simple SEV test
2023-01-10 17:50 Peter Gonda
@ 2023-01-18 20:50 ` Sean Christopherson
2023-01-20 16:43 ` Peter Gonda
2023-03-24 19:05 ` Sean Christopherson
1 sibling, 1 reply; 5+ messages in thread
From: Sean Christopherson @ 2023-01-18 20:50 UTC (permalink / raw)
To: Peter Gonda
Cc: kvm, linux-kernel, marcorr, michael.roth, thomas.lendacky, joro,
pbonzini, andrew.jones, vannapurve, Ackerley Tng
On Tue, Jan 10, 2023, Peter Gonda wrote:
> This patch series continues the work Michael Roth has done in supporting
> SEV guests in selftests. It continues on top of the work Sean
> Christopherson has sent to support ucalls from SEV guests. Along with a
> very simple version of the SEV selftests Michael originally proposed.
I got two copies of this series. AFAICT, the only difference is that LKML is
Cc'd on the second send. When resending an _identical_ series, e.g. because you
forgot to Cc' someone or because mails got lost in transit, add RESEND in between
the square braces in the subject of all patches so as not to confuse folks that
get both (or multiple) copies.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH V6 0/7] KVM: selftests: Add simple SEV test
@ 2023-01-10 17:50 Peter Gonda
2023-01-18 20:50 ` Sean Christopherson
2023-03-24 19:05 ` Sean Christopherson
0 siblings, 2 replies; 5+ messages in thread
From: Peter Gonda @ 2023-01-10 17:50 UTC (permalink / raw)
To: kvm, linux-kernel
Cc: Peter Gonda, marcorr, michael.roth, thomas.lendacky, joro,
pbonzini, andrew.jones, vannapurve, Sean Christopherson,
Ackerley Tng
This patch series continues the work Michael Roth has done in supporting
SEV guests in selftests. It continues on top of the work Sean
Christopherson has sent to support ucalls from SEV guests. Along with a
very simple version of the SEV selftests Michael originally proposed.
V6
* Updated SEV VM create function based on Seanjc's feedback and new
changes to VM creation functions.
* Removed pte_me_mask based on feedback.
* Fixed s_bit usage based on TDX
* Fixed bugs and took Ackerly's code for enc_region setup code.
V5
* Rebase onto seanjc@'s latest ucall pool series.
* More review changes based on seanjc:
** use protected instead of encrypted outside of SEV specific files
** Swap memcrypt struct for kvm_vm_arch arch specific struct
** Make protected page table data agnostic of address bit stealing specifics
of SEV
** Further clean up for SEV library to just vm_sev_create_one_vcpu()
* Due to large changes moved more authorships from mroth@ to pgonda@. Gave
originally-by tags to mroth@ as suggested by Seanjc for this.
V4
* Rebase ontop of seanjc@'s latest Ucall Pool series:
https://lore.kernel.org/linux-arm-kernel/20220825232522.3997340-8-seanjc@google.com/
* Fix up review comments from seanjc
* Switch authorship on 2 patches because of significant changes, added
* Michael as suggested-by or originally-by.
V3
* Addressed more of andrew.jones@ in ucall patches.
* Fix build in non-x86 archs.
V2
* Dropped RFC tag
* Correctly separated Sean's ucall patches into 2 as originally
intended.
* Addressed andrew.jones@ in ucall patches.
* Fixed ucall pool usage to work for other archs
V1
* https://lore.kernel.org/all/20220715192956.1873315-1-pgonda@google.com/
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: marcorr@google.com
Cc: michael.roth@amd.com
Cc: thomas.lendacky@amd.com
Cc: joro@8bytes.org
Cc: pbonzini@redhat.com
Cc: andrew.jones@linux.dev
Cc: vannapurve@google.com
Cc: Sean Christopherson <seanjc@google.com>
Cc: Ackerley Tng <ackerleytng@google.com>
Michael Roth (2):
KVM: selftests: sparsebit: add const where appropriate
KVM: selftests: add support for protected vm_vaddr_* allocations
Peter Gonda (5):
KVM: selftests: add hooks for managing protected guest memory
KVM: selftests: handle protected bits in page tables
KVM: selftests: add library for creating/interacting with SEV guests
KVM: selftests: Update ucall pool to allocate from shared memory
KVM: selftests: Add simple sev vm testing
tools/arch/arm64/include/asm/kvm_host.h | 7 +
tools/arch/riscv/include/asm/kvm_host.h | 7 +
tools/arch/s390/include/asm/kvm_host.h | 7 +
tools/arch/x86/include/asm/kvm_host.h | 14 +
tools/testing/selftests/kvm/.gitignore | 84 ++++++
tools/testing/selftests/kvm/Makefile | 4 +-
.../selftests/kvm/include/kvm_util_base.h | 49 +++-
.../testing/selftests/kvm/include/sparsebit.h | 36 +--
.../selftests/kvm/include/x86_64/processor.h | 1 +
.../selftests/kvm/include/x86_64/sev.h | 27 ++
tools/testing/selftests/kvm/lib/kvm_util.c | 66 ++++-
tools/testing/selftests/kvm/lib/sparsebit.c | 48 ++--
.../testing/selftests/kvm/lib/ucall_common.c | 2 +-
.../selftests/kvm/lib/x86_64/processor.c | 62 ++++-
tools/testing/selftests/kvm/lib/x86_64/sev.c | 254 ++++++++++++++++++
.../selftests/kvm/x86_64/sev_all_boot_test.c | 84 ++++++
16 files changed, 685 insertions(+), 67 deletions(-)
create mode 100644 tools/arch/arm64/include/asm/kvm_host.h
create mode 100644 tools/arch/riscv/include/asm/kvm_host.h
create mode 100644 tools/arch/s390/include/asm/kvm_host.h
create mode 100644 tools/arch/x86/include/asm/kvm_host.h
create mode 100644 tools/testing/selftests/kvm/include/x86_64/sev.h
create mode 100644 tools/testing/selftests/kvm/lib/x86_64/sev.c
create mode 100644 tools/testing/selftests/kvm/x86_64/sev_all_boot_test.c
--
2.39.0.314.g84b9a713c41-goog
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-24 19:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 17:03 [PATCH V6 0/7] KVM: selftests: Add simple SEV test Peter Gonda
2023-01-10 17:50 Peter Gonda
2023-01-18 20:50 ` Sean Christopherson
2023-01-20 16:43 ` Peter Gonda
2023-03-24 19:05 ` Sean Christopherson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®