From patchwork Fri Feb 19 15:18:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 8361991 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2ACC7C0553 for ; Fri, 19 Feb 2016 15:19:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 895AC20458 for ; Fri, 19 Feb 2016 15:19:04 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EE4DD20452 for ; Fri, 19 Feb 2016 15:19:03 +0000 (UTC) Received: from localhost ([::1]:53091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWmpi-0000C4-TU for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Feb 2016 10:19:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWmpW-0000AB-5X for qemu-devel@nongnu.org; Fri, 19 Feb 2016 10:18:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWmpR-0004qP-63 for qemu-devel@nongnu.org; Fri, 19 Feb 2016 10:18:50 -0500 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:33071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWmpQ-0004qK-T7; Fri, 19 Feb 2016 10:18:45 -0500 Received: by mail-pf0-x241.google.com with SMTP id c10so3703602pfc.0; Fri, 19 Feb 2016 07:18:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=P4y4HZngNqKkXp4zL/hFYI5tApbLwjKObiDZvKNIdFw=; b=j3nY7mqtlknPoEtqTzOuNn5//a0J1PKsr6Juw5PGTn0j4gf5aaO3UcR6lO6RMh88jt nHzlSfj2qBbKvUMue5n9exKBinZrn4u1l3gw0o4w1IZXqLet94SWyKZl8ti/ito7FuoZ UHsLiCz42RYhY4xA+rj6HtNFNTkdWS++Fgg3bh5nIvsCn9UFeW0ChsYW/rZ67VPAMmz0 bdtg2wTYKGfws8cEWDej28xJr5uX1n7gOpnBz6dFqbOYxV0n2IWqSZy7yUJKuCwgEUWX gz4zvrWx6sPhf8WR+aBjHUQwCLHtF7x2DqGCdfqxcwWQFYxKlQ5dK0QcLCT/jZpMyrwD hN6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=P4y4HZngNqKkXp4zL/hFYI5tApbLwjKObiDZvKNIdFw=; b=kpXAkHQXAB4XnDAUFibxzScNhmND7CxpI6Gp4hq9tpRyu5XYqUAWPeEdKgA5wmOFPE FgBHdXfTLeish02J3tgJLEbCEiXJ6w+J7fyhXA8/i7sPnSqa7jogYbmvOmli6iX9gQ9i mCbIB+2jTLzQpIOvkxq76nma/DsBqqvW6PqqOTU7BNo/XV69S/KUxX2jkZD5qbo+yf4P tYmI4G3PAmgs/iOceJ76a8XQI79er/0BtQUQIlOUEtmJ41jLAuI/L24LjJ8yQ7g0EuIo stADmWhqwayX0TYXwAQaOG9Mvhf6gPHKageb9BysgnShXU5CYXXB/4fuD9UCohI/hCTL XoPg== X-Gm-Message-State: AG10YOQYRqC+t2QvEjOoD69WL5KzBR34CGRmxtr7120RQlSFF4rOqyrS61UkBZavWOjBBw== X-Received: by 10.98.72.24 with SMTP id v24mr18549341pfa.15.1455895123928; Fri, 19 Feb 2016 07:18:43 -0800 (PST) Received: from localhost ([45.32.44.20]) by smtp.gmail.com with ESMTPSA id e20sm18609186pfd.4.2016.02.19.07.18.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Feb 2016 07:18:43 -0800 (PST) From: Wei Yang To: Date: Fri, 19 Feb 2016 15:18:10 +0000 Message-Id: <1455895091-7589-2-git-send-email-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1455895091-7589-1-git-send-email-richard.weiyang@gmail.com> References: <1455895091-7589-1-git-send-email-richard.weiyang@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::241 Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, Wei Yang Subject: [Qemu-devel] [PATCH 1/2] vfio/pci: use PCI_MSIX_FLAGS on retrieving the MSIX entries X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Even PCI_CAP_FLAGS has the same value as PCI_MSIX_FLAGS, the later one is the more proper on retrieving MSIX entries. This patch uses PCI_MSIX_FLAGS to retrieve the MSIX entries. Signed-off-by: Wei Yang --- hw/vfio/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index e66c47f..321423b 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -1210,7 +1210,7 @@ static int vfio_msix_early_setup(VFIOPCIDevice *vdev) } if (pread(fd, &ctrl, sizeof(ctrl), - vdev->config_offset + pos + PCI_CAP_FLAGS) != sizeof(ctrl)) { + vdev->config_offset + pos + PCI_MSIX_FLAGS) != sizeof(ctrl)) { return -errno; }