[PATCH 3/6] KVM: x86: Use an 'unsigned int' when emulating string port I/O

From: Sean Christopherson
Date: Thu Oct 21 2021 - 19:45:21 EST


Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
---
arch/x86/kvm/x86.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 13a21a05a75d..a126b1129348 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -7046,7 +7046,8 @@ static int emulator_cmpxchg_emulated(struct x86_emulate_ctxt *ctxt,

static int kernel_pio(struct kvm_vcpu *vcpu, void *pd)
{
- int r, i;
+ unsigned int i;
+ int r;

for (i = 0; i < vcpu->arch.pio.count; i++) {
if (vcpu->arch.pio.in)
--
2.33.0.1079.g6e70778dc9-goog


--kTbyx1pw6IySRUfp
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0004-KVM-x86-Fill-kvm_pio_request-if-and-only-if-KVM-is-e.patch"