Received: from eggs.gnu.org ([2001:4830:134:3::10]:52331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1df6B9-0006BU-78 for qemu-devel@nongnu.org; Tue, 08 Aug 2017 11:12:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1df6B7-0006Ak-1n for qemu-devel@nongnu.org; Tue, 08 Aug 2017 11:12:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53186) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1df6B6-0006A4-Rd for qemu-devel@nongnu.org; Tue, 08 Aug 2017 11:12:16 -0400 References: <1501964858-5159-1-git-send-email-zuban32s@gmail.com> <1501964858-5159-6-git-send-email-zuban32s@gmail.com> From: Laszlo Ersek Message-ID: <87e569e6-e1ec-4238-e073-38c0e136af0d@redhat.com> Date: Tue, 8 Aug 2017 17:11:46 +0200 MIME-Version: 1.0 In-Reply-To: <1501964858-5159-6-git-send-email-zuban32s@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 5/5] docs: update documentation considering PCIE-PCI bridge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aleksandr Bezzubikov , qemu-devel@nongnu.org Cc: ehabkost@redhat.com, mst@redhat.com, seabios@seabios.org, kevin@koconnor.net, kraxel@redhat.com, pbonzini@redhat.com, marcel@redhat.com, imammedo@redhat.com, rth@twiddle.net one comment below On 08/05/17 22:27, Aleksandr Bezzubikov wrote: > +Capability layout (defined in include/hw/pci/pci_bridge.h): > + > + uint8_t id; Standard PCI capability header field > + uint8_t next; Standard PCI capability header field > + uint8_t len; Standard PCI vendor-specific capability header field > + > + uint8_t type; Red Hat vendor-specific capability type > + List of currently existing types: > + QEMU_RESERVE = 1 > + > + > + uint32_t bus_res; Minimum number of buses to reserve > + > + uint64_t io; IO space to reserve > + uint64_t mem Non-prefetchable memory to reserve > + uint64_t mem_pref; Prefetchable memory to reserve (I apologize if I missed any concrete points from the past messages regarding this structure.) How is the firmware supposed to know whether the prefetchable MMIO reservation should be made in 32-bit or 64-bit address space? If we reserve prefetchable MMIO outside of the 32-bit address space, then hot-plugging a device without 64-bit MMIO support could fail. My earlier request, to distinguish "prefetchable_32" from "prefetchable_64" (mutually exclusively), was so that firmware would know whether to restrict the MMIO reservation to 32-bit address space. This is based on an earlier email from Alex to me: On 10/03/16 18:01, Alex Williamson wrote: > I don't think there's such a thing as a 64-bit non-prefetchable > aperture. In fact, there are not separate 32 and 64 bit prefetchable > apertures. The apertures are: > > I/O base/limit - (default 16bit, may be 32bit) > Memory base/limit - (32bit only, non-prefetchable) > Prefetchable Memory base/limit - (default 32bit, may be 64bit) > > This is according to Table 3-2 in the PCI-to-PCI bridge spec rev 1.2. I don't care much about the 16-bit vs. 32-bit IO difference (that's entirely academic and the Platform Spec init doesn't even provide a way for OVMF to express such a difference). However, the optional restriction to 32-bit matters for the prefetchable MMIO aperture. Other than this, the patch looks good to me, and I'm ready to R-b. Thanks! Laszlo