From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (NAM04-DM6-obe.outbound.protection.outlook.com [40.107.102.43]) by mx.groups.io with SMTP id smtpd.web10.178272.1673899851412232513 for ; Mon, 16 Jan 2023 12:10:51 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=akdILzde; 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.102.43, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NLUO+6AjyYA8K0M3Jhi7LgYyA7qutrr8LMzZ3uJxs1HgPrOiCEIGvk7+uJ1rstsnerJxPeVIed/ftmI5WC7H1da/OPKl1a1kB1zim6Nh33CDEuFvmgbc0HnTlPx3KHgV3KmA/fduzd3IQd2azMWy0/x2Sao2l3ln2BRRx+DR/JAk5GpLEtbuojDOzN6Cl8rlvlXz8kesqN++33d//hPtpNfAA9oujlzwReY8xP/ny++wuDOJN06Ny/77CKCe5UYdY6UzLXxrNKK9e7V2qIINO8SyCFQGmujkHVYexWHZQQ8ySB4SHBndsPhiXs+SgPRYMx4sbCE9ZpctfJqWY17jCA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nFEYtUe/cSsd8wL/hbNn9i6ALLbipm2/tfRktKlb6rA=; b=RyEI3aEhkZVAZuhGQATBtaVK98DeGoURWNXh39auXOsK1E/HhOQRrjr79MZVAxzuo8lHERZ3iHrSHvAZpW18OC7QexmjWwh0848+NzaTZdO0SmtyCYCGNUffApCRPVD//MNBYpWh58pNpCMcBcfMe8OPnr1rxS+fXzUUnvjekmgfkxgEMLTnPgKoZg6Hkmpxpvk4fUem6DGQN1A/drgTCJ2OFj7dVeKLB4vi0dEBDSVBmagl/TnsoqSYq1zNWNf5tqUjjpvnKaX+l0X2VXx/Lb2Y5/CHYmsHbE4hfUV2noWOvo2g9lgPybKs/DKk5WS0bbz5anOpcWa8dGrCozcjIA== 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=nFEYtUe/cSsd8wL/hbNn9i6ALLbipm2/tfRktKlb6rA=; b=akdILzdeIXtacq6yu9sjM2l0O+uv1CkzMcQxGWkKkgwMVUObi/qlRwEDa3v8b0P2xOCWAWCg43QeHwXmrYOJbijLCDyny1dr6BlrMl/P6cQ+83hBq1eWXhjgZjedUsqQ4NvYTl+qdi5NEs13nooT5P09jec0mc7EIDgtuefa0VU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) by IA1PR12MB7493.namprd12.prod.outlook.com (2603:10b6:208:41b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Mon, 16 Jan 2023 20:10:49 +0000 Received: from DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::8200:4042:8db4:63d7]) by DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::8200:4042:8db4:63d7%3]) with mapi id 15.20.6002.013; Mon, 16 Jan 2023 20:10:49 +0000 Message-ID: <21f9bdc1-10fc-726f-9585-b84df8b414fa@amd.com> Date: Mon, 16 Jan 2023 14:10:47 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/PlatformInitLib: pass through reservations from qemu To: Ard Biesheuvel Cc: devel@edk2.groups.io, kraxel@redhat.com, Laszlo Ersek , Oliver Steffen , Ard Biesheuvel , Jordan Justen , Jiewen Yao , Pawel Polawski References: <20221207053215.2527430-1-kraxel@redhat.com> From: "Lendacky, Thomas" In-Reply-To: X-ClientProxiedBy: CH2PR14CA0055.namprd14.prod.outlook.com (2603:10b6:610:56::35) To DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) Return-Path: Thomas.Lendacky@amd.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR12MB5229:EE_|IA1PR12MB7493:EE_ X-MS-Office365-Filtering-Correlation-Id: 8aa2a61a-e59a-4366-d82b-08daf7fdc27d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1EEX49NXBNfZEyiEf/6J9txFGg+69BDC+anipYgjYT4ecbgeXDGIrYVbdWpui27aP/wyMCovSKcCx3KR4HL/W6kwov9jgRwV/wvVFI/gIROi0wxewwNmw6rdMm1IuDXvJtRzkcR/+vUoqtEHt0qN38hgsdTSHQEm3Qrx779LSlLVBhYJ4v3qMKsF5rG6+sEuYN3DCk7XYQayWLZF7/3X3Mt1WaxmYZTU/uyXYcWWBpRxUj9adHwmqrUHqeqYvu+5JUzs7IXzKCCD+OmAlb7RTAaTNcRgyLrZVUNVLSWpEiBgzFV2Qv0tO0CAVnDAzE68WDXR9w0gGIsl0KV5CGeMjGowO4CPxsXG7kADmzopdvKx/iksR7BcFdQFU60YWkEQBYRAzOLBa/DVXqU0+BB0/TZz0Q8tYi7yxzTsY47fDQz07PxdrPnhjLUMJ7VPENN2uPAYaZBToTf2kg7pdUdo4X8n4CMeEraeiMuWpg40e2X1CVJqeFzdGPAFquCh8IthpfhgkyviDhMS0u1fS5ICgXaLSg6jFCQB5q8DaZWLOJHfLP0JafGoVOece5qavtelMvINY8MABaw8fEmv84jFwKcEa9VdrA9OJ3umF9qhbpSd1bvZ6XukkOSsuAktVwS8Fyq639eeh0iV/7py4uHw7POEe377OHM/rlHdqJBheK1bhZbo7s/++LaWgKD5v/jViNd6Tr7h8ZAopJpfsXwWV1e8mFp+5FFbxgVx79DSYiJcgiuD4Q0KbhQtYiXEVghg X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5229.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(396003)(136003)(366004)(346002)(39860400002)(376002)(451199015)(6916009)(316002)(66476007)(4326008)(66946007)(8676002)(54906003)(66556008)(2906002)(26005)(41300700001)(5660300002)(83380400001)(478600001)(53546011)(31696002)(6486002)(6506007)(966005)(36756003)(38100700002)(2616005)(6512007)(8936002)(186003)(31686004)(86362001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TTVtdWw3WVM4bG81TGxGWnZtNFhsNVU1TUlndFBYNEFOaklQZGJLazE3Zzho?= =?utf-8?B?WUdrTnBnK2dtM1czbEJ0R0U4dFNIUlBrSDdoN0h0THd6TVpXUDRlL0hGMTlD?= =?utf-8?B?SFNKT3FlOFZVWXpNUk8xTkRsR1lTb0dzQzl0dm81UzRuV09PWW9leW1BelhU?= =?utf-8?B?TysyWmZzS3ZmbFlZYjNiZHYySG9DNU0rWFhscU1MeHV5Kzhvdnl2U1FDV0dQ?= =?utf-8?B?ZmNOQUhaMXhoUktQb29UUG5tSENldGRDQlJncURteldmbTdVT3ltQTZFblNh?= =?utf-8?B?czRoNlNBK25pN1JmOHJlUXU2ZXN5MjlnWHRTVE1WLzdiYmdDUmRsTnpBbndU?= =?utf-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w06Xft9m?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8aa2a61a-e59a-4366-d82b-08daf7fdc27d X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5229.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2023 20:10:48.9878 (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: PB1tAk8WNZRKnXmkI3FYNB3TXJfZ0YFr/9pnHjNiiQeFE0F0FAe2up8/ydxwmCIikq8YSFkQFyhTdaCEBcFDCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7493 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/16/23 11:09, Ard Biesheuvel wrote: > On Thu, 12 Jan 2023 at 18:09, Tom Lendacky wrote: >> >> On 12/6/22 23:32, Gerd Hoffmann via groups.io wrote: >>> qemu uses the etc/e820 fw_cfg file not only for memory, but >>> also for reservations. Handle reservations by adding resource >>> descriptor hobs for them. >>> >>> A typical qemu configuration has a small reservation between >>> lapic and flash: >>> >>> # sudo cat /proc/iomem >>> [ ... ] >>> fee00000-fee00fff : Local APIC >>> feffc000-feffffff : Reserved <= HERE >>> ffc00000-ffffffff : Reserved >>> [ ... ] >>> >>> Signed-off-by: Gerd Hoffmann >> >> On newer versions of Qemu, this patch causes a boot failure on my >> AMD system with the following output: >> >> ... >> PciHostBridgeUtilityInitRootBridge: populated root bus 0, with room for 255 subordinate bus(es) >> RootBridge: PciRoot(0x0) >> Support/Attr: 70069 / 70069 >> DmaAbove4G: No >> NoExtConfSpace: No >> AllocAttr: 3 (CombineMemPMem Mem64Decode) >> Bus: 0 - FF Translation=0 >> Io: 6000 - FFFF Translation=0 >> Mem: C0000000 - FBFFFFFF Translation=0 >> MemAbove4G: E000000000 - FFFFFFFFFF Translation=0 >> PMem: FFFFFFFFFFFFFFFF - 0 Translation=0 >> PMemAbove4G: FFFFFFFFFFFFFFFF - 0 Translation=0 >> PciHostBridgeDxe: IntersectMemoryDescriptor: desc [FD00000000, 10000000000) type 1 cap 8000000000026000 conflicts with aperture [E000000000, 10000000000) cap 1 >> >> ASSERT_EFI_ERROR (Status = Invalid Parameter) >> ASSERT [PciHostBridgeDxe] /root/kernels/ovmf-build-X64/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c(550): !(((INTN)(RETURN_STATUS)(Status)) < 0) >> >> Doing some bisecting, before Qemu patch >> >> 8504f129450b ("i386/pc: relocate 4g start to 1T where applicable") >> >> this issue wasn't observed. And before this OVMF patch, the newer version >> of Qemu doesn't have an issue. >> >> Also, if I add host-phys-bits=true to the Qemu -cpu parameter, then >> the issue isn't observed regardless of Qemu/OVMF level. >> >> I'm hoping someone has an understanding of what is going on and what >> can be done to fix it. >> > > Could someone look into this please? Gerd? Looks like Gerd is already on it. See https://bugzilla.tianocore.org/show_bug.cgi?id=4251 Thanks, Tom