aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/emulate.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r--arch/x86/kvm/emulate.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 106c01557f2b..c941abe800ef 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -3323,7 +3323,7 @@ static int em_clts(struct x86_emulate_ctxt *ctxt)
3323 return X86EMUL_CONTINUE; 3323 return X86EMUL_CONTINUE;
3324} 3324}
3325 3325
3326static int em_vmcall(struct x86_emulate_ctxt *ctxt) 3326static int em_hypercall(struct x86_emulate_ctxt *ctxt)
3327{ 3327{
3328 int rc = ctxt->ops->fix_hypercall(ctxt); 3328 int rc = ctxt->ops->fix_hypercall(ctxt);
3329 3329
@@ -3395,17 +3395,6 @@ static int em_lgdt(struct x86_emulate_ctxt *ctxt)
3395 return em_lgdt_lidt(ctxt, true); 3395 return em_lgdt_lidt(ctxt, true);
3396} 3396}
3397 3397
3398static int em_vmmcall(struct x86_emulate_ctxt *ctxt)
3399{
3400 int rc;
3401
3402 rc = ctxt->ops->fix_hypercall(ctxt);
3403
3404 /* Disable writeback. */
3405 ctxt->dst.type = OP_NONE;
3406 return rc;
3407}
3408
3409static int em_lidt(struct x86_emulate_ctxt *ctxt) 3398static int em_lidt(struct x86_emulate_ctxt *ctxt)
3410{ 3399{
3411 return em_lgdt_lidt(ctxt, false); 3400 return em_lgdt_lidt(ctxt, false);
@@ -3769,7 +3758,7 @@ static int check_perm_out(struct x86_emulate_ctxt *ctxt)
3769 3758
3770static const struct opcode group7_rm0[] = { 3759static const struct opcode group7_rm0[] = {
3771 N, 3760 N,
3772 I(SrcNone | Priv | EmulateOnUD, em_vmcall), 3761 I(SrcNone | Priv | EmulateOnUD, em_hypercall),
3773 N, N, N, N, N, N, 3762 N, N, N, N, N, N,
3774}; 3763};
3775 3764
@@ -3781,7 +3770,7 @@ static const struct opcode group7_rm1[] = {
3781 3770
3782static const struct opcode group7_rm3[] = { 3771static const struct opcode group7_rm3[] = {
3783 DIP(SrcNone | Prot | Priv, vmrun, check_svme_pa), 3772 DIP(SrcNone | Prot | Priv, vmrun, check_svme_pa),
3784 II(SrcNone | Prot | EmulateOnUD, em_vmmcall, vmmcall), 3773 II(SrcNone | Prot | EmulateOnUD, em_hypercall, vmmcall),
3785 DIP(SrcNone | Prot | Priv, vmload, check_svme_pa), 3774 DIP(SrcNone | Prot | Priv, vmload, check_svme_pa),
3786 DIP(SrcNone | Prot | Priv, vmsave, check_svme_pa), 3775 DIP(SrcNone | Prot | Priv, vmsave, check_svme_pa),
3787 DIP(SrcNone | Prot | Priv, stgi, check_svme), 3776 DIP(SrcNone | Prot | Priv, stgi, check_svme),