From: "Jan Beulich" Subject: Re: [Xen-devel] [PATCH][XSA-126] xen: limit guest control of PCI command register Date: Mon, 13 Apr 2015 13:40:59 +0100 Message-ID: <552BD57B0200007800071763@mail.emea.novell.com> References: <20150401103411-mutt-send-email-mst@redhat.com> <551BBD38.60204@citrix.com> <20150401115032-mutt-send-email-mst@redhat.com> <552B97A00200007800071558@mail.emea.novell.com> <20150413125101-mutt-send-email-mst@redhat.com> <552BC5EA02000078000716E7@mail.emea.novell.com> <20150413133843-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: <20150413133843-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: Andrew Cooper , xen-devel@lists.xensource.com, pmatouse@redhat.com, qemu-devel@nongnu.org, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org >>> On 13.04.15 at 13:47, wrote: > On Mon, Apr 13, 2015 at 12:34:34PM +0100, Jan Beulich wrote: >> >>> On 13.04.15 at 13:19, wrote: >> > Yes Linux can't fix firmware 1st mode, but >> > PCI express spec says what firmware should do in this case: >> >=20 >> > IMPLEMENTATION NOTE Software UR Reporting Compatibility with 1.0a = Devices >> >=20 >> > With 1.0a device Functions, 96 if the Unsupported Request = Reporting=20 >=20 >> > Enable bit is set, the Function >> > when operating as a Completer will send an uncorrectable = error=20 >> > Message (if enabled) when a UR >> > error is detected. On platforms where an uncorrectable = error=20 > Message=20 >> > is handled as a System Error, >> > this will break PC-compatible Configuration Space probing, = so=20 >> > software/firmware on such >> > platforms may need to avoid setting the Unsupported Request=20= >> > Reporting Enable bit. >> > With device Functions implementing Role-Based Error Reporting,= =20 >> > setting the Unsupported Request >> > Reporting Enable bit will not interfere with PC-compatible=20 >> > Configuration Space probing, assuming >> > that the severity for UR is left at its default of non-fatal.= =20 >> > However, setting the Unsupported Request >> > Reporting Enable bit will enable the Function to report UR = errors=20 >> > detected with posted Requests, >> > helping avoid this case for potential silent data corruption. >> > On platforms where robust error handling and PC-compatible=20 >> > Configuration Space probing is >> > required, it is suggested that software or firmware have = the=20 >> > Unsupported Request Reporting Enable >> > bit Set for Role-Based Error Reporting Functions, but clear = for 1.0a=20 >=20 >> > Functions. Software or >> > firmware can distinguish the two classes of Functions by = examining=20 >> > the Role-Based Error Reporting >> > bit in the Device Capabilities register. >> >=20 >> >=20 >> > What I think you have is a very old 1.0a system, and you set = Unsupported >> > Request Reporting Enable. >> >=20 >> > Can you confirm? >>=20 >> No. In at least one of the two cases we got reports of the original >> problem, triggering the finding of this issue, this is a brand new one, >> only soon to become available publicly. Furthermore I'm being >> confused by the mention of PC-compatible config space probing >> above: The URs we talk about here don't result from config space >> accessed at all. >=20 > OK. Can you please explain why does UR cause a system error then? > It looks like a hardware bug: PCIE 1.1 seems to say it shouldn't. Quite possible. Looking at the ITP log we were provided, the UR severity bit is clear (non-fatal), yet the error got surfaced to the OS as a fatal one (I would guess because it validly gets flagged as uncorrectable at the same time). Jan