提交 4a906e49 编写于 作者: W Weidong Han 提交者: 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: NMark McLoughlin <markmc@redhat.com>
Signed-off-by: NWeidong Han <weidong.han@intel.com>
Signed-off-by: NAvi Kivity <avi@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册