Skip to contentSkip to conversation

x86/nested HAP: don't BUG() on legitimate error

PATCH In review Jan Beulich 3 participants 4 messages Apr 11, 2014 – Apr 13, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/nested HAP: don't BUG() on legitimate error

set_p2m_entry() can fail without there being a bug in the code - crash the domain rather than the host in that case.

xen/arch/x86/mm/hap/nested_hap.c +1 -1
@@ -133,7 +133,7 @@ nestedhap_fix_p2m(struct vcpu *v, struct
         gdprintk(XENLOG_ERR,
 		"failed to set entry for %#"PRIx64" -> %#"PRIx64"\n",
 		L2_gpa, L0_gpa);
-        BUG();
+        domain_crash(p2m->domain);
     }
 }
 

x86/nested HAP: don't BUG() on legitimate error

set_p2m_entry() can fail without there being a bug in the code - crash the domain rather than the host in that case.

xen/arch/x86/mm/hap/nested_hap.c +1 -1
@@ -133,7 +133,7 @@ nestedhap_fix_p2m(struct vcpu *v, struct
         gdprintk(XENLOG_ERR,
 		"failed to set entry for %#"PRIx64" -> %#"PRIx64"\n",
 		L2_gpa, L0_gpa);
-        BUG();
+        domain_crash(p2m->domain);
     }
 }
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Jan Beulich

set_p2m_entry() can fail without there being a bug in the code - crash the domain rather than the host in that case.

It would be useful to indicate which conditions.

Quoted 2 lines

Irrespective of the conditions causing a failed p2m update, this is certainly a good change

Quoted 17 lines
xen/arch/x86/mm/hap/nested_hap.c +1 -1
@@ -133,7 +133,7 @@ nestedhap_fix_p2m(struct vcpu *v, struct
         gdprintk(XENLOG_ERR,
 		"failed to set entry for %#"PRIx64" -> %#"PRIx64"\n",
 		L2_gpa, L0_gpa);
-        BUG();
+        domain_crash(p2m->domain);
     }
 }
 
Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#2 lore raw
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 11.04.14 at 13:08, <[email protected]> wrote:
Quoted 2 lines · Jan Beulich

set_p2m_entry() can fail without there being a bug in the code - crash the domain rather than the host in that case.

It would be useful to indicate which conditions.

Out of memory when splitting a huge page; I thought this was pretty obvious, but maybe I've been working too much on all that paging code lately...

Jan