Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0292e169 authored by Herongguang (Stephen)'s avatar Herongguang (Stephen) Committed by Paolo Bonzini
Browse files

KVM: pci-assign: do not map smm memory slot pages in vt-d page tables



or VM memory are not put thus leaked in kvm_iommu_unmap_memslots() when
destroy VM.

This is consistent with current vfio implementation.

Signed-off-by: default avatarherongguang <herongguang.he@huawei.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 90db1043
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1065,7 +1065,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;
	}