diff options
author | Alexander Graf <agraf@suse.de> | 2013-02-13 11:56:14 (GMT) |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-02-13 11:56:14 (GMT) |
commit | dd92d6f2749c43ebab91c4762a1bc79e6523e936 (patch) | |
tree | 6e6730bdd09284679c0861df6d0fcbec08ea7a87 /virt/kvm/iommu.c | |
parent | b9e3e208935e95ad62bd1b1bc4408c23a9ae3ada (diff) | |
parent | b0da5bec30eca7ffbb2c89afa6fe503fd418d3a6 (diff) | |
download | linux-fsl-qoriq-dd92d6f2749c43ebab91c4762a1bc79e6523e936.tar.xz |
Merge commit 'origin/next' into kvm-ppc-next
Diffstat (limited to 'virt/kvm/iommu.c')
-rw-r--r-- | virt/kvm/iommu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c index 4a340cb..72a130b 100644 --- a/virt/kvm/iommu.c +++ b/virt/kvm/iommu.c @@ -76,7 +76,9 @@ int kvm_iommu_map_pages(struct kvm *kvm, struct kvm_memory_slot *slot) gfn = slot->base_gfn; end_gfn = gfn + slot->npages; - flags = IOMMU_READ | IOMMU_WRITE; + flags = IOMMU_READ; + if (!(slot->flags & KVM_MEM_READONLY)) + flags |= IOMMU_WRITE; if (kvm->arch.iommu_flags & KVM_IOMMU_CACHE_COHERENCY) flags |= IOMMU_CACHE; |