From patchwork Mon Nov 3 12:45:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 406145 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 0165C14008C for ; Mon, 3 Nov 2014 23:50:29 +1100 (AEDT) Received: from localhost ([::1]:34320 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlH5X-0007w9-CM for incoming@patchwork.ozlabs.org; Mon, 03 Nov 2014 07:50:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlH0d-0007b5-05 for qemu-devel@nongnu.org; Mon, 03 Nov 2014 07:45:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlH0U-0008NX-DE for qemu-devel@nongnu.org; Mon, 03 Nov 2014 07:45:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlH0U-0008MW-6p for qemu-devel@nongnu.org; Mon, 03 Nov 2014 07:45:14 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sA3CjAN1003427 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 3 Nov 2014 07:45:10 -0500 Received: from redhat.com (ovpn-116-73.ams2.redhat.com [10.36.116.73]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id sA3Cj8ou023163; Mon, 3 Nov 2014 07:45:09 -0500 Date: Mon, 3 Nov 2014 14:45:08 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1415018633-16041-9-git-send-email-mst@redhat.com> References: <1415018633-16041-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1415018633-16041-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Peter Maydell , Anthony Liguori Subject: [Qemu-devel] [PULL 08/29] intel_iommu: fix VTD_SID_TO_BUS 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org (((sid) >> 8) && 0xff) makes no sense (((sid) >> 8) & 0xff) seems to be what was meant. https://bugs.launchpad.net/qemu/+bug/1382477 Signed-off-by: Michael S. Tsirkin --- include/hw/i386/intel_iommu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/i386/intel_iommu.h b/include/hw/i386/intel_iommu.h index f4701e1..e321ee4 100644 --- a/include/hw/i386/intel_iommu.h +++ b/include/hw/i386/intel_iommu.h @@ -37,7 +37,7 @@ #define VTD_PCI_DEVFN_MAX 256 #define VTD_PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) #define VTD_PCI_FUNC(devfn) ((devfn) & 0x07) -#define VTD_SID_TO_BUS(sid) (((sid) >> 8) && 0xff) +#define VTD_SID_TO_BUS(sid) (((sid) >> 8) & 0xff) #define VTD_SID_TO_DEVFN(sid) ((sid) & 0xff) #define DMAR_REG_SIZE 0x230