Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1771280pxm; Thu, 24 Feb 2022 09:03:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlBpTTS2hdVLnMA2O72CGeEiuT7LZp1YFb6x+luz7jf8lFTc1xIOQEhXQRDM2yuKuQ8XKO X-Received: by 2002:a05:6a00:130c:b0:4bd:118:8071 with SMTP id j12-20020a056a00130c00b004bd01188071mr3720855pfu.28.1645722226915; Thu, 24 Feb 2022 09:03:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1645722226; cv=pass; d=google.com; s=arc-20160816; b=0QfbtjzM0e5CW+Y0ks3q87Qs/ShMH722s+4zVmIgs4rY/ZvJsbRfFqEUxCsvsoqRq8 zR7Jgsj0YBZyCwmilcvjfrrzlQtUlrf2RYvj58SfbeRqqYjkRQY4eYQXEbDBGnXQ1Azc YbrDZhppc9WwhXaOYYoyi0Cp65xWI8Hp4ecd2sipvNb8MPuzb/nx7rbMZowLHxNMd3p3 j3kX9MJ9KD+WR6R5Ru+WgjtC7pR+2kdtB+7Rsg7cY1ZhKBtK/xkfNvvN2gJsEw8pnFW8 C7CpN82sNB+INdopW0O7ov5tFSvmPt7/2Fr7IKY8O3yR0uggPkod1EPrmnhVzmKZpgdR NzJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jhswYmnERXxICUPqhZGTbKwdFlBe4HJkgbVgye8BLO0=; b=h+w8zJBBlRaad921KMSz6myblv2sgvbiZAwGphZnyxKoSPa+TKTJ7atYHOlU1FU8QV a+2YDPsH0fZBRL8ASbUQrij7p6McE3OId7OPDZHrdcEPetel6tjWpSm42inh1T4bx5bT I2ykkYIqNeAas3TUYN5Skz+LExSyjagXE80tdS+7+sit5ydAbeV0Ji61J3eqRa4JmGmV 3OdwAP8N2DqQiTsljfA8aHb/IO0ilLeBAgOHzOWGm4VTbnnVPXg9xtvvHOpEHtYsUgyh DbAwIzY5du0cjXOOoCwI4G+z1/EDbXRAwwwEEjjhHHrWk8MZKfqzTW8w++OY3HQGyiUT BumA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=jGg4UYbD; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y16si2806554pgf.788.2022.02.24.09.03.24; Thu, 24 Feb 2022 09:03:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=jGg4UYbD; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231842AbiBXRCh (ORCPT + 99 others); Thu, 24 Feb 2022 12:02:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231491AbiBXRCY (ORCPT ); Thu, 24 Feb 2022 12:02:24 -0500 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2072.outbound.protection.outlook.com [40.107.223.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA8B677A8C; Thu, 24 Feb 2022 08:59:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j7tv2w2W/ln3EbKZILx5h89ubwtzc9VJpHSJ/EIpcrK5fyI5Mx/mPRvqtoCDUzNdhLZoH0Ao7aW0N1RNQ1bBlXdrV0SjufMnc7hxBOzVaC9Yj0X+/mz8H5k/do6SEa3m57cjIZnHpcH/U+NqUor204sNUyL6Fg5zO2jlY3Zvtb7Xr3dNbIijiMTcMzF9H5k5SiCZ8nJbhDW7YhOTM8AKf3O3oAPpkfrpfoWf3idX9O/Tc0h/VwJCdVJpI0icA7OtNi83lWZz85ouswq/XsvEUbPdJfeOQOq9ZdO8eav4AILzgARsrMoq2UQrQny/wGrN6Iof1RJA2H2BjHEa9PlLZw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jhswYmnERXxICUPqhZGTbKwdFlBe4HJkgbVgye8BLO0=; b=PVZFkpcnhSOzMZ30sa2CLCrSAne0eYY0EMa3TboXGzrLAfWOHoOg49zZTNdghDZQNCnMs6BrCL9tcV0crCL8mng0kOYl2jlvn+8bil+kTXJwH+W5HAd0rN4yMiGgRngc2nGeMtPGJfirKuS5PB5Aa1m2NodfFXDn35V2Z/M1l4tcGqId+W1QIrSxDS+203J/eyQKmpz18jTLy8h5EC2EUGO6oadQoIDHNFDwFaFtsvnLzz2P1dFX36GdsOM+cJP0ueKmcVln4KJ3xHE2fc39NGLzr4ddk6A1G17U+5Ytkapl8mHIjEb3VnE7eMzJRnQbycivm+FRATgrOyt+0zi9bw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=jhswYmnERXxICUPqhZGTbKwdFlBe4HJkgbVgye8BLO0=; b=jGg4UYbDQsb9Cf1Z1hKDIfHEn79pg3NX6iKAz8KQyohe+S2xWfqA6YJTkKpQaJ+2RrZaDC8oRmGUaly9AXj33tJumM+LjFnDw89TWurgGr03Dn1sv9MS9p9PVN9HaQS77KT7yzy1I6dQGdD2WBWR1kTrGp1YUhxq/LL+ZPQIBxM= Received: from DM3PR14CA0146.namprd14.prod.outlook.com (2603:10b6:0:53::30) by MN2PR12MB3309.namprd12.prod.outlook.com (2603:10b6:208:106::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.21; Thu, 24 Feb 2022 16:59:13 +0000 Received: from DM6NAM11FT024.eop-nam11.prod.protection.outlook.com (2603:10b6:0:53:cafe::b8) by DM3PR14CA0146.outlook.office365.com (2603:10b6:0:53::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.21 via Frontend Transport; Thu, 24 Feb 2022 16:59:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT024.mail.protection.outlook.com (10.13.172.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5017.22 via Frontend Transport; Thu, 24 Feb 2022 16:59:13 +0000 Received: from sbrijesh-desktop.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.18; Thu, 24 Feb 2022 10:59:09 -0600 From: Brijesh Singh To: , , , , , , CC: Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , "Vitaly Kuznetsov" , Jim Mattson , "Andy Lutomirski" , Dave Hansen , Sergio Lopez , Peter Gonda , "Peter Zijlstra" , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Borislav Petkov , Michael Roth , Vlastimil Babka , "Kirill A . Shutemov" , Andi Kleen , "Dr . David Alan Gilbert" , , , , , Brijesh Singh Subject: [PATCH v11 44/45] virt: sevguest: Add support to get extended report Date: Thu, 24 Feb 2022 10:56:24 -0600 Message-ID: <20220224165625.2175020-45-brijesh.singh@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220224165625.2175020-1-brijesh.singh@amd.com> References: <20220224165625.2175020-1-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5d0324a6-6d32-41b1-177a-08d9f7b6fc10 X-MS-TrafficTypeDiagnostic: MN2PR12MB3309:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8zE7SZuRFfEub9lzE4ts7qa5hbr6V9lQsfGidLrYkM7T+CxpjoAH57cnKRULYCxYB4TnVvngKD82yJV2kiuFoLaSdfjVSBjksJLqWrUeK/IGXGKlP2Ei0M6HdD3sdjlddJyuN+VHFhrUv/MlxQCQvJLv7L1m+7LihcbnOsAYHSHfmsUgy6MNgYUKJSiQ3Nwq1iSTT4ZUumQxG6RaA1Kklh8ul4YX2md/G2OTTkdePcef1EmjEDk6XJi55jsyCPj+rif2fWfgJ5a76uapZxZbxxNsgzf1pf0Fy9XCEgW+zxJwQnkJ13/sTXNNJcZ1L5lf3FSk+uRMnupa1qxRKE/orWxQDbWaebztSoekaJCKSbVv4nQF0qmXSJ6HrIlyD+2mBhyfKZKUjudmf5dlmTdUiommLl4wUa9XyHCaWQsj4mCbvLqoIzmi03ywy01ns1O4J0VDrf5XI33Q9N3EW6TeXpb+XYXXynSs1Orzy81s8rSpMS0w8xvlaUCzIBx4eie8Iev9CkblqH+gvbStV/BEr6efpmUJxcNhf9r/PoL9ONDbYP0n5KavVKkZYJlvsCuMLeLDfvuhWHGPlD/UO2sKrCgHMQ3sew1/2E9Op53P3SQrAaRkSWTIyZgPLS5hJ+L/3AXSUQqLixglG/DPVVR6pE83xNPAltTuW/YDroVgQdowThx2K00+E0arwmz/5VFrHHw2sXTbm6IN2l9psFGOyRRAIPcsKPDsH+/lK7AEGNA= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(86362001)(70206006)(8676002)(82310400004)(54906003)(70586007)(4326008)(356005)(47076005)(81166007)(110136005)(36860700001)(316002)(83380400001)(8936002)(1076003)(26005)(5660300002)(6666004)(7696005)(16526019)(2616005)(44832011)(7406005)(40460700003)(336012)(426003)(36756003)(186003)(7416002)(508600001)(2906002)(36900700001)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2022 16:59:13.3563 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5d0324a6-6d32-41b1-177a-08d9f7b6fc10 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT024.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3309 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Version 2 of GHCB specification defines Non-Automatic-Exit(NAE) to get the extended guest report. It is similar to the SNP_GET_REPORT ioctl. The main difference is related to the additional data that will be returned. The additional data returned is a certificate blob that can be used by the SNP guest user. The certificate blob layout is defined in the GHCB specification. The driver simply treats the blob as a opaque data and copies it to userspace. Signed-off-by: Brijesh Singh --- Documentation/virt/coco/sevguest.rst | 23 +++++++ drivers/virt/coco/sevguest/sevguest.c | 93 ++++++++++++++++++++++++++- include/uapi/linux/sev-guest.h | 13 ++++ 3 files changed, 127 insertions(+), 2 deletions(-) diff --git a/Documentation/virt/coco/sevguest.rst b/Documentation/virt/coco/sevguest.rst index ae2e76f59435..0f352056572d 100644 --- a/Documentation/virt/coco/sevguest.rst +++ b/Documentation/virt/coco/sevguest.rst @@ -95,6 +95,29 @@ on the various fields passed in the key derivation request. On success, the snp_derived_key_resp.data contains the derived key value. See the SEV-SNP specification for further details. + +2.3 SNP_GET_EXT_REPORT +---------------------- +:Technology: sev-snp +:Type: guest ioctl +:Parameters (in/out): struct snp_ext_report_req +:Returns (out): struct snp_report_resp on success, -negative on error + +The SNP_GET_EXT_REPORT ioctl is similar to the SNP_GET_REPORT. The difference is +related to the additional certificate data that is returned with the report. +The certificate data returned is being provided by the hypervisor through the +SNP_SET_EXT_CONFIG. + +The ioctl uses the SNP_GUEST_REQUEST (MSG_REPORT_REQ) command provided by the SEV-SNP +firmware to get the attestation report. + +On success, the snp_ext_report_resp.data will contain the attestation report +and snp_ext_report_req.certs_address will contain the certificate blob. If the +length of the blob is smaller than expected then snp_ext_report_req.certs_len will +be updated with the expected value. + +See GHCB specification for further detail on how to parse the certificate blob. + Reference --------- diff --git a/drivers/virt/coco/sevguest/sevguest.c b/drivers/virt/coco/sevguest/sevguest.c index 2062f94fdc38..b840cf426f38 100644 --- a/drivers/virt/coco/sevguest/sevguest.c +++ b/drivers/virt/coco/sevguest/sevguest.c @@ -41,6 +41,7 @@ struct snp_guest_dev { struct device *dev; struct miscdevice misc; + void *certs_data; struct snp_guest_crypto *crypto; struct snp_guest_msg *request, *response; struct snp_secrets_page_layout *layout; @@ -431,6 +432,83 @@ static int get_derived_key(struct snp_guest_dev *snp_dev, struct snp_guest_reque return rc; } +static int get_ext_report(struct snp_guest_dev *snp_dev, struct snp_guest_request_ioctl *arg) +{ + struct snp_guest_crypto *crypto = snp_dev->crypto; + struct snp_ext_report_req req = {0}; + struct snp_report_resp *resp; + int ret, npages = 0, resp_len; + + lockdep_assert_held(&snp_cmd_mutex); + + if (!arg->req_data || !arg->resp_data) + return -EINVAL; + + if (copy_from_user(&req, (void __user *)arg->req_data, sizeof(req))) + return -EFAULT; + + if (req.certs_len) { + if (req.certs_len > SEV_FW_BLOB_MAX_SIZE || + !IS_ALIGNED(req.certs_len, PAGE_SIZE)) + return -EINVAL; + } + + if (req.certs_address && req.certs_len) { + if (!access_ok(req.certs_address, req.certs_len)) + return -EFAULT; + + /* + * Initialize the intermediate buffer with all zeros. This buffer + * is used in the guest request message to get the certs blob from + * the host. If host does not supply any certs in it, then copy + * zeros to indicate that certificate data was not provided. + */ + memset(snp_dev->certs_data, 0, req.certs_len); + + npages = req.certs_len >> PAGE_SHIFT; + } + + /* + * The intermediate response buffer is used while decrypting the + * response payload. Make sure that it has enough space to cover the + * authtag. + */ + resp_len = sizeof(resp->data) + crypto->a_len; + resp = kzalloc(resp_len, GFP_KERNEL_ACCOUNT); + if (!resp) + return -ENOMEM; + + snp_dev->input.data_npages = npages; + ret = handle_guest_request(snp_dev, SVM_VMGEXIT_EXT_GUEST_REQUEST, arg->msg_version, + SNP_MSG_REPORT_REQ, &req.data, + sizeof(req.data), resp->data, resp_len, &arg->fw_err); + + /* If certs length is invalid then copy the returned length */ + if (arg->fw_err == SNP_GUEST_REQ_INVALID_LEN) { + req.certs_len = snp_dev->input.data_npages << PAGE_SHIFT; + + if (copy_to_user((void __user *)arg->req_data, &req, sizeof(req))) + ret = -EFAULT; + } + + if (ret) + goto e_free; + + if (req.certs_address && req.certs_len && + copy_to_user((void __user *)req.certs_address, snp_dev->certs_data, + req.certs_len)) { + ret = -EFAULT; + goto e_free; + } + + if (copy_to_user((void __user *)arg->resp_data, resp, sizeof(*resp))) + ret = -EFAULT; + +e_free: + kfree(resp); + return ret; +} + static long snp_guest_ioctl(struct file *file, unsigned int ioctl, unsigned long arg) { struct snp_guest_dev *snp_dev = to_snp_dev(file); @@ -463,6 +541,9 @@ static long snp_guest_ioctl(struct file *file, unsigned int ioctl, unsigned long case SNP_GET_DERIVED_KEY: ret = get_derived_key(snp_dev, &input); break; + case SNP_GET_EXT_REPORT: + ret = get_ext_report(snp_dev, &input); + break; default: break; } @@ -590,10 +671,14 @@ static int __init snp_guest_probe(struct platform_device *pdev) if (!snp_dev->response) goto e_free_request; + snp_dev->certs_data = alloc_shared_pages(SEV_FW_BLOB_MAX_SIZE); + if (!snp_dev->certs_data) + goto e_free_response; + ret = -EIO; snp_dev->crypto = init_crypto(snp_dev, snp_dev->vmpck, VMPCK_KEY_LEN); if (!snp_dev->crypto) - goto e_free_response; + goto e_free_cert_data; misc = &snp_dev->misc; misc->minor = MISC_DYNAMIC_MINOR; @@ -603,14 +688,17 @@ static int __init snp_guest_probe(struct platform_device *pdev) /* initial the input address for guest request */ snp_dev->input.req_gpa = __pa(snp_dev->request); snp_dev->input.resp_gpa = __pa(snp_dev->response); + snp_dev->input.data_gpa = __pa(snp_dev->certs_data); ret = misc_register(misc); if (ret) - goto e_free_response; + goto e_free_cert_data; dev_info(dev, "Initialized SNP guest driver (using vmpck_id %d)\n", vmpck_id); return 0; +e_free_cert_data: + free_shared_pages(snp_dev->certs_data, SEV_FW_BLOB_MAX_SIZE); e_free_response: free_shared_pages(snp_dev->response, sizeof(struct snp_guest_msg)); e_free_request: @@ -624,6 +712,7 @@ static int __exit snp_guest_remove(struct platform_device *pdev) { struct snp_guest_dev *snp_dev = platform_get_drvdata(pdev); + free_shared_pages(snp_dev->certs_data, SEV_FW_BLOB_MAX_SIZE); free_shared_pages(snp_dev->response, sizeof(struct snp_guest_msg)); free_shared_pages(snp_dev->request, sizeof(struct snp_guest_msg)); deinit_crypto(snp_dev->crypto); diff --git a/include/uapi/linux/sev-guest.h b/include/uapi/linux/sev-guest.h index 598367f12064..256aaeff7e65 100644 --- a/include/uapi/linux/sev-guest.h +++ b/include/uapi/linux/sev-guest.h @@ -56,6 +56,16 @@ struct snp_guest_request_ioctl { __u64 fw_err; }; +struct snp_ext_report_req { + struct snp_report_req data; + + /* where to copy the certificate blob */ + __u64 certs_address; + + /* length of the certificate blob */ + __u32 certs_len; +}; + #define SNP_GUEST_REQ_IOC_TYPE 'S' /* Get SNP attestation report */ @@ -64,4 +74,7 @@ struct snp_guest_request_ioctl { /* Get a derived key from the root */ #define SNP_GET_DERIVED_KEY _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x1, struct snp_guest_request_ioctl) +/* Get SNP extended report as defined in the GHCB specification version 2. */ +#define SNP_GET_EXT_REPORT _IOWR(SNP_GUEST_REQ_IOC_TYPE, 0x2, struct snp_guest_request_ioctl) + #endif /* __UAPI_LINUX_SEV_GUEST_H_ */ -- 2.25.1