aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-06-13 05:28:33 -0400
committerAvi Kivity <avi@redhat.com>2012-07-09 07:19:04 -0400
commita14e579f224ba929fe2f1d9bbbff688ae67e2ec4 (patch)
tree6f03c2c154c71d259ff39784b78434124ff64704 /arch/x86/kvm
parent9299836e6379d5703826a540fb3c704223fac520 (diff)
KVM: x86 emulator: emulate LLDT
Opcode 0F 00 /2. Used by isolinux durign the protected mode transition. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/emulate.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index cfa5cc30c1d9..7b575adaf1fd 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -3015,6 +3015,15 @@ static int em_mov_sreg_rm(struct x86_emulate_ctxt *ctxt)
3015 return load_segment_descriptor(ctxt, sel, ctxt->modrm_reg); 3015 return load_segment_descriptor(ctxt, sel, ctxt->modrm_reg);
3016} 3016}
3017 3017
3018static int em_lldt(struct x86_emulate_ctxt *ctxt)
3019{
3020 u16 sel = ctxt->src.val;
3021
3022 /* Disable writeback. */
3023 ctxt->dst.type = OP_NONE;
3024 return load_segment_descriptor(ctxt, sel, VCPU_SREG_LDTR);
3025}
3026
3018static int em_invlpg(struct x86_emulate_ctxt *ctxt) 3027static int em_invlpg(struct x86_emulate_ctxt *ctxt)
3019{ 3028{
3020 int rc; 3029 int rc;
@@ -3560,7 +3569,7 @@ static struct opcode group5[] = {
3560static struct opcode group6[] = { 3569static struct opcode group6[] = {
3561 DI(Prot, sldt), 3570 DI(Prot, sldt),
3562 DI(Prot, str), 3571 DI(Prot, str),
3563 DI(Prot | Priv, lldt), 3572 II(Prot | Priv | SrcMem16, em_lldt, lldt),
3564 DI(Prot | Priv, ltr), 3573 DI(Prot | Priv, ltr),
3565 N, N, N, N, 3574 N, N, N, N,
3566}; 3575};