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

Re: [Xen-devel] [PATCH v1] x86/mm: Make change_type_range return error



On 4/24/19 5:46 PM, Roger Pau Monné wrote:
On Wed, Apr 24, 2019 at 02:27:32PM +0000, Alexandru Stefan ISAILA wrote:
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index 9e81a30cc4..27697d5a77 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -1028,7 +1028,7 @@ int p2m_change_type_one(struct domain *d, unsigned long 
gfn_l,
  }
/* Modify the p2m type of [start, end_exclusive) from ot to nt. */
-static void change_type_range(struct p2m_domain *p2m,
+static int change_type_range(struct p2m_domain *p2m,
                                unsigned long start, unsigned long 
end_exclusive,
                                p2m_type_t ot, p2m_type_t nt)
  {
@@ -1053,15 +1053,11 @@ static void change_type_range(struct p2m_domain *p2m,
       * This should be revisited later, but for now post a warning.
       */
      if ( unlikely(end > host_max_pfn) )
-    {
-        printk(XENLOG_G_WARNING "Dom%d logdirty rangeset clipped to 
max_mapped_pfn\n",
-               d->domain_id);
-        end = invalidate_end = host_max_pfn;
-    }
+        return -EINVAL;
/* If the requested range is out of scope, return doing nothing. */
      if ( start > end )
-        return;
+        return 0;

Since you are already changing the behavior of the function above this
should also return EINVAL IMO.

My fault, I suggested 0 there. :)


Thanks,
Razvan

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

 


Rackspace

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