OpenCloudOS-Kernel/arch/i386/xen
Andi Kleen ab144f5ec6 i386: Make patching more robust, fix paravirt issue
Commit 19d36ccdc3 "x86: Fix alternatives
and kprobes to remap write-protected kernel text" uses code which is
being patched for patching.

In particular, paravirt_ops does patching in two stages: first it
calls paravirt_ops.patch, then it fills any remaining instructions
with nop_out().  nop_out calls text_poke() which calls
lookup_address() which calls pgd_val() (aka paravirt_ops.pgd_val):
that call site is one of the places we patch.

If we always do patching as one single call to text_poke(), we only
need make sure we're not patching the memcpy in text_poke itself.
This means the prototype to paravirt_ops.patch needs to change, to
marshal the new code into a buffer rather than patching in place as it
does now.  It also means all patching goes through text_poke(), which
is known to be safe (apply_alternatives is also changed to make a
single patch).

AK: fix compilation on x86-64 (bad rusty!)
AK: fix boot on x86-64 (sigh)
AK: merged with other patches

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:58:13 -07:00
..
Kconfig xen: Add support for preemption 2007-07-18 08:47:44 -07:00
Makefile xen: Attempt to patch inline versions of common operations 2007-07-18 08:47:45 -07:00
enlighten.c i386: Make patching more robust, fix paravirt issue 2007-08-11 15:58:13 -07:00
events.c arch/i386/xen/events.c should #include <asm/xen/hypervisor.h> 2007-07-20 08:44:19 -07:00
features.c xen: Core Xen implementation 2007-07-18 08:47:42 -07:00
manage.c xen: handle external requests for shutdown, reboot and sysrq 2007-07-18 08:47:45 -07:00
mmu.c xen: lazy-mmu operations 2007-07-18 08:47:44 -07:00
mmu.h xen: SMP guest support 2007-07-18 08:47:44 -07:00
multicalls.c xen: lazy-mmu operations 2007-07-18 08:47:44 -07:00
multicalls.h xen: Core Xen implementation 2007-07-18 08:47:42 -07:00
setup.c xen: disable vdso "nosegneg" on native boot 2007-07-20 08:44:19 -07:00
smp.c xen: Place vcpu_info structure into per-cpu memory 2007-07-18 08:47:45 -07:00
time.c clockevents: fix resume logic 2007-07-21 17:49:15 -07:00
vdso.h xen: disable vdso "nosegneg" on native boot 2007-07-20 08:44:19 -07:00
xen-asm.S xen: use iret directly when possible 2007-07-18 08:47:46 -07:00
xen-head.S x86_64: Fix xen section warnings 2007-07-22 11:17:17 -07:00
xen-ops.h xen: use iret directly when possible 2007-07-18 08:47:46 -07:00