[PATCH v2 0/2] Add throttling detection to sev-guest
From: Dionna Glaze
Date: Wed Oct 19 2022 - 13:37:42 EST
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.
Changes from v1:
* Changed throttle error code to 2
Cc: Tom Lendacky <Thomas.Lendacky@xxxxxxx>
Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Cc: Joerg Roedel <jroedel@xxxxxxx>
Cc: Peter Gonda <pgonda@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
Signed-off-by: Dionna Glaze <dionnaglaze@xxxxxxxxxx>
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 | 16 ++++++++++--
4 files changed, 42 insertions(+), 18 deletions(-)
--
2.38.0.413.g74048e4d9e-goog