mirror of
https://github.com/torvalds/linux.git
synced 2024-11-07 04:32:03 +00:00
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>
This commit is contained in:
parent
9bf418335e
commit
6493f1574e
@ -4261,9 +4261,9 @@ static int svm_check_intercept(struct kvm_vcpu *vcpu,
|
|||||||
if (info->intercept == x86_intercept_in ||
|
if (info->intercept == x86_intercept_in ||
|
||||||
info->intercept == x86_intercept_ins) {
|
info->intercept == x86_intercept_ins) {
|
||||||
exit_info |= SVM_IOIO_TYPE_MASK;
|
exit_info |= SVM_IOIO_TYPE_MASK;
|
||||||
bytes = info->src_bytes;
|
|
||||||
} else {
|
|
||||||
bytes = info->dst_bytes;
|
bytes = info->dst_bytes;
|
||||||
|
} else {
|
||||||
|
bytes = info->src_bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info->intercept == x86_intercept_outs ||
|
if (info->intercept == x86_intercept_outs ||
|
||||||
|
Loading…
Reference in New Issue
Block a user