From: Takuya Yoshikawa Date: Fri, 5 Feb 2010 08:52:46 +0000 (+0900) Subject: KVM: Remove redundant reading of rax on OUT instructions X-Git-Tag: v2.6.34-rc1~193^2~28 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1976d2d2c91246a37fcb8246b811de735aa6e9a4;p=pandora-kernel.git 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 Signed-off-by: Avi Kivity --- Reading git-diff-tree failed