Commit 4a906e49 authored by Weidong Han's avatar Weidong Han Committed by Avi Kivity

KVM: fix kvm_vm_ioctl_deassign_device

only need to set assigned_dev_id for deassignment, use
match->flags to judge and deassign it.
Acked-by: default avatarMark McLoughlin <markmc@redhat.com>
Signed-off-by: default avatarWeidong Han <weidong.han@intel.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 2df8a40b
......@@ -517,7 +517,7 @@ static int kvm_vm_ioctl_deassign_device(struct kvm *kvm,
goto out;
}
if (assigned_dev->flags & KVM_DEV_ASSIGN_ENABLE_IOMMU)
if (match->flags & KVM_DEV_ASSIGN_ENABLE_IOMMU)
kvm_deassign_device(kvm, match);
kvm_free_assigned_device(kvm, match);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment