From patchwork Thu May 22 19:05:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 891707 Delivered-To: patch@linaro.org Received: by 2002:adf:e88a:0:b0:3a3:61c9:c5d4 with SMTP id d10csp2805294wrm; Thu, 22 May 2025 12:06:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWaNve0vjGh1aKKlOWOAFZJlT0mzeT0RRe6MmVLuyDpeDCVNOcXr0OoIu+9fv//hBYPcPvQ5Q==@linaro.org X-Google-Smtp-Source: AGHT+IGjl+FtJawSotoXUDBg5HWSL8lVso4bAk7MDC2BltbcD9H0zxF7tV58PnQjlf0fJhCeJvpc X-Received: by 2002:a05:6602:488d:b0:85d:a5d3:618c with SMTP id ca18e2360f4ac-86caf1070aemr18427539f.11.1747940780066; Thu, 22 May 2025 12:06:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747940780; cv=none; d=google.com; s=arc-20240605; b=lYzw+cRZqZ5yowFL6gFuBhbeM4RltPFNp+Hq1Q25viJmNlWhDbcPDtdnbq3TAW8gHn M9pBEuhp2mHH06czsWM5YHKoRe6zTnToXNBdXtbImI4uu9yWt47eMf+Lzd3cONPSGGtJ mtw/r0Fhm8dM9CqVoLhTPZELKMDDBAZ5/m3KYMzBPfHXbp7cNq9GWORdokxmRbmBiRjA hvzQ5bXiWpGICVGouOgThbNCjcnLFrHdRp9O/lj4mabuSSKeJPCYJ+PkbeOVDTVZa9pd Yw0FefVh4eA5He3IomFHZ0BMW3nHDWcAEj5GAlESOlZ6vIJlHBEpELYLzdUlS2m9qnx9 EDUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fNQNvYWp/z3kSBykHJK9nPCJGqDZwEVbVWsgm8QVtr4=; fh=KLm/AGbE26h6jaAcc1KwvWPtLJHi7FVLmArvpM27l0Q=; b=LMZ2RUDrFMa7L4KV3hmLutzZPO8h13mkdjBniGl7GMrelauOE1Sd3RWdk76epFgILC TXoaa3PkD2KFwoohtMPVJYtTLSNXI7V+sF/Rn21fUPConTp9gYzhs6g/3jCg3pfC0q3N tVu4TUxpyZ0ddAUJDq9FoZhN5N9R+vdZR5TCXsSFtjXqnTQmrm+hJXuMybt6drPY4ILQ 3yqv7zmAxgb27PQr/SIrYhreLloC7VblP3psre3kJHLYWdsVCPOOmwvpTxqu1QheIzNa 52bT9A4VsygDBNUeuNG4c1/J5UdspQmEo9twmjg3mllDVQWgOMc7i9fBZTWaxkZzcGUJ gvzA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dTWJWjJn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 8926c6da1cb9f-4fbcc4b2e96si16072158173.118.2025.05.22.12.06.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 May 2025 12:06:20 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dTWJWjJn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uIBEv-0000vl-0F; Thu, 22 May 2025 15:06:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uIBEo-0000up-DG for qemu-devel@nongnu.org; Thu, 22 May 2025 15:05:54 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uIBEm-0006Rz-KT for qemu-devel@nongnu.org; Thu, 22 May 2025 15:05:54 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-73c17c770a7so8932607b3a.2 for ; Thu, 22 May 2025 12:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747940751; x=1748545551; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fNQNvYWp/z3kSBykHJK9nPCJGqDZwEVbVWsgm8QVtr4=; b=dTWJWjJnh2Blz8nOWuKHNph+Z8a8NomPeSV7TWpvODGLKs0lF3q8mekcSxX9BULLUE vi+VFuJgnHuqo5FkKbxfSbm97CKetq8MtnuIqSgyikFMldbY8jU2Ri47bvSeWqLV1Klm fRiLzeiqHhaDvwPX2lra2ou4ZAqsQlUb9PEV8C2Ppi3DI4DZ3Rwj8sS0+R0RbhAT/Oby NXHSjo7aPkVRmJqeTlwlhpULL9BiEITlkAc8HYiciCcHfteuoMeuHDyehxRh7QPao6LN Pi4hfVqTD9Ysvy+zqM3p8jygezwcqaVBO75sOP25S1uvieIv8ZU70GHfVRk0vk+y9Srh KjIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747940751; x=1748545551; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fNQNvYWp/z3kSBykHJK9nPCJGqDZwEVbVWsgm8QVtr4=; b=ekj3+oFktU6UguutG1GzNAaB+MUQmg9uUeR7th0kjQJG28t90Ai4uE7WN/4tm6JdvW gXJz5jwSdC3J3q3nDuy7DGl591k2Skln1TfuTS4GZpS057G/bHTNd0o6o8iX4GEVuh2+ NURwVWSqoJFyBaOJxe0wjjdST0C64OrKvFp+Y1LWDvQwuAAIqEUFodcrBjlPf7MzBZyI /lFG8uo51s4Hb8zGoTOUmTGOizxz+2WUEZ9pZO0kbtJ+CynytroivLH55HTnwzV6SLaO KLnRXUncw8BzD+eoF2iFAc1/Vavm4KxT+YySrMeN3cOb4feRCtBEg7eUZzhvALf+p47j nC6w== X-Gm-Message-State: AOJu0YzkAGQT5N1m00Q7vakfCIqalEnJrxwp5hASrGZZIXHeNZLAi2cI 6ElnGXm5BdntpGjw+CxQEhqb+QaMIBV12Hp7ScFDBKTRTi8l3WKtCQrlVTwJO+Ph8pkUaNxxLM0 MePvw X-Gm-Gg: ASbGncumUF6Xngf5ttWzjuKgzJEc3Y66/6a/a8FIN3nyeL7xTcGaBHEK0yc85l+/bkP GFhjBUhRMirbYWdMcY0tcp57K8PKXeAVSlVuxtBh6dZDChYBTE2pGi2u3aNlVJEODYEAoSxOxU0 DTLAUM92HsHebPhaWancv9lyJp1hfp/sfJD8QLUIY8lzXCl8HsGl7y0piq43m7eZvla7fajy5VQ 1sKcEcq+xyQoHUz8dYoYOM+JSN7YT13PYMQ5RxO211pxM0MtjNOXth5xh64Ld55H9w1HDk73iT6 w/Wcs20Ajrv9Fgv7amIcMOqoDrlTw5yjLiWvsQm4/iWFcNO+moY= X-Received: by 2002:a05:6a00:3a04:b0:732:a24:7354 with SMTP id d2e1a72fcca58-745ed84a0d9mr328091b3a.4.1747940750891; Thu, 22 May 2025 12:05:50 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b26eb082c66sm11625565a12.60.2025.05.22.12.05.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 May 2025 12:05:49 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: michael.roth@amd.com, thuth@redhat.com, pbonzini@redhat.com, richard.henderson@linaro.org, armbru@redhat.com, pierrick.bouvier@linaro.org, peter.maydell@linaro.org, berrange@redhat.com, philmd@linaro.org Subject: [PATCH v4 02/15] qapi: expand docs for SEV commands Date: Thu, 22 May 2025 12:05:29 -0700 Message-ID: <20250522190542.588267-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250522190542.588267-1-pierrick.bouvier@linaro.org> References: <20250522190542.588267-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel P. Berrangé This gives some more context about the behaviour of the commands in unsupported guest configuration or platform scenarios. Reviewed-by: Richard Henderson Signed-off-by: Daniel P. Berrangé Signed-off-by: Pierrick Bouvier --- qapi/misc-target.json | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/qapi/misc-target.json b/qapi/misc-target.json index c5f9f6be7e1..6b857efc1cc 100644 --- a/qapi/misc-target.json +++ b/qapi/misc-target.json @@ -110,7 +110,11 @@ ## # @query-sev: # -# Returns information about SEV +# Returns information about SEV/SEV-ES/SEV-SNP. +# +# If unavailable due to an incompatible configuration the +# returned @enabled field will be set to 'false' and the +# state of all other fields is undefined. # # Returns: @SevInfo # @@ -141,7 +145,16 @@ ## # @query-sev-launch-measure: # -# Query the SEV guest launch information. +# Query the SEV/SEV-ES guest launch information. +# +# This is only valid on x86 machines configured with KVM and the +# 'sev-guest' confidential virtualization object. The launch +# measurement for SEV-SNP guests is only available within +# the guest. +# +# This will return an error if the launch measurement is +# unavailable, either due to an invalid guest configuration +# or if the guest has not reached the required SEV state. # # Returns: The @SevLaunchMeasureInfo for the guest # @@ -185,8 +198,9 @@ ## # @query-sev-capabilities: # -# This command is used to get the SEV capabilities, and is supported -# on AMD X86 platforms only. +# This command is used to get the SEV capabilities, and is only +# supported on AMD X86 platforms with KVM enabled. If SEV is not +# available on the platform an error will be returned. # # Returns: SevCapability objects. # @@ -205,7 +219,15 @@ ## # @sev-inject-launch-secret: # -# This command injects a secret blob into memory of SEV guest. +# This command injects a secret blob into memory of a SEV/SEV-ES guest. +# +# This is only valid on x86 machines configured with KVM and the +# 'sev-guest' confidential virtualization object. SEV-SNP guests +# do not support launch secret injection +# +# This will return an error if launch secret injection is not possible, +# either due to an invalid guest configuration, or if the guest has not +# reached the required SEV state. # # @packet-header: the launch secret packet header encoded in base64 # @@ -236,8 +258,15 @@ ## # @query-sev-attestation-report: # -# This command is used to get the SEV attestation report, and is -# supported on AMD X86 platforms only. +# This command is used to get the SEV attestation report. +# +# This is only valid on x86 machines configured with KVM and the +# 'sev-guest' confidential virtualization object. The attestation +# report for SEV-SNP guests is only available within the guest. +# +# This will return an error if the attestation report is +# unavailable, either due to an invalid guest configuration +# or if the guest has not reached the required SEV state. # # @mnonce: a random 16 bytes value encoded in base64 (it will be # included in report)