From patchwork Thu Nov 6 23:18:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 407906 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D6D021400A0 for ; Fri, 7 Nov 2014 10:33:00 +1100 (AEDT) Received: from localhost ([::1]:57126 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmWXy-0005Yr-Qv for incoming@patchwork.ozlabs.org; Thu, 06 Nov 2014 18:32:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmWWp-0004kb-IH for qemu-devel@nongnu.org; Thu, 06 Nov 2014 18:32:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmWVw-0000VM-B8 for qemu-devel@nongnu.org; Thu, 06 Nov 2014 18:31:47 -0500 Received: from indium.canonical.com ([91.189.90.7]:50323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmWVw-0000VA-64 for qemu-devel@nongnu.org; Thu, 06 Nov 2014 18:30:52 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1XmWVv-00079h-Hg for ; Thu, 06 Nov 2014 23:30:51 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 7F79E2E80C2 for ; Thu, 6 Nov 2014 23:30:51 +0000 (UTC) MIME-Version: 1.0 Date: Thu, 06 Nov 2014 23:18:19 -0000 From: Alex Williamson To: qemu-devel@nongnu.org X-Launchpad-Bug: product=qemu; status=New; importance=Undecided; assignee=None; X-Launchpad-Bug-Information-Type: Public X-Launchpad-Bug-Private: no X-Launchpad-Bug-Security-Vulnerability: no X-Launchpad-Bug-Commenters: alex-l-williamson flo-at X-Launchpad-Bug-Reporter: Florian Wickert (flo-at) X-Launchpad-Bug-Modifier: Alex Williamson (alex-l-williamson) References: <20141023194249.8096.62457.malonedeb@chaenomeles.canonical.com> Message-Id: <20141106231820.1158.51330.malone@wampee.canonical.com> X-Launchpad-Message-Rationale: Subscriber (QEMU) @qemu-devel-ml Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="17231"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: bcdb8af608ea9731f286fcf3a6219595c6838800 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 91.189.90.7 Subject: [Qemu-devel] [Bug 1384892] Re: RTL8168 NIC VFIO not working anymore since QEMU 2.1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Reply-To: Bug 1384892 <1384892@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Does this improve anything? Reviewing the quirk seems to show there's a bug in how we're writing to the MSI-X table. Not sure how it worked before. Tested this with a Win8.1 VM and assigned RTL8111/8168/8411. Thanks. --- a/hw/misc/vfio.c +++ b/hw/misc/vfio.c @@ -1834,8 +1834,8 @@ static void vfio_rtl8168_window_quirk_write(void *opaque, hwaddr addr, vdev->host.bus, vdev->host.slot, vdev->host.function); io_mem_write(&vdev->pdev.msix_table_mmio, - (hwaddr)(quirk->data.address_match & 0xfff), - data, size); + (hwaddr)(data & 0xfff), + (uint64_t)quirk->data.address_mask, size); } quirk->data.flags = 1;