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

[Xen-devel] ioemu & settimeoffset [Was: Clean up handling of IS_PRIV_FOR

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] ioemu & settimeoffset [Was: Clean up handling of IS_PRIV_FOR() and rcu_[un]lock_domain()]
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Thu, 10 Apr 2008 16:43:46 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 10 Apr 2008 08:46:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C413DCED.1587C%keir.fraser@xxxxxxxxxxxxx>
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>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
References: <20080329112316.GC4482@implementation> <C413DCED.1587C%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
Keir Fraser, le Sat 29 Mar 2008 11:47:57 +0000, a écrit :
> > DOMCTL_settimeoffset is needed.
> 
> Why is this done in ioemu and not in xend (it's already done there for PV
> guests).

I don't see a reason indeed, the attached patch seems to work fine.

Samuel


Make xend set time offset for all kinds of domains,
so that ioemu doesn't need to do it.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>

diff -r 8d750b7acfa3 tools/ioemu/target-i386-dm/helper2.c
--- a/tools/ioemu/target-i386-dm/helper2.c      Thu Apr 10 11:11:25 2008 +0100
+++ b/tools/ioemu/target-i386-dm/helper2.c      Thu Apr 10 16:36:05 2008 +0100
@@ -391,8 +391,6 @@
        fprintf(logfile, "Time offset set %ld\n", time_offset);
     else
        time_offset = 0;
-
-    xc_domain_set_time_offset(xc_handle, domid, time_offset);
 
     free(p);
 }
--- a/tools/python/xen/xend/image.py    Thu Apr 10 11:11:25 2008 +0100
+++ b/tools/python/xen/xend/image.py    Thu Apr 10 16:36:05 2008 +0100
@@ -99,7 +99,9 @@ ImageHandler configure
         self.vncconsole = vmConfig['platform'].get('vncconsole')
         self.dmargs = self.parseDeviceModelArgs(vmConfig)
         self.pid = None
-
+        rtc_timeoffset = vmConfig['platform'].get('rtc_timeoffset')
+        if rtc_timeoffset is not None:
+            xc.domain_set_time_offset(self.vm.getDomid(), int(rtc_timeoffset))
 
 
     def cleanupBootloading(self):
@@ -419,9 +421,6 @@ LinuxImageHandler configure
 
     def configure(self, vmConfig):
         ImageHandler.configure(self, vmConfig)
-        rtc_timeoffset = vmConfig['platform'].get('rtc_timeoffset')
-        if rtc_timeoffset is not None:
-            xc.domain_set_time_offset(self.vm.getDomid(), int(rtc_timeoffset))
 
     def buildDomain(self):
         store_evtchn = self.vm.getStorePort()

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] ioemu & settimeoffset [Was: Clean up handling of IS_PRIV_FOR() and rcu_[un]lock_domain()], Samuel Thibault <=