From patchwork Fri Apr 23 20:08:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 12221645 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB521C433ED for ; Fri, 23 Apr 2021 20:10:48 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 14D6C60725 for ; Fri, 23 Apr 2021 20:10:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14D6C60725 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1la28V-0001xL-0S for qemu-devel@archiver.kernel.org; Fri, 23 Apr 2021 16:10:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1la26x-00019a-9v for qemu-devel@nongnu.org; Fri, 23 Apr 2021 16:09:11 -0400 Received: from mail-bn7nam10on2067.outbound.protection.outlook.com ([40.107.92.67]:12705 helo=NAM10-BN7-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1la26u-0005D7-SB for qemu-devel@nongnu.org; Fri, 23 Apr 2021 16:09:10 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SCedyXzgzz26yRgVYX1nzJVhjG6x3wbSlNhXee3oS/ADvpuf1jJIyqR5P8g7G7zolOG/tIyCSjUR7Tpb+E7+jjy+WMUJz6Ued9R7lSlYD3fMesTwD6FwaqgfJZqfWfZgOMf1bGwRw66RQlnbjAXSW1pPVRfnsiuk4jP44J5hcrbc36GRZq1fUfPYPVwuYKXoMPUqolQQ+V83furpRxZhwB8Z88OQYHsxGYZdVmiGgRvPbre5TZnW3P0LC4uYxhUnnVH3SbWg7RvlzgQsxJ4g17d67cYgXPL5niq4IEZzbxDRvtgxbWK4cMlG81UE/DwD6HJ7tEPu8LPD2CvdxdDIBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OTI+Yu8+zpLHe5GHQhalYm9j4C2CTK9cWugmo7kisfA=; b=MjN7hJb2ko1102RNS7yrOBWVrXgrlymPYVv74ctLC5mzw0YCv70AjdVmBHAd3n+pdIfXxzJ/mYsM3l4VJLO/0ri0NxDd6HObIlcfEWfcuMc4bic0rl3BOghm4PjArcmuGfc7+EOowfVeocAFR9gslzIU9sqh0et03xzpRDBkOJZgKzvc6TT489b0cff1EyPj4Ij+UejfbAxwg65YToaoy7mjroOknEmyujxnfDaau2MLQTCs98wHPfQC1GiA4/ct7ySHPIctMzGzFM1dkJySeFFGMZampdexUaMoEDZv5qFiRrHPeZs4d9p0l+LXXDbmn9wc7h/HUBJnglNbAomeIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OTI+Yu8+zpLHe5GHQhalYm9j4C2CTK9cWugmo7kisfA=; b=KR+bJ4bCaQNmDwLnDh+L28K7Zxdb1zXhx/RhVlcnsioPSiLn5dGJPKWNs/IpO+BChC5U3PbSSFDJwbVeuFRModxnMHk+eUZqwNY/MDgXhYypF1qvYDjH2DqhGKP0OeIgN8G4XyHBJK70M5OFweJUda2NA7eqTcl7mUQBAYcjuyo= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) by DM5PR12MB4678.namprd12.prod.outlook.com (2603:10b6:4:a9::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.18; Fri, 23 Apr 2021 20:08:30 +0000 Received: from DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::b914:4704:ad6f:aba9]) by DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::b914:4704:ad6f:aba9%12]) with mapi id 15.20.4065.023; Fri, 23 Apr 2021 20:08:30 +0000 From: Tom Lendacky To: qemu-devel@nongnu.org Subject: [PATCH v2 1/3] doc: Fix some mistakes in the SEV documentation Date: Fri, 23 Apr 2021 15:08:17 -0500 Message-Id: X-Mailer: git-send-email 2.31.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SN4PR0601CA0004.namprd06.prod.outlook.com (2603:10b6:803:2f::14) To DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from tlendack-t1.amd.com (165.204.77.1) by SN4PR0601CA0004.namprd06.prod.outlook.com (2603:10b6:803:2f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20 via Frontend Transport; Fri, 23 Apr 2021 20:08:29 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ab65cbb1-b898-444a-ecb2-08d906939053 X-MS-TrafficTypeDiagnostic: DM5PR12MB4678: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RlUgOXM+iasBGRJUNcrY5AISlIx/YvL9rZA9El1Ze3B1uaPhvQH84acVAX7PQigcw1k3HdS3pg5/3QEyERd+Il3PV4V+FlXrD7wCRxhV71ul/f1BwZBnjN/qVNqAOmAKk0tdSlJBS5GovT0HE7WX7S8Sbx0dxl06E0/RRzH+KaNlJegPVarOoNOF6erJwIXa5LchmEvyr/4lVAzVaTp0gNEtmWJOzCYHITR9PalBFV4PhY2kpUdza/lVFSOkDTaELHfFDcyUUvrAr139wA7bwimJ2eLD/PpEiQqAZj7TWOIYUg3hG1cjPB87azds73UP1pHiQTERkVZFfJwr1l6IGJTpvZ6wYO4jlZAau8zcAme4jsy39BvcjWuElkPkCrtGuhZXVgMX+H9q6GuRvrSDss7tmjbPNciDx5jLpLQmRC9Fp4F45XX28teYLG98Ok+ouFjFcqIwgWw52HBNerkDD+bArv04RJDRfrAbls4OM345l9nMNZ8MWyQFeiKJoSLajB3sirSk+iWujh22PFcWp46z3foGevQ7if5FX1FQmdbigPfxycg2nkX7GDIWWjDJ7I2YuwJZ+4Np94ORiV76rkUABId5NUWHeh/oAQuyO72YHWL4tWpmG3p9A+jCu3fogYOHxURXj6/wgle3JZtbZrLS1MzzYVYvACytY0o1BuM= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR12MB1355.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(366004)(396003)(376002)(136003)(346002)(6486002)(8676002)(36756003)(7696005)(66476007)(66946007)(26005)(956004)(478600001)(316002)(83380400001)(6916009)(4326008)(186003)(66556008)(16526019)(86362001)(2906002)(54906003)(2616005)(38350700002)(5660300002)(6666004)(8936002)(38100700002)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: IyvXdDyd8mW/dqjf2CQwD/yD3+XsQQrmfmpo4FvEynoTBhSQL51JE971MsGkxoOiN+0WRWE2RLDWfII1klSALA7dhKZx1+g+/nfNmHSHpO6F9j30evCVm1SShSNR3sRk2zbxpz8s0313B417Z1Fc/LiVwW07y1ckGBgF2vvl169NkGz7IsEpJSjWrU74t4pZosiI8uSdP+QBhCF7lFQqxp+z9eiplcU4pxEfDV7HLdHVMs0cvrcLj7jDZesxq8Jdmdb0IQOsRAO9RwNy6TtAFvj5sOVahQyrtEXKP3Q0Gnqlhq5TQyfXwe2mROCSSzGNb2NYXOoOJqxIFFdaEUW3atDZUfrXorrVstDrb9LdkFv4IqF1WKviuGIeCjqLJRGERp4xrqx8GuqqXCZhJ5Dizh3wmGrOmowbNwoKx7KWurQMALd8j3JV0u6thJk0uTlsB4nChP06hQ5YP3DE9DfNLzs8MZtKymJKW3N4FhadQJ3HpBE56clHarwoLLQvcGCcy+k9Ag5yDZzBO1Lx6/qNPcOEVSbv6SubnVskS7ezLqO6XCn0Hlth/vpX0sRPBzvjpyRi2Y9n4CZsAitWdApEqdF3W4/haHh/87sLOkopY0O3q2O8P4XSyb1fK/Mjblh8ep3K4kp0V+QqChGBxd0PKcu8mLsTiQFm/3JRfqnLswRzHQ0iZBC8b5UDwL8yXuUjL2hRntepStpytP9P+MsqebUkzjuks1f/LNFRNRaCSn3lnY4wv5Dx40ZX58kAmV9R/f0cj0mQmwUCyc4lPbAFEjcOwos/VIhEbIKtfbddhYiZoWF8BEgu+uvOgcxx/qLwbW6ySrBsnPx5woRE5KjdTKTpDFQTOtItbYC6bqpYDsMttCGfY8oaimAbrP32kamNWFikP2QKHB8Py3zWYF0YMd/oyzvZgWma9AoF1PI8yUn0GFNZbO7iHyOkTFTkF5pE4TGibK8otTlfCSO6M+HXLHyON/ZMsYW5MgILN4K+Bf7u1hrqv/X0o+Ov6Ui/G8EqRhTd0C9mnvRhnvqwJuXpbmz4gNTVO5hBvK2EWmBjP5El7tei65Ycw9IBGe4106fF3sQD6Mb/NyLoF3B6bnoxViGjvM3Dlnjxd6IwGP5/jjHYkmgXu08acfqjfrj+EEQtq1edYEj6/8CZf3zGciit8VTFxnyhv0RyexpDUwqfrFJkMqdM7K4C3Jl53qEAoHm1+9SNNyxK0lA2VGA+DEtE8xbwQi6uooIEnB2+yE/gCM8b75jWB9zJoHHJBS2w2zoyBPOUr3SDu7c5aOkuyQ7/xIaErgQ/qE/TnMWKK8QmB/RFlGV9erWA0A8Tick6M3RJ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: ab65cbb1-b898-444a-ecb2-08d906939053 X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1355.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2021 20:08:30.2443 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kGZ1JjgSNifEKtm4jPJSgTVqkoNAQ1jNKr957fQFvUq216mPUA8QmIOfZOn899lwxT9770s/xt5frB1buHipag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB4678 Received-SPF: softfail client-ip=40.107.92.67; envelope-from=Thomas.Lendacky@amd.com; helo=NAM10-BN7-obe.outbound.protection.outlook.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pavel Hrdina , "Daniel P . Berrange" , Eduardo Habkost , Michal Privoznik , "Dr. David Alan Gilbert" , Brijesh Singh , Paolo Bonzini , Laszlo Ersek Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Tom Lendacky Fix some spelling and grammar mistakes in the amd-memory-encryption.txt file. No new information added. Signed-off-by: Tom Lendacky Reviewed-by: Laszlo Ersek Reviewed-by: Connor Kuehl --- docs/amd-memory-encryption.txt | 59 +++++++++++++++++----------------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/docs/amd-memory-encryption.txt b/docs/amd-memory-encryption.txt index 145896aec7..ed85159ea7 100644 --- a/docs/amd-memory-encryption.txt +++ b/docs/amd-memory-encryption.txt @@ -1,38 +1,38 @@ Secure Encrypted Virtualization (SEV) is a feature found on AMD processors. SEV is an extension to the AMD-V architecture which supports running encrypted -virtual machine (VMs) under the control of KVM. Encrypted VMs have their pages +virtual machines (VMs) under the control of KVM. Encrypted VMs have their pages (code and data) secured such that only the guest itself has access to the unencrypted version. Each encrypted VM is associated with a unique encryption -key; if its data is accessed to a different entity using a different key the +key; if its data is accessed by a different entity using a different key the encrypted guests data will be incorrectly decrypted, leading to unintelligible data. -The key management of this feature is handled by separate processor known as -AMD secure processor (AMD-SP) which is present in AMD SOCs. Firmware running -inside the AMD-SP provide commands to support common VM lifecycle. This +Key management for this feature is handled by a separate processor known as the +AMD secure processor (AMD-SP), which is present in AMD SOCs. Firmware running +inside the AMD-SP provides commands to support a common VM lifecycle. This includes commands for launching, snapshotting, migrating and debugging the -encrypted guest. Those SEV command can be issued via KVM_MEMORY_ENCRYPT_OP +encrypted guest. These SEV commands can be issued via KVM_MEMORY_ENCRYPT_OP ioctls. Launching --------- -Boot images (such as bios) must be encrypted before guest can be booted. -MEMORY_ENCRYPT_OP ioctl provides commands to encrypt the images :LAUNCH_START, +Boot images (such as bios) must be encrypted before a guest can be booted. The +MEMORY_ENCRYPT_OP ioctl provides commands to encrypt the images: LAUNCH_START, LAUNCH_UPDATE_DATA, LAUNCH_MEASURE and LAUNCH_FINISH. These four commands together generate a fresh memory encryption key for the VM, encrypt the boot -images and provide a measurement than can be used as an attestation of the +images and provide a measurement than can be used as an attestation of a successful launch. LAUNCH_START is called first to create a cryptographic launch context within -the firmware. To create this context, guest owner must provides guest policy, +the firmware. To create this context, guest owner must provide a guest policy, its public Diffie-Hellman key (PDH) and session parameters. These inputs -should be treated as binary blob and must be passed as-is to the SEV firmware. +should be treated as a binary blob and must be passed as-is to the SEV firmware. -The guest policy is passed as plaintext and hypervisor may able to read it +The guest policy is passed as plaintext. A hypervisor may choose to read it, but should not modify it (any modification of the policy bits will result in bad measurement). The guest policy is a 4-byte data structure containing -several flags that restricts what can be done on running SEV guest. +several flags that restricts what can be done on a running SEV guest. See KM Spec section 3 and 6.2 for more details. The guest policy can be provided via the 'policy' property (see below) @@ -40,31 +40,30 @@ The guest policy can be provided via the 'policy' property (see below) # ${QEMU} \ sev-guest,id=sev0,policy=0x1...\ -Guest owners provided DH certificate and session parameters will be used to +The guest owner provided DH certificate and session parameters will be used to establish a cryptographic session with the guest owner to negotiate keys used for the attestation. -The DH certificate and session blob can be provided via 'dh-cert-file' and -'session-file' property (see below +The DH certificate and session blob can be provided via the 'dh-cert-file' and +'session-file' properties (see below) # ${QEMU} \ sev-guest,id=sev0,dh-cert-file=,session-file= LAUNCH_UPDATE_DATA encrypts the memory region using the cryptographic context -created via LAUNCH_START command. If required, this command can be called +created via the LAUNCH_START command. If required, this command can be called multiple times to encrypt different memory regions. The command also calculates the measurement of the memory contents as it encrypts. -LAUNCH_MEASURE command can be used to retrieve the measurement of encrypted -memory. This measurement is a signature of the memory contents that can be -sent to the guest owner as an attestation that the memory was encrypted -correctly by the firmware. The guest owner may wait to provide the guest -confidential information until it can verify the attestation measurement. -Since the guest owner knows the initial contents of the guest at boot, the -attestation measurement can be verified by comparing it to what the guest owner -expects. +LAUNCH_MEASURE can be used to retrieve the measurement of encrypted memory. +This measurement is a signature of the memory contents that can be sent to the +guest owner as an attestation that the memory was encrypted correctly by the +firmware. The guest owner may wait to provide the guest confidential information +until it can verify the attestation measurement. Since the guest owner knows the +initial contents of the guest at boot, the attestation measurement can be +verified by comparing it to what the guest owner expects. -LAUNCH_FINISH command finalizes the guest launch and destroy's the cryptographic +LAUNCH_FINISH finalizes the guest launch and destroys the cryptographic context. See SEV KM API Spec [1] 'Launching a guest' usage flow (Appendix A) for the @@ -78,10 +77,10 @@ To launch a SEV guest Debugging ----------- -Since memory contents of SEV guest is encrypted hence hypervisor access to the -guest memory will get a cipher text. If guest policy allows debugging, then -hypervisor can use DEBUG_DECRYPT and DEBUG_ENCRYPT commands access the guest -memory region for debug purposes. This is not supported in QEMU yet. +Since the memory contents of a SEV guest are encrypted, hypervisor access to +the guest memory will return cipher text. If the guest policy allows debugging, +then a hypervisor can use the DEBUG_DECRYPT and DEBUG_ENCRYPT commands to access +the guest memory region for debug purposes. This is not supported in QEMU yet. Snapshot/Restore ----------------- From patchwork Fri Apr 23 20:08:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 12221649 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DECCC433ED for ; Fri, 23 Apr 2021 20:12:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1A3626137D for ; Fri, 23 Apr 2021 20:12:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A3626137D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1la2A8-0003Ro-69 for qemu-devel@archiver.kernel.org; Fri, 23 Apr 2021 16:12:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1la26z-00019w-IM for qemu-devel@nongnu.org; Fri, 23 Apr 2021 16:09:14 -0400 Received: from mail-bn7nam10on2067.outbound.protection.outlook.com ([40.107.92.67]:12705 helo=NAM10-BN7-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1la26x-0005D7-BY for qemu-devel@nongnu.org; Fri, 23 Apr 2021 16:09:13 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CQXjnCP/MAVQ6k3Lxr2bNQ03ZyuEwGZwU0EqqNe8IMq291VnI0ndKHoM6o1i01b+W4RJj0Qp418nHjx0Hiz4aIXI0ygsLJC9wsDE+0Q//eu0jBNlz4PH6vnaY7FRk0BI66pvxMr5xmNR45RCknGck6m14Rb/F6KQjyRKXBtvUqzkB1CitPWdNdXr+UNzQZPoXd33AqiI8BnRSJMXtXerxCEEP8E9HjNc78xatYVNdP/6OBAL0z+cVD096JdbT5r9WSIJkb0RSC1eOwI12pUl5xE8ihDdM7cWCw/YQHL37yM0CzcZNIX7XlWnfO1VygoHTQLO4Wws1Y9IQUueAigycA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4z03hKyTRRx8qmLvblygBGm5FolLoDIyXsn0FgirHj8=; b=d1O23iCG6kWu8pC1Az4GQv5AdmMu+VneOd2zpUY5A8wd3k+XAYyQFzvJRs0kB1f6J/P+Ifhw/hzfMAUgOEu0bfl4WwzfmicYqWUjnoFHmjAaf/pE0uKOgOLOklMDhWqHA7BOi8xKgF+JAhHPMjj3w/mIWGW/l7d4SS8wkyqL8LpMilOQx68FBm4qsT8yVm1rnVOVQDtYvtErHpgTR/skRX+3JoL/NuRCQRunMTX62xZvVkuFLHySznGakk8UGjkY/TyytXqdv2ecIolW5eVOIFUqJdrHt3pz4V+mGuuKRhWInCf8h6+7VF5G4+AQLxXiA/buz7++LPg/QsCfou7YsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4z03hKyTRRx8qmLvblygBGm5FolLoDIyXsn0FgirHj8=; b=31N1Bf+NyMI4lkxbdOAgXZ6xq6HkyMpHQ1TXCMkBj/dAXM5aY+qf8DaTWs/h4L6fX2a8SvV9wBRV1La3i4rvW0o3n7AaxHDDfaZ0iNqgDeCNgxidIHYydmEfZuJ8KjT/j6oU/JPXta9aOnkB6JJ+bqoBXpRhwhSPZkreg1faCNQ= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) by DM5PR12MB4678.namprd12.prod.outlook.com (2603:10b6:4:a9::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.18; Fri, 23 Apr 2021 20:08:38 +0000 Received: from DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::b914:4704:ad6f:aba9]) by DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::b914:4704:ad6f:aba9%12]) with mapi id 15.20.4065.023; Fri, 23 Apr 2021 20:08:38 +0000 From: Tom Lendacky To: qemu-devel@nongnu.org Subject: [PATCH v2 2/3] docs: Add SEV-ES documentation to amd-memory-encryption.txt Date: Fri, 23 Apr 2021 15:08:18 -0500 Message-Id: X-Mailer: git-send-email 2.31.0 In-Reply-To: References: X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SN7PR04CA0207.namprd04.prod.outlook.com (2603:10b6:806:126::32) To DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from tlendack-t1.amd.com (165.204.77.1) by SN7PR04CA0207.namprd04.prod.outlook.com (2603:10b6:806:126::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20 via Frontend Transport; Fri, 23 Apr 2021 20:08:37 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3a7aa4f6-2478-478e-6184-08d90693952e X-MS-TrafficTypeDiagnostic: DM5PR12MB4678: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I8L+rMz4BBks2bwjJQlvK+jiby2+8ijrmnrkxoC5FvsyH4S5+dmcO/Zhq+Lyz5EssSpuTlSSuXD4w//o7ZkTjTYAF4tUYno5hD2Bwc2ZnjuAsSRfk1LxM1A88fFdAvDAlTH0y1LNMCacumEdZdOwmyZNjC7386XEnSNfg1BVBblnFPBWHNvWkWNU4qa3/YPn5xrmOMT/RnmMn+98elMUP0Aw2+78LZAyhqUaaJtSQVmwS5Szt00K0oGhGFNKS8yIsgnC0L7Cvmqwx/Y0tuPEYSDTWtxOVSP2reg1atuL8NbWgPFlVddfl8C0IeEV7FS2JQAFaOOmbaBrIak5EZ0lcnC28flVjtENsVddsL+tdkLetzLHcQjdrKeGvc0ObXR8LRHddN/IVm0JsBghy6d529Xxqc/EcUVmruMTjk4vNYPpYGJenWdBx2sLjBxHlnreTpFpMxNdzgqpuq4WMQEApCRN6JszDhdr6iOtEp1fagiDSaSIUW+B7GB2v2oR+4z1YBzJ3koQsxzE0rYcKT5WlLkFZt8bnVC/0dDOsqbgSbUz3LTBkXe87/z5lKzz0OfifQIegSA2gkGEv6jZSHgS4vITGFLijloi7w0vBVj0n/f3fMRzklLCn93fIcbvREcuqyZV3X8Nznskc+vZCmz3Jg1GEqwIaGdoT1ltfpqpa9iQcNEQkZ3bFSoT5iNoQ2evcslq8RM8T02Fo9jHD7pUOXezSkE0i3untGLKd1lK4bU= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR12MB1355.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(366004)(396003)(376002)(136003)(346002)(6486002)(8676002)(36756003)(7696005)(66476007)(66946007)(26005)(956004)(478600001)(316002)(83380400001)(966005)(6916009)(4326008)(186003)(66556008)(16526019)(86362001)(2906002)(54906003)(2616005)(38350700002)(5660300002)(6666004)(8936002)(38100700002)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: AQ8RP/XLbph2bEfnpVWdl0megAia2+jpCV6dITDBzCC9nX9vkam6o3Yx7WAQo5MFb3ELoZ5bn/RGUlwP/ip767J+8KADh6j2ys91gfmuBpnGD2AYnYocPcBleV4whVZa0RmRvpV3vM2G7XXrBQQeJGwVZ1eg0VwT0vHm4pxv97cWTBu1cBJb+0VuIr9PwWKtsEt0RMjbcK42S5DgcjRpOs0EGLyXWruYsuEDbNnzD1/0lndrpA0/3N8y0A+ThMW2mnckbVHcK50xP1AzP/+I6fKse3rht035Q3eDYeM+baGdXFn3f7i7Q7ii/H9Kyfly+1CSOmwug7+l09F9IBHY5kJF00hDA6ZbFoTZPkW0fziPF60t5dvP0diAzzs3qQseXrg+jLaP9XiNysTMp5fLg5xC+ecJIeH8Q4R7HKFkqno08eu3gcvcQwIEFHvBJQghdQ42Z0hkBMs7PJQAvrDeaVPoP1KCgQMAFa1H2DtketyyolOJK3VnqgQDPx6EqFuYJ6sY2QFiK1w3a36W2rAntsjyLQvXiNTBKkbW4vX4m/qmWuRU+Z4eCIr/NLicQ6aLsXN9Xia6xmqv9dLjHFKUF53yK7sc9w2SJRMAn4WGlLiEGHqaRF4bRgDRkSetaxly0raG6fZzEO2EcmCBc+VQ2R6ZleKR5/Lcty1+KO1Fze9g2ocdheZIwrJpw0B3ANwGkrIs6N5//eUL87U8YlANIEVJM5HG+Sb+Bt+ryGGgm4816JllJtxikr5dI2ovq+EP044olf3AIUY5pGHk/5rHxeg4k5QCKncdXuNUFT4EkUB6iRkULVf4YZg9kql6E0AbhUNJbqrkxyRbV67fwxlyw1lH+3/he2ega5wF6pFaNe4MD5OL0iuyqzwn5kwj0kKMofe62TvoMmIWLxj/Px34NhvSUHjFPX7JAyr1fDQuUf/AFPf9wnVvMi43Inoa7N2Z+5QraF++LnDW6MrDWq/rcpKSk756yyTFUBFbaCLt/4sjzFJKukejsev7AY+CjfqKEbPtfBB6R/aDB342XH5AixKkMGvNRAAKZQvD/q39fuQfCaxevPV6iRCIva9mqDl6nuQIpn3Kt78RbCQ/fwVOTWPfrhGusGi/u5STbT8Jo8fvsw5IG4GPshev4kjL+NbObH/CJnMqfLm0JkWV26ypy4RAMAbyErUm1E9p9sbfRvBqwXtclF91IqrjCjT6KtZifxhySFiPQRwbBWHjl8V1nzkqI8OtBTRBE2OolGH0OxtLX74p5jqf9gF01R9FAtZoCK6HFs8GQ11nQqHX5Da2up2ZweWpVKTALAqDu5mU/6XGZuAVfRG7eaqXxDMEl/fJ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a7aa4f6-2478-478e-6184-08d90693952e X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1355.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2021 20:08:38.3889 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bVM1W5kDi+HIAtx9e4mu0uZaYiOyMMYbXa3aT+1eWoX90Torlko95o1fq1357nvyZJie3ogN/+caVsrOULa1Jw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB4678 Received-SPF: softfail client-ip=40.107.92.67; envelope-from=Thomas.Lendacky@amd.com; helo=NAM10-BN7-obe.outbound.protection.outlook.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pavel Hrdina , "Daniel P . Berrange" , Eduardo Habkost , Michal Privoznik , "Dr. David Alan Gilbert" , Brijesh Singh , Paolo Bonzini , Laszlo Ersek Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Tom Lendacky Update the amd-memory-encryption.txt file with information about SEV-ES, including how to launch an SEV-ES guest and some of the differences between SEV and SEV-ES guests in regards to launching and measuring the guest. Signed-off-by: Tom Lendacky Acked-by: Laszlo Ersek --- docs/amd-memory-encryption.txt | 54 +++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/docs/amd-memory-encryption.txt b/docs/amd-memory-encryption.txt index ed85159ea7..ffca382b5f 100644 --- a/docs/amd-memory-encryption.txt +++ b/docs/amd-memory-encryption.txt @@ -15,6 +15,13 @@ includes commands for launching, snapshotting, migrating and debugging the encrypted guest. These SEV commands can be issued via KVM_MEMORY_ENCRYPT_OP ioctls. +Secure Encrypted Virtualization - Encrypted State (SEV-ES) builds on the SEV +support to additionally protect the guest register state. In order to allow a +hypervisor to perform functions on behalf of a guest, there is architectural +support for notifying a guest's operating system when certain types of VMEXITs +are about to occur. This allows the guest to selectively share information with +the hypervisor to satisfy the requested function. + Launching --------- Boot images (such as bios) must be encrypted before a guest can be booted. The @@ -24,6 +31,9 @@ together generate a fresh memory encryption key for the VM, encrypt the boot images and provide a measurement than can be used as an attestation of a successful launch. +For a SEV-ES guest, the LAUNCH_UPDATE_VMSA command is also used to encrypt the +guest register state, or VM save area (VMSA), for all of the guest vCPUs. + LAUNCH_START is called first to create a cryptographic launch context within the firmware. To create this context, guest owner must provide a guest policy, its public Diffie-Hellman key (PDH) and session parameters. These inputs @@ -40,6 +50,12 @@ The guest policy can be provided via the 'policy' property (see below) # ${QEMU} \ sev-guest,id=sev0,policy=0x1...\ +Setting the "SEV-ES required" policy bit (bit 2) will launch the guest as a +SEV-ES guest (see below) + +# ${QEMU} \ + sev-guest,id=sev0,policy=0x5...\ + The guest owner provided DH certificate and session parameters will be used to establish a cryptographic session with the guest owner to negotiate keys used for the attestation. @@ -55,13 +71,19 @@ created via the LAUNCH_START command. If required, this command can be called multiple times to encrypt different memory regions. The command also calculates the measurement of the memory contents as it encrypts. -LAUNCH_MEASURE can be used to retrieve the measurement of encrypted memory. -This measurement is a signature of the memory contents that can be sent to the -guest owner as an attestation that the memory was encrypted correctly by the -firmware. The guest owner may wait to provide the guest confidential information -until it can verify the attestation measurement. Since the guest owner knows the -initial contents of the guest at boot, the attestation measurement can be -verified by comparing it to what the guest owner expects. +LAUNCH_UPDATE_VMSA encrypts all the vCPU VMSAs for a SEV-ES guest using the +cryptographic context created via the LAUNCH_START command. The command also +calculates the measurement of the VMSAs as it encrypts them. + +LAUNCH_MEASURE can be used to retrieve the measurement of encrypted memory and, +for a SEV-ES guest, encrypted VMSAs. This measurement is a signature of the +memory contents and, for a SEV-ES guest, the VMSA contents, that can be sent +to the guest owner as an attestation that the memory and VMSAs were encrypted +correctly by the firmware. The guest owner may wait to provide the guest +confidential information until it can verify the attestation measurement. +Since the guest owner knows the initial contents of the guest at boot, the +attestation measurement can be verified by comparing it to what the guest owner +expects. LAUNCH_FINISH finalizes the guest launch and destroys the cryptographic context. @@ -75,6 +97,22 @@ To launch a SEV guest -machine ...,confidential-guest-support=sev0 \ -object sev-guest,id=sev0,cbitpos=47,reduced-phys-bits=1 +To launch a SEV-ES guest + +# ${QEMU} \ + -machine ...,confidential-guest-support=sev0 \ + -object sev-guest,id=sev0,cbitpos=47,reduced-phys-bits=1,policy=0x5 + +An SEV-ES guest has some restrictions as compared to a SEV guest. Because the +guest register state is encrypted and cannot be updated by the VMM/hypervisor, +a SEV-ES guest: + - Does not support SMM - SMM support requires updating the guest register + state. + - Does not support reboot - a system reset requires updating the guest register + state. + - Requires in-kernel irqchip - the burden is placed on the hypervisor to + manage booting APs. + Debugging ----------- Since the memory contents of a SEV guest are encrypted, hypervisor access to @@ -101,8 +139,10 @@ Secure Encrypted Virtualization Key Management: KVM Forum slides: http://www.linux-kvm.org/images/7/74/02x08A-Thomas_Lendacky-AMDs_Virtualizatoin_Memory_Encryption_Technology.pdf +https://www.linux-kvm.org/images/9/94/Extending-Secure-Encrypted-Virtualization-with-SEV-ES-Thomas-Lendacky-AMD.pdf AMD64 Architecture Programmer's Manual: http://support.amd.com/TechDocs/24593.pdf SME is section 7.10 SEV is section 15.34 + SEV-ES is section 15.35 From patchwork Fri Apr 23 20:08:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 12221647 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12D13C433B4 for ; Fri, 23 Apr 2021 20:11:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6E97260725 for ; Fri, 23 Apr 2021 20:11:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E97260725 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1la28g-00022C-LX for qemu-devel@archiver.kernel.org; Fri, 23 Apr 2021 16:11:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1la271-0001Au-Fk for qemu-devel@nongnu.org; Fri, 23 Apr 2021 16:09:16 -0400 Received: from mail-bn7nam10on2067.outbound.protection.outlook.com ([40.107.92.67]:12705 helo=NAM10-BN7-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1la26z-0005D7-Pd for qemu-devel@nongnu.org; Fri, 23 Apr 2021 16:09:15 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mgdZ3mGyUGgj7C+2PHHeCGb+aaBecnkwzPhUbxNhNGoCgSXoJyjaInJdQICQcZW6sWOaQNNWCi/s+poEtvQySUT9evTECrhvdxJzGIZIt0m1CkiAYjms1IFQfmwmocLPKtfiJiwml4d0Pyfr226taiUZo7oqeF7OxZqHlcxBZyCOPnJMYjeVmL4rHXX6rnVekmJqJn69bz07sue/vvh1tiFzKeX2McLf9NQmzB8ndugG6t4WHYVxd0qdjhgsv9rXKK+3sgE4D6P/FC+dLK8VoA+IrjE873m0Zw/IidQ3kqtdkyZOzpywddDmnLVbVIhli16uO4m96f0hxMvhBOOOrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wIIR5th1EQyftS+iRKtrY7sIhIjZ+jCoA9CHAtg0hOo=; b=ekR5p2deEHoVGkCfB04k0gQH6uj+3gIslS1RgN+qbTUQ3L13LgOZgFgKexJvkcez3RYMdNPyRcnXw4akjbqtg6uvER9dEzZ66Dx5NFY0UU/0KetQuF30BmY9qMpGyLg14f+PR39Y0P8wclYTC82QXhUnCwTdlaJ3zbv3sMKnk1CgfWKEwAw7rsNu03RslaCKHvkLDp+p/lqvVvhteqZ6Dm6V8GcEZfs2PAnSR1CnS7GBD1WTm3FlSsyiOXpm6wSnlknmiFdGx6/7u8l3Nw6EtkC9Zh88ZZkGVaeT7/8G1SgjzrdV1uaCEePVFUqupk10KbnsdQ9xZ+r0eU8Gs1f4lA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wIIR5th1EQyftS+iRKtrY7sIhIjZ+jCoA9CHAtg0hOo=; b=pMW0VfRK8NMnUL+IURviPzJxCoMtV/yz4Das1kjbzsB1IuPhcXzxaJZtOzI6WUClt1Xt8FgJvddFOxQz4dcaZoZ3GiTUOOiu3MWvzrIyKtsrVS5kNcUFW4Zyj9fTSokSyCo/vMOjXxrocxs07d5b7HI7Y7AGikuj9HBcx9be6f8= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) by DM5PR12MB4678.namprd12.prod.outlook.com (2603:10b6:4:a9::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.18; Fri, 23 Apr 2021 20:08:46 +0000 Received: from DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::b914:4704:ad6f:aba9]) by DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::b914:4704:ad6f:aba9%12]) with mapi id 15.20.4065.023; Fri, 23 Apr 2021 20:08:46 +0000 From: Tom Lendacky To: qemu-devel@nongnu.org Subject: [PATCH v2 3/3] docs/interop/firmware.json: Add SEV-ES support Date: Fri, 23 Apr 2021 15:08:19 -0500 Message-Id: X-Mailer: git-send-email 2.31.0 In-Reply-To: References: X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SA0PR11CA0179.namprd11.prod.outlook.com (2603:10b6:806:1bb::34) To DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from tlendack-t1.amd.com (165.204.77.1) by SA0PR11CA0179.namprd11.prod.outlook.com (2603:10b6:806:1bb::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20 via Frontend Transport; Fri, 23 Apr 2021 20:08:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 488f6f17-88a2-4ae2-3206-08d9069399f1 X-MS-TrafficTypeDiagnostic: DM5PR12MB4678: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QR4Om4NUUSkAv4xL+25bcz2t/cOP14RO6sfygKiJOU5AznHMBPKjYstCwXNwLvU39vPIdd+C1KJhxn+YmMqHJfsbt4PIDqPA4ZDz/x9K90dpW+6i8p3MEXghy2UeXZ5klHK94gAZPDRy4ibODJqzfidEsOr3uBrWI0jHwGGNd0JP1XNPoCwuDAZgBZO5f29iqCIF65B7wVDim08KkzfWOj+HouSCXY2woh4Cnk4HeO7Uo6yBrFw/PUyPGrtIRug3WLduDySdxLGelcpTesbDm74PmDzPTKGg/kiMcpUrhhBaaz2JjEBHlUdXhqRh80ioDEqOC4t4y86hH9T8tZTWGuFrF3MUCVdrgh6uN6dQN834I/7H+5lCYVY+NU33A2XFUqUUHG5WBaFKzDVvbXmAzHZw2Zxkse/f0FLx04PzaiGtikVG6nhdub0phHW9Y8dQGmGGXIHVKsc01GybgdeWvpuAUDMCH4mw/SlyywC5JGut+0lP48Et3O7pWwbvQE0zYHuO1oREYABT7pq5LufrglcyhXmfq004hlzjqvUqAZtVbbTdYIfdK0fwszk9LMcYyI1XlUX68s9HMZCTv83cqp99xZfLkooFVrMZTBSqOvHcvdLiDHMEKxpY4lzTIrbDFqv/3zM33Z7q0YyFjNI8tRbsvaGK4pYfxblZy6FNIQ4= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR12MB1355.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39850400004)(366004)(396003)(376002)(136003)(346002)(6486002)(8676002)(36756003)(7696005)(66476007)(66946007)(26005)(956004)(478600001)(316002)(83380400001)(6916009)(4326008)(186003)(66556008)(16526019)(86362001)(2906002)(54906003)(2616005)(38350700002)(5660300002)(6666004)(8936002)(38100700002)(52116002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: N5USIEV9mib1AIEEbHczkF3Ygmkxwl/MfWjXF8PVODWcbmqqyY0RyIP07fCsb69yB30i+BQGENqyeeJrwaiZvoFX5kfEkX7eWCVlP1RZ/xE4JaJCDU7idK30Wln/SbD9RLmoHuncMCx24C78xNweA+BPBm6/RQ97WNbRSvTJEEMW9OnP96YGWtXgQGhCWH28J1Ekd8YAIMMLGrEb5XF5pvzVT+t5iZQLao1gYXlIRFIKzKE/GO7HrfizVgGKU1WWmAQJm4RVu5DTqPdpQ9MHMpyxYknCm0aFUR4c1PSzsf7MXbTxF9nkpSn6IhlrDKxyU9y9/cyVSzVb78dgA4jDR/m4pV26sDhcbLNfg9Dhi1r/9/l3aXd6WsLRaVgxNXAoxvpiIwF1qzpCAo/FkDP1UHOO/awS/eyAnVDg63wiImz59lqyJ21zySo9EiW9EJlk6yczwRP8UvO3hVkyi7ZUEMchaXjOCmMUbSzUR6iP4DkcYyYBL5oKrz0Mfc+90nGMDz7uZSe+QTVInuV7SlYmQFMpdAzlZWD1qNbcq1Bqc6MlfobXFXebT2ye4PfnwqMVufGWBJ99R/Ckuq+2sGMXKME5v20nKBkAR6gxViWxwCcieD8uEk/eUaRJDNJ/niwiIcBBxRP2L5bWqrEOE8kEKwiicbXIUP4hak+pX5MQIsDzO6GGg3/V8RblBVuh16DSyUWtS+27dUuggRBYueh+Te8i3PAMrOvGiL6LyAfT9xGKT+Q7t62HorJindPcxhvxmFCKbGLc0eXNP8MZrWRNUIL2zmEAbeNWicHJ81/nwRJlHZFZ6pSF+/nwo1GpvtwuwSkMR/c75ujQwTSKpYTmhCeUdgNTYa6HZRFI12UY82d1njpNX+btlx+auWHsA5efl7FYXT/oN/vum8mHpInCHvD5inK4HwH76MOcZk/dCtZo1NxqBl7gXguxJAIStxQGwand307oicLAMxWnhykVHGDujqCsErqdYrUb+/qssLL3H60nYHoSfiRWXZgyl4JbM+Vfw7yvW8m6mmklK1NdumGSXx3HKyNxeUnbmXuk7no4/U+tOHOloJWPzbcH20T2VVFF99lUvXO+1WWM6ePqUHQ7Joj/+7E2KsM15Zpe8fPckU/8D0GgktmL+l+Zu+rzagIZSwFooiq3AF3ldh02ZhVDrZuLxN9H5P1+O25LYb5JTCap+VQk//0b0UWf9MkdNJi5v4ORizXlR9EDshPbekzTVU1kZFIUPXIFNkgiEFMc+ZRe58KZtM9kOgpD5js5FvTWTNRC9HMws0Mg8obOoxJuCwvgsrEj0gV/LI9s82nBfH7giVs4efyeClFeO2AW X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 488f6f17-88a2-4ae2-3206-08d9069399f1 X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1355.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2021 20:08:46.3725 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: k+5EExLsgtOF2ER0gxsNVDDpClsOe7/JLNYA8OPTVryBakwlIJT2UBNvyNanTum5tHgUc5+WK7U3pQl9zAG21g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB4678 Received-SPF: softfail client-ip=40.107.92.67; envelope-from=Thomas.Lendacky@amd.com; helo=NAM10-BN7-obe.outbound.protection.outlook.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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pavel Hrdina , "Daniel P . Berrange" , Eduardo Habkost , Michal Privoznik , "Dr. David Alan Gilbert" , Brijesh Singh , Paolo Bonzini , Laszlo Ersek Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Tom Lendacky Create an enum definition, '@amd-sev-es', for SEV-ES and add documention for the new enum. Add an example that shows some of the requirements for SEV-ES, including not having SMM support and the requirement for an X64-only build. Signed-off-by: Tom Lendacky Reviewed-by: Laszlo Ersek --- docs/interop/firmware.json | 47 +++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json index 9d94ccafa9..8d8b0be030 100644 --- a/docs/interop/firmware.json +++ b/docs/interop/firmware.json @@ -115,6 +115,12 @@ # this feature are documented in # "docs/amd-memory-encryption.txt". # +# @amd-sev-es: The firmware supports running under AMD Secure Encrypted +# Virtualization - Encrypted State, as specified in the AMD64 +# Architecture Programmer's Manual. QEMU command line options +# related to this feature are documented in +# "docs/amd-memory-encryption.txt". +# # @enrolled-keys: The variable store (NVRAM) template associated with # the firmware binary has the UEFI Secure Boot # operational mode turned on, with certificates @@ -179,7 +185,7 @@ # Since: 3.0 ## { 'enum' : 'FirmwareFeature', - 'data' : [ 'acpi-s3', 'acpi-s4', 'amd-sev', 'enrolled-keys', + 'data' : [ 'acpi-s3', 'acpi-s4', 'amd-sev', 'amd-sev-es', 'enrolled-keys', 'requires-smm', 'secure-boot', 'verbose-dynamic', 'verbose-static' ] } @@ -504,6 +510,45 @@ # } # # { +# "description": "OVMF with SEV-ES support", +# "interface-types": [ +# "uefi" +# ], +# "mapping": { +# "device": "flash", +# "executable": { +# "filename": "/usr/share/OVMF/OVMF_CODE.fd", +# "format": "raw" +# }, +# "nvram-template": { +# "filename": "/usr/share/OVMF/OVMF_VARS.fd", +# "format": "raw" +# } +# }, +# "targets": [ +# { +# "architecture": "x86_64", +# "machines": [ +# "pc-q35-*" +# ] +# } +# ], +# "features": [ +# "acpi-s3", +# "amd-sev", +# "amd-sev-es", +# "verbose-dynamic" +# ], +# "tags": [ +# "-a X64", +# "-p OvmfPkg/OvmfPkgX64.dsc", +# "-t GCC48", +# "-b DEBUG", +# "-D FD_SIZE_4MB" +# ] +# } +# +# { # "description": "UEFI firmware for ARM64 virtual machines", # "interface-types": [ # "uefi"