From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: seanjc@google.com, michael.roth@amd.com, aik@amd.com
Subject: Re: [PATCH v3 00/15] KVM: SEV: allow customizing VMSA features
Date: Tue, 27 Feb 2024 10:50:39 +0700 [thread overview]
Message-ID: <Zd1cDyyx65J1IVK1@archie.me> (raw)
In-Reply-To: <20240226190344.787149-1-pbonzini@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2713 bytes --]
On Mon, Feb 26, 2024 at 02:03:29PM -0500, Paolo Bonzini wrote:
> The idea that no parameter would ever be necessary when enabling SEV or
> SEV-ES for a VM was decidedly optimistic. The first source of variability
> that was encountered is the desired set of VMSA features, as that affects
> the measurement of the VM's initial state and cannot be changed
> arbitrarily by the hypervisor.
>
> This series adds all the APIs that are needed to customize the features,
> with room for future enhancements:
>
> - a new /dev/kvm device attribute to retrieve the set of supported
> features (right now, only debug swap)
>
> - a new sub-operation for KVM_MEM_ENCRYPT_OP that can take a struct,
> replacing the existing KVM_SEV_INIT and KVM_SEV_ES_INIT
>
> It then puts the new op to work by including the VMSA features as a field
> of the The existing KVM_SEV_INIT and KVM_SEV_ES_INIT use the full set of
> supported VMSA features for backwards compatibility; but I am considering
> also making them use zero as the feature mask, and will gladly adjust the
> patches if so requested.
>
> In order to avoid creating *two* new KVM_MEM_ENCRYPT_OPs, I decided that
> I could as well make SEV and SEV-ES use VM types. And then, why not make
> a SEV-ES VM, when created with the new VM type instead of KVM_SEV_ES_INIT,
> reject KVM_GET_REGS/KVM_SET_REGS and friends on the vCPU file descriptor
> once the VMSA has been encrypted... Which is how the API should have
> always behaved.
>
> The series is structured as follows:
>
> - patches 1 to 5 are unrelated fixes and improvements for the SEV code
> and documentation. In particular they change sev.c so that it is
> compiled only if SEV is enabled in kconfig
>
> - patches 6 to 8 introduce the new device attribute to retrieve supported
> VMSA features
>
> - patch 9 disables DEBUG_SWAP by default
>
> - patches 10 and 11 introduce new infrastructure for VM types, replacing
> the similar code in the TDX patches
>
> - patches 12 to 14 introduce the new VM types for SEV and
> SEV-ES, and KVM_SEV_INIT2 as a new sub-operation for KVM_MEM_ENCRYPT_OP.
>
> - patch 15 tests the new ioctl.
>
> The idea is that SEV SNP will only ever support KVM_SEV_INIT2. I have
> patches in progress for QEMU to support this new API.
>
> Thanks,
>
> Paolo
>
>
> v2->v3:
> - use u64_to_user_addr()
> - Compile sev.c if and only if CONFIG_KVM_AMD_SEV=y
> - remove double signoffs
> - rebase on top of kvm-x86/next
I can't apply this series on top of current kvm-x86/next. On what exact
commit the series is based on?
Confused...
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-02-27 3:50 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 19:03 [PATCH v3 00/15] KVM: SEV: allow customizing VMSA features Paolo Bonzini
2024-02-26 19:03 ` [PATCH v3 01/15] KVM: SEV: fix compat ABI for KVM_MEMORY_ENCRYPT_OP Paolo Bonzini
2024-02-26 19:03 ` [PATCH v3 02/15] KVM: x86: use u64_to_user_addr() Paolo Bonzini
2024-03-04 9:08 ` Xu Yilun
2024-02-26 19:03 ` [PATCH v3 03/15] KVM: SVM: Invert handling of SEV and SEV_ES feature flags Paolo Bonzini
2024-03-12 15:19 ` Michael Roth
2024-02-26 19:03 ` [PATCH v3 04/15] KVM: SVM: Compile sev.c if and only if CONFIG_KVM_AMD_SEV=y Paolo Bonzini
2024-03-18 22:55 ` Isaku Yamahata
2024-02-26 19:03 ` [PATCH v3 05/15] Documentation: kvm/sev: separate description of firmware Paolo Bonzini
2024-02-28 9:34 ` Bagas Sanjaya
2024-02-26 19:03 ` [PATCH v3 06/15] KVM: introduce new vendor op for KVM_GET_DEVICE_ATTR Paolo Bonzini
2024-02-26 19:03 ` [PATCH v3 07/15] KVM: SEV: publish supported VMSA features Paolo Bonzini
2024-02-26 19:03 ` [PATCH v3 08/15] KVM: SEV: store VMSA features in kvm_sev_info Paolo Bonzini
2024-02-26 19:03 ` [PATCH v3 09/15] KVM: SEV: disable DEBUG_SWAP by default Paolo Bonzini
2024-02-26 19:03 ` [PATCH v3 10/15] KVM: x86: add fields to struct kvm_arch for CoCo features Paolo Bonzini
2024-03-14 2:49 ` Michael Roth
2024-03-14 22:09 ` Michael Roth
2024-03-14 22:56 ` Sean Christopherson
2024-03-14 23:48 ` Michael Roth
2024-03-15 14:56 ` Sean Christopherson
2024-03-18 16:48 ` Paolo Bonzini
2024-03-18 22:01 ` Paolo Bonzini
2024-02-26 19:03 ` [PATCH v3 11/15] KVM: x86: Add supported_vm_types to kvm_caps Paolo Bonzini
2024-02-26 19:03 ` [PATCH v3 12/15] KVM: SEV: introduce to_kvm_sev_info Paolo Bonzini
2024-02-26 19:03 ` [PATCH v3 13/15] KVM: SEV: define VM types for SEV and SEV-ES Paolo Bonzini
2024-02-28 1:00 ` Isaku Yamahata
2024-03-04 15:32 ` Xu Yilun
2024-03-04 16:37 ` Sean Christopherson
2024-03-05 13:34 ` Paolo Bonzini
2024-02-26 19:03 ` [PATCH v3 14/15] KVM: SEV: introduce KVM_SEV_INIT2 operation Paolo Bonzini
2024-03-04 15:35 ` Xu Yilun
2024-02-26 19:03 ` [PATCH v3 15/15] selftests: kvm: add tests for KVM_SEV_INIT2 Paolo Bonzini
2024-02-27 3:50 ` Bagas Sanjaya [this message]
2024-02-27 17:49 ` [PATCH v3 00/15] KVM: SEV: allow customizing VMSA features Sean Christopherson
2024-02-28 3:22 ` Bagas Sanjaya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zd1cDyyx65J1IVK1@archie.me \
--to=bagasdotme@gmail.com \
--cc=aik@amd.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox