# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID db52c7d043bb2a7f3dc67f4f2fb4f6498b92e558
# Parent  014c4ef0e124a81a072a92bd4cff17e6214d8897
[XEN][POWERPC] DomU real time clock based off of the real one in Dom0

Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 xen/arch/powerpc/domain.c         |   21 ++++++++++++---------
 xen/arch/powerpc/time.c           |    6 ------
 xen/include/public/arch-powerpc.h |    2 +-
 3 files changed, 13 insertions(+), 16 deletions(-)

diff -r 014c4ef0e124 -r db52c7d043bb xen/arch/powerpc/domain.c
--- a/xen/arch/powerpc/domain.c Sun Dec 17 12:54:30 2006 -0500
+++ b/xen/arch/powerpc/domain.c Tue Dec 19 09:20:58 2006 -0500
@@ -152,17 +152,20 @@ void vcpu_destroy(struct vcpu *v)
 
 int arch_set_info_guest(struct vcpu *v, vcpu_guest_context_t *c)
 { 
+    struct domain *d = v->domain;
+
     memcpy(&v->arch.ctxt, &c->user_regs, sizeof(c->user_regs));
 
-    printk("Domain[%d].%d: initializing\n",
-           v->domain->domain_id, v->vcpu_id);
-
-    if (v->domain->arch.htab.order == 0)
-        panic("Page table never allocated for Domain: %d\n",
-              v->domain->domain_id);
-    if (v->domain->arch.rma_order == 0)
-        panic("RMA never allocated for Domain: %d\n",
-              v->domain->domain_id);
+    printk("Domain[%d].%d: initializing\n", d->domain_id, v->vcpu_id);
+
+    if (d->arch.htab.order == 0)
+        panic("Page table never allocated for Domain: %d\n", d->domain_id);
+    if (d->arch.rma_order == 0)
+        panic("RMA never allocated for Domain: %d\n", d->domain_id);
+
+    d->shared_info->wc_sec = dom0->shared_info->wc_sec;
+    d->shared_info->wc_nsec = dom0->shared_info->wc_nsec;
+    d->shared_info->arch.boot_timebase = dom0->shared_info->arch.boot_timebase;
 
     set_bit(_VCPUF_initialised, &v->vcpu_flags);
 
diff -r 014c4ef0e124 -r db52c7d043bb xen/arch/powerpc/time.c
--- a/xen/arch/powerpc/time.c   Sun Dec 17 12:54:30 2006 -0500
+++ b/xen/arch/powerpc/time.c   Tue Dec 19 09:20:58 2006 -0500
@@ -85,12 +85,6 @@ void send_timer_event(struct vcpu *v)
     vcpu_unblock(v);
 }
 
-/* Set clock to <secs,usecs> after 00:00:00 UTC, 1 January, 1970. */
-void do_settime(unsigned long secs, unsigned long usecs, u64 system_time_base)
-{
-    unimplemented();
-}
-
 void update_vcpu_system_time(struct vcpu *v)
 {
 }
diff -r 014c4ef0e124 -r db52c7d043bb xen/include/public/arch-powerpc.h
--- a/xen/include/public/arch-powerpc.h Sun Dec 17 12:54:30 2006 -0500
+++ b/xen/include/public/arch-powerpc.h Tue Dec 19 09:20:58 2006 -0500
@@ -108,7 +108,7 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_conte
 DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
 
 struct arch_shared_info {
-    uint64_t pad[32];
+    uint64_t boot_timebase;
 };
 
 struct arch_vcpu_info {

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

Reply via email to