KVM: x86 emulator: store x86_emulate_ops in emulation context
[deliverable/linux.git] / arch / x86 / kvm / emulate.c
index d7e3ea4797f1f9bf5c2f74aa20585f7c4e5666ab..3689f34a303a583ed2b3a02284df6aa133bbecb3 100644 (file)
@@ -943,8 +943,9 @@ done:
 }
 
 int
-x86_decode_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
+x86_decode_insn(struct x86_emulate_ctxt *ctxt)
 {
+       struct x86_emulate_ops *ops = ctxt->ops;
        struct decode_cache *c = &ctxt->decode;
        int rc = X86EMUL_CONTINUE;
        int mode = ctxt->mode;
@@ -2586,10 +2587,10 @@ static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt,
 }
 
 int emulator_task_switch(struct x86_emulate_ctxt *ctxt,
-                        struct x86_emulate_ops *ops,
                         u16 tss_selector, int reason,
                         bool has_error_code, u32 error_code)
 {
+       struct x86_emulate_ops *ops = ctxt->ops;
        struct decode_cache *c = &ctxt->decode;
        int rc;
 
@@ -2619,8 +2620,9 @@ static void string_addr_inc(struct x86_emulate_ctxt *ctxt, unsigned long base,
 }
 
 int
-x86_emulate_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
+x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
 {
+       struct x86_emulate_ops *ops = ctxt->ops;
        u64 msr_data;
        struct decode_cache *c = &ctxt->decode;
        int rc = X86EMUL_CONTINUE;
This page took 0.044393 seconds and 5 git commands to generate.