diff options
author | Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> | 2011-05-29 08:53:48 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-07-12 06:15:57 -0400 |
commit | 9d74191ab1ea857d1cc27e439316eebf8ae46d19 (patch) | |
tree | aed0f1486f410231366c96047a8cc8267b5e4468 /arch/x86/kvm/emulate.c | |
parent | 55399a02e90fdc6cd45165b2df5dd97b7c3f018f (diff) |
KVM: x86 emulator: Use the pointers ctxt and c consistently
We should use the local variables ctxt and c when the emulate_ctxt and
decode appears many times. At least, we need to be consistent about
how we use these in a function.
Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/emulate.c')
-rw-r--r-- | arch/x86/kvm/emulate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index bc916bd22e8..6c054f84731 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c | |||
@@ -3707,7 +3707,7 @@ int x86_emulate_insn(struct x86_emulate_ctxt *ctxt) | |||
3707 | int saved_dst_type = c->dst.type; | 3707 | int saved_dst_type = c->dst.type; |
3708 | int irq; /* Used for int 3, int, and into */ | 3708 | int irq; /* Used for int 3, int, and into */ |
3709 | 3709 | ||
3710 | ctxt->decode.mem_read.pos = 0; | 3710 | c->mem_read.pos = 0; |
3711 | 3711 | ||
3712 | if (ctxt->mode == X86EMUL_MODE_PROT64 && (c->d & No64)) { | 3712 | if (ctxt->mode == X86EMUL_MODE_PROT64 && (c->d & No64)) { |
3713 | rc = emulate_ud(ctxt); | 3713 | rc = emulate_ud(ctxt); |
@@ -4092,7 +4092,7 @@ writeback: | |||
4092 | &c->dst); | 4092 | &c->dst); |
4093 | 4093 | ||
4094 | if (c->rep_prefix && (c->d & String)) { | 4094 | if (c->rep_prefix && (c->d & String)) { |
4095 | struct read_cache *r = &ctxt->decode.io_read; | 4095 | struct read_cache *r = &c->io_read; |
4096 | register_address_increment(c, &c->regs[VCPU_REGS_RCX], -1); | 4096 | register_address_increment(c, &c->regs[VCPU_REGS_RCX], -1); |
4097 | 4097 | ||
4098 | if (!string_insn_completed(ctxt)) { | 4098 | if (!string_insn_completed(ctxt)) { |
@@ -4107,7 +4107,7 @@ writeback: | |||
4107 | * decode, but since instruction is restarted | 4107 | * decode, but since instruction is restarted |
4108 | * we have to do it here. | 4108 | * we have to do it here. |
4109 | */ | 4109 | */ |
4110 | ctxt->decode.mem_read.end = 0; | 4110 | c->mem_read.end = 0; |
4111 | return EMULATION_RESTART; | 4111 | return EMULATION_RESTART; |
4112 | } | 4112 | } |
4113 | goto done; /* skip rip writeback */ | 4113 | goto done; /* skip rip writeback */ |