summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/emulate.c
diff options
context:
space:
mode:
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>2011-05-29 21:53:48 +0900
committerAvi Kivity <avi@redhat.com>2011-07-12 13:15:57 +0300
commit9d74191ab1ea857d1cc27e439316eebf8ae46d19 (patch)
treeaed0f1486f410231366c96047a8cc8267b5e4468 /arch/x86/kvm/emulate.c
parent55399a02e90fdc6cd45165b2df5dd97b7c3f018f (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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index bc916bd22e86..6c054f847319 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)
int saved_dst_type = c->dst.type;
int irq; /* Used for int 3, int, and into */
- ctxt->decode.mem_read.pos = 0;
+ c->mem_read.pos = 0;
if (ctxt->mode == X86EMUL_MODE_PROT64 && (c->d & No64)) {
rc = emulate_ud(ctxt);
@@ -4092,7 +4092,7 @@ writeback:
&c->dst);
if (c->rep_prefix && (c->d & String)) {
- struct read_cache *r = &ctxt->decode.io_read;
+ struct read_cache *r = &c->io_read;
register_address_increment(c, &c->regs[VCPU_REGS_RCX], -1);
if (!string_insn_completed(ctxt)) {
@@ -4107,7 +4107,7 @@ writeback:
* decode, but since instruction is restarted
* we have to do it here.
*/
- ctxt->decode.mem_read.end = 0;
+ c->mem_read.end = 0;
return EMULATION_RESTART;
}
goto done; /* skip rip writeback */