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] Provide HVM guest RTC change notification

To: "Ben Thomas" <bthomas@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Provide HVM guest RTC change notification
From: "Christian Limpach" <christian.limpach@xxxxxxxxx>
Date: Wed, 21 Mar 2007 15:00:29 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 21 Mar 2007 07:59:28 -0700
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Qaklt7j+p5pIb0S/LASauIeC0PmdHCBkn0kbns1fH8q/3qCRZY02M813SkWu/6ngPNURHdan183DJJrw674Eaom3554ZAuGHApxm+J+Y6K3fNSHvRYw2SDGMFGP2BBZkm9l3MQqqaBa/3lr78PQI7+mOZe6FfX+26mzhKnSOWRc=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XeHeH2B7EhSjkcoT/h7BCCHxittbKHkk0kE0gOcqHwsJMnWuebwZS4HR4C7ZFADQhcHZf0blYcVzeH4Mt2pNYF/ZldZM1M0LHideMhrOdycXghyz171b4yLH4V0HY4FL2I0j2I+TVFJiEd0dKvnQkSPbYo4qtgxhiF6H5i+PvQA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4600205B.8040004@xxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4600205B.8040004@xxxxxxxxxxxxxxx>
Reply-to: Christian.Limpach@xxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 3/20/07, Ben Thomas <bthomas@xxxxxxxxxxxxxxx> wrote:
This patch restores the capabilities initially provided in
changeset 10010.  When the RTC code was moved into the hypervisor
(a good move), the control plane lost the ability to read the
current time offset as well as to receive notification of changes
to the RTC time base by a guest. This patch reintroduces these.

Additionally, there is a small window at initialization time in
which the time offset may be set but not noticed or used. If
xc_domain_set_time_offset is called before the domain is started,
the offset won't be noticed until the next second update. An HVM
guest could read the RTC in this window and get an unintended
result. This patch closes the window.

Isn't the "s->time_offset_seconds !=
s->pt.vcpu->domain->time_offset_seconds" condition an appropriate test
whether you need to call rtc_copy_date?

The patch builds upon the existing change notification mechanism
provided by VIRQ_DOM_EXC. I stopped short of renaming the
releaseDomain watch to something like domainEvent as it wasn't
clear who might be relying upon the existing name. A patch for
that would be easy to create, though.

The domain exception virq is already quite overloaded as is and it
causes xend to do a quite expensive scan of all the domain
information.

I think using an ioreq to qemu would be a more appropriate mechanism
to signal that the guest has changed the timeoffset.  The ioreq would
include the delta by which the offset was changed.  qemu could then
update the timeoffset stored in xenstore, since we would want to make
the changed timeoffset persist across reboots.

   christian

Last, the code introduced into qemu by 10010 is no longer really
connected to anything and could be removed. It's found in
tools/ioemu/patches/domain-timeoffset and can probably be excised
at some suitable point. Currently, it's relatively harmless.


Signed-off-by: Ben Thomas (ben@xxxxxxxxxxxxxxx)

--
------------------------------------------------------------------------
Ben Thomas                                         Virtual Iron Software
bthomas@xxxxxxxxxxxxxxx                            Tower 1, Floor 2
978-849-1214                                       900 Chelmsford Street
                                                   Lowell, MA 01851

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




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