Skip to content

Commit

Permalink
KVM: nSVM: Fix IOIO size reported on emulation
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
jan-kiszka authored and bonzini committed Jul 9, 2014
1 parent 9bf4183 commit 6493f15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down

0 comments on commit 6493f15

Please sign in to comment.