Messages in this thread Patch in this message | | | Subject | [PATCH] KVM: Fix asm constraints for segment loads | From | Avi Kivity <> | Date | Sun, 12 Nov 2006 14:02:43 -0000 |
| |
From: Bernhard Rosenkraenzer <bero@arklinux.org>
"g" is an invalid constraint for a segment register load, since it includes immediate operands, which are illegal for segment moves.
Fix by specifying register or memory operands.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Index: linux-2.6/drivers/kvm/kvm_main.c =================================================================== --- linux-2.6.orig/drivers/kvm/kvm_main.c +++ linux-2.6/drivers/kvm/kvm_main.c @@ -154,12 +154,12 @@ static u16 read_ldt(void) static void load_fs(u16 sel) { - asm ("mov %0, %%fs" : : "g"(sel)); + asm ("mov %0, %%fs" : : "rm"(sel)); } static void load_gs(u16 sel) { - asm ("mov %0, %%gs" : : "g"(sel)); + asm ("mov %0, %%gs" : : "rm"(sel)); } #ifndef load_ldt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |