Skip to content

Commit

Permalink
KVM: fix kvm_vm_ioctl_deassign_device
Browse files Browse the repository at this point in the history
only need to set assigned_dev_id for deassignment, use
match->flags to judge and deassign it.

Acked-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Weidong Han authored and Avi Kivity committed Mar 24, 2009
1 parent 2df8a40 commit 4a906e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4a906e4

Please sign in to comment.