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.89]) by mx.groups.io with SMTP id smtpd.web08.601.1604685270833962849 for ; Fri, 06 Nov 2020 09:54:31 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=KDNwPYTu; spf=none, err=SPF record not found (domain: amd.com, ip: 40.107.237.89, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cvb/4K+jK7ERK6rvG6vbLcCrWkROtsQkn4qeqzNZKqR/uxonf8e+UJQmj508rbejiq28He+a0VTKn/cTEtXsjXWq+L6S1qrB3yctM/iiqgSVJIyotJAgiKjxX5nS54nTDXfqxxkBhxjxfsu1npNjL2xYDCaR36DaYnYHNNhFQLMEAhwu4YAuF5q5tek84zzbkM3LUA7T63IuL5zmLFmdZZHpms3do3VRvcARc/1k8GLwyBUJ9xxOXTO9aFM9Y7jzaUjXpfKBht5VswAQLnAVWHnVvVAW5Pi8s+vsNdoOzhoA+g4WRqOQPr5x5kcYt15Q5WmgFmd+fgTstsSzWDbgmg== 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=YI/F1sIEQqPoOtwVs7AMbdLrlk5wZGUWavLFWuupfLs=; b=AxW/yQzDNcoSu5eRQnrxtba0l1PgGaQz82274sb5JePSCY1avQVWFBuc6ZYvWuMsYLAb5UNDNAbLwIbOQEImhThV5zOY6SMUufwdC1heTcMw6EWnwlzqJ5BFu/ZJtC18XOTu71ad5FAeAHSWskLt/OVqTPe3QawrXDtHfm3vxLJLGiy+zAKlxTeiC0htkcChRWJtPdnAfnq8a9gGmy5a7bOIZ4Cf56YJsQzMEUCIE6idDqNF4OizNKcccC+Qg5px/yuMdy5KUjUATs8lXRTRTTSOzWpEWFcErdPh2QoUVnHT+N+w3IkM8+lJ+apDhewFAyVfHETIjgrDTSfs9f4v6Q== 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=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YI/F1sIEQqPoOtwVs7AMbdLrlk5wZGUWavLFWuupfLs=; b=KDNwPYTut0vO0sw5xT/o2t7uX2u+kTy2oR47fz8Nal1ovUm2DFjKY8FRiUX0KAWlxERInCFDlVYoVBDF5TXRnWb82LXa/L/z4/zypFuoniAEQWCwOp4OOiOzsUrA0xWFNfDZaP0IVmBQfp7YHV5tdQRLhcPyB01iD92NWFeXhbA= 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 DM6PR12MB4385.namprd12.prod.outlook.com (2603:10b6:5:2a6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21; Fri, 6 Nov 2020 17:54:29 +0000 Received: from DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::e442:c052:8a2c:5fba]) by DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::e442:c052:8a2c:5fba%6]) with mapi id 15.20.3499.032; Fri, 6 Nov 2020 17:54:29 +0000 From: "Lendacky, Thomas" To: devel@edk2.groups.io CC: Brijesh Singh , Jordan Justen , Laszlo Ersek , Ard Biesheuvel Subject: [PATCH v4 08/11] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: Set the SwScratch valid bit Date: Fri, 6 Nov 2020 11:53:10 -0600 Message-ID: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SA0PR11CA0023.namprd11.prod.outlook.com (2603:10b6:806:d3::28) 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 SA0PR11CA0023.namprd11.prod.outlook.com (2603:10b6:806:d3::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.19 via Frontend Transport; Fri, 6 Nov 2020 17:54:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 5b36c42d-9c59-4ad6-cd06-08d8827d0225 X-MS-TrafficTypeDiagnostic: DM6PR12MB4385: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rCvo8VFNMlTGNQ7MXjY45D1j+1hQQ2eIqUBE+VXLNmOARcw2ozisoWj1qV+OyfqAsgRammJwvebc+7YPUjyb/g4bfQJFDaew4blc9E7KidVLbDsfTnV/QsZdb6iJjKRBd1M+HLq5MLI4IwVZKWreIulDCv+3RMb1rBgBsErjyceUbsCbOaW5YpvkaPdvXs0X9JbxdcPrqIYO/vCPPidiZD+nkkDHGltU0FuGPyErgOO3R1hyJK7jT/b8KB46PIwjNkHIukahMmQEga9V4/0ayr7ObtJU0sbQqZfSBPWlLKGqO7MC5ehKk8KGF6wwC9sKXDYdZThawn5/RHc26RZCwZqA0wqVVwytcpUW5vfU0JSHQ05picD7bvO758iDnBtzxHFz/6G1H6oRgqN91jcYgUBXSDdodmxAsvg5K8I4z7rGmWZhFVgThivlJjUAwWBF+7e8Nh7JMU0Mg6RRZmnS5g== 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:(6029001)(4636009)(366004)(376002)(136003)(346002)(396003)(39860400002)(316002)(966005)(86362001)(52116002)(7696005)(66946007)(5660300002)(6916009)(6666004)(8936002)(36756003)(8676002)(478600001)(66476007)(16526019)(26005)(2906002)(186003)(66556008)(6486002)(4326008)(54906003)(956004)(2616005)(213903007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 7ENOhKpnitl1Wt4SaOi8+oAhoGganNJE25IVZQlTR9/H+YL7lkxtVCTeCdkzWRgOkayP5sT5aRD/IbEbIuWfJN5JmMf4ZnvFiSl+N2uH8GZKaqljnqLAPSGGIdM7H/N3HkJ3SXBaP/Nt1KZn80G4+43woIiV+KhbZPbMpZOidmcbLYyMeDQKyh7+E+BJ4YJ1jCNbCZm4rLR8hGe5Nwyq4MIkh7HJG4ZEaco1a5RN+NG5MYXzYiwhIBRPjed+eBspjLJWmHMJUzVYpV0Qvh+Vd6lVAr/8f0FLRn21UkYAF+HIwqITfK7mpnTGvNrs9fEiJ0eCHQmuny9b8eif5oErQX/DNfaw6e/r8bCTTyLRF2LVyWUVrbhEqtXwQ/n9sMcAz8fQzpZQaI0KbUUa+sCCFZTlXe51FjQW8h7BbOhmtABzz1SrDEOJ4qpmoxhayI95BQ1imldcewhj5NBnCbIhsDlWMT0WpnJEA8Btk2c6+LMl/OvI1JaG5Dfc62ICFg/V45wFz+QIElKfeqf3ch6i+UYuUIKw55jOli2fn/Fzq/R+mwJCro9JZi18YpnDj9FUht1qkaWTP7S/YFwuFVgUnqFs7oZdpIiauSuQsSIgWmeQufjIocuL63WLX9vyvOlvsGG+3vP7wjjRSrGOx64Fpg== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b36c42d-9c59-4ad6-cd06-08d8827d0225 X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1355.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2020 17:54:29.4598 (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: QGL2yiybGq6W54XuJebt445NHxF4H9h+xYkTIFtqh4vcs/cWI0rSMW7Qd3G1oSTvA/hp63E5dfMSJlD3YRI6NQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4385 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3008 All fields that are set in the GHCB should have their associated bit in the GHCB ValidBitmap field set. Add support to set the bit for the scratch area field (SwScratch). Fixes: 437eb3f7a8db7681afe0e6064d3a8edb12abb766 Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Reviewed-by: Laszlo Ersek Signed-off-by: Tom Lendacky --- OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c b/OvmfPk= g/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c index 565383ee26d2..f9b21b54137d 100644 --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlashDxe.c @@ -66,6 +66,7 @@ QemuFlashPtrWrite ( VmgInit (Ghcb); Ghcb->SharedBuffer[0] =3D Value; Ghcb->SaveArea.SwScratch =3D (UINT64) (UINTN) Ghcb->SharedBuffer; + VmgSetOffsetValid (Ghcb, GhcbSwScratch); VmgExit (Ghcb, SVM_EXIT_MMIO_WRITE, (UINT64) (UINTN) Ptr, 1); VmgDone (Ghcb); } else { --=20 2.28.0