]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SEV-ES: fix length of string I/O
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 12 Oct 2021 15:07:59 +0000 (11:07 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 15 Oct 2021 08:47:36 +0000 (04:47 -0400)
commit80cfc862e6abeb097f50da16e57f414baa115900
tree28dfb7d5ddd48e4d36a5a9c01fd65b3e4ff7789a
parentd5fae8192e908e3e273acbb00af833b464a37a02
KVM: SEV-ES: fix length of string I/O

The size of the data in the scratch buffer is not divided by the size of
each port I/O operation, so vcpu->arch.pio.count ends up being larger
than it should be by a factor of size.

Cc: stable@vger.kernel.org
Fixes: d3e48bd8f6b4 ("KVM: SVM: Support string IO operations for an SEV-ES guest")
Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/sev.c