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.6503.1643960393517464678 for ; Thu, 03 Feb 2022 23:39:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QRW2Yfl3; 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=1643960392; 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=weDKvoG7I89k3+y0e+1iPg4+Lh353iq3/Qn8Lv3QVPY=; b=QRW2Yfl32BYLz2bdk43jcQIY3DnXOtn0NsYo1GDroQfvfLH5jRmEF7p2WFiWRk2QRd+tPG 8Zpph2bOYF9lXGJeQgdcokzR8Zn+wzNWlrweT+di4PjXRVmrqWMO3PWDp7dkrbzM2b1CgR lBAc6MGGqpNDjjOx/hgz4oXBXFM23lk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-97-UXESqjqdOrq6Ccqv0SMt6g-1; Fri, 04 Feb 2022 02:39:47 -0500 X-MC-Unique: UXESqjqdOrq6Ccqv0SMt6g-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C0B77185305F; Fri, 4 Feb 2022 07:39:45 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 60924105C88A; Fri, 4 Feb 2022 07:39:45 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C13D1180039F; Fri, 4 Feb 2022 08:39:43 +0100 (CET) Date: Fri, 4 Feb 2022 08:39:43 +0100 From: "Gerd Hoffmann" To: Nicolas Ojeda Leon Cc: devel@edk2.groups.io, atugup@amazon.com, Alexander Graf Subject: Re: [PATCH v4 5/8] OvmfPkg/PciHostBridgeUtilityLib: Initialize RootBridges apertures with spec Message-ID: <20220204073943.zgzb5norazspewa3@sirius.home.kraxel.org> References: <048b039ecfad8765487246c4b1c5d928a91c57aa.1643919691.git.ncoleon@amazon.com> MIME-Version: 1.0 In-Reply-To: <048b039ecfad8765487246c4b1c5d928a91c57aa.1643919691.git.ncoleon@amazon.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 03, 2022 at 09:56:25PM +0100, Nicolas Ojeda Leon wrote: > Consume the host-provided specification of PCI host bridges if > available. Using the DxeHardwareInfoLib, populate a list of > hardware descriptors based on the content of the "hardware-info" > fw-cfg file, if provided. In the affirmative case, use the > resources and attributes specified by the hypervisor for each > Host Bridge to create the RootBridge elements. > > In Ovmf platforms, the host can provide the specification of > non-discoverable hardware resources like PCI host bridges. If the > proper fw-cfg file is found, parse the contents provided by the > host into a linked list by using the Hardware Info library. Then, > using the list of PCI host bridges' descriptions, populate the > PCI_ROOT_BRIDGES array with the resources and attributes specified > by the host. If the file is not provided or no Host Bridge is found > in it, fold back to the legacy method based on pre-defined > apertures and rules. > > In some use cases, the host requires additional control over the > hardware resources' configurations in the guest for performance and > discoverability reasons. For instance, to disclose information about > the PCI hierarchy to the guest so that this can profit from > optimized accesses. In this case, the host can decide to describe > multiple PCI Host Bridges and provide a specific set of resources > (e.g. MMIO apertures) so that the guest uses the values provided. > Using the provided values may entitle the guest to added performance, > for example by using specific MMIO mappings that can enable peer-to-peer > communication across the PCI hierarchy or by allocating memory closer > to a device for faster DMA transactions. > > Cc: Alexander Graf > Cc: Gerd Hoffmann > > Signed-off-by: Nicolas Ojeda Leon Acked-by: Gerd Hoffmann