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
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
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
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
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
)
* 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
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
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
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
)
* 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
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
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 &
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
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
-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
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
-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
.
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
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
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
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 +
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
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
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:
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:
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
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]>
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
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/
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
.
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
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
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
-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
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
-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
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
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
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
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
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
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
)
* 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
)
* 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
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
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
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
&
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
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
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
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
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."
> @@ -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
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
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.
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
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
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
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
> &
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
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
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
> > 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
&
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
> > -
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
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
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
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
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
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
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
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
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
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
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
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
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
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 &
.
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
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
. 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
801 - 900 of 1034 matches
Mail list logo