aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 92a1adde0b44..97d9a9914ba8 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -3033,6 +3033,15 @@ static int em_lldt(struct x86_emulate_ctxt *ctxt)
3033 return load_segment_descriptor(ctxt, sel, VCPU_SREG_LDTR); 3033 return load_segment_descriptor(ctxt, sel, VCPU_SREG_LDTR);
3034} 3034}
3035 3035
3036static int em_ltr(struct x86_emulate_ctxt *ctxt)
3037{
3038 u16 sel = ctxt->src.val;
3039
3040 /* Disable writeback. */
3041 ctxt->dst.type = OP_NONE;
3042 return load_segment_descriptor(ctxt, sel, VCPU_SREG_TR);
3043}
3044
3036static int em_invlpg(struct x86_emulate_ctxt *ctxt) 3045static int em_invlpg(struct x86_emulate_ctxt *ctxt)
3037{ 3046{
3038 int rc; 3047 int rc;
@@ -3579,7 +3588,7 @@ static struct opcode group6[] = {
3579 DI(Prot, sldt), 3588 DI(Prot, sldt),
3580 DI(Prot, str), 3589 DI(Prot, str),
3581 II(Prot | Priv | SrcMem16, em_lldt, lldt), 3590 II(Prot | Priv | SrcMem16, em_lldt, lldt),
3582 DI(Prot | Priv, ltr), 3591 II(Prot | Priv | SrcMem16, em_ltr, ltr),
3583 N, N, N, N, 3592 N, N, N, N,
3584}; 3593};
3585 3594