diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-21 04:57:15 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-21 05:03:32 -0400 |
commit | 33a37eb411d193851c334060780ab834ba534292 (patch) | |
tree | 15eff4d19335ec69ef2c222c800a0073cf10b924 | |
parent | e27772b48df91a954a74b1411b57d83b945a58c7 (diff) |
KVM: fix exception entry / build bug, on 64-bit
-tip testing found this build bug:
arch/x86/kvm/built-in.o:(.text.fixup+0x1): relocation truncated to fit: R_X86_64_32 against `.text'
arch/x86/kvm/built-in.o:(.text.fixup+0xb): relocation truncated to fit: R_X86_64_32 against `.text'
arch/x86/kvm/built-in.o:(.text.fixup+0x15): relocation truncated to fit: R_X86_64_32 against `.text'
arch/x86/kvm/built-in.o:(.text.fixup+0x1f): relocation truncated to fit: R_X86_64_32 against `.text'
arch/x86/kvm/built-in.o:(.text.fixup+0x29): relocation truncated to fit: R_X86_64_32 against `.text'
Introduced by commit 4ecac3fd. The problem is that 'push' will default
to 32-bit, which is not wide enough as a fixup address. (and which would
crash on any real fixup event even if it was wide enough)
Introduce KVM_EX_PUSH to get the proper address push width on 64-bit too.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | include/asm-x86/kvm_host.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h index f995783b1fdb..fdde0bedaa90 100644 --- a/include/asm-x86/kvm_host.h +++ b/include/asm-x86/kvm_host.h | |||
@@ -703,9 +703,11 @@ enum { | |||
703 | vcpu, 0, 0, 0, 0, 0, 0) | 703 | vcpu, 0, 0, 0, 0, 0, 0) |
704 | 704 | ||
705 | #ifdef CONFIG_64BIT | 705 | #ifdef CONFIG_64BIT |
706 | #define KVM_EX_ENTRY ".quad" | 706 | # define KVM_EX_ENTRY ".quad" |
707 | # define KVM_EX_PUSH "pushq" | ||
707 | #else | 708 | #else |
708 | #define KVM_EX_ENTRY ".long" | 709 | # define KVM_EX_ENTRY ".long" |
710 | # define KVM_EX_PUSH "pushl" | ||
709 | #endif | 711 | #endif |
710 | 712 | ||
711 | /* | 713 | /* |
@@ -719,7 +721,7 @@ asmlinkage void kvm_handle_fault_on_reboot(void); | |||
719 | "666: " insn "\n\t" \ | 721 | "666: " insn "\n\t" \ |
720 | ".pushsection .text.fixup, \"ax\" \n" \ | 722 | ".pushsection .text.fixup, \"ax\" \n" \ |
721 | "667: \n\t" \ | 723 | "667: \n\t" \ |
722 | "push $666b \n\t" \ | 724 | KVM_EX_PUSH " $666b \n\t" \ |
723 | "jmp kvm_handle_fault_on_reboot \n\t" \ | 725 | "jmp kvm_handle_fault_on_reboot \n\t" \ |
724 | ".popsection \n\t" \ | 726 | ".popsection \n\t" \ |
725 | ".pushsection __ex_table, \"a\" \n\t" \ | 727 | ".pushsection __ex_table, \"a\" \n\t" \ |