Skip to content

Commit

Permalink
Revert "[PATCH] paravirt: Add startup infrastructure for paravirtuali…
Browse files Browse the repository at this point in the history
…zation"

This reverts commit c9ccf30.

Entering the kernel at startup_32 without passing our real mode data in
%esi, and without guaranteeing that physical and virtual addresses are
identity mapped makes head.S impossible to maintain.

The only user of this infrastructure is lguest which is not merged so
nothing we currently support will break by removing this over designed
nightmare, and only the pending lguest patches will be affected.  The
pending Xen patches have a different entry point that they use.

We are currently discussing what Xen and lguest need to do to boot the
kernel in a more normal fashion so using startup_32 in this weird manner is
clearly not their long term direction.

So let's remove this code in head.S before it causes brain damage to people
trying to maintain head.S

Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Andi Kleen <ak@suse.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Zachary Amsden <zach@vmware.com>
CC: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed May 10, 2007
1 parent 0cfe61e commit 5a18c92
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 50 deletions.
38 changes: 0 additions & 38 deletions arch/i386/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ INIT_MAP_BEYOND_END = BOOTBITMAP_SIZE + (PAGE_TABLE_SIZE + ALLOCATOR_SLOP)*PAGE_
.section .text.head,"ax",@progbits
ENTRY(startup_32)

#ifdef CONFIG_PARAVIRT
movl %cs, %eax
testl $0x3, %eax
jnz startup_paravirt
#endif

/*
* Set segments to known values.
*/
Expand Down Expand Up @@ -501,38 +495,6 @@ ignore_int:
iret

.section .text
#ifdef CONFIG_PARAVIRT
startup_paravirt:
cld
movl $(init_thread_union+THREAD_SIZE),%esp

/* We take pains to preserve all the regs. */
pushl %edx
pushl %ecx
pushl %eax

pushl $__start_paravirtprobe
1:
movl 0(%esp), %eax
cmpl $__stop_paravirtprobe, %eax
je unhandled_paravirt
pushl (%eax)
movl 8(%esp), %eax
call *(%esp)
popl %eax

movl 4(%esp), %eax
movl 8(%esp), %ecx
movl 12(%esp), %edx

addl $4, (%esp)
jmp 1b

unhandled_paravirt:
/* Nothing wanted us: we're screwed. */
ud2
#endif

/*
* Real beginning of normal "text" segment
*/
Expand Down
1 change: 0 additions & 1 deletion arch/i386/kernel/paravirt.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <linux/module.h>
#include <linux/efi.h>
#include <linux/bcd.h>
#include <linux/start_kernel.h>
#include <linux/highmem.h>

#include <asm/bug.h>
Expand Down
6 changes: 0 additions & 6 deletions arch/i386/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ SECTIONS
CONSTRUCTORS
} :data

.paravirtprobe : AT(ADDR(.paravirtprobe) - LOAD_OFFSET) {
__start_paravirtprobe = .;
*(.paravirtprobe)
__stop_paravirtprobe = .;
}

. = ALIGN(4096);
.data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) {
__nosave_begin = .;
Expand Down
5 changes: 0 additions & 5 deletions include/asm-i386/paravirt.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,6 @@ struct paravirt_ops
void (*iret)(void);
};

/* Mark a paravirt probe function. */
#define paravirt_probe(fn) \
static asmlinkage void (*__paravirtprobe_##fn)(void) __attribute_used__ \
__attribute__((__section__(".paravirtprobe"))) = fn

extern struct paravirt_ops paravirt_ops;

#define PARAVIRT_PATCH(x) \
Expand Down

0 comments on commit 5a18c92

Please sign in to comment.