linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dionna Glaze <dionnaglaze@google.com>
To: linux-kernel@vger.kernel.org, x86@kernel.org
Cc: Dionna Glaze <dionnaglaze@google.com>,
	Tom Lendacky <Thomas.Lendacky@amd.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Joerg Roedel <jroedel@suse.de>, Peter Gonda <pgonda@google.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Dave Hansen <dave.hansen@linux.intel.com>
Subject: [PATCH 0/2] Add throttling detection to sev-guest
Date: Thu, 13 Oct 2022 16:00:38 +0000	[thread overview]
Message-ID: <20221013160040.2858732-1-dionnaglaze@google.com> (raw)

The guest request synchronous API from SEV-SNP VMs to the host's security
processor consumes a global resource. For this reason, AMD's docs
recommend that the host implements a throttling mechanism. In order for
the guest to know it's been throttled and should try its request again,
we need some good-faith communication from the host that the request
has been throttled.

These patches work with the existing /dev/sev-guest ABI to detect a
throttling code.

Cc: Tom Lendacky <Thomas.Lendacky@amd.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Joerg Roedel <jroedel@suse.de>
Cc: Peter Gonda <pgonda@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>

Signed-off-by: Dionna Glaze <dionnaglaze@google.com>

Dionna Glaze (2):
  x86/sev: Rename snp_guest_issue_request's fw_err
  virt/coco/sev-guest: interpret VMM errors from guest request

 arch/x86/include/asm/sev.h              |  4 +--
 arch/x86/kernel/sev.c                   |  6 ++---
 drivers/virt/coco/sev-guest/sev-guest.c | 34 +++++++++++++++++--------
 include/uapi/linux/sev-guest.h          | 17 +++++++++++--
 4 files changed, 43 insertions(+), 18 deletions(-)

-- 
2.38.0.rc1.362.ged0d419d3c-goog


             reply	other threads:[~2022-10-13 16:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13 16:00 Dionna Glaze [this message]
2022-10-13 16:00 ` [PATCH 1/2] x86/sev: Rename snp_guest_issue_request's fw_err Dionna Glaze
2022-10-13 16:00 ` [PATCH 2/2] virt/coco/sev-guest: interpret VMM errors from guest request Dionna Glaze
2022-10-13 21:59   ` Tom Lendacky
2022-10-18 16:20     ` Dionna Amalie Glaze

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=20221013160040.2858732-1-dionnaglaze@google.com \
    --to=dionnaglaze@google.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=pgonda@google.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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).