[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20061112140243.ADDA8A0001@cleopatra.q>
Date: Sun, 12 Nov 2006 14:02:43 -0000
From: Avi Kivity <avi@...ranet.com>
To: kvm-devel@...ts.sourceforge.net
Cc: akpm@...l.org, linux-kernel@...r.kernel.org, bero@...linux.org
Subject: [PATCH] KVM: Fix asm constraints for segment loads
From: Bernhard Rosenkraenzer <bero@...linux.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@...ranet.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists