direct-io.hg

view patches/linux-2.6.16.29/x86-increase-interrupt-vector-range.patch @ 11750:d845c9522d9e

[HVM][SVM] Check if SVM is disabled by the BIOS before enabling it.

Newer BIOS implementations will be able to disable the SVM feature,
although an additional test of an MSR (VMCR 0xC0010114 bit 4) is
necessary (set equals disabled). Bit 4 of MSR 0xc0010114 returns 0
(SVM enabled) on machines with older BIOS' without the SVM disable
feature support.

Signed-off-by: Wei Huang <wei.huang2@amd.com>=20
Signed-off-by: Tom Woller <thomas.woller@amd.com>=20
author kfraser@localhost.localdomain
date Thu Oct 12 16:12:10 2006 +0100 (2006-10-12)
parents 041be3f6b38e
children
line source
1 diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/entry.S ./arch/i386/kernel/entry.S
2 --- ../orig-linux-2.6.16.29/arch/i386/kernel/entry.S 2006-09-19 14:05:44.000000000 +0100
3 +++ ./arch/i386/kernel/entry.S 2006-09-19 14:05:56.000000000 +0100
4 @@ -406,7 +406,7 @@ vector=0
5 ENTRY(irq_entries_start)
6 .rept NR_IRQS
7 ALIGN
8 -1: pushl $vector-256
9 +1: pushl $~(vector)
10 jmp common_interrupt
11 .data
12 .long 1b
13 @@ -423,7 +423,7 @@ common_interrupt:
15 #define BUILD_INTERRUPT(name, nr) \
16 ENTRY(name) \
17 - pushl $nr-256; \
18 + pushl $~(nr); \
19 SAVE_ALL \
20 movl %esp,%eax; \
21 call smp_/**/name; \
22 diff -pruN ../orig-linux-2.6.16.29/arch/i386/kernel/irq.c ./arch/i386/kernel/irq.c
23 --- ../orig-linux-2.6.16.29/arch/i386/kernel/irq.c 2006-09-12 19:02:10.000000000 +0100
24 +++ ./arch/i386/kernel/irq.c 2006-09-19 14:05:56.000000000 +0100
25 @@ -53,8 +53,8 @@ static union irq_ctx *softirq_ctx[NR_CPU
26 */
27 fastcall unsigned int do_IRQ(struct pt_regs *regs)
28 {
29 - /* high bits used in ret_from_ code */
30 - int irq = regs->orig_eax & 0xff;
31 + /* high bit used in ret_from_ code */
32 + int irq = ~regs->orig_eax;
33 #ifdef CONFIG_4KSTACKS
34 union irq_ctx *curctx, *irqctx;
35 u32 *isp;
36 diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/entry.S ./arch/x86_64/kernel/entry.S
37 --- ../orig-linux-2.6.16.29/arch/x86_64/kernel/entry.S 2006-09-12 19:02:10.000000000 +0100
38 +++ ./arch/x86_64/kernel/entry.S 2006-09-19 14:05:56.000000000 +0100
39 @@ -596,7 +596,7 @@ retint_kernel:
40 */
41 .macro apicinterrupt num,func
42 INTR_FRAME
43 - pushq $\num-256
44 + pushq $~(\num)
45 CFI_ADJUST_CFA_OFFSET 8
46 interrupt \func
47 jmp ret_from_intr
48 diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/irq.c ./arch/x86_64/kernel/irq.c
49 --- ../orig-linux-2.6.16.29/arch/x86_64/kernel/irq.c 2006-09-12 19:02:10.000000000 +0100
50 +++ ./arch/x86_64/kernel/irq.c 2006-09-19 14:05:56.000000000 +0100
51 @@ -96,8 +96,8 @@ skip:
52 */
53 asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
54 {
55 - /* high bits used in ret_from_ code */
56 - unsigned irq = regs->orig_rax & 0xff;
57 + /* high bit used in ret_from_ code */
58 + unsigned irq = ~regs->orig_rax;
60 exit_idle();
61 irq_enter();
62 diff -pruN ../orig-linux-2.6.16.29/arch/x86_64/kernel/smp.c ./arch/x86_64/kernel/smp.c
63 --- ../orig-linux-2.6.16.29/arch/x86_64/kernel/smp.c 2006-09-12 19:02:10.000000000 +0100
64 +++ ./arch/x86_64/kernel/smp.c 2006-09-19 14:05:56.000000000 +0100
65 @@ -135,10 +135,10 @@ asmlinkage void smp_invalidate_interrupt
67 cpu = smp_processor_id();
68 /*
69 - * orig_rax contains the interrupt vector - 256.
70 + * orig_rax contains the negated interrupt vector.
71 * Use that to determine where the sender put the data.
72 */
73 - sender = regs->orig_rax + 256 - INVALIDATE_TLB_VECTOR_START;
74 + sender = ~regs->orig_rax - INVALIDATE_TLB_VECTOR_START;
75 f = &per_cpu(flush_state, sender);
77 if (!cpu_isset(cpu, f->flush_cpumask))
78 diff -pruN ../orig-linux-2.6.16.29/include/asm-x86_64/hw_irq.h ./include/asm-x86_64/hw_irq.h
79 --- ../orig-linux-2.6.16.29/include/asm-x86_64/hw_irq.h 2006-09-12 19:02:10.000000000 +0100
80 +++ ./include/asm-x86_64/hw_irq.h 2006-09-19 14:05:56.000000000 +0100
81 @@ -127,7 +127,7 @@ asmlinkage void IRQ_NAME(nr); \
82 __asm__( \
83 "\n.p2align\n" \
84 "IRQ" #nr "_interrupt:\n\t" \
85 - "push $" #nr "-256 ; " \
86 + "push $~(" #nr ") ; " \
87 "jmp common_interrupt");
89 #if defined(CONFIG_X86_IO_APIC)