Re: [PATCH] kvm: svm: fix unsigned compare less than zero comparison

2016-09-19 Thread Suravee Suthikulpanit
Hi, On 9/19/16 13:11, Colin King wrote: From: Colin Ian King vm_data->avic_vm_id is a u32, so the check for a error return (less than zero) such as -EAGAIN from avic_get_next_vm_id currently has no effect whatsoever. Fix this by using a temporary int for the comparison and assign vm_data->avic

Re: [PATCH] kvm: svm: fix unsigned compare less than zero comparison

2016-09-19 Thread Paolo Bonzini
On 19/09/2016 08:11, Colin King wrote: > From: Colin Ian King > > vm_data->avic_vm_id is a u32, so the check for a error > return (less than zero) such as -EAGAIN from > avic_get_next_vm_id currently has no effect whatsoever. > Fix this by using a temporary int for the comparison > and assign v

Re: [PATCH] kvm: svm: fix unsigned compare less than zero comparison

2016-09-19 Thread Joerg Roedel
On Mon, Sep 19, 2016 at 07:11:59AM +0100, Colin King wrote: > From: Colin Ian King > > vm_data->avic_vm_id is a u32, so the check for a error > return (less than zero) such as -EAGAIN from > avic_get_next_vm_id currently has no effect whatsoever. > Fix this by using a temporary int for the compar

[PATCH] kvm: svm: fix unsigned compare less than zero comparison

2016-09-18 Thread Colin King
From: Colin Ian King vm_data->avic_vm_id is a u32, so the check for a error return (less than zero) such as -EAGAIN from avic_get_next_vm_id currently has no effect whatsoever. Fix this by using a temporary int for the comparison and assign vm_data->avic_vm_id to this. I used an explicit u32 cast