Commit a14e579f authored by Avi Kivity's avatar Avi Kivity

KVM: x86 emulator: emulate LLDT

Opcode 0F 00 /2. Used by isolinux durign the protected mode transition.
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 9299836e
...@@ -3015,6 +3015,15 @@ static int em_mov_sreg_rm(struct x86_emulate_ctxt *ctxt) ...@@ -3015,6 +3015,15 @@ static int em_mov_sreg_rm(struct x86_emulate_ctxt *ctxt)
return load_segment_descriptor(ctxt, sel, ctxt->modrm_reg); return load_segment_descriptor(ctxt, sel, ctxt->modrm_reg);
} }
static int em_lldt(struct x86_emulate_ctxt *ctxt)
{
u16 sel = ctxt->src.val;
/* Disable writeback. */
ctxt->dst.type = OP_NONE;
return load_segment_descriptor(ctxt, sel, VCPU_SREG_LDTR);
}
static int em_invlpg(struct x86_emulate_ctxt *ctxt) static int em_invlpg(struct x86_emulate_ctxt *ctxt)
{ {
int rc; int rc;
...@@ -3560,7 +3569,7 @@ static struct opcode group5[] = { ...@@ -3560,7 +3569,7 @@ static struct opcode group5[] = {
static struct opcode group6[] = { static struct opcode group6[] = {
DI(Prot, sldt), DI(Prot, sldt),
DI(Prot, str), DI(Prot, str),
DI(Prot | Priv, lldt), II(Prot | Priv | SrcMem16, em_lldt, lldt),
DI(Prot | Priv, ltr), DI(Prot | Priv, ltr),
N, N, N, N, N, N, N, N,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment