From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.65697.1673247773086065331 for ; Sun, 08 Jan 2023 23:02:54 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KRRG54tL; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673247772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iG86j34uc1WK0D24iChip7PZbir7MgB6U5lZoNzOFns=; b=KRRG54tLVNOn1zhJ0YAInx2hsGspnhoDbaSBALUf41xBEZkA6sp4VDKPuzQ4j6TlyKLyG3 l3utqhsSITPDcvo4+Q3NcixlPIGEqXhG9rItcW4op+axvg83bnN8E0Vtk6/K8wLg9QYCaz Ay7o7MTX1yi3rTdl5n8hoWLOW31Bigo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-629-mFAFsvN9M-WkYngKhZ_qAw-1; Mon, 09 Jan 2023 02:02:47 -0500 X-MC-Unique: mFAFsvN9M-WkYngKhZ_qAw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8C904101A55E; Mon, 9 Jan 2023 07:02:46 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.238]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 537782166B26; Mon, 9 Jan 2023 07:02:46 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 033341800393; Mon, 9 Jan 2023 08:02:45 +0100 (CET) Date: Mon, 9 Jan 2023 08:02:44 +0100 From: "Gerd Hoffmann" To: devel@edk2.groups.io, pedro.falcato@gmail.com Cc: Ard Biesheuvel , =?utf-8?B?TMOhc3psw7Mgw4lyc2Vr?= , Jordan Justen , Pawel Polawski , Oliver Steffen , Jiewen Yao Subject: Re: [edk2-devel] [PATCH 2/2] OvmfPkg/PlatformInitLib: check 64bit mmio window for resource conflicts Message-ID: <20230109070244.txlzhnazphkl5unl@sirius.home.kraxel.org> References: <20230106140403.2889131-1-kraxel@redhat.com> <20230106140403.2889131-3-kraxel@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 06, 2023 at 08:39:38PM +0000, Pedro Falcato wrote: > On Fri, Jan 6, 2023 at 2:04 PM Gerd Hoffmann wrote: > > > Add new operation mode to PlatformScanOrAdd64BitE820Ram() which checks > > whenever any reservations from the qemu e820 table overlap with the mmio > > window. Should that be the case move it to avoid the conflict. > > > Hi, > > In what case could this happen? Does QEMU ever place e820 entries inside > the PCI MMIO window? Why? Well, the *firmware* picks where it places the PCI MMIO window. So it's not qemu creating a conflict ;) > (In fact, when does QEMU even add a reservation in the e820? I've never > seen one.) New enough qemu adds a reservation just below 1TB when running on AMD processors (or emulating one with tcg). That window is used by the iommu. take care, Gerd