From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.69]) by mx.groups.io with SMTP id smtpd.web10.210504.1673991824332741970 for ; Tue, 17 Jan 2023 13:43:48 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=y8UYpEti; 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.220.69, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kXiDUxlm0rt9ip9pSlftc1th1pUCIMuCghscaVamxwA/GYJCrrSDaH3vwA+x0WTg3uPvAkxr45z7+BLGPuEE5yFO2RNvpuKj/f1NOlTvB2clFgdUCBZCpFrrjADWp2AVgb1i6c3ASemr/QbBDO/RnHdfPoCvNiN2fzZO1IRPEf2xpUTs4lHDb/xJlTlvLRfvk7iItK5qvjVamED9v1EcbKCwKKd2Af7gblx64rTmuNCPq4S6MhaTmGnDbIuAivUiJJGGIcHX1ZMzvZbkxyZyTqUSJzOB3SmPSitkUWmVPvIIxmM9BplEnoYCR1JsG5bXzaY14qO1EP8TJb6IBUyvfQ== 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=JQZ6HTIpjRndHbEv7B0RTSOXp9TSg6ETJFL+cmvI9yY=; b=bPtu8xVYglSCksjaWIzxdO1nLF5ZPaTMlraRrmEBDxZ+cqJ+bpCtc7/YzNBz9rCCu57xgG3a9syXGRSd2UN2W1Gz7lCOvlJQgvP9hUjwEWyabAnkFIC/lyxiv8Rnb42zz9q399bkIOB7Fto5xj9mwr3tu2NnKVQIMXkpIC3fZvF39473K0aOJlCqqILlASk3ZT7Ho3oE8dKmARpkIYaApVqXuFcB5eJ0fHqDfOCqS7RCbKtWWmAiLRzOJ4LEug6yV5lD/4vGU9zRp+KAVBZyZMfFhf1TzICbSPS5jk391NZLVSyJYlRepEfHRomvN8YaAZikeFQsRx3/JSj93JabMw== 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=JQZ6HTIpjRndHbEv7B0RTSOXp9TSg6ETJFL+cmvI9yY=; b=y8UYpEtiHSf0xRo0C+baFJAR0mB2XaQ3vwUAVDJg/Mjy+LllM3XPlN1HV28N7r2YzUJNWU3Q3zrCE0l2gSMrBysdeLGmygO5ugssoQjDUQhbD3frtIUJuhjZu0Fs12lg8haWoGiCTs937ygAK0EBF04OWt3FK6aeRPzLLpL0Q6w= 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 BN9PR12MB5225.namprd12.prod.outlook.com (2603:10b6:408:11e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.23; Tue, 17 Jan 2023 21:43:40 +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; Tue, 17 Jan 2023 21:43:40 +0000 Message-ID: <90f05b21-3fb6-44cd-3254-2275b5fb072d@amd.com> Date: Tue, 17 Jan 2023 15:43:37 -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> <21f9bdc1-10fc-726f-9585-b84df8b414fa@amd.com> From: "Lendacky, Thomas" In-Reply-To: X-ClientProxiedBy: CH2PR16CA0002.namprd16.prod.outlook.com (2603:10b6:610:50::12) 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_|BN9PR12MB5225:EE_ X-MS-Office365-Filtering-Correlation-Id: f03e7b48-0c35-43f4-1f73-08daf8d3e54e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lxgyZbsrVHYdjDyHxOzBW0a5KJNHE6zIqOMFuSLjJy0W2DuoZqQQT54AZS1vx83V/BOhbMUcys5EPXeBG8lY30D1jR4LdYN17qKt0ddFBQzjJP51A571jDnNP8Sw3/jGOSSGibZpZRoKkTZAAjv6hrpFWg3yxrEndfLZEwTEfilmF54bsoFHs3+up1XWLGwwCTL2bk3tspFu35k33aw5obQyYDcKqG/Op9bWgqRSD1nnP2HHfl4vRwWsfdNuBMfNfin1JCt8awWYJDgaZDBxchKb1Ek7wfC32IxjBA19wxMAIhZkxYTwZkRyXrNRtLCLgVGB95eqwBkw61mVOSDolQ8TnRwvqbadlyBMZKYyPuFBpu2fzcfQ3xxT0vm4gIuIY96bzwQSatlDSL97XyT8uD2aSA7w8rbyd99fWwTjYOpcKoi+AgkxLSqbXz6lOVjNy3r5FQF59ngJkv8gvNsus32VGhkQ9aNC1ryP9G1Q47xMNB0TA3RYI/N1hJ2dzWDAh5bKVizXGaUsnCpnnvnjrL4ZnKv3YDCvVh0wd9SyWFl2pPWaSaVHWHLLUyIs/7mfXw5c1L4zlNNwusxwZu2QfvO8595+ajtSZzT24+GL/CSdkdOT5WOcWj+XgwG5c+LWWDJGkHrPaAjxuvmk8el7Ze/lRiKqyfWax61PiRrPs5YI1KUc5fDq4aUDRFFryVtHaJ0/dwpe9Js0W59bGuElDRcLLGgbNC0WN2swkQp4eweFdQLpY4vuvT2030rCc5I1 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)(346002)(39860400002)(366004)(396003)(376002)(136003)(451199015)(83380400001)(38100700002)(5660300002)(2906002)(6916009)(86362001)(4326008)(66946007)(66556008)(31696002)(8676002)(8936002)(66476007)(478600001)(2616005)(186003)(6506007)(53546011)(26005)(6512007)(316002)(6486002)(54906003)(966005)(6666004)(41300700001)(31686004)(36756003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MTNrc3hxSDdRWXE3dVZvUWU5MzFwRnBxZWw5WkVESVlKSFNjeVZNeW1BRmtC?= =?utf-8?B?YlFwUm12U0xaUXJCNW5PMUNSWEhmVy9tTTRhSmZkbWVVbU9MRUJWRkxRd2ZK?= =?utf-8?B?ck1tUG9pSXNiWDRJVTdiRGpKM01sZmR1d1VhNFprRld4NjJQbWM2VE5ZRVVu?= =?utf-8?B?NWFXRGtSVVUraFhDYXUybzJLY1J6WWJVaXg2OG1iK1ExbisxSXlSUzhrUjVY?= =?utf-8?B?MDNqdndieHR3Qlh0U1hyNTlFbktxb1J5UW9Oa1AzSU5LRktBU2duT3I3OG5i?= =?utf-8?B?L2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m5xaXJzb282dTlYYlNXdVNB?= =?utf-8?Q?22CM8QbKhenuEmgNu6xZUbUSM?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: f03e7b48-0c35-43f4-1f73-08daf8d3e54e X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5229.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2023 21:43:40.1341 (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: kjt4dglD37uoFd+SFiVVkdMQu4U6Xm9J+9lxdRU1KgGD+QMqa2WNaM75M43Z3UgmpG+5qZYIyTEwUPUg5dF4nw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5225 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/17/23 10:49, Ard Biesheuvel wrote: > On Mon, 16 Jan 2023 at 21:10, Tom Lendacky wrote: >> >> 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 >> > > Right, I didn't realize these things were related. > > In any case, those patches have been merged now - care to check > whether the issue has been resolved? Thanks. Yes, the issue is now resolved. Thanks, Tom