From: Han Weidong <[EMAIL PROTECTED]>

Signed-off-by: Ben-Ami Yassour <[EMAIL PROTECTED]>
---
 arch/x86/kvm/vtd.c        |    2 +-
 drivers/pci/intel-iommu.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/vtd.c b/arch/x86/kvm/vtd.c
index c2d9192..be775cd 100644
--- a/arch/x86/kvm/vtd.c
+++ b/arch/x86/kvm/vtd.c
@@ -157,7 +157,7 @@ int kvm_iommu_unmap_guest(struct kvm *kvm)
        struct kvm_pci_pt_dev_list *entry;
        struct pci_dev *pdev = NULL;
 
-       if (kvm->arch.domain)
+       if (!kvm->arch.domain)
                return 0;
 
        list_for_each_entry(entry, &kvm->arch.pci_pt_dev_head, list) {
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index d927a13..930874f 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -2483,7 +2483,7 @@ EXPORT_SYMBOL_GPL(kvm_intel_iommu_page_mapping);
 
 void kvm_intel_iommu_detach_dev(struct dmar_domain *domain, u8 bus, u8 devfn)
 {
-       kvm_intel_iommu_detach_dev(domain, bus, devfn);
+       detach_domain_for_dev(domain, bus, devfn);
 }
 EXPORT_SYMBOL_GPL(kvm_intel_iommu_detach_dev);
 
-- 
1.5.5.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to