Skip to contentSkip to conversation

paravirt_ops queue rebased

DISCUSSION Jeremy Fitzhardinge 4 participants 5 messages May 6, 2007 – May 7, 2007 1 message not in the archive virtio core

lore
Share & tools
lore
#0 lore raw

I just rebased my paravirt_ops patch queue to current git. Looks like almost all the pre-req patches are now in, which is nice.

The only missing thing from your patches was you sched_clock patches and the sched_clock paravirt-op. Are there still problems with either your sched_clock patch or the paravirt patch? Should I resubmit the paravirt-sched_clock patch based on git?

The only other general patches before the Xen series I have left in my queue are:

    i386-common-smp.patch
    i386-fix-voyager-build.patch
    vsyscall-note-use-elfnote_h.patch

I obviously don't depend the voyager patch, but I tweaked it a bit to apply to the current git tree.

How is your patch queue looking now? Is there much left?

J

#1 lore raw
Quoted 8 lines · Jeremy Fitzhardinge

I just rebased my paravirt_ops patch queue to current git. Looks like almost all the pre-req patches are now in, which is nice.

The only missing thing from your patches was you sched_clock patches and the sched_clock paravirt-op. Are there still problems with either your sched_clock patch or the paravirt patch? Should I resubmit the paravirt-sched_clock patch based on git?

Quoted 6 lines

The only other general patches before the Xen series I have left in my queue are:

    i386-common-smp.patch
    i386-fix-voyager-build.patch
    vsyscall-note-use-elfnote_h.patch

Just make sure it's the one I sent you, not your original one ... the original one won't compile on voyager.

Since voyager is now completely broken in mainline (again) do you want me to take these through the voyager tree?

James

Subject: i386: move common parts of smp into their own file

Several parts of kernel/smp.c and smpboot.c are generally useful for other subarchitectures and paravirt_ops implementations, so make them available for reuse.

Cc James Bottomley <[email protected]>
Cc Eric W. Biederman <[email protected]>
---
 arch/i386/kernel/Makefile    |    1 
 arch/i386/kernel/smp.c       |   65 +++-------------------------------
 arch/i386/kernel/smpboot.c   |   22 -----------
 arch/i386/kernel/smpcommon.c |   79 ++++++++++++++++++++++++++++++++++++++++++
 include/asm-i386/processor.h |    4 ++
 5 files changed, 90 insertions(+), 81 deletions(-)

===================================================================

arch/i386/kernel/Makefile +1 -0
Index: BUILD-voyager/arch/i386/kernel/Makefile
===================================================================
@@ -19,6 +19,7 @@ obj-$(CONFIG_X86_CPUID)		+= cpuid.o
 obj-$(CONFIG_MICROCODE)		+= microcode.o
 obj-$(CONFIG_APM)		+= apm.o
 obj-$(CONFIG_X86_SMP)		+= smp.o smpboot.o tsc_sync.o
+obj-$(CONFIG_SMP)		+= smpcommon.o
 obj-$(CONFIG_X86_TRAMPOLINE)	+= trampoline.o
 obj-$(CONFIG_X86_MPPARSE)	+= mpparse.o
 obj-$(CONFIG_X86_LOCAL_APIC)	+= apic.o nmi.o
arch/i386/kernel/smp.c +6 -59

89 lines not on this page · raw message

arch/i386/kernel/smpboot.c +0 -22
Index: BUILD-voyager/arch/i386/kernel/smpboot.c
===================================================================
@@ -99,9 +99,6 @@ EXPORT_SYMBOL(x86_cpu_to_apicid);
 
 u8 apicid_2_node[MAX_APICID];
 
-DEFINE_PER_CPU(unsigned long, this_cpu_off);
-EXPORT_PER_CPU_SYMBOL(this_cpu_off);
-
 /*
  * Trampoline 80x86 program as an array.
  */
@@ -764,25 +761,6 @@ static inline struct task_struct * alloc
 #define alloc_idle_task(cpu) fork_idle(cpu)
 #endif
 
-/* Initialize the CPU's GDT.  This is either the boot CPU doing itself
-   (still using the master per-cpu area), or a CPU doing it for a
-   secondary which will soon come up. */
-static __cpuinit void init_gdt(int cpu)
-{
-	struct desc_struct *gdt = get_cpu_gdt_table(cpu);
-
-	pack_descriptor((u32 *)&gdt[GDT_ENTRY_PERCPU].a,
-			(u32 *)&gdt[GDT_ENTRY_PERCPU].b,
-			__per_cpu_offset[cpu], 0xFFFFF,
-			0x80 | DESCTYPE_S | 0x2, 0x8);
-
-	per_cpu(this_cpu_off, cpu) = __per_cpu_offset[cpu];
-	per_cpu(cpu_number, cpu) = cpu;
-}
-
-/* Defined in head.S */
-extern struct Xgt_desc_struct early_gdt_descr;
-
 static int __cpuinit do_boot_cpu(int apicid, int cpu)
 /*
  * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad
arch/i386/kernel/smpcommon.c new file +79 -0

79 lines not on this page · raw message

include/asm-i386/processor.h +4 -0
Index: BUILD-voyager/include/asm-i386/processor.h
===================================================================
@@ -749,9 +749,13 @@ extern unsigned long boot_option_idle_ov
 extern void enable_sep_cpu(void);
 extern int sysenter_setup(void);
 
+/* Defined in head.S */
+extern struct Xgt_desc_struct early_gdt_descr;
+
 extern void cpu_set_gdt(int);
 extern void switch_to_new_gdt(void);
 extern void cpu_init(void);
+extern void init_gdt(int cpu);
 
 extern int force_mwait;
 

Subject: i386: fix voyager build

This adds an smp_ops for voyager, and hooks things up appropriately. This is the first baby-step to making subarch runtime switchable.

Cc James Bottomley <[email protected]>
Cc Eric W. Biederman <[email protected]>
---
 arch/i386/mach-voyager/voyager_smp.c |   73 ++++++++++++++++++++--------------
 1 file changed, 44 insertions(+), 29 deletions(-)

===================================================================

arch/i386/mach-voyager/voyager_smp.c +40 -65

214 lines not on this page · raw message

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/virtualization

author Acked-by Chris Wright
#2 lore raw
Quoted 3 lines · James Bottomley

Just make sure it's the one I sent you, not your original one ... the original one won't compile on voyager.

Sorry, I saw your patch, but while I was trying to work out how you changed it I forgot about it. I actually did test-compile a voyager config and it works for me; how does it break for you?

Quoted 2 lines

Since voyager is now completely broken in mainline (again) do you want me to take these through the voyager tree?

Sure. I need the prerequisite patch which pulls things into smpcommon.c (i386-common-smp), but the voyager patch is otherwise independent of everything else I'm doing.

J

Subject: i386: move common parts of smp into their own file

Several parts of kernel/smp.c and smpboot.c are generally useful for other subarchitectures and paravirt_ops implementations, so make them available for reuse.

---
 arch/i386/kernel/Makefile    |    1 
 arch/i386/kernel/smp.c       |   65 +++-------------------------------
 arch/i386/kernel/smpboot.c   |   22 -----------
 arch/i386/kernel/smpcommon.c |   79 ++++++++++++++++++++++++++++++++++++++++++
 include/asm-i386/processor.h |    4 ++
 5 files changed, 90 insertions(+), 81 deletions(-)

===================================================================

arch/i386/kernel/Makefile +1 -0
@@ -20,6 +20,7 @@ obj-$(CONFIG_MICROCODE)		+= microcode.o
 obj-$(CONFIG_MICROCODE)		+= microcode.o
 obj-$(CONFIG_APM)		+= apm.o
 obj-$(CONFIG_X86_SMP)		+= smp.o smpboot.o tsc_sync.o
+obj-$(CONFIG_SMP)		+= smpcommon.o
 obj-$(CONFIG_X86_TRAMPOLINE)	+= trampoline.o
 obj-$(CONFIG_X86_MPPARSE)	+= mpparse.o
 obj-$(CONFIG_X86_LOCAL_APIC)	+= apic.o nmi.o

===================================================================

arch/i386/kernel/smp.c +6 -59

89 lines not on this page · raw message

===================================================================

arch/i386/kernel/smpboot.c +0 -22
@@ -99,9 +99,6 @@ EXPORT_SYMBOL(x86_cpu_to_apicid);
 
 u8 apicid_2_node[MAX_APICID];
 
-DEFINE_PER_CPU(unsigned long, this_cpu_off);
-EXPORT_PER_CPU_SYMBOL(this_cpu_off);
-
 /*
  * Trampoline 80x86 program as an array.
  */
@@ -766,25 +763,6 @@ static inline struct task_struct * alloc
 #define alloc_idle_task(cpu) fork_idle(cpu)
 #endif
 
-/* Initialize the CPU's GDT.  This is either the boot CPU doing itself
-   (still using the master per-cpu area), or a CPU doing it for a
-   secondary which will soon come up. */
-static __cpuinit void init_gdt(int cpu)
-{
-	struct desc_struct *gdt = get_cpu_gdt_table(cpu);
-
-	pack_descriptor((u32 *)&gdt[GDT_ENTRY_PERCPU].a,
-			(u32 *)&gdt[GDT_ENTRY_PERCPU].b,
-			__per_cpu_offset[cpu], 0xFFFFF,
-			0x80 | DESCTYPE_S | 0x2, 0x8);
-
-	per_cpu(this_cpu_off, cpu) = __per_cpu_offset[cpu];
-	per_cpu(cpu_number, cpu) = cpu;
-}
-
-/* Defined in head.S */
-extern struct Xgt_desc_struct early_gdt_descr;
-
 static int __cpuinit do_boot_cpu(int apicid, int cpu)
 /*
  * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad

===================================================================

arch/i386/kernel/smpcommon.c new file +79 -0

79 lines not on this page · raw message

===================================================================

include/asm-i386/processor.h +4 -0
@@ -749,9 +749,13 @@ extern void enable_sep_cpu(void);
 extern void enable_sep_cpu(void);
 extern int sysenter_setup(void);
 
+/* Defined in head.S */
+extern struct Xgt_desc_struct early_gdt_descr;
+
 extern void cpu_set_gdt(int);
 extern void switch_to_new_gdt(void);
 extern void cpu_init(void);
+extern void init_gdt(int cpu);
 
 extern int force_mwait;
 

Subject: i386: fix voyager build

This adds an smp_ops for voyager, and hooks things up appropriately. This is the first baby-step to making subarch runtime switchable.

Cc James Bottomley <[email protected]>
Cc Eric W. Biederman <[email protected]>
---
 arch/i386/mach-voyager/voyager_smp.c |  110 +++++++++++++---------------------
 1 file changed, 43 insertions(+), 67 deletions(-)

===================================================================

arch/i386/mach-voyager/voyager_smp.c +43 -67

216 lines not on this page · raw message

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/virtualization

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 4 lines · James Bottomley

The original one you sent had duplicate smp_call_function... definitions. The interdiff between the one you've attached now and the one I sent is pretty tiny:

Huh. Must have been a mixup somewhere, because this was one was more or less identical to the last one. Maybe I'd sent out an earlier borken one you picked up? Anyway, doesn't matter.

Review

Quoted 2 lines
(quoted diff) +1 -0
+	u32 mask = cpus_addr(cpumask)[0];

Ah, didn't know about that.

J

#5 lore raw
In reply to Jeremy Fitzhardinge
Quoted 6 lines · On Sunday 06 May 2007 19:21:17 Jeremy Fitzhardinge wrote:

I just rebased my paravirt_ops patch queue to current git. Looks like almost all the pre-req patches are now in, which is nice.

The only missing thing from your patches was you sched_clock patches and the sched_clock paravirt-op. Are there still problems with either your sched_clock patch

There were problems with my patch and yours dependend on it so I deferred both.

Quoted 2 lines

or the paravirt patch? Should I resubmit the
paravirt-sched_clock patch based on git?

Not needed, I still have it.

Quoted 11 lines

The only other general patches before the Xen series I have left in my queue are:

    i386-common-smp.patch
    i386-fix-voyager-build.patch
    vsyscall-note-use-elfnote_h.patch

I obviously don't depend the voyager patch, but I tweaked it a bit to apply to the current git tree.

How is your patch queue looking now? Is there much left?

Only a few patches left, like unwinder, vDSO, sched-clock.

-Andi