From: Mario Smarduch <m.smarduch@samsung.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-trivial] [Qemu-devel][PATCH] fix return check for KVM_GET_DIRTY_LOG ioctl
Date: Thu, 20 Mar 2014 09:38:35 -0700 [thread overview]
Message-ID: <532B198B.8010800@samsung.com> (raw)
In-Reply-To: <532B0CFC.6070309@msgid.tls.msk.ru>
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
>
WARNING: multiple messages have this Message-ID (diff)
From: Mario Smarduch <m.smarduch@samsung.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] fix return check for KVM_GET_DIRTY_LOG ioctl
Date: Thu, 20 Mar 2014 09:38:35 -0700 [thread overview]
Message-ID: <532B198B.8010800@samsung.com> (raw)
In-Reply-To: <532B0CFC.6070309@msgid.tls.msk.ru>
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
>
next prev parent reply other threads:[~2014-03-20 16:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-19 17:24 [Qemu-trivial] [Qemu-devel][PATCH] fix return check for KVM_GET_DIRTY_LOG ioctl Mario Smarduch
2014-03-19 17:24 ` [Qemu-devel] [PATCH] " Mario Smarduch
2014-03-20 15:45 ` [Qemu-trivial] [Qemu-devel][PATCH] " Michael Tokarev
2014-03-20 15:45 ` [Qemu-devel] [Qemu-trivial] [PATCH] " Michael Tokarev
2014-03-20 16:38 ` Mario Smarduch [this message]
2014-03-20 16:38 ` Mario Smarduch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=532B198B.8010800@samsung.com \
--to=m.smarduch@samsung.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.