[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20061120102820.A828825015E@cleopatra.q>
Date: Mon, 20 Nov 2006 10:28:20 -0000
From: Avi Kivity <avi@...ranet.com>
To: kvm-devel@...ts.sourceforge.net
Cc: akpm@...l.org, kvm-devel@...ts.sourceforge.net,
yaniv.kamay@...ranet.com, linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] KVM: Pass fs, gs segment bases to x86 emulator
From: Yaniv Kamay <yaniv@...ranet.com>
The x86-64 respects segment bases for fs and gs.
Signed-off-by: Yaniv Kamay <yaniv@...ranet.com>
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
@@ -1907,17 +1907,16 @@ static int emulate_instruction(struct kv
emulate_ctxt.ds_base = 0;
emulate_ctxt.es_base = 0;
emulate_ctxt.ss_base = 0;
- emulate_ctxt.gs_base = 0;
- emulate_ctxt.fs_base = 0;
} else {
emulate_ctxt.cs_base = vmcs_readl(GUEST_CS_BASE);
emulate_ctxt.ds_base = vmcs_readl(GUEST_DS_BASE);
emulate_ctxt.es_base = vmcs_readl(GUEST_ES_BASE);
emulate_ctxt.ss_base = vmcs_readl(GUEST_SS_BASE);
- emulate_ctxt.gs_base = vmcs_readl(GUEST_GS_BASE);
- emulate_ctxt.fs_base = vmcs_readl(GUEST_FS_BASE);
}
+ emulate_ctxt.gs_base = vmcs_readl(GUEST_GS_BASE);
+ emulate_ctxt.fs_base = vmcs_readl(GUEST_FS_BASE);
+
vcpu->mmio_is_write = 0;
r = x86_emulate_memop(&emulate_ctxt, &emulate_ops);
-
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