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] Xen: enhanced PV on HVM

To: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Xen: enhanced PV on HVM
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Wed, 10 Mar 2010 14:56:47 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 10 Mar 2010 06:57:58 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.DEB.2.00.1003091537050.8337@kaball-desktop>
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: <alpine.DEB.2.00.1003091537050.8337@kaball-desktop>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
At 16:05 +0000 on 09 Mar (1268150723), Stefano Stabellini wrote:
> @@ -686,7 +696,16 @@
> 
>      if ( is_hvm_vcpu(v) )
>      {
> +        unsigned long eip, cs;
>          hvm_set_info_guest(v);
> +
> +        eip = c(user_regs.eip);
> +        if (eip != 0) {
> +            cs = eip >> 12 << 8;
> +            hvm_vcpu_reset_state(v, cs, 0);
> +            hvm_funcs.set_tsc_offset(v, 0);

If there isn't a more sensible thing to gate this on, it needs a big
comment explaining why (%eip != 0) ==> (tsc_offset == 0).

Likewise the implicit setting of tsc_offset to zero when setting up the
timer virq needs a comment, and preferably this should all be described
in the public headers too.

The potential in this patch for a guest to get surprised when one of its
vcpus' TSC offset changes under its feet is a bit worrying.

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>