Received: from eggs.gnu.org ([2001:4830:134:3::10]:41819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buO3H-00085e-W2 for qemu-devel@nongnu.org; Wed, 12 Oct 2016 14:14:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buO3C-00047Y-Qy for qemu-devel@nongnu.org; Wed, 12 Oct 2016 14:14:51 -0400 Received: from mout.gmx.net ([212.227.17.21]:50731) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buO3C-00046m-H4 for qemu-devel@nongnu.org; Wed, 12 Oct 2016 14:14:46 -0400 References: <4cad93cd-9762-896f-c858-b9480340524e@gmx.de> <20161010091823.756b3661@t450s.home> From: Thorsten Kohfeldt Message-ID: <38758ed6-32ea-71ba-12aa-e48193289c74@gmx.de> Date: Wed, 12 Oct 2016 20:14:39 +0200 MIME-Version: 1.0 In-Reply-To: <20161010091823.756b3661@t450s.home> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] vfio: Fix vfio_rtl8168_quirk_data_read address offset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: qemu-devel@nongnu.org Am 10.10.2016 um 17:18 schrieb Alex Williamson: > On Sun, 9 Oct 2016 19:56:03 +0200 > Thorsten Kohfeldt wrote: > >> From: Thorsten Kohfeldt >> Date: Sat, 24 Sep 2016 20:43:20 +0200 >> Subject: [PATCH] vfio: Fix vfio_rtl8168_quirk_data_read address offset >> >> Introductory comment for rtl8168 VFIO MSI-X quirk states: >> At BAR2 offset 0x70 there is a dword data register, >> offset 0x74 is a dword address register. >> vfio: vfio_bar_read(0000:05:00.0:BAR2+0x70, 4) = 0xfee00398 // read data >> >> Thus, correct offset for data read is 0x70, >> but function vfio_rtl8168_quirk_data_read() wrongfully uses offset 0x74. >> >> Signed-off-by: Thorsten Kohfeldt > > I need a real email address for these, can I replace this with your > gmx.de email? Thanks, > > Alex Yes, thank you for taking over from here. Regards, Thorsten >> --- >> hw/vfio/pci-quirks.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c >> index bec694c..1e97bc4 100644 >> --- a/hw/vfio/pci-quirks.c >> +++ b/hw/vfio/pci-quirks.c >> @@ -898,7 +898,7 @@ static uint64_t vfio_rtl8168_quirk_data_read(void *opaque, >> { >> VFIOrtl8168Quirk *rtl = opaque; >> VFIOPCIDevice *vdev = rtl->vdev; >> - uint64_t data = vfio_region_read(&vdev->bars[2].region, addr + 0x74, size); >> + uint64_t data = vfio_region_read(&vdev->bars[2].region, addr + 0x70, size); >> >> if (rtl->enabled && (vdev->pdev.cap_present & QEMU_PCI_CAP_MSIX)) { >> hwaddr offset = rtl->addr & 0xfff; > >