Re: [PATCH 21/25][V3] export cpu_gdt_descr

2007-08-15 Thread Glauber de Oliveira Costa
Andi Kleen escreveu: On Wed, Aug 15, 2007 at 11:25:43AM -0300, Glauber de Oliveira Costa wrote: On 8/15/07, Andi Kleen [EMAIL PROTECTED] wrote: +#ifdef CONFIG_PARAVIRT +extern unsigned long *cpu_gdt_descr; No externs in .c files Normally they should be where the variable is defined anyways

Re: [PATCH 3/25][V3] irq_flags / halt routines

2007-08-15 Thread Glauber de Oliveira Costa
Andi Kleen escreveu: On Wed, Aug 15, 2007 at 12:09:42PM -0300, Glauber de Oliveira Costa wrote: Again, this is the code of such function: static inline int raw_irqs_disabled_flags(unsigned long flags) { return !(flags X86_EFLAGS_IF); } so all it is doing is getting a parameter (flags

Re: [PATCH 3/25][V3] irq_flags / halt routines

2007-08-15 Thread Glauber de Oliveira Costa
Chris Wright escreveu: * Glauber de Oliveira Costa ([EMAIL PROTECTED]) wrote: As alternatives what we have now, we can either keep the paravirt_ops as it is now for the native case, just hooking the vsmp functions in place of the normal one, (there are just three ops anyway), refill

Re: [PATCH 3/25][V3] irq_flags / halt routines

2007-08-15 Thread Glauber de Oliveira Costa
On 8/15/07, Chris Wright [EMAIL PROTECTED] wrote: * Glauber de Oliveira Costa ([EMAIL PROTECTED]) wrote: Only caveat, is that it has to be done before smp gets in the game, and with interrupts disabled. (which makes the function in vsmp.c not eligible). My current option is to force VSMP

Re: [PATCH 3/25][V3] irq_flags / halt routines

2007-08-15 Thread Glauber de Oliveira Costa
Jeremy Fitzhardinge escreveu: Glauber de Oliveira Costa wrote: Thanks for the explanation, Andi. I understand it much better now, and agree with you. As alternatives what we have now, we can either keep the paravirt_ops as it is now for the native case, just hooking the vsmp functions in place

[PATCH 25/25 -v2] add paravirtualization support for x86_64

2007-08-10 Thread Glauber de Oliveira Costa
) * modifications needed to accomodate other parts of the patch that changed, such as getting rid of ebda_info * put the integers at struct paravirt_ops at the end (Jeremy) ] Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL

[PATCH 15/25 -v2] introducing paravirt_activate_mm

2007-08-10 Thread Glauber de Oliveira Costa
This function/macro will allow a paravirt guest to be notified we changed the current task cr3, and act upon it. It's up to them Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- include/asm-x86_64/mmu_cont

[PATCH 9/25 -v2] report ring kernel is running without paravirt

2007-08-10 Thread Glauber de Oliveira Costa
When paravirtualization is disabled, the kernel is always running at ring 0. So report it in the appropriate macro Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- include/asm-x86_64/segment.h |4 1 file

[PATCH 20/25 -v2] replace syscall_init

2007-08-10 Thread Glauber de Oliveira Costa
This patch replaces syscall_init by x86_64_syscall_init. The former will be later replaced by a paravirt replacement in case paravirt is on Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/kernel/setu

[PATCH 24/25 -v2] paravirt hooks for arch initialization

2007-08-10 Thread Glauber de Oliveira Costa
) * Make paravirt_setup_arch() void (Andi) ] Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/kernel/setup.c | 32 +++- include/asm-x86_64/e820.h |6 ++ include/asm-x

[PATCH 17/25 -v2] introduce paravirt_release_pgd()

2007-08-10 Thread Glauber de Oliveira Costa
This patch introduces a new macro/function that informs a paravirt guest when its page table is not more in use, and can be released. In case we're not paravirt, just do nothing. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL

[PATCH 22/25 -v2] turn priviled operation into a macro

2007-08-10 Thread Glauber de Oliveira Costa
under paravirt, read cr2 cannot be issued directly anymore. So wrap it in a macro, defined to the operation itself in case paravirt is off, but to something else if we have paravirt in the game Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt &

[PATCH 23/25 -v2] provide paravirt patching function

2007-08-10 Thread Glauber de Oliveira Costa
This patch introduces apply_paravirt(), a function that shall be called by i386/alternative.c to apply replacements to paravirt_functions. It is defined to an do-nothing function if paravirt is not enabled. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven R

[PATCH 16/25 -v2] turn page operations into native versions

2007-08-10 Thread Glauber de Oliveira Costa
This patch turns the page operations (set and make a page table) into native_ versions. The operations itself will be later overriden by paravirt. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- include/asm-x86_64/p

[PATCH 7/25 -v2] interrupt related native paravirt functions.

2007-08-10 Thread Glauber de Oliveira Costa
-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/kernel/i8259.c |5 - include/asm-x86_64/irq.h |2 ++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/arch/x86_64/kernel/i8259.c b/arch/x

[PATCH 14/25 -v2] get rid of inline asm for load_cr3

2007-08-10 Thread Glauber de Oliveira Costa
Besides not elegant, it is now even forbidden, since it can break paravirtualized guests. load_cr3 should call write_cr3() instead. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- include/asm-x86_64/mmu_context.h

[PATCH 21/25 -v2] export cpu_gdt_descr

2007-08-10 Thread Glauber de Oliveira Costa
-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/kernel/x8664_ksyms.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c index 77c2

[PATCH 19/25 -v2] time-related functions paravirt provisions

2007-08-10 Thread Glauber de Oliveira Costa
. The timer interrupt setup also have to be replaced. The job is done by time_init_hook(). Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/kernel/time.c | 37 + includ

[PATCH 13/25 -v2] add native functions for descriptors handling

2007-08-10 Thread Glauber de Oliveira Costa
to be patched. We also patch call sites that now needs a typecast. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/kernel/head64.c |2 +- arch/x86_64/kernel/ldt.c |6 +- arch/x86_64/ker

[PATCH 12/25 -v2] turn msr.h functions into native versions

2007-08-10 Thread Glauber de Oliveira Costa
duplication of code in get_cycles_sync * Get rid of rdtsc(), since it is used nowhere else All three suggested by Andi Kleen ] Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/ia32/syscall32.c |2 +- arch/x

[PATCH 18/25 -v2] turn priviled operations into macros in entry.S

2007-08-10 Thread Glauber de Oliveira Costa
to SWAPGS_UNSAFE_STACK * change the unexpressive 1b label to do_iret All suggested by Andi Kleen ] Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/kernel/entry.S | 130 +

[PATCH 11/25 -v2] native versions for set pagetables

2007-08-10 Thread Glauber de Oliveira Costa
are moved to below the #ifdef CONFIG_PARAVIRT site, as they are users of the newly defined set_* macros. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- include/asm-x86_64/pgtable.h | 152

[PATCH 10/25 -v2] export math_state_restore

2007-08-10 Thread Glauber de Oliveira Costa
Export math_state_restore symbol, so it can be used for hypervisors. They are commonly loaded as modules. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/kernel/traps.c |1 + 1 files changed, 1 inse

[PATCH 2/25 -v2] tlb flushing routines

2007-08-10 Thread Glauber de Oliveira Costa
This patch turns the flush_tlb routines into native versions. In case paravirt is not defined, the natives are defined into the actually used ones. flush_tlb_others() goes in smp.c, unless smp is not in the game Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by:

[PATCH 3/25 -v2] irq_flags / halt routines

2007-08-10 Thread Glauber de Oliveira Costa
This patch turns the irq_flags and halt routines into the native versions. [ updates from v1 Move raw_irqs_disabled_flags outside of the PARAVIRT ifdef to avoid increasing the mess, suggested by Andi Kleen ] Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by:

[PATCH 4/25 -v2] Add debugreg/load_rsp native hooks

2007-08-10 Thread Glauber de Oliveira Costa
This patch adds native hooks for debugreg handling functions, and for the native load_rsp0 function. The later also have its call sites patched. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/kern

[PATCH 8/25 -v2] use macro for sti/cli in spinlock definitions

2007-08-10 Thread Glauber de Oliveira Costa
This patch switches the cli and sti instructions into macros. In this header, they're just defined to the instructions they refer to. Later on, when paravirt is defined, they will be defined to something with paravirt abilities. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]>

[PATCH 0/25 -v2] paravirt_ops for x86_64, second round

2007-08-10 Thread Glauber de Oliveira Costa
Here is an slightly updated version of the paravirt_ops patch. If your comments and criticism were welcome before, now it's even more! There are some issues that are _not_ addressed in this revision, and here are the causes: * split debugreg into multiple functions, suggested by Andi: - Me and

[PATCH 5/25 -v2] native versions for system.h functions

2007-08-10 Thread Glauber de Oliveira Costa
This patch adds the native hook for the functions in system.h They are the read/write_crX, clts and wbinvd. The later, also gets its call sites patched. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/

[PATCH 6/25 -v2] add native_apic read and write functions, as well as boot clocks ones

2007-08-10 Thread Glauber de Oliveira Costa
Time for the apic handling functions to get their native counterparts. Also, put the native hook for the boot clocks functions in the apic.h header Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/k

[PATCH 1/25 -v2] header file move

2007-08-10 Thread Glauber de Oliveira Costa
Later on, the paravirt_ops patch will deference the vm_area_struct in asm/pgtable.h. It means this define must be after the struct definition Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- include/linux

Re: [PATCH 23/25] [PATCH] paravirt hooks for arch initialization

2007-08-10 Thread Glauber de Oliveira Costa
Jeremy Fitzhardinge escreveu: Glauber de Oliveira Costa wrote: I think the idea you gave me earlier of using probe_kernel_address could work. Xen/lguest/put_yours_here that won't use an ebda would then have to unmap the page, to make sure a read would fault. Hm, the memory might be mapped

Re: [PATCH 23/25] [PATCH] paravirt hooks for arch initialization

2007-08-10 Thread Glauber de Oliveira Costa
Jeremy Fitzhardinge escreveu: Glauber de Oliveira Costa wrote: On 8/9/07, Alan Cox <[EMAIL PROTECTED]> wrote: What's the EBDA actually used for? The only place which seems to use ebda_addr is in the e820 code to avoid that area as RAM. It belongs to the firmware. Wo

Re: [PATCH 23/25] [PATCH] paravirt hooks for arch initialization

2007-08-10 Thread Glauber de Oliveira Costa
ep unconditionally if we are running a paravirtualized guest? What do we from doing it? -- Glauber de Oliveira Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act." - To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH 23/25] [PATCH] paravirt hooks for arch initialization

2007-08-10 Thread Glauber de Oliveira Costa
Jeremy Fitzhardinge escreveu: Glauber de Oliveira Costa wrote: On 8/9/07, Alan Cox [EMAIL PROTECTED] wrote: What's the EBDA actually used for? The only place which seems to use ebda_addr is in the e820 code to avoid that area as RAM. It belongs to the firmware. Wouldn't

Re: [PATCH 23/25] [PATCH] paravirt hooks for arch initialization

2007-08-10 Thread Glauber de Oliveira Costa
a paravirtualized guest? What do we from doing it? -- Glauber de Oliveira Costa. Free as in Freedom http://glommer.net The less confident you are, the more serious you have to act. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED

Re: [PATCH 23/25] [PATCH] paravirt hooks for arch initialization

2007-08-10 Thread Glauber de Oliveira Costa
Jeremy Fitzhardinge escreveu: Glauber de Oliveira Costa wrote: I think the idea you gave me earlier of using probe_kernel_address could work. Xen/lguest/put_yours_here that won't use an ebda would then have to unmap the page, to make sure a read would fault. Hm, the memory might be mapped

[PATCH 5/25 -v2] native versions for system.h functions

2007-08-10 Thread Glauber de Oliveira Costa
This patch adds the native hook for the functions in system.h They are the read/write_crX, clts and wbinvd. The later, also gets its call sites patched. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- arch/x86_64/kernel/tce.c

[PATCH 6/25 -v2] add native_apic read and write functions, as well as boot clocks ones

2007-08-10 Thread Glauber de Oliveira Costa
Time for the apic handling functions to get their native counterparts. Also, put the native hook for the boot clocks functions in the apic.h header Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- arch/x86_64/kernel/apic.c|2

[PATCH 1/25 -v2] header file move

2007-08-10 Thread Glauber de Oliveira Costa
Later on, the paravirt_ops patch will deference the vm_area_struct in asm/pgtable.h. It means this define must be after the struct definition Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- include/linux/mm.h | 14 +- 1

[PATCH 0/25 -v2] paravirt_ops for x86_64, second round

2007-08-10 Thread Glauber de Oliveira Costa
Here is an slightly updated version of the paravirt_ops patch. If your comments and criticism were welcome before, now it's even more! There are some issues that are _not_ addressed in this revision, and here are the causes: * split debugreg into multiple functions, suggested by Andi: - Me and

[PATCH 8/25 -v2] use macro for sti/cli in spinlock definitions

2007-08-10 Thread Glauber de Oliveira Costa
This patch switches the cli and sti instructions into macros. In this header, they're just defined to the instructions they refer to. Later on, when paravirt is defined, they will be defined to something with paravirt abilities. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed

[PATCH 2/25 -v2] tlb flushing routines

2007-08-10 Thread Glauber de Oliveira Costa
This patch turns the flush_tlb routines into native versions. In case paravirt is not defined, the natives are defined into the actually used ones. flush_tlb_others() goes in smp.c, unless smp is not in the game Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven

[PATCH 3/25 -v2] irq_flags / halt routines

2007-08-10 Thread Glauber de Oliveira Costa
This patch turns the irq_flags and halt routines into the native versions. [ updates from v1 Move raw_irqs_disabled_flags outside of the PARAVIRT ifdef to avoid increasing the mess, suggested by Andi Kleen ] Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt

[PATCH 4/25 -v2] Add debugreg/load_rsp native hooks

2007-08-10 Thread Glauber de Oliveira Costa
This patch adds native hooks for debugreg handling functions, and for the native load_rsp0 function. The later also have its call sites patched. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- arch/x86_64/kernel/process.c |2

[PATCH 11/25 -v2] native versions for set pagetables

2007-08-10 Thread Glauber de Oliveira Costa
are moved to below the #ifdef CONFIG_PARAVIRT site, as they are users of the newly defined set_* macros. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- include/asm-x86_64/pgtable.h | 152 - 1

[PATCH 10/25 -v2] export math_state_restore

2007-08-10 Thread Glauber de Oliveira Costa
Export math_state_restore symbol, so it can be used for hypervisors. They are commonly loaded as modules. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- arch/x86_64/kernel/traps.c |1 + 1 files changed, 1 insertions(+), 0

[PATCH 12/25 -v2] turn msr.h functions into native versions

2007-08-10 Thread Glauber de Oliveira Costa
duplication of code in get_cycles_sync * Get rid of rdtsc(), since it is used nowhere else All three suggested by Andi Kleen ] Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- arch/x86_64/ia32/syscall32.c |2 +- arch/x86_64/kernel

[PATCH 18/25 -v2] turn priviled operations into macros in entry.S

2007-08-10 Thread Glauber de Oliveira Costa
to SWAPGS_UNSAFE_STACK * change the unexpressive 1b label to do_iret All suggested by Andi Kleen ] Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- arch/x86_64/kernel/entry.S | 130 +--- 1 files

[PATCH 19/25 -v2] time-related functions paravirt provisions

2007-08-10 Thread Glauber de Oliveira Costa
. The timer interrupt setup also have to be replaced. The job is done by time_init_hook(). Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- arch/x86_64/kernel/time.c | 37 + include/asm-x86_64/time.h

[PATCH 13/25 -v2] add native functions for descriptors handling

2007-08-10 Thread Glauber de Oliveira Costa
to be patched. We also patch call sites that now needs a typecast. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- arch/x86_64/kernel/head64.c |2 +- arch/x86_64/kernel/ldt.c |6 +- arch/x86_64/kernel/reboot.c

[PATCH 14/25 -v2] get rid of inline asm for load_cr3

2007-08-10 Thread Glauber de Oliveira Costa
Besides not elegant, it is now even forbidden, since it can break paravirtualized guests. load_cr3 should call write_cr3() instead. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- include/asm-x86_64/mmu_context.h |2 +- 1 files

[PATCH 21/25 -v2] export cpu_gdt_descr

2007-08-10 Thread Glauber de Oliveira Costa
-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- arch/x86_64/kernel/x8664_ksyms.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c index 77c25b3..2d3932d

[PATCH 16/25 -v2] turn page operations into native versions

2007-08-10 Thread Glauber de Oliveira Costa
This patch turns the page operations (set and make a page table) into native_ versions. The operations itself will be later overriden by paravirt. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- include/asm-x86_64/page.h | 36

[PATCH 7/25 -v2] interrupt related native paravirt functions.

2007-08-10 Thread Glauber de Oliveira Costa
-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- arch/x86_64/kernel/i8259.c |5 - include/asm-x86_64/irq.h |2 ++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/arch/x86_64/kernel/i8259.c b/arch/x86_64/kernel/i8259

[PATCH 23/25 -v2] provide paravirt patching function

2007-08-10 Thread Glauber de Oliveira Costa
This patch introduces apply_paravirt(), a function that shall be called by i386/alternative.c to apply replacements to paravirt_functions. It is defined to an do-nothing function if paravirt is not enabled. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt

[PATCH 22/25 -v2] turn priviled operation into a macro

2007-08-10 Thread Glauber de Oliveira Costa
under paravirt, read cr2 cannot be issued directly anymore. So wrap it in a macro, defined to the operation itself in case paravirt is off, but to something else if we have paravirt in the game Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL

[PATCH 17/25 -v2] introduce paravirt_release_pgd()

2007-08-10 Thread Glauber de Oliveira Costa
This patch introduces a new macro/function that informs a paravirt guest when its page table is not more in use, and can be released. In case we're not paravirt, just do nothing. Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED

[PATCH 15/25 -v2] introducing paravirt_activate_mm

2007-08-10 Thread Glauber de Oliveira Costa
This function/macro will allow a paravirt guest to be notified we changed the current task cr3, and act upon it. It's up to them Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- include/asm-x86_64/mmu_context.h | 17

[PATCH 9/25 -v2] report ring kernel is running without paravirt

2007-08-10 Thread Glauber de Oliveira Costa
When paravirtualization is disabled, the kernel is always running at ring 0. So report it in the appropriate macro Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- include/asm-x86_64/segment.h |4 1 files changed, 4

[PATCH 20/25 -v2] replace syscall_init

2007-08-10 Thread Glauber de Oliveira Costa
This patch replaces syscall_init by x86_64_syscall_init. The former will be later replaced by a paravirt replacement in case paravirt is on Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- arch/x86_64/kernel/setup64.c |8

[PATCH 24/25 -v2] paravirt hooks for arch initialization

2007-08-10 Thread Glauber de Oliveira Costa
) * Make paravirt_setup_arch() void (Andi) ] Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- arch/x86_64/kernel/setup.c | 32 +++- include/asm-x86_64/e820.h |6 ++ include/asm-x86_64/page.h |1

[PATCH 25/25 -v2] add paravirtualization support for x86_64

2007-08-10 Thread Glauber de Oliveira Costa
) * modifications needed to accomodate other parts of the patch that changed, such as getting rid of ebda_info * put the integers at struct paravirt_ops at the end (Jeremy) ] Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Steven Rostedt [EMAIL PROTECTED] --- arch

Re: [PATCH 3/25] [PATCH] irq_flags / halt routines

2007-08-09 Thread Glauber de Oliveira Costa
ner by moving them down, and so I did. But later on, you voiced concern about making CONFIG_PARAVIRT depend on !VSMP. (and said it would be okay, because these functions would be paravirt clients: but they won't) Given this updated picture, what's your position about this? Again, as they don't do anyt

Re: [PATCH 25/25] [PATCH] add paravirtualization support for x86_64

2007-08-09 Thread Glauber de Oliveira Costa
ligned. Then the question: Why would putting it in the end be different to putting them _together_, aligned at the beginning ? -- Glauber de Oliveira Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act." - To unsubscrib

Re: [PATCH 25/25] [PATCH] add paravirtualization support for x86_64

2007-08-09 Thread Glauber de Oliveira Costa
ok. Dividing by four would be a solution, but it > > + * would limit the future growth of the structure if needed. > > > > Why not just stick them at the end of the structure? Does it really matter? -- Glauber de Oliveira Costa. "Free as in Freedom" http://glommer.net &

Re: [PATCH 25/25] [PATCH] add paravirtualization support for x86_64

2007-08-09 Thread Glauber de Oliveira Costa
in the structure by 8, to get a number + * associated with the hook. Dividing by four would be a solution, but it + * would limit the future growth of the structure if needed. Why not just stick them at the end of the structure? Does it really matter? -- Glauber de Oliveira Costa. Free

Re: [PATCH 25/25] [PATCH] add paravirtualization support for x86_64

2007-08-09 Thread Glauber de Oliveira Costa
putting it in the end be different to putting them _together_, aligned at the beginning ? -- Glauber de Oliveira Costa. Free as in Freedom http://glommer.net The less confident you are, the more serious you have to act. - To unsubscribe from this list: send the line unsubscribe linux-kernel

Re: [PATCH 3/25] [PATCH] irq_flags / halt routines

2007-08-09 Thread Glauber de Oliveira Costa
it would be okay, because these functions would be paravirt clients: but they won't) Given this updated picture, what's your position about this? Again, as they don't do anything besides bit manipulation, I don't think they will stop VSMP from working with PARAVIRT. -- Glauber de Oliveira Costa. Free

Re: [PATCH 4/25] [PATCH] Add debugreg/load_rsp native hooks

2007-08-08 Thread Glauber de Oliveira Costa
t_ops for each set/get_debugreg, then split then in various set/get_debugregX(a, b), changing the current interface, OR c) plit the debugreg paravirt_ops in various paravirt_ops.set/get_debugreg{X,Y,Z...}, and give each its own function set/get_debugregX(a, b), again, changing the current interf

Re: [PATCH 5/7] Change lguest launcher to use asm generic include

2007-08-08 Thread Glauber de Oliveira Costa
quot; > +#include "../../include/asm/e820.h" Couldn't we add the ../../../../../../../etc to the Makefile and avoid it here? -- Glauber de Oliveira Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act."

Re: [PATCH 2/7] Added generic lg.h in lguest directory.

2007-08-08 Thread Glauber de Oliveira Costa
> @@ -0,0 +1,3 @@ > +#ifdef CONFIG_X86_32 > +#include "i386/lg.h" > +#endif Wouldn't it be cleaner to do something like the asm/ includes? I understand that lguest now lives in drivers/ and so we don't put headers directly in asm-i386 , but we could come up with a similar

Re: Introducing paravirt_ops for x86_64

2007-08-08 Thread Glauber de Oliveira Costa
with the i386 > tree. I see. I'll address this in the next version of the patch. -- Glauber de Oliveira Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act." - To unsubscribe from this list: send the line "unsubs

Re: Introducing paravirt_ops for x86_64

2007-08-08 Thread Glauber de Oliveira Costa
On 8/8/07, Nakajima, Jun <[EMAIL PROTECTED]> wrote: > Glauber de Oliveira Costa wrote: > > Hi folks, > > > > After some time away from it, and a big rebase as a consequence, here > is > > the updated version of paravirt_ops for x86_64, heading to inclusion.

Re: [PATCH 18/25] [PATCH] turn priviled operations into macros in entry.S

2007-08-08 Thread Glauber de Oliveira Costa
ah, I ommited it in the changelog, (it is in a comment at paravirt.h), should probably include. the CLBR_ defines only accounts for the caller-saved registers. -- Glauber de Oliveira Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you hav

Re: [PATCH 25/25] [PATCH] add paravirtualization support for x86_64

2007-08-08 Thread Glauber de Oliveira Costa
me rdi to be usually used already for the caller's > arguments so it will produce spilling > > Similar for the rax return in the other functions. I don't think we can do different. These functions can be patched, and if it happens, they will put their return value in rax. So we'd better expect

Re: [PATCH 21/25] [PATCH] export cpu_gdt_descr

2007-08-08 Thread Glauber de Oliveira Costa
On 8/8/07, Arjan van de Ven <[EMAIL PROTECTED]> wrote: > On Wed, 2007-08-08 at 01:19 -0300, Glauber de Oliveira Costa wrote: > > With paravirualization, hypervisors needs to handle the gdt, > > that was right to this point only used at very early > > inialization cod

Re: [PATCH 3/25] [PATCH] irq_flags / halt routines

2007-08-08 Thread Glauber de Oliveira Costa
On 8/8/07, Andi Kleen <[EMAIL PROTECTED]> wrote: > On Wednesday 08 August 2007 16:10:28 Glauber de Oliveira Costa wrote: > > On 8/8/07, Andi Kleen <[EMAIL PROTECTED]> wrote: > > > > > > > +#ifdef CONFIG_PARAVIRT > > > > +#include > &

Re: [PATCH 13/25] [PATCH] turn msr.h functions into native versions

2007-08-08 Thread Glauber de Oliveira Costa
On 8/8/07, Andi Kleen <[EMAIL PROTECTED]> wrote: > On Wednesday 08 August 2007 06:19, Glauber de Oliveira Costa wrote: > > > +static __always_inline long long vget_cycles_sync(void) > > Why is there a copy of this function now? That seems wrong Yeah, the other one i

Re: [PATCH 3/25] [PATCH] irq_flags / halt routines

2007-08-08 Thread Glauber de Oliveira Costa
t client first > instead of complicating all this even more. By "client" you mean a user of the paravirt interface? > > +#ifndef CONFIG_PARAVIRT > > +#define raw_safe_haltnative_raw_safe_halt > > +#define halt native_halt > > +#endif /* ! CONFI

Re: [PATCH 23/25] [PATCH] paravirt hooks for arch initialization

2007-08-08 Thread Glauber de Oliveira Costa
that it was a choice, it would only lead to code duplication if the hypervisor wanted it. But yeah, I understand your concern. They may chose to return 1 here just to change some tiny thing in the bottom. I don't know exactly what other kinds of hooks we could put there. lguest surely didn't need an

Re: [PATCH 18/25] [PATCH] turn priviled operations into macros in entry.S

2007-08-08 Thread Glauber de Oliveira Costa
> > ENTRY adds alignment. Why do you need that export anyways? > > The paravirt ops struct points to it. But the paravirt_ops probably won't need it as an export. So I guess andi is right. -- Glauber de Oliveira Costa. "Free as in Freedom" http://glommer.net &

Re: [PATCH 18/25] [PATCH] turn priviled operations into macros in entry.S

2007-08-08 Thread Glauber de Oliveira Costa
o keep it this way until it is merged, and we are sure all the rest is stable > > - swapgs > > + SWAPGS_NOSTACK > > There's still stack here Yes, but it is not safe to use. I think Roasted addressed it later on. > > paranoid_restore\trace: > > RESTORE_ALL 8 > > -

Re: [PATCH 5/25] [PATCH] native versions for system.h functions

2007-08-08 Thread Glauber de Oliveira Costa
Okay, this one is obviously wrong, my fault (it doesn't do what it says it does in the body of the e-mail. Resending... -- Glauber de Oliveira Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act." arch/x86_64/ke

[PATCH 23/25] [PATCH] paravirt hooks for arch initialization

2007-08-08 Thread Glauber de Oliveira Costa
memory_setup(), so it can handle it in its own way. The hypervisor can make its own ebda mapping visible by providing its custom ebda_info function. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/kernel/se

[PATCH 17/25] [PATCH] turn page operations into native versions

2007-08-08 Thread Glauber de Oliveira Costa
This patch turns the page operations (set and make a page table) into native_ versions. The operations itself will be later overriden by paravirt. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- include/asm-x86_64/p

[PATCH 13/25] [PATCH] turn msr.h functions into native versions

2007-08-08 Thread Glauber de Oliveira Costa
in the vsyscall area, as they cannot call any of them anymore (otherwise, the call would go through a kernel address, invalid in userspace mapping). The solution is to call the now-provided native_ versions instead. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven R

[PATCH 15/25] [PATCH] get rid of inline asm for load_cr3

2007-08-08 Thread Glauber de Oliveira Costa
Besides not elegant, it is now even forbidden, since it can break paravirtualized guests. load_cr3 should call write_cr3() instead. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- include/asm-x86_64/mmu_context.h

[PATCH 12/25] [PATCH] native versions for set pagetables

2007-08-08 Thread Glauber de Oliveira Costa
are moved to below the #ifdef CONFIG_PARAVIRT site, as they are users of the newly defined set_* macros. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- include/asm-x86_64/pgtable.h | 152

[PATCH 14/25] [PATCH] add native functions for descriptors handling

2007-08-08 Thread Glauber de Oliveira Costa
to be patched. We also patch call sites that now needs a typecast. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/kernel/head64.c |2 +- arch/x86_64/kernel/ldt.c |6 +- arch/x86_64/ker

[PATCH 24/25] [PATCH] provide paravirt patching function

2007-08-08 Thread Glauber de Oliveira Costa
This patch introduces apply_paravirt(), a function that shall be called by i386/alternative.c to apply replacements to paravirt_functions. It is defined to an do-nothing function if paravirt is not enabled. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven R

[PATCH 25/25] [PATCH] add paravirtualization support for x86_64

2007-08-08 Thread Glauber de Oliveira Costa
throughout this patch set. There are also changes in asm-offsets.c. paravirt.h needs it to find out the offsets into the structure of functions such as irq_enable, used in assembly files. The text in Kconfig is the same as i386 one. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTEC

[PATCH 9/25] [PATCH] report ring kernel is running without paravirt

2007-08-08 Thread Glauber de Oliveira Costa
When paravirtualization is disabled, the kernel is always running at ring 0. So report it in the appropriate macro Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- include/asm-x86_64/segment.h |4 1 file

[PATCH 11/25] [PATCH] introduce paravirt_release_pgd()

2007-08-08 Thread Glauber de Oliveira Costa
This patch introduces a new macro/function that informs a paravirt guest when its page table is not more in use, and can be released. In case we're not paravirt, just do nothing. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL

[PATCH 21/25] [PATCH] export cpu_gdt_descr

2007-08-08 Thread Glauber de Oliveira Costa
With paravirualization, hypervisors needs to handle the gdt, that was right to this point only used at very early inialization code. Hypervisors are commonly modules, so make it an export Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL

[PATCH 7/25] [PATCH] interrupt related native paravirt functions.

2007-08-08 Thread Glauber de Oliveira Costa
lashes, so it is renamed. Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/kernel/i8259.c | 15 +++ include/asm-x86_64/irq.h |2 ++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/arch

[PATCH 22/25] [PATCH] turn priviled operation into a macro

2007-08-08 Thread Glauber de Oliveira Costa
under paravirt, read cr2 cannot be issued directly anymore. So wrap it in a macro, defined to the operation itself in case paravirt is off, but to something else if we have paravirt in the game Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt &

[PATCH 19/25] [PATCH] time-related functions paravirt provisions

2007-08-08 Thread Glauber de Oliveira Costa
. The timer interrupt setup also have to be replaced. The job is done by time_init_hook(). Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/kernel/time.c | 37 + 1 files

[PATCH 20/25] [PATCH] replace syscall_init

2007-08-08 Thread Glauber de Oliveira Costa
This patch replaces syscall_init by x86_64_syscall_init. The former will be later replaced by a paravirt replacement in case paravirt is on Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> Signed-off-by: Steven Rostedt <[EMAIL PROTECTED]> --- arch/x86_64/kernel/setu

[PATCH 18/25] [PATCH] turn priviled operations into macros in entry.S

2007-08-08 Thread Glauber de Oliveira Costa
. It is basically because if we had already issued an swapgs, we would be with a user stack at this point. So we do all-in-one. The clobber list follows the idea of the i386 version closely, and represents which registers are safe to modify at the point the function is called. Signed-off-by: Glauber de Oliveira

<    4   5   6   7   8   9   10   11   >