[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC v2 09/12] xen/arm: Data abort exception (R/W) mem_events.



Hello Tamas,

On 27/08/14 10:06, Tamas K Lengyel wrote:
  /*
   * Lookup the MFN corresponding to a domain's PFN.
   *
   * There are no processor functions to do a stage 2 only lookup therefore we
   * do a a software walk.
+ *
+ * [IN]:  d      Domain
+ * [IN]:  paddr  IPA
+ * [IN]:  a      (Optional) Update PTE access permission
+ * [OUT]: t      (Optional) Return PTE type
   */
-paddr_t p2m_lookup(struct domain *d, paddr_t paddr, p2m_type_t *t)
+paddr_t p2m_lookup(struct domain *d,
+    paddr_t paddr,
+    p2m_access_t *a,
+    p2m_type_t *t)

The indentation looks wrong here.

  {
      struct p2m_domain *p2m = &d->arch.p2m;
-    lpae_t pte, *first = NULL, *second = NULL, *third = NULL;
+    lpae_t pte, *pte_loc, *first = NULL, *second = NULL, *third = NULL;
      paddr_t maddr = INVALID_PADDR;
      paddr_t mask;
      p2m_type_t _t;
@@ -167,20 +251,20 @@ paddr_t p2m_lookup(struct domain *d, paddr_t paddr, 
p2m_type_t *t)

      *t = p2m_invalid;

-    spin_lock(&p2m->lock);
-

If you need a version with the lock already taken, please introduce a new function (i.e p2m_lookup_locked or smth else) rather than move the lock in every caller.

Regards,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.