From: "Jan Beulich" Subject: Re: [Xen-devel] [PATCH][XSA-126] xen: limit guest control of PCI command register Date: Mon, 08 Jun 2015 10:03:18 +0100 Message-ID: <557576760200007800081DC8@mail.emea.novell.com> References: <552B97A00200007800071558@mail.emea.novell.com> <20150413125101-mutt-send-email-mst@redhat.com> <552BC5EA02000078000716E7@mail.emea.novell.com> <20150413133843-mutt-send-email-mst@redhat.com> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <55754DAB.2070102@citrix.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: Malcolm Crossley Cc: xen-devel@lists.xensource.com, pmatouse@redhat.com, "Michael S. Tsirkin" , Andrew Cooper , Stefano Stabellini , qemu-devel@nongnu.org List-Id: xen-devel@lists.xenproject.org >>> On 08.06.15 at 10:09, wrote: > On 08/06/15 08:42, Jan Beulich wrote: >> Not really. All we concluded so far is that _maybe_ the bridge, upon >> seeing the UR, generates a Master Abort, rendering the whole thing >> fatal. Otoh the respective root port also has >> - Received Master Abort set in its Secondary Status register (but >> that's also already the case in the log that we have before the UR >> occurs, i.e. that doesn't mean all that much), >> - Received System Error set in its Secondary Status register (and >> after the UR the sibling endpoint [UR originating from 83:00.0, >> sibling being 83:00.1] also shows Signaled System Error set). >>=20 >=20 > Disabling the Memory decode in the command register could also result in = a=20 > completion timeout on the > root port issuing a transaction towards the PCI device in question. = PCIE=20 > completion timeouts can be > escalated to Fatal AER errors which trigger system firmware to inject = NMI's=20 > into the host. And how does all that play with PC compatibility (where writes into no-where get dropped, and reads from no-where get all ones returned)? Remember - we#re talking about CPU side accesses here. > Here is an example AER setup for a PCIE root port. You can see = UnsupReq=20 > errors are masked and so do > not trigger errors. CmpltTO ( completion timeout) errors are not masked = and=20 > the errors are treated > as Fatal because the corresponding bit in the Uncorrectable Severity=20 > register is set. >=20 > Capabilities: [148 v1] Advanced Error Reporting > UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- = MalfTLP- ECRC- UnsupReq-=20 > ACSViol- > UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt+ UnxCmplt+ RxOF- = MalfTLP- ECRC-=20 > UnsupReq+ ACSViol+ > UESvrt: DLP+ SDES+ TLP+ FCP+ CmpltTO+ CmpltAbrt- UnxCmplt- RxOF+ = MalfTLP+ ECRC-=20 > UnsupReq- ACSViol- > CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr- > CEMsk: RxErr+ BadTLP+ BadDLLP+ Rollover+ Timeout+ NonFatalErr+ > AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn- >=20 > A root port completion timeout will also result in the master abort = bit=20 > being set. >=20 > Typically system firmware clears the error in the AER registers after = it's=20 > processed it. So the > operating system may not be able to determine what error triggered the = NMI=20 > in the first place. Right, but in the case at hand we have an ITP log available, which increases the hope that we see a reasonably complete picture. >>> Do we can chalk this up to hardware bugs on a specific box? >>=20 >> I have to admit that I'm still very uncertain whether to consider all >> this correct behavior, a firmware flaw, or a hardware bug. > I believe the correct behaviour is happening but a PCIE completion = timeout=20 > is occurring instead of a > unsupported request. 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)? Jan