Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125575
b: refs/heads/master
c: 1ce28fe
h: refs/heads/master
i:
  125573: e7788fd
  125571: 98286a9
  125567: 01a407c
v: v3
  • Loading branch information
Weidong Han authored and Joerg Roedel committed Jan 3, 2009
1 parent 2305d47 commit 95bfc52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8e604097ddc483eb1e6e99564953e4e937fe439a
refs/heads/master: 1ce28feb22833645a0f3843cd873a0b56ed19ef0
7 changes: 7 additions & 0 deletions trunk/drivers/pci/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ 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)

/* domain represents a virtual machine, more than one devices
* across iommus may be owned in one domain, e.g. kvm guest.
*/
#define DOMAIN_FLAG_VIRTUAL_MACHINE (1 << 1)

struct dmar_domain {
int id; /* domain id */
unsigned long iommu_bmp; /* bitmap of iommus this domain uses*/
Expand Down Expand Up @@ -391,6 +396,8 @@ static struct intel_iommu *domain_get_iommu(struct dmar_domain *domain)
{
int iommu_id;

BUG_ON(domain->flags & DOMAIN_FLAG_VIRTUAL_MACHINE);

iommu_id = find_first_bit(&domain->iommu_bmp, g_num_of_iommus);
if (iommu_id < 0 || iommu_id >= g_num_of_iommus)
return NULL;
Expand Down

0 comments on commit 95bfc52

Please sign in to comment.