kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, kvm <kvm@vger.kernel.org>,
	 Michael Roth <michael.roth@amd.com>
Subject: Re: SNP guest policy support
Date: Thu, 21 Aug 2025 09:39:18 -0700	[thread overview]
Message-ID: <aKdLtn-28moWf0_6@google.com> (raw)
In-Reply-To: <1a054b30-6c3c-8e58-e2e6-c83cb18cb0ee@amd.com>

On Wed, Aug 13, 2025, Tom Lendacky wrote:
> Paolo/Sean,
> 
> I'm looking to expand the supported set of policy bits that the VMM can
> supply on an SNP guest launch (e.g. requiring ciphertext hiding, etc.).
> 
> Right now we have the SNP_POLICY_MASK_VALID bitmask that is used to
> check for KVM supported policy bits. From the previous patches I
> submitted to add the SMT and SINGLE_SOCKET policy bit support, there was
> some thought of possibly providing supported policy bits to userspace.
> 
> Should we just update the mask as we add support for new policy bits? Or
> should we do something similar to the sev_supported_vmsa_features
> support and add a KVM_X86_SEV_POLICY_SUPPORT attribute to the
> KVM_X86_GRP_SEV? Or...?

I think adding KVM_X86_SEV_POLICY_SUPPORT to KVM_X86_GRP_SEV makes the most sense.

If we allow new bits, then we definitely need a way to enumerate support to
userspace.  Even if we made KVM fully permissive, we'd need/want a way to communicate
_that_ to userspace, which means adding a capability or something similar.

In other words, we need new uAPI, and if we need new uAPI, then I'd much prefer
to retain control in KVM just in case a policy comes along that we don't want to
(or can't) support for whatever reason.

      reply	other threads:[~2025-08-21 16:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13 13:18 SNP guest policy support Tom Lendacky
2025-08-21 16:39 ` Sean Christopherson [this message]

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=aKdLtn-28moWf0_6@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=thomas.lendacky@amd.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;
as well as URLs for NNTP newsgroup(s).