diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-30 17:35:32 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-30 17:35:32 -0500 |
| commit | d145c7253c8cb2ed8a75a8839621b0bb8f778820 (patch) | |
| tree | fac21920d149a2cddfdfbde65066ff98935a9c57 /arch | |
| parent | 44c3b59102e3ecc7a01e9811862633e670595e51 (diff) | |
| parent | 84f12e39c856a8b1ab407f8216ecebaf4204b94d (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: (27 commits)
lguest: use __PAGE_KERNEL instead of _PAGE_KERNEL
lguest: Use explicit includes rateher than indirect
lguest: get rid of lg variable assignments
lguest: change gpte_addr header
lguest: move changed bitmap to lg_cpu
lguest: move last_pages to lg_cpu
lguest: change last_guest to last_cpu
lguest: change spte_addr header
lguest: per-vcpu lguest pgdir management
lguest: make pending notifications per-vcpu
lguest: makes special fields be per-vcpu
lguest: per-vcpu lguest task management
lguest: replace lguest_arch with lg_cpu_arch.
lguest: make registers per-vcpu
lguest: make emulate_insn receive a vcpu struct.
lguest: map_switcher_in_guest() per-vcpu
lguest: per-vcpu interrupt processing.
lguest: per-vcpu lguest timers
lguest: make hypercalls use the vcpu struct
lguest: make write() operation smp aware
...
Manual conflict resolved (maybe even correctly, who knows) in
drivers/lguest/x86/core.c
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86/lguest/boot.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index a63373759f08..5afdde4895dc 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
| @@ -67,6 +67,7 @@ | |||
| 67 | #include <asm/mce.h> | 67 | #include <asm/mce.h> |
| 68 | #include <asm/io.h> | 68 | #include <asm/io.h> |
| 69 | #include <asm/i387.h> | 69 | #include <asm/i387.h> |
| 70 | #include <asm/reboot.h> /* for struct machine_ops */ | ||
| 70 | 71 | ||
| 71 | /*G:010 Welcome to the Guest! | 72 | /*G:010 Welcome to the Guest! |
| 72 | * | 73 | * |
| @@ -813,7 +814,7 @@ static void lguest_safe_halt(void) | |||
| 813 | * rather than virtual addresses, so we use __pa() here. */ | 814 | * rather than virtual addresses, so we use __pa() here. */ |
| 814 | static void lguest_power_off(void) | 815 | static void lguest_power_off(void) |
| 815 | { | 816 | { |
| 816 | hcall(LHCALL_CRASH, __pa("Power down"), 0, 0); | 817 | hcall(LHCALL_SHUTDOWN, __pa("Power down"), LGUEST_SHUTDOWN_POWEROFF, 0); |
| 817 | } | 818 | } |
| 818 | 819 | ||
| 819 | /* | 820 | /* |
| @@ -823,7 +824,7 @@ static void lguest_power_off(void) | |||
| 823 | */ | 824 | */ |
| 824 | static int lguest_panic(struct notifier_block *nb, unsigned long l, void *p) | 825 | static int lguest_panic(struct notifier_block *nb, unsigned long l, void *p) |
| 825 | { | 826 | { |
| 826 | hcall(LHCALL_CRASH, __pa(p), 0, 0); | 827 | hcall(LHCALL_SHUTDOWN, __pa(p), LGUEST_SHUTDOWN_POWEROFF, 0); |
| 827 | /* The hcall won't return, but to keep gcc happy, we're "done". */ | 828 | /* The hcall won't return, but to keep gcc happy, we're "done". */ |
| 828 | return NOTIFY_DONE; | 829 | return NOTIFY_DONE; |
| 829 | } | 830 | } |
| @@ -927,6 +928,11 @@ static unsigned lguest_patch(u8 type, u16 clobber, void *ibuf, | |||
| 927 | return insn_len; | 928 | return insn_len; |
| 928 | } | 929 | } |
| 929 | 930 | ||
| 931 | static void lguest_restart(char *reason) | ||
| 932 | { | ||
| 933 | hcall(LHCALL_SHUTDOWN, __pa(reason), LGUEST_SHUTDOWN_RESTART, 0); | ||
| 934 | } | ||
| 935 | |||
| 930 | /*G:030 Once we get to lguest_init(), we know we're a Guest. The pv_ops | 936 | /*G:030 Once we get to lguest_init(), we know we're a Guest. The pv_ops |
| 931 | * structures in the kernel provide points for (almost) every routine we have | 937 | * structures in the kernel provide points for (almost) every routine we have |
| 932 | * to override to avoid privileged instructions. */ | 938 | * to override to avoid privileged instructions. */ |
| @@ -1060,6 +1066,7 @@ __init void lguest_init(void) | |||
| 1060 | * the Guest routine to power off. */ | 1066 | * the Guest routine to power off. */ |
| 1061 | pm_power_off = lguest_power_off; | 1067 | pm_power_off = lguest_power_off; |
| 1062 | 1068 | ||
| 1069 | machine_ops.restart = lguest_restart; | ||
| 1063 | /* Now we're set up, call start_kernel() in init/main.c and we proceed | 1070 | /* Now we're set up, call start_kernel() in init/main.c and we proceed |
| 1064 | * to boot as normal. It never returns. */ | 1071 | * to boot as normal. It never returns. */ |
| 1065 | start_kernel(); | 1072 | start_kernel(); |
