From ad0d217ca645477ba30c2f3cf1a5bbb7ef18b1fd Mon Sep 17 00:00:00 2001 From: Ethan Zhao Date: Tue, 9 Sep 2014 10:21:26 +0800 Subject: 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 Signed-off-by: Bjorn Helgaas Acked-by: Paolo Bonzini --- virt/kvm/iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'virt/kvm/iommu.c') diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c index 714b94932312..e723bb91aa34 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"); -- cgit v1.2.3