From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.86]) by mx.groups.io with SMTP id smtpd.web12.4565.1618959296127748935 for ; Tue, 20 Apr 2021 15:54:56 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=EcKcpKk9; 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.220.86, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=agAzA4x2YqKB6OggXEeVFEYPSXKVGDeeQ63+S7LpU9RQYVATA9KXOJWA5DrgxskreKtGQw05Xr5jFgk37h8t/Pj0qdMkiFZVOEL01NW47DEujyVfqFmvNqNVmTHz/7wUTwt7xH37IsqtR8b1gPjABvBJU4kEYPpOiu6RRr3eSoAMsq+cZnRC/XfHgPJer0mTubjXe8Buj+PXwca3dsUPqsSrYeuMdVFa4kTrs4tDY8Y5RdmGJrl/qh1niGpsu31PSfJVJAQGFwLlZp2S/gtG1o4dJlEKW7B8BKFCxdEmbpOJiJ9hByJme0meozhT9tnfr9CDGC2MCBs5ady9/d7DMQ== 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=5c4TywUTKYySGqklyRUjwi4ynxeohhLIAYX7Vx89EPw=; b=VLber0BI14g+GRXhvA+97CMAnlWuMNSbwUWt6piPEJnXRPC9NUmTvbVzzdrBp0pPImd1w1kySVp9EluKdBpgdqsYG39c8qHCou/kqX64jksVzSx2geUzMliwHIvDbwasOh2dNKiiN1nmCsoQQHRprI5EA9hDHegU89gISpnuzmbRqK5RIRces6+DJMnMd7qZqb7nFNouT8o0eeJ1pTjAe1bcuUF+3VjggNqieIAXeQQ0N+2fg56X61+ZrNBLuJYg+5wAJcJbjAXcaHleZNEHp1BLNNy9UdtGq+HkfkjlTOMD3pgvPFTnScDjrWdGUtKCFV54HfW4YG8846WP5z+uiQ== 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=5c4TywUTKYySGqklyRUjwi4ynxeohhLIAYX7Vx89EPw=; b=EcKcpKk9NiBkqt95YKJHeL1qwIYvrsH9pS/hhuJSypZYZfktUEQbCvtF4SvrWhhqC9tT+f9r91SKr3l3dmQSE+1Zz0eP+oMv3Jh40KqCvEwhHfYa/Sqb4Sq3NzyW7EPK/vKqqowvk5UYkKq7kgLCeo8RyGNrBbj6hhjN8wT+GmA= Authentication-Results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) by DM6PR12MB4337.namprd12.prod.outlook.com (2603:10b6:5:2a9::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Tue, 20 Apr 2021 22:54:54 +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.4042.024; Tue, 20 Apr 2021 22:54:54 +0000 From: "Lendacky, Thomas" To: devel@edk2.groups.io CC: Joerg Roedel , Borislav Petkov , Laszlo Ersek , Ard Biesheuvel , Jordan Justen , Brijesh Singh , James Bottomley , Jiewen Yao , Min Xu Subject: [PATCH 0/3] SEV-ES TPM enablement fixes Date: Tue, 20 Apr 2021 17:54:39 -0500 Message-ID: X-Mailer: git-send-email 2.31.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SN4PR0701CA0027.namprd07.prod.outlook.com (2603:10b6:803:2d::13) To DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) Return-Path: thomas.lendacky@amd.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from tlendack-t1.amd.com (165.204.77.1) by SN4PR0701CA0027.namprd07.prod.outlook.com (2603:10b6:803:2d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16 via Frontend Transport; Tue, 20 Apr 2021 22:54:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bac50583-9774-46ef-5baa-08d9044f4fd9 X-MS-TrafficTypeDiagnostic: DM6PR12MB4337: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:288; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4LDald1r2XVi793H7VTZwrmc+KgJg8QciIMlnn8a2Y8Lxl1EmZtBrUP5C7XsbTM/GMNQ4BSjGBhVL05vAhgl0RZyQ4vXSzN9HAMZ74PUWl9DeeDcq04QLwkx1zi9J8qkPxjKOXj3mCWvy7/9/m+ma05xchoUr9v8Arc2JV1e40IhEgh3M0gMMWqGSJynPJ5u8iU9kqZENBOb5sqmvjQeoGYUOxGoJbfuBdT9QlWpLhpc7ZtAFNVfg12Ba/G8HP3vf+PLZaJvc4V7jgCk0FlGpnspNgWgvWvYOoxwqCdTrhsaO1vdHDzOMofiEwcuHmn9pXU+ECfPOXjZKnolbbJztePuivBZis54bp7gnTFh9R6Uq0xf/eF+XazRvZ7M6Et/c+lP65IYygo92tLW0yjiuSGGvBzLDnmjx52dDookHd6CaoV+U+iErrrnKzWYbzPVqkfnMSdcdsHWnoj9/75EoyIbKe3/KOAbGZtnnNo9Ym6eLpd/UU7WFhOXtfF26f8NAbSCHclHuYcJ9MO2M/FgrUC7gMhEP6CkWXr/eJvyBQ4NwNbneH3imx9UY/h0j9bPBpw02LGGAZaYBlz+Lrh9GEUcjU3msiUzHTsBGLYWWJia4Y4AFH+x1aIPgDResl2f6T0DPu2+uSWmQ1n+vf4TY2+MgRP1tw56dayeoKvTrXvyW+c7sFxLXisgbpUCy9cPo7sVZxMnbvjqwIVD638cu4IaTtc6FrsHeaqNHcid1vvSBxmZgDBasniQVxmb7VHh 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)(346002)(136003)(376002)(396003)(39860400002)(366004)(316002)(52116002)(83380400001)(186003)(966005)(36756003)(16526019)(4326008)(2616005)(478600001)(7696005)(66556008)(86362001)(54906003)(6666004)(38350700002)(8676002)(956004)(38100700002)(6486002)(2906002)(6916009)(8936002)(26005)(66946007)(66476007)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?nH5sHRZwjC25K3GOoPOfKe1nRWSC5BiWu2tgW9rz+V+lwaL0+9Oa7Vl0Ft0J?= =?us-ascii?Q?0tGF846f142QigXzFKU+lWwrYtG8mOrSlKuErcKndlrwDgSUTJcRvz2CiutD?= =?us-ascii?Q?i+jTwHK4/OkdZs0K75ISJnmrKUkh/R56J3UT2b2fI1Z5nPsyZMrsszpFs2bX?= =?us-ascii?Q?rl2FfbdzBU7ocOvwSN5dF0z+8oPJd9MgRQhWU9zJZRSptfKnhPwnSpqq9sAl?= =?us-ascii?Q?iJ+j9YP9j1ZWJPpj1OENiB3LmmmeprdL9Vt/AaDpSSHf8b7vNathIYotEveg?= =?us-ascii?Q?C5enywborjRE99CkVSAiJzpX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?PZqc6lE9G2bhIbGYvVtfRhRlmj7BPwmMvXVUyKllQ8HP5wfEW6WWmNaMBpMr?= =?us-ascii?Q?P0cNrYuqKvDk7aeZoZA4DxICHv0ruimDbAiY0brXsP3I0EMpuuL1gA8xVyVB?= =?us-ascii?Q?do/7xeWxwhHI+eFEVSafrlmK?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: bac50583-9774-46ef-5baa-08d9044f4fd9 X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1355.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2021 22:54:54.0507 (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: zs88rQl30Hty7R5RSf0Vjynl3O/RR7vWgzJenUU30/bIMhKKjXoJEJjVloDwTekqFiuLOXGjjRhi/0zDKAVGFw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4337 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable From: Tom Lendacky This patch series provides fixes for using TPM support with an SEV-ES guest. The fixes include: - Decode ModRM byte for MOVZX and MOVSX opcodes. - Add MMIO support for MOV opcodes 0xA0-0xA3. - Mark TPM MMIO range as un-encrypted during PEI phase. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3345 --- These patches are based on commit: d3b0d007a135 ("BaseTools: Add double quote around CLANG_BIN path string") Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Brijesh Singh Cc: James Bottomley Cc: Jiewen Yao Cc: Min Xu Tom Lendacky (3): OvfmPkg/VmgExitLib: Properly decode MMIO MOVZX and MOVSX opcodes OvmfPkg/VmgExitLib: Add support for new MMIO MOV opcodes OvmfPkg/PlatformPei: Mark TPM MMIO range as unencrypted for SEV OvmfPkg/PlatformPei/PlatformPei.inf | 1 + OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 106 +++++++++++++++++- OvmfPkg/PlatformPei/AmdSev.c | 19 ++++ 3 files changed, 124 insertions(+), 2 deletions(-) --=20 2.31.0