xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <paul.durrant@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Paul Durrant <paul.durrant@citrix.com>,
	Brian Woods <brian.woods@amd.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: [PATCH 1/7] amd-iommu: don't domain_crash() inside map/unmap_page()
Date: Thu, 20 Sep 2018 15:11:43 +0100	[thread overview]
Message-ID: <20180920141149.1643-2-paul.durrant@citrix.com> (raw)
In-Reply-To: <20180920141149.1643-1-paul.durrant@citrix.com>

Commit c210cafb "iommu: don't domain_crash() inside iommu_map/unmap_page()"
removed the implicit domain_crash() from the iommu_ops wrapper functions.
This patch does the same thing in the AMD IOMMU implementation. This is a
necessary pre-requisite for implementation of PV IOMMU.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
---
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Brian Woods <brian.woods@amd.com>
---
 xen/drivers/passthrough/amd/iommu_map.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/xen/drivers/passthrough/amd/iommu_map.c b/xen/drivers/passthrough/amd/iommu_map.c
index c89c54fdb6..8a10412a07 100644
--- a/xen/drivers/passthrough/amd/iommu_map.c
+++ b/xen/drivers/passthrough/amd/iommu_map.c
@@ -653,7 +653,6 @@ int amd_iommu_map_page(struct domain *d, dfn_t dfn, mfn_t mfn,
         spin_unlock(&hd->arch.mapping_lock);
         AMD_IOMMU_DEBUG("Root table alloc failed, dfn = %"PRI_dfn"\n",
                         dfn_x(dfn));
-        domain_crash(d);
         return rc;
     }
 
@@ -666,7 +665,6 @@ int amd_iommu_map_page(struct domain *d, dfn_t dfn, mfn_t mfn,
             spin_unlock(&hd->arch.mapping_lock);
             AMD_IOMMU_DEBUG("Update page mode failed dfn = %"PRI_dfn"\n",
                             dfn_x(dfn));
-            domain_crash(d);
             return -EFAULT;
         }
     }
@@ -676,7 +674,6 @@ int amd_iommu_map_page(struct domain *d, dfn_t dfn, mfn_t mfn,
         spin_unlock(&hd->arch.mapping_lock);
         AMD_IOMMU_DEBUG("Invalid IO pagetable entry dfn = %"PRI_dfn"\n",
                         dfn_x(dfn));
-        domain_crash(d);
         return -EFAULT;
     }
 
@@ -711,7 +708,6 @@ int amd_iommu_map_page(struct domain *d, dfn_t dfn, mfn_t mfn,
             AMD_IOMMU_DEBUG("Merge iommu page failed at level %d, "
                             "dfn = %"PRI_dfn" mfn = %"PRI_mfn"\n",
                             merge_level, dfn_x(dfn), mfn_x(mfn));
-            domain_crash(d);
             return -EFAULT;
         }
 
@@ -753,8 +749,6 @@ int amd_iommu_unmap_page(struct domain *d, dfn_t dfn)
             spin_unlock(&hd->arch.mapping_lock);
             AMD_IOMMU_DEBUG("Update page mode failed dfn = %"PRI_dfn"\n",
                             dfn_x(dfn));
-            if ( rc != -EADDRNOTAVAIL )
-                domain_crash(d);
             return rc;
         }
     }
@@ -764,7 +758,6 @@ int amd_iommu_unmap_page(struct domain *d, dfn_t dfn)
         spin_unlock(&hd->arch.mapping_lock);
         AMD_IOMMU_DEBUG("Invalid IO pagetable entry dfn = %"PRI_dfn"\n",
                         dfn_x(dfn));
-        domain_crash(d);
         return -EFAULT;
     }
 
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-09-20 14:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-20 14:11 [PATCH 0/7] amd-iommu: cleanup and add lookup_page method Paul Durrant
2018-09-20 14:11 ` Paul Durrant [this message]
2018-09-20 14:11 ` [PATCH 2/7] amd-iommu: re-name u8/16/32/64 to uint8/16/32/64_t Paul Durrant
2018-09-20 14:11 ` [PATCH 3/7] amd-iommu: convert all bool_t to bool Paul Durrant
2018-09-20 14:11 ` [PATCH 4/7] amd-iommu: reduce code duplication Paul Durrant
2018-09-20 14:11 ` [PATCH 5/7] amd-iommu: introduce new get/set_iommu_pde_info() functions Paul Durrant
2018-09-20 14:11 ` [PATCH 6/7] vtd: change lookup_page failure semantics Paul Durrant
2018-09-21  0:58   ` Tian, Kevin
2018-09-21 10:16   ` Jan Beulich
2018-09-21 10:18     ` Paul Durrant
2018-09-21 10:27       ` Jan Beulich
2018-09-21 10:31         ` Paul Durrant
2018-09-20 14:11 ` [PATCH 7/7] amd-iommu: add lookup_page method to iommu_ops Paul Durrant
2018-09-20 15:03   ` Jan Beulich
2018-09-20 15:41     ` Paul Durrant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180920141149.1643-2-paul.durrant@citrix.com \
    --to=paul.durrant@citrix.com \
    --cc=brian.woods@amd.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).