From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.42]) by mx.groups.io with SMTP id smtpd.web09.9423.1603981163093961836 for ; Thu, 29 Oct 2020 07:19:23 -0700 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=C6RbyMUk; spf=none, err=SPF record not found (domain: amd.com, ip: 40.107.236.42, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iNKqRv9Vv9tS0seb79F5WfPbaV6hGtEF5yrDrpsI0VPazoSxovr0zaYkBykcJVKn/g+4JHt/97xMT4pbPmxYcc1Ullp9b+Gb+10dRcfJShhOW0aOOA4l6osnoJzxLbUuYCpDV1OspNVgvZu/8oEGz3rwKL+/exVJm+Z0iI6gHvH7zqdQ+cWpDCbt5VIogoJ7mIYvkIDCxTZjYT9mm3ZZX+jf+xkGuNzLBeRlHCozwl5fkMB8cu4DckttiEdB4IGD5G2RBup4B5HRYfiwPU4qcllknsdtNsbLC9IFqMYwdz8kZi8eqJOPbQyDBbrIcZTGOr7JS1+4BAv99Aj+bttTqg== 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=IOVxSVTjRRKwRdM8ENsl0PeKhGISdWEHpzsVzwAJDeHiNr9efpSBUzvyowKZa23j5EanLhaGgkEm0Jha0tLVtCayr4X1TP8ikjp2XdZBzXYGb2+INFelj2/z+IAFLWa6wiR3L6AhC/mAUxQbimWX+YgiP7Q87c6x0x6LoKPYCEGLxgzbAmOapkX+B7EiV0ycUk92UHdXA+G9K4Qq7wy5uz/UYvVQ3V2gTR81qhEuv8nq8eGXrUGYLlB+mc6LKTQAfzH1uiKnocqeJPA32862V6KSoPaluQCPfz19LCE1sdtSSi8eJFtnEx4H1a9MxBvJC0AHufVBcryDi45SIxo3Dg== 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=C6RbyMUk2nmrwAkLp5Y6rG4cTPm19J9FjvMdmOZyCGUPWXe6g5ch00CUqAj6L5n1JVvq025xIEQVOjC4XQV4ui0+2VKk0faJdEV1fueAVhPP92tziul1RpwFgwlqcKKlXUCPluks0eahzDkFEiFz2AgNJoLlKl8yWU6H8WFFpeg= 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 DM6PR12MB3276.namprd12.prod.outlook.com (2603:10b6:5:15e::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.24; Thu, 29 Oct 2020 14:19:20 +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.027; Thu, 29 Oct 2020 14:19:20 +0000 From: "Lendacky, Thomas" To: devel@edk2.groups.io CC: Brijesh Singh , Jordan Justen , Laszlo Ersek , Ard Biesheuvel Subject: [PATCH v3 08/11] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: Set the SwScratch valid bit Date: Thu, 29 Oct 2020 09:17:59 -0500 Message-ID: <54463dadda03ef4ff6fae89ec5e9a1c20a663f31.1603981082.git.thomas.lendacky@amd.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: References: X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SN4PR0401CA0005.namprd04.prod.outlook.com (2603:10b6:803:21::15) 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 SN4PR0401CA0005.namprd04.prod.outlook.com (2603:10b6:803:21::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18 via Frontend Transport; Thu, 29 Oct 2020 14:19:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c174d3c8-a23e-4952-9e05-08d87c15a064 X-MS-TrafficTypeDiagnostic: DM6PR12MB3276: 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: hWMIgShV4TdNxgwiwgSYtcneoLmgVw1UWK419ozTkpUZaPzXvpCJqS+VYEbELZY4e0Y9VB9aLLJiW/AufXvtG+8nDaMEb/EvgkFSwGN0qd5bc8TTclv90AdoFxSRm15sm+hKclgEySKB6Rl11Qgs5rOQqwMuycu7m95OgmH1UfitlbOwwVGLgubqLpH/EwZklNrMlJvVnmldL1bBv1eudiDGPlNm8Uj0XQc7kGgyRZMRVEJQT9P0/5/4EgcWTnZWikWAyHm172kzoSg2UKH5Kq37SvDCD8gnf37QYc6+yA4waDb0LOfsUTHvkCUnqVoN60qKijSaJaEqHbY1lG0ksxp717WemJUm9UPTVasCTE/ed2jrdlKhPiuabjAMzVO59vlt00c9R25QHGWRUj296jMSLmnRZA6Eiu+DOHhjcHulNblXDC+kB3eR2JiWk9yiWWm6ATmT6lBU6nw1OcqoBQ== 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)(39860400002)(396003)(376002)(136003)(346002)(366004)(26005)(8676002)(186003)(16526019)(4326008)(86362001)(6486002)(7696005)(52116002)(54906003)(66556008)(5660300002)(2906002)(6666004)(966005)(36756003)(2616005)(478600001)(316002)(6916009)(956004)(8936002)(66476007)(66946007)(213903007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: CNruG+72tGc/1V+qCCWUBR3Pc0uS6wYqe40vxn8ViE+mIjg2J16r9LC5b7VdjOcRRU+jj5AgnuYXmEN8nUxz7ncc4pJYK5/e+ornHsOvIrLPTvd+aMg0sY+Z9z+/LRjgAxi6jJmgvglZXGldEgWoZ2fMGedJJ1LaQC784hTGRGfPFXVw+qhjVMpszP2Wets27m1gO0kHKXnxKiPDvPz9C8Q1QTM2rGZKj4+qCRA5304kS/1GhX2GXhlmipcY7tMzDVnrmQ1P5RzhE3IRyCrQmIWc8/MU99IZ9VzyY6uNDvqLli6Orbz91AsgGrHl6jsVYMGsXIVPhGajLMQbV7Hr3ro+FjMBraw/eJycg6xb4KvKcKTjtoOWjX0HgZieNl19kuih68YPLbQMtRu1Wbqep+jY4gNLiVjxkJew5abTOEckOBLwLGt2hAp2+MPg5bbp9ML+jkq0mGn0vsES0ZRF7vl5tQ3gZdin8htQaFGv1WEhgae59XbfQWR6s0niw4vpTe3lskogWFxKZZNDuN0kdS1kxfx0rV2a6QtJC2PIP3KuNkAPke4S0eUJjtXcOu8vYBDPik0r5M+0KhH/9YMRyucJCjvQ1MwZqBCI9VvE6qZv+CaPE4o/ygzkyH8gUPmHz8gLfOSMW253iPSFgDJ/vQ== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c174d3c8-a23e-4952-9e05-08d87c15a064 X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1355.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2020 14:19:20.5248 (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: dCxazHNpMfyzjfVuZVFNQ46uPmCo4UiTv5sBfIeeWZ2F/X9YoYgzuEyD/42VvmbdZzsG6dYkYod5dO6WFb3Scg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3276 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