diff options
Diffstat (limited to 'arch/x86/lguest/boot.c')
| -rw-r--r-- | arch/x86/lguest/boot.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index f3a5305b8adf..9fe4ddaa8f6f 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
| @@ -348,6 +348,11 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx, | |||
| 348 | * flush_tlb_user() for both user and kernel mappings unless | 348 | * flush_tlb_user() for both user and kernel mappings unless |
| 349 | * the Page Global Enable (PGE) feature bit is set. */ | 349 | * the Page Global Enable (PGE) feature bit is set. */ |
| 350 | *dx |= 0x00002000; | 350 | *dx |= 0x00002000; |
| 351 | /* We also lie, and say we're family id 5. 6 or greater | ||
| 352 | * leads to a rdmsr in early_init_intel which we can't handle. | ||
| 353 | * Family ID is returned as bits 8-12 in ax. */ | ||
| 354 | *ax &= 0xFFFFF0FF; | ||
| 355 | *ax |= 0x00000500; | ||
| 351 | break; | 356 | break; |
| 352 | case 0x80000000: | 357 | case 0x80000000: |
| 353 | /* Futureproof this a little: if they ask how much extended | 358 | /* Futureproof this a little: if they ask how much extended |
| @@ -594,19 +599,21 @@ static void __init lguest_init_IRQ(void) | |||
| 594 | /* Some systems map "vectors" to interrupts weirdly. Lguest has | 599 | /* Some systems map "vectors" to interrupts weirdly. Lguest has |
| 595 | * a straightforward 1 to 1 mapping, so force that here. */ | 600 | * a straightforward 1 to 1 mapping, so force that here. */ |
| 596 | __get_cpu_var(vector_irq)[vector] = i; | 601 | __get_cpu_var(vector_irq)[vector] = i; |
| 597 | if (vector != SYSCALL_VECTOR) { | 602 | if (vector != SYSCALL_VECTOR) |
| 598 | set_intr_gate(vector, | 603 | set_intr_gate(vector, interrupt[i]); |
| 599 | interrupt[vector-FIRST_EXTERNAL_VECTOR]); | ||
| 600 | set_irq_chip_and_handler_name(i, &lguest_irq_controller, | ||
| 601 | handle_level_irq, | ||
| 602 | "level"); | ||
| 603 | } | ||
| 604 | } | 604 | } |
| 605 | /* This call is required to set up for 4k stacks, where we have | 605 | /* This call is required to set up for 4k stacks, where we have |
| 606 | * separate stacks for hard and soft interrupts. */ | 606 | * separate stacks for hard and soft interrupts. */ |
| 607 | irq_ctx_init(smp_processor_id()); | 607 | irq_ctx_init(smp_processor_id()); |
| 608 | } | 608 | } |
| 609 | 609 | ||
| 610 | void lguest_setup_irq(unsigned int irq) | ||
| 611 | { | ||
| 612 | irq_to_desc_alloc_cpu(irq, 0); | ||
| 613 | set_irq_chip_and_handler_name(irq, &lguest_irq_controller, | ||
| 614 | handle_level_irq, "level"); | ||
| 615 | } | ||
| 616 | |||
| 610 | /* | 617 | /* |
| 611 | * Time. | 618 | * Time. |
| 612 | * | 619 | * |
