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] [PATCH 05/14] Nested Virtualization: core

To: Christoph Egger <Christoph.Egger@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH 05/14] Nested Virtualization: core
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Mon, 9 Aug 2010 13:38:48 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 09 Aug 2010 05:39:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <201008051701.36033.Christoph.Egger@xxxxxxx>
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>
References: <201008051701.36033.Christoph.Egger@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
Hi, 

> +int
> +nestedhvm_vcpu_destroy(struct vcpu *v)
> +{
> +     int ret = 0;
> +
> +     if (!nestedhvm_enabled(v->domain))
> +             return 0;
> +
> +     if (nestedhvm_vcpu_in_guestmode(v)) {
> +             nestedhvm_vcpu_exit_guestmode(v);
> +             ret = -EBUSY;
> +     }

This still bothers me, since we go on to complete the teardown anyway,
and this function's only caller does nothing interesting with the
result.

> +     /* Enable interrupts or the guest won't see any interrupts
> +      * after nested guest exited.
> +      */
> +     nestedsvm_vcpu_stgi(v);
> +
> +     hvm_nestedhvm_vcpu_destroy(v);

While I'm complaining about unchecked return values, I should point out
that your implementation of this returns an integer (which in turn is
always 0).

> +     return ret;
> +}

Cheers,

Tim.

-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, XenServer Engineering
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

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

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