diff options
Diffstat (limited to 'arch/x86/lguest/boot.c')
-rw-r--r-- | arch/x86/lguest/boot.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index a7ed208f81e3..960a8d9c049c 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -343,6 +343,11 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx, | |||
343 | * flush_tlb_user() for both user and kernel mappings unless | 343 | * flush_tlb_user() for both user and kernel mappings unless |
344 | * the Page Global Enable (PGE) feature bit is set. */ | 344 | * the Page Global Enable (PGE) feature bit is set. */ |
345 | *dx |= 0x00002000; | 345 | *dx |= 0x00002000; |
346 | /* We also lie, and say we're family id 5. 6 or greater | ||
347 | * leads to a rdmsr in early_init_intel which we can't handle. | ||
348 | * Family ID is returned as bits 8-12 in ax. */ | ||
349 | *ax &= 0xFFFFF0FF; | ||
350 | *ax |= 0x00000500; | ||
346 | break; | 351 | break; |
347 | case 0x80000000: | 352 | case 0x80000000: |
348 | /* Futureproof this a little: if they ask how much extended | 353 | /* Futureproof this a little: if they ask how much extended |
@@ -589,19 +594,21 @@ static void __init lguest_init_IRQ(void) | |||
589 | /* Some systems map "vectors" to interrupts weirdly. Lguest has | 594 | /* Some systems map "vectors" to interrupts weirdly. Lguest has |
590 | * a straightforward 1 to 1 mapping, so force that here. */ | 595 | * a straightforward 1 to 1 mapping, so force that here. */ |
591 | __get_cpu_var(vector_irq)[vector] = i; | 596 | __get_cpu_var(vector_irq)[vector] = i; |
592 | if (vector != SYSCALL_VECTOR) { | 597 | if (vector != SYSCALL_VECTOR) |
593 | set_intr_gate(vector, | 598 | set_intr_gate(vector, interrupt[i]); |
594 | interrupt[vector-FIRST_EXTERNAL_VECTOR]); | ||
595 | set_irq_chip_and_handler_name(i, &lguest_irq_controller, | ||
596 | handle_level_irq, | ||
597 | "level"); | ||
598 | } | ||
599 | } | 599 | } |
600 | /* This call is required to set up for 4k stacks, where we have | 600 | /* This call is required to set up for 4k stacks, where we have |
601 | * separate stacks for hard and soft interrupts. */ | 601 | * separate stacks for hard and soft interrupts. */ |
602 | irq_ctx_init(smp_processor_id()); | 602 | irq_ctx_init(smp_processor_id()); |
603 | } | 603 | } |
604 | 604 | ||
605 | void lguest_setup_irq(unsigned int irq) | ||
606 | { | ||
607 | irq_to_desc_alloc_cpu(irq, 0); | ||
608 | set_irq_chip_and_handler_name(irq, &lguest_irq_controller, | ||
609 | handle_level_irq, "level"); | ||
610 | } | ||
611 | |||
605 | /* | 612 | /* |
606 | * Time. | 613 | * Time. |
607 | * | 614 | * |
@@ -931,7 +938,7 @@ static void lguest_restart(char *reason) | |||
931 | * that we can fit comfortably. | 938 | * that we can fit comfortably. |
932 | * | 939 | * |
933 | * First we need assembly templates of each of the patchable Guest operations, | 940 | * First we need assembly templates of each of the patchable Guest operations, |
934 | * and these are in lguest_asm.S. */ | 941 | * and these are in i386_head.S. */ |
935 | 942 | ||
936 | /*G:060 We construct a table from the assembler templates: */ | 943 | /*G:060 We construct a table from the assembler templates: */ |
937 | static const struct lguest_insns | 944 | static const struct lguest_insns |
@@ -1093,7 +1100,7 @@ __init void lguest_init(void) | |||
1093 | acpi_ht = 0; | 1100 | acpi_ht = 0; |
1094 | #endif | 1101 | #endif |
1095 | 1102 | ||
1096 | /* We set the perferred console to "hvc". This is the "hypervisor | 1103 | /* We set the preferred console to "hvc". This is the "hypervisor |
1097 | * virtual console" driver written by the PowerPC people, which we also | 1104 | * virtual console" driver written by the PowerPC people, which we also |
1098 | * adapted for lguest's use. */ | 1105 | * adapted for lguest's use. */ |
1099 | add_preferred_console("hvc", 0, NULL); | 1106 | add_preferred_console("hvc", 0, NULL); |