summaryrefslogtreecommitdiffstats
path: root/virt/kvm/coalesced_mmio.c
diff options
context:
space:
mode:
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>2010-02-05 17:52:46 +0900
committerMarcelo Tosatti <mtosatti@redhat.com>2010-03-01 12:36:09 -0300
commit1976d2d2c91246a37fcb8246b811de735aa6e9a4 (patch)
treeb4e12a5300fee56dafb59ad3b3d410d92a3b5f63 /virt/kvm/coalesced_mmio.c
parent6316e1c8c6af6ccb55ff8564231710660608f46c (diff)
downloadop-kernel-dev-1976d2d2c91246a37fcb8246b811de735aa6e9a4.zip
op-kernel-dev-1976d2d2c91246a37fcb8246b811de735aa6e9a4.tar.gz
KVM: Remove redundant reading of rax on OUT instructions
kvm_emulate_pio() and complete_pio() both read out the RAX register value and copy it to a place into which the value read out from the port will be copied later. This patch removes this redundancy. /*** snippet from arch/x86/kvm/x86.c ***/ int complete_pio(struct kvm_vcpu *vcpu) { ... if (!io->string) { if (io->in) { val = kvm_register_read(vcpu, VCPU_REGS_RAX); memcpy(&val, vcpu->arch.pio_data, io->size); kvm_register_write(vcpu, VCPU_REGS_RAX, val); } ... Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt/kvm/coalesced_mmio.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud