From: "Jan Beulich" Subject: Re: [Xen-devel] [PATCH][XSA-126] xen: limit guest control of PCI command register Date: Mon, 08 Jun 2015 11:55:22 +0100 Message-ID: <557590BA020000780008201C@mail.emea.novell.com> References: <552BD57B0200007800071763@mail.emea.novell.com> <20150413144223-mutt-send-email-mst@redhat.com> <552BD7DA0200007800071783@mail.emea.novell.com> <20150420153915-mutt-send-email-mst@redhat.com> <553524690200007800073D57@mail.emea.novell.com> <20150420162712-mutt-send-email-mst@redhat.com> <20150607082252-mutt-send-email-mst@redhat.com> <557563A10200007800081D1F@mail.emea.novell.com> <55754DAB.2070102@citrix.com> <557576760200007800081DC8@mail.emea.novell.com> <20150608113130-mutt-send-email-mst@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20150608113130-mutt-send-email-mst@redhat.com> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: "Michael S. Tsirkin" Cc: xen-devel@lists.xensource.com, pmatouse@redhat.com, Stefano Stabellini , Andrew Cooper , qemu-devel@nongnu.org, Malcolm Crossley List-Id: xen-devel@lists.xenproject.org >>> On 08.06.15 at 11:36, wrote: > On Mon, Jun 08, 2015 at 10:03:18AM +0100, Jan Beulich wrote: >> >>> On 08.06.15 at 10:09, wrote: >> > I believe the correct behaviour is happening but a PCIE completion = timeout=20 >> > is occurring instead of a >> > unsupported request. >>=20 >> Might it be that with the supposedly correct device returning UR >> the root port reissues the request to the sibling device, which then >> fails it in a more dramatic way (albeit the sibling's Uncorrectable >> Error Status Register also has only Unsupported Request Error >> Status set)? >=20 > Isn't the sibling a function on the same device? Yes. > And is the request causing the UR a memory read? No, it's a write according to the ITP log. > If so doesn't this use address routing? > What does it mean that the request is "to the sibling device" then? The way I expressed things above may simply be due to my limited knowledge of PCIe terminology: I simply don't know (and can't find this spelled out in the spec) what the root port's behavior ought to be when a transaction comes in with an address that's within one of its base/limit regions, but none of the endpoints can fulfill the request. But you asking this made me look more closely at the memory ranges dumped out to the ITP log: The root port has 0x20: Memory Base =3D 0xca40 0x22: Memory Limit =3D 0xca40 0x24: Prefetchable Mem Base =3D 0xca21 0x26: Prefetchable Mem Limit =3D 0xca21 while function 0 has 0x10: Base Address Register 0 =3D 0xca23000c (Memory space, 64-bit = access, prefetchable) 0x18: Base Address Register 2 =3D 0xca24000c (Memory space, 64-bit = access, prefetchable) 0x20: Base Address Register 4 =3D 0xca25000c (Memory space, 64-bit = access, prefetchable) and function 1 0x10: Base Address Register 0 =3D 0xca20000c (Memory space, 64-bit = access, prefetchable) 0x18: Base Address Register 2 =3D 0xca21000c (Memory space, 64-bit = access, prefetchable) 0x20: Base Address Register 4 =3D 0xca22000c (Memory space, 64-bit = access, prefetchable) Isn't is bogus for all but one of the BARs being outside the root ports prefetchable memory window (the MSI-X tables being inside the BAR 4 region in both cases)? > Does the sibling device have a BAR overlapping the address? No, its BARs are fully separate. Jan