From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] x86/nested HAP: don't BUG() on legitimate error Date: Fri, 11 Apr 2014 12:08:11 +0100 Message-ID: <5347CD1B.5000809@citrix.com> References: <5347DFDE0200007800007ECC@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7732343702951097757==" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WYZJf-0003IS-Vo for xen-devel@lists.xenproject.org; Fri, 11 Apr 2014 11:08:16 +0000 In-Reply-To: <5347DFDE0200007800007ECC@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , Tim Deegan List-Id: xen-devel@lists.xenproject.org --===============7732343702951097757== Content-Type: multipart/alternative; boundary="------------060908080104020107020602" --------------060908080104020107020602 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit On 11/04/14 11:28, Jan Beulich wrote: > 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. > > Signed-off-by: Jan Beulich Irrespective of the conditions causing a failed p2m update, this is certainly a good change Reviewed-by: Andrew Cooper > > --- a/xen/arch/x86/mm/hap/nested_hap.c > +++ b/xen/arch/x86/mm/hap/nested_hap.c > @@ -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 > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel --------------060908080104020107020602 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit
On 11/04/14 11:28, Jan Beulich wrote:
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.


Signed-off-by: Jan Beulich <jbeulich@suse.com>

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

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>


--- a/xen/arch/x86/mm/hap/nested_hap.c
+++ b/xen/arch/x86/mm/hap/nested_hap.c
@@ -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
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

--------------060908080104020107020602-- --===============7732343702951097757== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============7732343702951097757==--