]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
x86/p2m.c: fix missed off-by-one in altp2m commit
authorRavi Sahita <ravi.sahita@intel.com>
Wed, 29 Jul 2015 16:40:06 +0000 (09:40 -0700)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 30 Jul 2015 09:00:28 +0000 (10:00 +0100)
Signed-off-by: Ravi Sahita <ravi.sahita@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm/p2m.c

index ff8be31f46b1c24afce51b282ae4ffd81f578671..667b4c2f594cade296030bd2e4bf454af427195f 100644 (file)
@@ -2076,7 +2076,7 @@ bool_t p2m_switch_vcpu_altp2m_by_id(struct vcpu *v, unsigned int idx)
     struct domain *d = v->domain;
     bool_t rc = 0;
 
-    if ( idx > MAX_ALTP2M )
+    if ( idx >= MAX_ALTP2M )
         return rc;
 
     altp2m_list_lock(d);