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.44]) by mx.groups.io with SMTP id smtpd.web09.9418.1603981139828668773 for ; Thu, 29 Oct 2020 07:19:00 -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=K1TV4zoH; spf=none, err=SPF record not found (domain: amd.com, ip: 40.107.237.44, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=US+rk6DHWyWxhyJoCRfXy6bKKFXluK4OM60U0cSRtho5151EjncfjBawao436cIF5AjM4RjP4KWWdujFsybVQ/wWu83IcRSd+49JpU0t8DvJnZXsPfL7kXN+mdrVM0HddXtih3CguXhAIH0su0DHv7N3M+H9d7R25Nq9k56Sy/L4bNGMD0vNPXfnobs/QFzCrnlU8SVm61QfoG4r5jHetz9hbtcMmYdRJtVuvhWsX2TExB8pCTf0TzGbYzRuvU31FtQY1pEw2LsNq1NidSGIw+Q5AxVhN7vXKYiMy0w428iH3RtjnNdCjcnAHjynr7e47HP424QHAvrP+aWzI1W7yw== 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=GXhuA8Y2GwEBqBucn5j36BHXZl4O3V1D9dzlOb/Psyk=; b=ogMNijWVixxcAyTCn7MUd8t8dIa85CnXGW8WWyl8pRhSjic0c/d78/T2BjGBmQYCqTCXKx1TxnkOsxfFfGHdpytqTFPUQKPyDORGFj4k2cVlgpaVfHmMiv/MuBMCs/j3XyL/J/BamW/6pcSI0tkwrCRonL+Y2aN70YKTIh2oUd5TXBPSZNzG371E1oXUbzRTCe55ty2x8X/0Ci27EKiAi0nfBf1bWqfIrt7Irjjs4geqIorrVcgtzNx8rcor3lmC+aCnGJ3AgGn2QIPEFxP7+501gp1CuI9uFTeSC3licVu07zryG59Cu8fORVGmduoXPT2hmEx0NDMdt2B0s8K2Bw== 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=GXhuA8Y2GwEBqBucn5j36BHXZl4O3V1D9dzlOb/Psyk=; b=K1TV4zoHMREPv7aib5ZJl/aXGnP1XxmDtBi1zE5jDLPjGIGgI+BDE+g+1sPK4U51U38PSVhPVAQv4onVLy4B7Uf+900bLr7Q8B4E4vSBBrSQtSC2pRh9y6v2riCZmUKBjK7v5gRbzSghJCe9JoLeOkKfdd0CsCrjtiScT3yHO54= 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:18:56 +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:18:56 +0000 From: "Lendacky, Thomas" To: devel@edk2.groups.io CC: Brijesh Singh , Jordan Justen , Laszlo Ersek , Ard Biesheuvel Subject: [PATCH v3 05/11] OvmfPkg/VmgExitLib: Set the SwScratch valid bit for IOIO events Date: Thu, 29 Oct 2020 09:17:56 -0500 Message-ID: X-Mailer: git-send-email 2.28.0 In-Reply-To: References: X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: SN6PR2101CA0030.namprd21.prod.outlook.com (2603:10b6:805:106::40) 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 SN6PR2101CA0030.namprd21.prod.outlook.com (2603:10b6:805:106::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.7 via Frontend Transport; Thu, 29 Oct 2020 14:18:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 167a2daf-e040-4d23-c77d-08d87c15926a X-MS-TrafficTypeDiagnostic: DM6PR12MB3276: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0+LmQyXV51aT8pS43IEZJE9B0ie9/QF5DlQYD2OnP+s/2Qrl2QPJPKwSxVFZmKh+uKgavatSolTd2NBN/cFP69m5UzXiW/i9UnRCt39SIUkiviYhDuYo+ToMZQsnuX4IfP6FNVeNNk5hfzWVs0jWpKSiU+7C2wbEQQVGsVWVexeaepN+Du/jfrLbGJ7diAoALTO6br5SXXakuvqxf+QuDQEVvPgJthb5ZDDSf2Meu/6QxNLODd+hdyn0eogd1h+gjGNCqw0SEc696RAL461veybQZJ692st5kXT6I3FFGi8VZaXXHgWP1LmvVBV1JHRBDfQDJyFXuFIwyy8husbuA9gFajLQ8o2dtpDMJ1DfZnHrW2jOVr+Fba6SrCWAKnQcJ5itfktM+KMVjcNBs1Pe9A== 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)(966005)(36756003)(2616005)(478600001)(316002)(6916009)(956004)(8936002)(66476007)(66946007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: eZWfjcaSuqpOr0C3I3e2lRQlFibQPg98znw6Vvs58WcNRBD0wAaIwrUf8So+l/b/ru95N8Tx7HMeaLVJioPjoX0tnjv+W0qo2iyOGwO7AZ2lBe8aCzvrLhOGHYrxwHU0rvQU28HZUuYhZd0vVeRTMN5ZI6GQsvUby0zKrbLk7Cv4rYqgnsuBY7eDHNXaDfGt2l0U/1cf4w2ytDdlQ99Jbc9HefBtrBU1Av99mKUi1Gx71Vx4Yh96Hw83q036T4q+pyHfMmmWxwZYyDYF8b5EWLPBiQfsFKiiNovkngc1TnV3+IAj4VyMbOPFxMjT3vXslK5GGYb6cRPFgMydafmZS3LriYlCNQfvU71x+iydFrQnxcfJmmLaSioqpSCiXh2F+xKojKf8VwnUwgXvkYoYOThKKEDoQOsCx9MbTzPOXwKPQI62yWKd8ZVjMjgVcCnbwQFsap1Pi5pJZnBwY+f20GAtEF7vk/4TEJZQ94/UGZdU0z6+18g+Adp2ThBr6kLruCDxUFNypQ7XNrwP4JczVab/HLBMxtknhRdM0mdY6rhCfcVjeFUlAK8ZePOUGjmbjBjBdH+INe1HAUCI4Kt/35jaqiHgSjc+gJhhlrENSlTjpTRjeQCExp4t9D4t2VR18bXNSKgMLNTzV9+3J1EoxA== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 167a2daf-e040-4d23-c77d-08d87c15926a 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:18:56.8342 (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: e+RD7aJq9PaFm/rRcFaAG5OLyKk8eIv/pH+7ihB3seypmH8RopJz/5MyhKnO+6Roz9ToepybY7ewMaBWFehPaw== 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: 0020157a9825e5f5784ff014044f11c0558c92fe Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Tom Lendacky Cc: Brijesh Singh Reviewed-by: Laszlo Ersek Signed-off-by: Tom Lendacky --- OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c b/OvmfPkg/Librar= y/VmgExitLib/VmgExitVcHandler.c index 7d14341d592b..e5f14035b06f 100644 --- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c +++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c @@ -1233,6 +1233,7 @@ IoioExit ( } =20 Ghcb->SaveArea.SwScratch =3D (UINT64) Ghcb->SharedBuffer; + VmgSetOffsetValid (Ghcb, GhcbSwScratch); Status =3D VmgExit (Ghcb, SVM_EXIT_IOIO_PROT, ExitInfo1, ExitInfo2); if (Status !=3D 0) { return Status; --=20 2.28.0