From patchwork Thu Apr 22 20:56:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kalra, Ashish" X-Patchwork-Id: 12219189 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.8 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,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 6F747C433ED for ; Thu, 22 Apr 2021 20:56:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 416D36141C for ; Thu, 22 Apr 2021 20:56:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239584AbhDVU50 (ORCPT ); Thu, 22 Apr 2021 16:57:26 -0400 Received: from mail-bn7nam10on2075.outbound.protection.outlook.com ([40.107.92.75]:36448 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239575AbhDVU5Z (ORCPT ); Thu, 22 Apr 2021 16:57:25 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DiQGfO+XMnMXlBCnoc4Zn057dR6WUY1gvB1LSbZamfcOnXETjiOTt1K68zqB+iy5IdixEEg4xBi8nEkAsPWQskVF3ndA16rQ8Er4eFZmo5AbkP0a1EZ4v3eCKWvXvplXgSf39j+FLZ68gU/76O14mkoxdH/cnyi5BPY0Gb9l6Ga5I6LWKUSOGEbV292+BCDCjdhHlQlgXD9LJI3DAZOD+QHd/MJw6l6Xw/+7yAhDh2JQyfFSKuLmMMhoVbRXlFys3MKN01Kh8+fy40Vk6O2MkgJG2b9MSVwBUXxKr+t0hRiJ25D8xYG/RLFg/vcY+DYaXBDMzfcvs2+vAaKq9u9yoQ== 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=kP40PdU4Z8HHa6wnZVnRT/zhr1u8HNB3yWt0AcQt+JM=; b=g2I66d1BYWz6S1+mhN7QoGgaP5iMisGjFTDxm/7h2XG9QWwuvZG+UYrXEla80sbmjVz7U0ccnjeKvC1KJcgMSRbcySA+cX8hQOKMY871SQUMawMZdip6EPf2vhHA3rap1j/sBwUpzcscBm7ekx2Q7WeIl1byJ0Qp1OmQZTR8TgCUX3IyntzhLGsOCS0dOeD18QVT3uWmZpsw9Br9PnHHr+3dvFKbdv6Qn1EFlmHqm+D0UW6ERyx6ISp5WKpZ8XDYqvBAaXACOklUN9dqJGkhz+y8hdL/VHeljQe4na6EUJ4sExMsjg+f48xqWL3MNzCXcL/4tEJPCt2aIsjnuvWnsw== 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=kP40PdU4Z8HHa6wnZVnRT/zhr1u8HNB3yWt0AcQt+JM=; b=rvaIkUk7wx1SOk7scAiK71P9inIVF3QOiJoV6oBMq6z7iKOW5TGO8rea0FkQ6r46s4+GbL4c1QoinoR+Gpvh1RQaT+iW9K5QIem52ijd5a7OxAzpGIAeigtbC3NTqMTJjWn9ZtLEU0U1VMwpGkdy6frCjOlwZ86/6dKAnk2QNwM= Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=amd.com; Received: from SN6PR12MB2767.namprd12.prod.outlook.com (2603:10b6:805:75::23) by SA0PR12MB4509.namprd12.prod.outlook.com (2603:10b6:806:9e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Thu, 22 Apr 2021 20:56:48 +0000 Received: from SN6PR12MB2767.namprd12.prod.outlook.com ([fe80::1fb:7d59:2c24:615e]) by SN6PR12MB2767.namprd12.prod.outlook.com ([fe80::1fb:7d59:2c24:615e%7]) with mapi id 15.20.4065.021; Thu, 22 Apr 2021 20:56:48 +0000 From: Ashish Kalra To: pbonzini@redhat.com Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, joro@8bytes.org, bp@suse.de, thomas.lendacky@amd.com, x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, srutherford@google.com, seanjc@google.com, venu.busireddy@oracle.com, brijesh.singh@amd.com Subject: [PATCH 3/4] EFI: Introduce the new AMD Memory Encryption GUID. Date: Thu, 22 Apr 2021 20:56:39 +0000 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SN4PR0801CA0021.namprd08.prod.outlook.com (2603:10b6:803:29::31) To SN6PR12MB2767.namprd12.prod.outlook.com (2603:10b6:805:75::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from ashkalra_ubuntu_server.amd.com (165.204.77.1) by SN4PR0801CA0021.namprd08.prod.outlook.com (2603:10b6:803:29::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.22 via Frontend Transport; Thu, 22 Apr 2021 20:56:48 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2caacb1a-ec9f-4eba-be95-08d905d125ac X-MS-TrafficTypeDiagnostic: SA0PR12MB4509: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MAhMdgjj9TLObeUyAkXTB2A4PARxou6oE89ClQ3OKKbqphVosleihY+lsKbX/6Tg62NqZ/bpAR/u8VHdA+UkQtIjlMYOtd33JPajByI/PuzPCRAA3DJFx0otNk8mnPkS2nbO3i0NO2vn+lfiJev6/wJaKkVqKOr53z82w/WwHng3LG5hHh3fMNGz05Egeb5DpvWheM7/cbmXEWcJmu6MySOFiKYdts5Wh//hU+KYL1qukADYT33YVLCSRAefmLkZWLtJvO0jKau7jX5ilJlIWFIs5WqeEgvL4E5dFFLV/3USeMuw8tVh58upzIOeSE4RhuddDWtdGQTecDQeHJKvATsedMz5MHyjpaceMwkZB6FOUUXrVGRKKQJCtRiCdx7f1Xamjq3lgMkblmaX9UsOSMOPE9llg8O07VUuCWRF/EX2SMF0phcKByMQi3+5UXvljWivQBsu6QDfKH9kcwn7WvRhqVSIpC3jdYLknxtM+ULLy1ha9IlyskcUPVqxWvol599T0dkFCO5OQ49ZtGbXzgSG5nArQnSSGjaDCmpQXaaPdDKbtRuf6wfd/Gk4Hd/qd+Xsl/TTCTLSFAOxb12n+1jvk39VlhgapF3J/JHfa+DBMq9pjEQSx19uoFYOX78zE4ym063FwU+87iMC1BcALg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR12MB2767.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(136003)(346002)(376002)(39860400002)(396003)(8936002)(7696005)(26005)(8676002)(2906002)(186003)(66946007)(86362001)(38100700002)(83380400001)(6666004)(6486002)(7416002)(16526019)(66556008)(36756003)(6916009)(52116002)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UBvQynhz18EG92U6c3bssfbqAZ10GXVgOOQiWrvoYkD+6TOVlP+U0at4DPiE5AiuN107E8FBp6FxrF70dT07WFGIQDv+yR6jhrBag2x27LN0h0xayvSt7RyANQ95faq1rL3p3y4F0mSXouVsWbWva40AGcVsarWotCaQkhkbHNhX7t2Otwj1x5OirJQZqU7TEPKzPAMLLpMT63j+6C9oyzN339NdJnQA9O/E+LxrCNzjCrmKt/aSwSMiShMrq/P/Zyc1jia4O63YpJxpriLCm1eg/6uIiriExsc1Y6V7g83hJMndzUFACumXGH0xj/BvcyH/JRl39EQggdbX3hN8f9hrHLty9eiGo X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2caacb1a-ec9f-4eba-be95-08d905d125ac X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2767.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2021 20:56:48.9106 (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: AwmQ1xedRhQj7755Z6eOomt7ub8NLVfQaWh5zFHqrINRqSa4QCs1+ZcYXyQ1SDjGyYvOywXr/y8hE0QFZZK2Iw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4509 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Ashish Kalra Introduce a new AMD Memory Encryption GUID which is currently used for defining a new UEFI environment variable which indicates UEFI/OVMF support for the SEV live migration feature. This variable is setup when UEFI/OVMF detects host/hypervisor support for SEV live migration and later this variable is read by the kernel using EFI runtime services to verify if OVMF supports the live migration feature. Signed-off-by: Ashish Kalra --- include/linux/efi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/efi.h b/include/linux/efi.h index 8710f5710c1d..e95c144d1d02 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -360,6 +360,7 @@ void efi_native_runtime_setup(void); /* OEM GUIDs */ #define DELLEMC_EFI_RCI2_TABLE_GUID EFI_GUID(0x2d9f28a2, 0xa886, 0x456a, 0x97, 0xa8, 0xf1, 0x1e, 0xf2, 0x4f, 0xf4, 0x55) +#define MEM_ENCRYPT_GUID EFI_GUID(0x0cf29b71, 0x9e51, 0x433a, 0xa3, 0xb7, 0x81, 0xf3, 0xab, 0x16, 0xb8, 0x75) typedef struct { efi_guid_t guid;