qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Ján Poctavek" <jan.poctavek@erigones.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] wrong ioctl error handling on dirty pages sync?
Date: Fri, 25 Aug 2017 13:42:55 +0200	[thread overview]
Message-ID: <8c62454c-828b-0f16-76dd-227d9c52af1d@erigones.com> (raw)

Hi guys,

Maybe it is just my lack of understanding, this seems like a bug to me:

To get list of dirty pages, qemu calls kvm_vm_ioctl() with 
KVM_GET_DIRTY_LOG:
https://github.com/qemu/qemu/blob/v2.10.0-rc4/accel/kvm/kvm-all.c#L494

and considers the ioctl call failed when -1 is returned.

But the kvm_vm_ioctl() itself returns -errno, not the -1 on error:
https://github.com/qemu/qemu/blob/v2.10.0-rc4/accel/kvm/kvm-all.c#L2142

Thanks in advance for sheding some light into this for me.

Jan

             reply	other threads:[~2017-08-25 11:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 11:42 Ján Poctavek [this message]
2017-08-29 10:08 ` [Qemu-devel] wrong ioctl error handling on dirty pages sync? Stefan Hajnoczi
2017-09-04 12:52   ` Ján Poctavek
2017-09-05 10:33     ` Stefan Hajnoczi
2017-09-05 11:57       ` Michael Tokarev
2017-09-05 11:59         ` Michael Tokarev

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=8c62454c-828b-0f16-76dd-227d9c52af1d@erigones.com \
    --to=jan.poctavek@erigones.com \
    --cc=qemu-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).