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-changelog

[Xen-changelog] Fix cpu hotplug issue with SMP guests (including save/re

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix cpu hotplug issue with SMP guests (including save/restore).
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 09 Oct 2005 15:46:10 +0000
Delivery-date: Sun, 09 Oct 2005 15:43:45 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User smh22@xxxxxxxxxxxxxxxxxxxx
# Node ID 8f7ee9ab31ac36c84fcf499684803e72c3eef2ef
# Parent  fe4c1d44e8994794fa7377546061a2c37558f79a
Fix cpu hotplug issue with SMP guests (including save/restore). 
Was a nasty one - worth ensuring we cast to u64 whenever playing 
with Xen time values. 

Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx>

diff -r fe4c1d44e899 -r 8f7ee9ab31ac 
linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c       Sun Oct  9 
11:20:12 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/smpboot.c       Sun Oct  9 
15:26:08 2005
@@ -1578,7 +1578,7 @@
 void smp_resume(void)
 {
        smp_intr_init();
-       local_setup_timer_irq();
+       local_setup_timer();
 }
 
 void vcpu_prepare(int vcpu)
diff -r fe4c1d44e899 -r 8f7ee9ab31ac 
linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c  Sun Oct  9 11:20:12 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c  Sun Oct  9 15:26:08 2005
@@ -122,7 +122,7 @@
 static u64 processed_system_time;   /* System time (ns) at last processing. */
 static DEFINE_PER_CPU(u64, processed_system_time);
 
-#define NS_PER_TICK (1000000000L/HZ)
+#define NS_PER_TICK (1000000000ULL/HZ)
 
 static inline void __normalize_time(time_t *sec, s64 *nsec)
 {
@@ -800,9 +800,9 @@
                delta = j - jiffies;
                /* NB. The next check can trigger in some wrap-around cases,
                 * but that's ok: we'll just end up with a shorter timeout. */
-               if (delta < 1)
+               if (delta < 1) 
                        delta = 1;
-               st = processed_system_time + (delta * NS_PER_TICK);
+               st = processed_system_time + ((u64)delta * NS_PER_TICK);
        } while (read_seqretry(&xtime_lock, seq));
 
        return st;
@@ -816,7 +816,7 @@
 {
        unsigned int cpu = smp_processor_id();
        unsigned long j;
-
+       
        /* s390 does this /before/ checking rcu_pending(). We copy them. */
        cpu_set(cpu, nohz_cpu_mask);
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix cpu hotplug issue with SMP guests (including save/restore)., Xen patchbot -unstable <=