Re: [PATCHSETS #2] KVM device passthrough support with AMD IOMMU

From: Joerg Roedel
Date: Mon Dec 15 2008 - 06:29:40 EST


On Wed, Dec 10, 2008 at 06:48:23PM +0000, David Woodhouse wrote:
> On Wed, 2008-12-10 at 19:42 +0100, Joerg Roedel wrote:
> > Ok, I add it, thanks. Who is the author, Mike or you?
>
> Might as well attribute it to Mike; he spotted it.

Ok, here is what I applied, fyi.

--
| AMD Saxony Limited Liability Company & Co. KG
Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
System | Register Court Dresden: HRA 4896
Research | General Partner authorized to represent:
Center | AMD Saxony LLC (Wilmington, Delaware, US)
| General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
commit 8876830866c8c9e4471a578a4e474eeef80e98dd
Author: Mike Day <ncmike@xxxxxxxxxxx>
Date: Fri Dec 12 17:16:30 2008 +0100

intel-iommu: fix bit shift at DOMAIN_FLAG_P2P_MULTIPLE_DEVICES

Signed-off-by: Mike Day <ncmike@xxxxxxxxxxx>
Signed-off-by: Joerg Roedel <joerg.roedel@xxxxxxx>

diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 772fb22..f39af75 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -204,7 +204,7 @@ static inline bool dma_pte_present(struct dma_pte *pte)
}

/* devices under the same p2p bridge are owned in one domain */
-#define DOMAIN_FLAG_P2P_MULTIPLE_DEVICES (1 < 0)
+#define DOMAIN_FLAG_P2P_MULTIPLE_DEVICES (1 << 0)

/* domain represents a virtual machine, more than one devices
* across iommus may be owned in one domain, e.g. kvm guest.