public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use .fixup instead of .text.fixup on __kvm_handle_fault_on_reboot
@ 2008-08-19 23:00 Eduardo Habkost
  2008-08-21 13:49 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Eduardo Habkost @ 2008-08-19 23:00 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Chris Wright, kvm

[oops. sent it to the old kvm-devel list. sending to the right list, now]

vmlinux.lds expects the fixup code to be on a section named .fixup. The
.text.fixup section is not mentioned on vmlinux.lds, and is included on
the resulting vmlinux (just after .text) only because of ld heuristics on
placing orphan sections.

However, placing .text.fixup outside .text breaks the definition of
_etext, making it exclude the .text.fixup contents. That makes .text.fixup
be ignored by the kernel initialization code that needs to know about
section locations, such as the code setting page protection bits.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 include/asm-x86/kvm_host.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h
index 1e28880..982b6b2 100644
--- a/include/asm-x86/kvm_host.h
+++ b/include/asm-x86/kvm_host.h
@@ -743,7 +743,7 @@ asmlinkage void kvm_handle_fault_on_reboot(void);
 
 #define __kvm_handle_fault_on_reboot(insn) \
 	"666: " insn "\n\t" \
-	".pushsection .text.fixup, \"ax\" \n" \
+	".pushsection .fixup, \"ax\" \n" \
 	"667: \n\t" \
 	__ASM_SIZE(push) " $666b \n\t"	      \
 	"jmp kvm_handle_fault_on_reboot \n\t" \
-- 
1.5.5.GIT

-- 
Eduardo

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Use .fixup instead of .text.fixup on __kvm_handle_fault_on_reboot
  2008-08-19 23:00 [PATCH] Use .fixup instead of .text.fixup on __kvm_handle_fault_on_reboot Eduardo Habkost
@ 2008-08-21 13:49 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2008-08-21 13:49 UTC (permalink / raw)
  To: Eduardo Habkost; +Cc: Chris Wright, kvm

Eduardo Habkost wrote:
> [oops. sent it to the old kvm-devel list. sending to the right list, now]
>
> vmlinux.lds expects the fixup code to be on a section named .fixup. The
> .text.fixup section is not mentioned on vmlinux.lds, and is included on
> the resulting vmlinux (just after .text) only because of ld heuristics on
> placing orphan sections.
>
> However, placing .text.fixup outside .text breaks the definition of
> _etext, making it exclude the .text.fixup contents. That makes .text.fixup
> be ignored by the kernel initialization code that needs to know about
> section locations, such as the code setting page protection bits.
>
>   

Applied, thanks.


-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-21 13:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-19 23:00 [PATCH] Use .fixup instead of .text.fixup on __kvm_handle_fault_on_reboot Eduardo Habkost
2008-08-21 13:49 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox