summaryrefslogtreecommitdiffstats
path: root/virt/kvm/iommu.c
diff options
context:
space:
mode:
authorEthan Zhao <ethan.zhao@oracle.com>2014-09-09 10:21:26 +0800
committerBjorn Helgaas <bhelgaas@google.com>2014-09-16 16:18:40 -0600
commitad0d217ca645477ba30c2f3cf1a5bbb7ef18b1fd (patch)
treee7ae854942fa8df8538176afd6708963d3100d60 /virt/kvm/iommu.c
parentce0529843a505d09f5809a7db6288d2f038f64c4 (diff)
KVM: Use PCI device flag helper functions
Use PCI device flag helper functions when assigning or releasing device. No functional change. Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt/kvm/iommu.c')
-rw-r--r--virt/kvm/iommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c
index 714b9493231..e723bb91aa3 100644
--- a/virt/kvm/iommu.c
+++ b/virt/kvm/iommu.c
@@ -203,7 +203,7 @@ int kvm_assign_device(struct kvm *kvm,
goto out_unmap;
}
- pdev->dev_flags |= PCI_DEV_FLAGS_ASSIGNED;
+ pci_set_dev_assigned(pdev);
dev_info(&pdev->dev, "kvm assign device\n");
@@ -229,7 +229,7 @@ int kvm_deassign_device(struct kvm *kvm,
iommu_detach_device(domain, &pdev->dev);
- pdev->dev_flags &= ~PCI_DEV_FLAGS_ASSIGNED;
+ pci_clear_dev_assigned(pdev);
dev_info(&pdev->dev, "kvm deassign device\n");