summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorJan Kiszka2014-06-30 11:07:05 +0200
committerPaolo Bonzini2014-07-09 18:09:56 +0200
commit6493f1574e898b46370e2b2315836d76a1980f2c (patch)
tree91f5fc2a7a9293a332c657e51e4f07111754ee27 /arch/x86/kvm/svm.c
parentKVM: nSVM: Fix IOIO bitmap evaluation (diff)
downloadkernel-qcow2-linux-6493f1574e898b46370e2b2315836d76a1980f2c.tar.gz
kernel-qcow2-linux-6493f1574e898b46370e2b2315836d76a1980f2c.tar.xz
kernel-qcow2-linux-6493f1574e898b46370e2b2315836d76a1980f2c.zip
KVM: nSVM: Fix IOIO size reported on emulation
The access size of an in/ins is reported in dst_bytes, and that of out/outs in src_bytes. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r--arch/x86/kvm/svm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 3483ac978c76..1824949821f9 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -4261,9 +4261,9 @@ static int svm_check_intercept(struct kvm_vcpu *vcpu,
if (info->intercept == x86_intercept_in ||
info->intercept == x86_intercept_ins) {
exit_info |= SVM_IOIO_TYPE_MASK;
- bytes = info->src_bytes;
- } else {
bytes = info->dst_bytes;
+ } else {
+ bytes = info->src_bytes;
}
if (info->intercept == x86_intercept_outs ||