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.44]) by mx.groups.io with SMTP id smtpd.web12.1791.1619808604037641885 for ; Fri, 30 Apr 2021 11:50:04 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amd.com header.s=selector1 header.b=Dqp0NKx4; 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.44, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qb0OsVHzLaicGzck/xlt3Vy/aLyFw7/vGTqciPABjOFkcNei+RdE6cRl2MTlIXkHqGM6LGdFvU3OjChCrRpYQZK4mCxKcKIwu92POFsncgUrMF7Qf77Xs4/SOq7nlqCh6jveo4awcIlBydC09Tdy/nz3olVz1aG0pTirkjWvyMZKW1crfwo7LJyu0rVmb6zKztiR9uKKxUG3VaCRJdp/9729p9Drf1H5PLoJHnEatvcKi2dGHTMYAxMAU8nOK14nGZl8C39H7zKYOgGp1a4KnRZYcMRa7IupHqAIMURvos5wtW8p02V+e1GKJxbRkne/QAvT2iHmN/n1WC70VO5aVA== 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=EQZzn0JhJO+YxvRzuIMgP6XF+w0oDqJP2qi3xxvC9AA=; b=Fz2FbMqmMeYr8C4Jd61uUrzu7D2VsQuAowbQCG1hBSJhrwLwCFxhwHCjrl1wpphXkdBN8voWhFltyr2oEOthPYh/Ijh4CZIvz7pVaWJm+0X7GdTB8kcbJ6AF0Dke8Q6wADav/9VALEB0j8fXvc0NFgU70zv6BtWIrTV/RqHAPVZn+RNWc37V7iPnGGbce4awd3Rc0rJfuCdmFjV6ky9RcrnUuiRXiUAWKcUabx1pmDs/Ycbl3gA1tcSXZRCySakZQ6neWN3x6YPgxQYr1Pfws7XOcYMEF4+AK/idSpomEiP3aBa+Qbj9TDe0qSJfLUf+10sQ5tIvtutpcTLg/a2/zw== 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=EQZzn0JhJO+YxvRzuIMgP6XF+w0oDqJP2qi3xxvC9AA=; b=Dqp0NKx4XM6s1IADdfWYgxpcnWby+H9Mc3acEemrhQlMT4XLUzU3iiJhpLJmqKix+iUTPWZsEbxOxpuKCcIXEOTihz8BYJhh48X2uYR7A+5KRJEAXIHFSQagAwnSUOw5BQRKkQwBDG9oBgsV18fnRiJfkPdQArHgQSKEv7EuwqU= Authentication-Results: linux.ibm.com; dkim=none (message not signed) header.d=none;linux.ibm.com; dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) by DM6PR12MB2987.namprd12.prod.outlook.com (2603:10b6:5:3b::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Fri, 30 Apr 2021 18:50:02 +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.033; Fri, 30 Apr 2021 18:50:02 +0000 Subject: Re: [edk2-devel] [PATCH v3 3/5] OvmfPkg: Define a new PPI GUID to signal TPM MMIO accessability To: devel@edk2.groups.io, lersek@redhat.com CC: Joerg Roedel , Borislav Petkov , Ard Biesheuvel , Jordan Justen , Brijesh Singh , Erdem Aktas , James Bottomley , Jiewen Yao , Min Xu , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , Stefan Berger References: <03e292339273721724c8b14605cfe9d7bbe45a71.1619716333.git.thomas.lendacky@amd.com> <24ba1ef4-91f5-7fd6-9f74-c3d4c268e5ef@amd.com> <4665b01a-2a57-7d8b-7cd5-353e266cd0a1@redhat.com> <9c7bca35-e6e5-50f2-7f2b-7dc005941f76@redhat.com> From: "Lendacky, Thomas" Message-ID: Date: Fri, 30 Apr 2021 13:49:59 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 In-Reply-To: <9c7bca35-e6e5-50f2-7f2b-7dc005941f76@redhat.com> X-Originating-IP: [67.79.209.213] X-ClientProxiedBy: SN6PR16CA0072.namprd16.prod.outlook.com (2603:10b6:805:ca::49) 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 office-linux.texastahm.com (67.79.209.213) by SN6PR16CA0072.namprd16.prod.outlook.com (2603:10b6:805:ca::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.27 via Frontend Transport; Fri, 30 Apr 2021 18:50:00 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 455637de-5032-451e-027c-08d90c08c2d6 X-MS-TrafficTypeDiagnostic: DM6PR12MB2987: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FS1U4YIJEsz3RJgpuQzGLy29bYCwsYs5B54VoTiBLYBwSh6Zv6J1hxkxksTmQ6sHro5ZolF+FwFR3PAs4q20DLnb82bvNWEdfh4a5LMI0f2d0Plt4l9YzD2mLlSOo7pJbwa4KW+Gg2UOlPN8KoEAKKjzWwEzgwBgJiAl+oNk0JK6L/PV/sTMa98XzLpBM6r0F8QZMcdEM7P3zFqESAgxr8D1N35+BV+AqOWL4NHXGBM7ewmwdJ/BWoUnEgt1rwWOvOlRdjB1SfAel3xhI2kzoF12zeccldN8xmqLpq1F7zgajeRQGah85f+AwkH6fIf/KTmAxhBTkMtlE5GkrVx3/dSuPIORFwvwVHQkjCQ7fyaa7lvOEBk6r8ZdVkQbxSv/lCCoGEGsWOetweY4i5/o6n/kWNqsMA1OJJYO5Qp+cTB9bhdP6lDEs9eizlfk7UDWs1qL+kuNeFxdBtR0Ty3KjE1++77hB3StjIivUEZNlt4NRad30ZO0XZJaCMHHQsEWFIshcaJ4x4B9dvMFKUEb95HDZyLGB3TTBQyYkVaaEyKrAzYCCSBkdEARA7uwWkVpFAjvqzsWBnSNHq2Nai2dZJFj56xkjUVgbVzuGBQ4wlWRywit4Azr/JKTu//Dg6402/+rXBnBmq1J32ZejeJMDzKB23CuAPawZ1Or6e83v+n/bbzgTGi8V6vbjdsmcUEd3aDwQkwKhH6l1bX4sIzU9PxKp7s3xc32ic/9dJMJ4tajvjUlngr485UycbUuWBjL9oCZ9T66aKiuECLD0IBT1w== 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)(366004)(136003)(396003)(346002)(376002)(39860400002)(7416002)(45080400002)(316002)(5660300002)(54906003)(66556008)(478600001)(966005)(956004)(186003)(66476007)(66946007)(4326008)(6486002)(8936002)(8676002)(6506007)(36756003)(2906002)(38100700002)(86362001)(16526019)(31696002)(6512007)(83380400001)(2616005)(26005)(53546011)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?U+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EONTOUFa?= =?us-ascii?Q?EU/Z7FrO7VA+BuHm9utSbl2OS8CGRVo0EuCZ1l5gt11kvJGIpdgOH6Zaoo+u?= =?us-ascii?Q?qUg36YOu5h0uypRgGzL5uWDNrygof5yUM7+w8j+l1PijX71z4qDtHDureeMe?= =?us-ascii?Q?ka5WAQMpXLAlrqhYO023gNBp97A96mI7PKiLDQWIFvxFBFJqCpQAKSqXh209?= =?us-ascii?Q?O6lTbVIdXkkCnxrACZbKgJz8fG5KU2NoM8blFbPgz2C41E0OWzxeAj1hBpb/?= =?us-ascii?Q?wxIcZCv5gMzMnV3/qANqPi9JIkZQfsBX10H/yq9BEHZ3Y3DXTK7jIY9RcMc5?= =?us-ascii?Q?ypCpfuZsZgyNWsUJSvX6qlbvpd+bGN1cgUro2bSixkUs8/HpLBLRpdw2JTHh?= =?us-ascii?Q?coElvLIs2ipDAew52TtAD7ZTdv0k/yTzp5OcnG2+KuQnldTqlvGlvQT4x5Km?= =?us-ascii?Q?NgcZccsG7Ojgmemxktn2HsYq?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 455637de-5032-451e-027c-08d90c08c2d6 X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1355.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2021 18:50:01.9412 (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: Ukr2624jBc369ggQjk02Qnas+uOkh9Eahlg5BDLYVbUNKttkIWLtZx1RuLl7DfX/uBh4jgEzC6JyMVBBFXsCdg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2987 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 4/30/21 1:43 PM, Laszlo Ersek wrote: > On 04/30/21 18:54, Laszlo Ersek wrote: >> On 04/29/21 19:20, Lendacky, Thomas wrote: >>> On 4/29/21 12:12 PM, Tom Lendacky wrote: >>>> Define a new PPI GUID that is to be used as a signal of when it is sa= fe >>>> to access the TPM MMIO range. This is needed so that, when SEV is act= ive, >>>> the MMIO range can be mapped unencrypted before it is accessed. >>>> >>>> Cc: Laszlo Ersek >>>> Cc: Ard Biesheuvel >>>> Cc: Jordan Justen >>>> Cc: Brijesh Singh >>>> Cc: Erdem Aktas >>>> Cc: James Bottomley >>>> Cc: Jiewen Yao >>>> Cc: Min Xu >>>> Cc: Marc-Andr=C3=A9 Lureau >>>> Cc: Stefan Berger >>>> Signed-off-by: Tom Lendacky >>> >>> Sorry, Laszlo, I forgot to include your Reviewed-by: on this patch. >> >> Reviewed-by: Laszlo Ersek >=20 > Hrmpf, a more even workload would benefit my reviews; here I missed that > we didn't add the BZ link. :/ Not sure how I missed that, too, given that the other four patches had it. Sorry about that. Thanks, Tom >=20 > Laszlo >=20 >=20 >> >> Thanks >> Laszlo >> >>> >>> Tom >>> >>>> --- >>>> OvmfPkg/OvmfPkg.dec | 4 ++++ >>>> 1 file changed, 4 insertions(+) >>>> >>>> diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec >>>> index 9629707020ba..6ae733f6e39f 100644 >>>> --- a/OvmfPkg/OvmfPkg.dec >>>> +++ b/OvmfPkg/OvmfPkg.dec >>>> @@ -128,6 +128,10 @@ [Ppis] >>>> # has been discovered and recorded >>>> gOvmfTpmDiscoveredPpiGuid =3D {0xb9a61ad0, 0x2802, 0x4= 1f3, {0xb5, 0x13, 0x96, 0x51, 0xce, 0x6b, 0xd5, 0x75}} >>>> >>>> + # This PPI signals that accessing the MMIO range of the TPM is pos= sible in >>>> + # the PEI phase, regardless of memory encryption >>>> + gOvmfTpmMmioAccessiblePpiGuid =3D {0x35c84ff2, 0x7bfe, 0x4= 53d, {0x84, 0x5f, 0x68, 0x3a, 0x49, 0x2c, 0xf7, 0xb7}} >>>> + >>>> [Protocols] >>>> gVirtioDeviceProtocolGuid =3D {0xfa920010, 0x6785, 0x4= 941, {0xb6, 0xec, 0x49, 0x8c, 0x57, 0x9f, 0x16, 0x0a}} >>>> gXenBusProtocolGuid =3D {0x3d3ca290, 0xb9a5, 0x1= 1e3, {0xb7, 0x5d, 0xb8, 0xac, 0x6f, 0x7d, 0x65, 0xe6}} >>>> >>> >>> >>> >>> >>> >> >> >> >>=20 >> >> >=20