WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH v2] xen network backend driver

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH v2] xen network backend driver
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Fri, 25 Feb 2011 15:35:53 +0000
Cc: Ben Hutchings <bhutchings@xxxxxxxxxxxxxx>, "netdev@xxxxxxxxxxxxxxx" <netdev@xxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 25 Feb 2011 07:36:53 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1298553792.5034.391.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <1297160635.9149.21.camel@xxxxxxxxxxxxxxxxxxxxxx> <20110215213512.GA5587@xxxxxxxxxxxx> <1298553792.5034.391.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2011-02-24 at 13:23 +0000, Ian Campbell wrote:
> 
> > > +
> > > +     if (HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, &op,
> 1))
> > > +             BUG();
> > 
> > How about something less severe? Say return the error code?
> 
> Yes, I folded this into the following check of op.status. 

I revisited this and HYPERVISOR_grant_table_op has multicall like
semantics and a failure of the hypercall itself is a serious bug in the
calling kernel, akin to a page fault on kernel memory or similar so I
think a BUG() is the appropriate response.

Failures of the type which a guest may cause are the GNTST_* error codes
found in the op.status field an are handled appropriately gracefully.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>