From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (NAM12-BN8-obe.outbound.protection.outlook.com [40.107.237.59]) by mx.groups.io with SMTP id smtpd.web11.32934.1669862147379589601 for ; Wed, 30 Nov 2022 18:35:47 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=fhD4vz3W; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.237.59, mailfrom: alexey.kardashevskiy@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bN2i9Ypzll4yLfWRS/DkVBrwQ1MoOh1eB3/Zib/iEoPAvdzxEg3pEHJn9vzNdjno5TSFPJP+aXuJMli6sqd1p2fdhCr0yb9YIFQIYP6quVokZuT6klQAhNyr3BI44bZs/lh7yUZeNfcgbSORHftZOUGuTc0zDjaIAb/sycjrsTpyeDas1lcHhsO7dxQdHCjqKQjREUhhmhdUWmEf/1XnaW/v6HH5D+rRr1ksXYZF+whRAMyiDbZcqWXKDzwQrn+lj9mYgN5gUBABSpQmonqCiuVy/PsKbL8HgaLN8on0VT8Y1DaMwPb3is4tCPGiZsKhfWxhOKQdP1c78lIAOUuSXQ== 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=3YbFnFWC0Pwpl2TyOZQCxbgFr7kRSyFkb3VtxRXlalI=; b=Dx2ACqDfq5oueBOK1FAxXjGuYxinMdbsTYV8rS/T8gkoDISqH8FOlzLPa+T1cekSxOw6wcAITtePK/3yqX/qUTZW4rm2cgF4NBlI4pDSXYDtXL9M1sA3Sw0G+nd0xNQ1VU1liC437amXP7FOeIfjvwSTDd/DxjM4+fVYrpVmO5kz8ffkAmPCmBwy+W8/JherJlIaKwdgR8tXmWkFlpUDcwsHvuollZ58gZSa38xn2EgKD4G1UKV+F/Hg5FHOAErEc5Q6gI4JgpP4JB2xeyOwvcPs46a/sk8R63mGEP9V0fJj/ZNI3lCM/TlttsoVz2OW8JeZjYnstMRqT/C+4U7akw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=edk2.groups.io 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=3YbFnFWC0Pwpl2TyOZQCxbgFr7kRSyFkb3VtxRXlalI=; b=fhD4vz3Wi1rdsJlBVOOhLd0rzhc1lztei7w4YXceRM4V2EXZ9bKzb3xEV3Z7i/2OH5gcDIkiMl2XaI4IN5bNupscoURHkkxPCkkwcqtCwdmYt/oF28jZ7WUCeu0xr2lDJJtNsYNPN3BrUg+36X+GgVTKaFsqlld0lu6Ra8pkdLM= Received: from DS7PR05CA0093.namprd05.prod.outlook.com (2603:10b6:8:56::17) by SJ1PR12MB6339.namprd12.prod.outlook.com (2603:10b6:a03:454::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.23; Thu, 1 Dec 2022 02:35:44 +0000 Received: from DS1PEPF0000E633.namprd02.prod.outlook.com (2603:10b6:8:56:cafe::52) by DS7PR05CA0093.outlook.office365.com (2603:10b6:8:56::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.8 via Frontend Transport; Thu, 1 Dec 2022 02:35:44 +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; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS1PEPF0000E633.mail.protection.outlook.com (10.167.17.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5857.17 via Frontend Transport; Thu, 1 Dec 2022 02:35:44 +0000 Received: from aiemdeew.1.ozlabs.ru (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.34; Wed, 30 Nov 2022 20:35:39 -0600 From: "Alexey Kardashevskiy" To: CC: Ard Biesheuvel , Jiewen Yao , Jordan Justen , "Gerd Hoffmann" , Brijesh Singh , "Erdem Aktas" , James Bottomley , Min Xu , Tom Lendacky , "Alexey Kardashevskiy" Subject: [PATCH ovmf 0/5] Enable AMD SEV-ES DebugSwap Date: Thu, 1 Dec 2022 13:35:16 +1100 Message-ID: <20221201023521.10028-1-aik@amd.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Return-Path: Alexey.Kardashevskiy@amd.com 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-TrafficTypeDiagnostic: DS1PEPF0000E633:EE_|SJ1PR12MB6339:EE_ X-MS-Office365-Filtering-Correlation-Id: 55fe3394-1430-454d-dcba-08dad344bf3c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: btfL7e7NXThIkYTBoSI2bIHJTTk1uqJ3SEWe4AciHx47XNXVnNeE301LRwXFiR6UUEf1Cn8Y2TXznWUbckhTGzUcj4ntpV0g/2qrfyIKLWCjrdgtaWbzV7EyYuiPxP24TGl5z7oJrichXMeyaTm+lfsp2pwQe1t5C1nhqjrsB/qSDZo3lpzr6YSp42D94XdaOwdwtb5GCzLw/De0CNf4ppwCamH2zM4rZHF473vzuYOdjap3yQKp6geoCicWDKy4IwhBaScvgx2YcAxLrAPCsxPVbgSzYk5N1nrC0B+h9M6F9byVR3vEXQMtU2CKHBuDKAfk3FJkwS0LCQQ4Eak47oemR+G/IGhpduo/e6mvoEjwAzEKrJgDISWZdjQgg/5K1xFqU14NzbZPpWakahDGgPv8rjCU5+26+3aVpTLj7E6uB9Cv1Uoz+h7vfqXwdDQjtubUB2IVPIjNETBx7GSXeaeM5nSI6ICAuqEJIllVf49qNMGl5Swyj0qRNW/PWLP/4J1vQMGMiGxQYDD/Hh3otDcCPLn4RQX8y3jyjJfLshcvRyXZDeGfoMdjRnyTBf77aff78F2CaE2536O8BMO0Ba95xjMRGjRItoNBbC8axRDHRk/dyO5en06Ub9a2aOUZbMK1Ke97MiBgEQLMPq4D7ryFZFZjrVfmuB0dUCwWNYWGsHoEl6ej3NgOuGVLNtekuOey4sLQwxUa4ah1oJzzJEqBaKrir6FJiPzF9zRMgy0A5njAL7yDDyYKXo5EjaBXKqsrUhIVWehRGO/aDrjWkaLbZdMZpTZ54qElPI7/nmHbOpybduGF5dQG9Ue6ZAew 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:(13230022)(4636009)(346002)(136003)(376002)(396003)(39860400002)(451199015)(36840700001)(40470700004)(46966006)(40480700001)(356005)(2906002)(36756003)(40460700003)(19627235002)(478600001)(966005)(81166007)(5660300002)(8676002)(8936002)(70206006)(70586007)(41300700001)(4326008)(36860700001)(54906003)(6916009)(316002)(82310400005)(426003)(186003)(1076003)(26005)(82740400003)(2616005)(83380400001)(6666004)(336012)(16526019)(47076005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2022 02:35:44.5238 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55fe3394-1430-454d-dcba-08dad344bf3c 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: DS1PEPF0000E633.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6339 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain This is to prevent #DB interception on SEV-ES VM with enabled DebugSwap feature, more details in 3/5. This is based on sha1 dd3ba82d31a6 and pushed out at https://github.com/aik/edk2/commits/debugswap The corresponding Linux change (HV and VM) is here: https://github.com/aik/linux/commits/debugswap and has just been posted to lkml/etc as "[PATCH kernel 0/3] KVM: SEV: Enable AMD SEV-ES DebugSwap" Please comment. Thanks. Alexey Kardashevskiy (5): MdePkg/Register/Amd: Define all bits from MSR_SEV_STATUS_REGISTER MdePkg: Add AMD SEV features to PcdConfidentialComputingGuestAttr OvmfPkg: Add AMD SEV-ES DebugSwap feature support UefiCpuPkg: Add AMD SEV-ES features support OvmfPkf: Enable AMD SEV-ES DebugSwap for DXE MdePkg/Include/ConfidentialComputingGuestAttr.h | 5 +- MdePkg/Include/Register/Amd/Fam17Msr.h | 57 ++= +++++++++++++++++- OvmfPkg/Include/Library/MemEncryptSevLib.h | 12 ++= +++ OvmfPkg/Library/BaseMemEncryptSevLib/DxeMemEncryptSevLibInternal.c | 25 ++= +++++-- OvmfPkg/Library/BaseMemEncryptSevLib/PeiMemEncryptSevLibInternal.c | 19 ++= +++++ OvmfPkg/Library/BaseMemEncryptSevLib/SecMemEncryptSevLibInternal.c | 20 ++= +++++ OvmfPkg/Library/CcExitLib/CcExitVcHandler.c | 8 ++= + OvmfPkg/PlatformPei/AmdSev.c | 13 ++= +-- UefiCpuPkg/Library/MpInitLib/MpLib.c | 10 ++= -- 9 files changed, 158 insertions(+), 11 deletions(-) --=20 2.38.1