OSDN Git Service

KVM: pci-assign: do not map smm memory slot pages in vt-d page tables
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / virt / kvm / kvm_main.c
index cb092bd..d080f06 100644 (file)
@@ -986,7 +986,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
         * changes) is disallowed above, so any other attribute changes getting
         * here can be skipped.
         */
-       if ((change == KVM_MR_CREATE) || (change == KVM_MR_MOVE)) {
+       if (as_id == 0 && (change == KVM_MR_CREATE || change == KVM_MR_MOVE)) {
                r = kvm_iommu_map_pages(kvm, &new);
                return r;
        }