From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] dev-assignment: handle device with incorrect PCIe Cap structure size Date: Mon, 1 Aug 2011 12:56:28 -0300 Message-ID: <20110801155628.GC4285@amt.cnet> References: <20110726203722.39565.29092.stgit@dddsys0.bos.redhat.com> <20110801155045.GB4285@amt.cnet> <4E36CC0D.7070907@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Donald Dutile , kvm@vger.kernel.org, alex.williamson@redhat.com, mst@redhat.com To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:35465 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753842Ab1HARja (ORCPT ); Mon, 1 Aug 2011 13:39:30 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p71HdARV030125 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Aug 2011 13:39:30 -0400 Content-Disposition: inline In-Reply-To: <4E36CC0D.7070907@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Aug 01, 2011 at 06:53:49PM +0300, Avi Kivity wrote: > On 08/01/2011 06:50 PM, Marcelo Tosatti wrote: > >On Tue, Jul 26, 2011 at 06:08:09PM -0400, Donald Dutile wrote: > >> The bcm5761 provides a PCIe Cap structure (capid=0x10) > >> that is invalid, providing one that is 8 bytes shorter > >> than the v2 PCIe spec defines. > >> This leads to a memory corruption when mapped for device-assigment. > >> > >> Add a check in assigned_device_pci_cap_init() to correct > >> this hw error for this device, and try to catch other ones > >> and print warnings if they exists. > >> > >> Signed-off-by: Donald Dutile > >> cc: Alex Williamson > >> cc: Michael S. Tsirking > > > >Patch does not apply cleanly, complaints about trailing whitespaces. > > > >Please regenerate against current git tree, thanks. > > > > I thought I applied it already, I even remember the trailing > whitespace complaints (which git fixed for me). > > I hope we didn't lose other patches this way. OK. Its not lost: commit f9c29774d2174df6ffc20becec20928948198914 Author: Donald Dutile Date: Tue Jul 26 18:08:09 2011 -0400 device-assignment: handle device with incorrect PCIe Cap structure size