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.82]) by mx.groups.io with SMTP id smtpd.web11.9751.1602346065941820546 for ; Sat, 10 Oct 2020 09:07:46 -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=h8PLOedi; spf=none, err=SPF record not found (domain: amd.com, ip: 40.107.236.82, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XwNuoEZnOE01eqlC1nvN/FdUSeuoghM4te1w52UffCAzhyGfUpKSWtn542xPKK2PTA3cp1Gs41Cxh6pOYpp3X6F29NyhQI3isyojrmt77+7wdkd6B6KHqnc6tzzwNGbWokrhkL61mg9mAka4+efFG+ecXIf6vtQ7m5uH+PMRwOKBE+VwWy5KiGd+Mdgz548tlVmHDD5Orna9kxR7YtI/yR7+iXJL6LjcDoQ4PrndWGZVRJvGxtNw6ERZtk2mg5O2CGjwRFSJMazO2V+Dm6+OXtFns2quKk9KPbCjldQM+ZIN4Wi58jDiBh1zqMw8ad7h3oUaOxgCqMfrnMQXTsRVKA== 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=56YhNAPoxgXoPuaIFQxTAdpXEETGZcaZb/FvMjnf/BI=; b=F8F3Z0e9GlHDFh3zkuC0E7D98otwbUNzJZSUuDGphznw3i3T3FtCztYtiZp36vVXU+aRsfNdiDMA1EeHhFmEosQ7+DWAZ/fuPf4BfB166Acaq2AWCVLfR2DN0sNkUczfsYoK7GhVwQ4D0NROCgVLVRCJ6KKgTeOHlm/S5YV+TN7wDiuDzU09ApGbpIHiRyHWxZF38hSD/7E6VSxgPepMYUrE7/n9qy7aZyFZ9JhH6O7eXV1nk4dojrlC3JYqDe30/tLWKq/dkDPRpcPIPEBAMvQeozol/DYGFvIOWDkaSal1G1BWrgul6h9y2bekRg2hXMR6/kEXHI01Oxi0TLtqXA== 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=56YhNAPoxgXoPuaIFQxTAdpXEETGZcaZb/FvMjnf/BI=; b=h8PLOediOkZy1Kfpkv9bMHgM+gkBFRw55yqOi2r5Lyd9jRelETsKwQS4HU5jdn8D8Ar6rNxmzrXMffbasD5SVWATk08/qYARiwD7NqwuU7wCxkF6ceuVYs1SDp4ww2/EcK97i08zZH/xN9Xebp1k5HTq4ySRIdcYX3gx6Bi4MKY= 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 DM5PR1201MB0122.namprd12.prod.outlook.com (2603:10b6:4:57::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.28; Sat, 10 Oct 2020 16:07:44 +0000 Received: from DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::4d88:9239:2419:7348]) by DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::4d88:9239:2419:7348%2]) with mapi id 15.20.3455.026; Sat, 10 Oct 2020 16:07:43 +0000 From: "Lendacky, Thomas" To: devel@edk2.groups.io CC: Brijesh Singh , Jordan Justen , Laszlo Ersek , Ard Biesheuvel Subject: [PATCH 3/9] OvmfPkg/VmgExitLib: Set the SwScratch valid bit for IOIO events Date: Sat, 10 Oct 2020 11:07:01 -0500 Message-ID: <40baa962280b2e0f6e13d79c427910a223c77283.1602346027.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: SA9PR03CA0022.namprd03.prod.outlook.com (2603:10b6:806:20::27) 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 SA9PR03CA0022.namprd03.prod.outlook.com (2603:10b6:806:20::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.28 via Frontend Transport; Sat, 10 Oct 2020 16:07:42 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 865d2526-a36f-45d8-60bc-08d86d369e93 X-MS-TrafficTypeDiagnostic: DM5PR1201MB0122: 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: J0YQX8C/tz/cHsgYgqe66ECYymRW7bXY9LvJKPVpRYe4S5oiauJf8sp8vsKzE5lDkfjD57BNWLjat56hvAa46w53u3HwMWxpx94uMn/vOIBT8Aqd0xxHHXjO2NHCFQUfmK25fA9l0CCl3QwtQz8ZbaDsaOVSEFtVrFlwINDg5GCKNqeq59ghAmco9f8ixWy79E77lo2gedoeLWRKGVIBhXIjPCU0Et+uywBM1H4+/EbRlOkRNsPiPHevMk7RZOBQXLSW/gTfxJrq6lK9FhX8UNT296L3kA03S0FyfaO4lgjBTFCcI8IgKSlJUKKZpNKeZHcEshUGHZ8azqz1wLuDrw== 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)(136003)(39860400002)(396003)(346002)(366004)(376002)(478600001)(4326008)(6916009)(2616005)(956004)(86362001)(26005)(54906003)(66476007)(316002)(8676002)(66946007)(6666004)(66556008)(52116002)(5660300002)(2906002)(36756003)(6486002)(7696005)(16526019)(186003)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: F++1iM4hMHIdlbvLfm8cNuD5IRkflusqD99V1tkL0JyWjzDo5SMh1D0lqxAxXrATp4zKSnG1/A5JZaQ9J7yjZxATDDpe7Hxg1ZhUL3RLycanipv0sA58Mn1cn8g6+sI8HuFyE62wdAdrG9JfYvC3FvluVtvUJUB8jDmTU6YK3hPxxOTE8fDWvUKL02MdNRnvTPhET3W3vhK31umFrOJ5W4xWccbq1aHqFPcwSOpxK6FJ2UcX2qexZRMFaP8xmruNfhAiobiSLbEOKKy9PuexH+HJb4BG63U5aR9Zn+a+WuUChDKipPkNGfCooAHd/eqqTFsd7LQwcUs82WkzFcU5txZgr9kxGmapHJs8ALNITbZorpvcVmYjS+f0VaII343wCftKl5JxLkQY/B+WbAG0CXXfrzhTSBrooFIAQzh9m7arhnBFQBi/smikjzkq5z7F93kiLVgkeryf3bv0pBsVh4UYmg0JR77dhVS0v+GjZPceSAnoc0pU6A/9/e1BOWL3FfCa40a09XetViUam2oLh8XjlrLd6fI2HkmJsk9tmLlMzbVuoUTIFFiKFvmH1VixmzOkHI8nUhwp+tRMZGF7bOV3vczfW4xQciAMCNCMTPZSQ7g0gBaMCf/JhSNwOLygpEBZDJ4tO4X6atMkvZwGJQ== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 865d2526-a36f-45d8-60bc-08d86d369e93 X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1355.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2020 16:07:43.2323 (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: XybvJ6gMW3yoIQm4RIV6RGLv8HWj9vqbo9z4zcl+apodcsMNhwr3KSt7c/IjNUZ6Qk10W9yG3BI2LqvMphtiTQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0122 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable From: Tom Lendacky 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: 0020157a9825 ("OvmfPkg/VmgExitLib: Support string IO for IOIO_PROT N= AE events") Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Cc: Tom Lendacky Cc: Brijesh Singh 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 c5484a3f478c..40120e29af18 100644 --- a/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c +++ b/OvmfPkg/Library/VmgExitLib/VmgExitVcHandler.c @@ -1289,6 +1289,7 @@ IoioExit ( } =20 Ghcb->SaveArea.SwScratch =3D (UINT64) Ghcb->SharedBuffer; + GhcbSetRegValid (Ghcb, GhcbSwScratch); Status =3D VmgExit (Ghcb, SVM_EXIT_IOIO_PROT, ExitInfo1, ExitInfo2); if (Status !=3D 0) { return Status; --=20 2.28.0