I agree. One thing I forgot to mention andother side effect
of this bug was virtio VRing used, avail index error 
the Guest was 1,2,..  less then host.

I looked up that bug it happend on some architectures. 
This may or may not be related. Obviously if the dirty
bitmap is not processed properly you may see issues like that.

- Mario 

On 03/20/2014 08:45 AM, Michael Tokarev wrote:
> 19.03.2014 21:24, Mario Smarduch wrote:
>>
>> Fix return condition check from kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d) to
>> handle internal failures or no support for memory slot dirty bitmap.
>> Otherwise the ioctl succeeds and continues with migration.
>> Addresses BUG# 1294227
> 
> Thanks, applied to -trivial.
> 
> []
>> -        if (kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d) == -1) {
>> +        if (kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d) < 0) {
> 
> Actually I'd make all error checks like this.  Many checks compares
> return value with -1 for some reason, while actually, any <0 value
> should be treated as error in many many places...  At the same time,
> comparison with 0 is cheaper than comparison with -1 ;)
> 
> /mjt
> 


Reply via email to