qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Error handling for KVM_GET_DIRTY_LOG
@ 2017-02-16 14:51 Janosch Frank
  2017-02-20  8:05 ` Christian Borntraeger
  2017-02-20 13:46 ` Paolo Bonzini
  0 siblings, 2 replies; 5+ messages in thread
From: Janosch Frank @ 2017-02-16 14:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini

While trying to fix a bug in the s390 migration code, I noticed that
QEMU ignores practically all errors returned from that VM ioctl. QEMU
behaves as specified in the KVM api and only processes -1 (-EPERM) as an
error.

Unfortunately the documentation is wrong/old and KVM may return -EFAULT,
-EINVAL, -ENOTSUPP (BookE) and -ENOENT. This bugs me, as I found a case
where I want to return -EFAULT because of guest memory problems and QEMU
will still happily migrate the VM.

I currently don't see a reason why we continue to migrate on EFAULT and
EINVAL. But returning -error from kvm_physical_sync_dirty_bitmap might
also a bit hard, as it kills QEMU.

Do we want to fix this and if, how do we want it done?
If not we at least have a definitive mail to point to when the next one
comes around. I also have a KVM patch to update the api documentation if
wanted (maybe we should dust that off a bit anyhow).


This has been brought up in 2009 [1] the first time and was more or less
fixed and then reverted in 2014 [2].

The reason in [1] was that PPC hadn't settled yet on a valid return code.

In [2] it was too close to the v2 to handle it properly.


[1] https://lists.nongnu.org/archive/html/qemu-devel/2009-07/msg01772.html

[2] https://lists.nongnu.org/archive/html/qemu-devel/2014-04/msg01993.html


Cheers,
Janosch

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-20 14:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-16 14:51 [Qemu-devel] Error handling for KVM_GET_DIRTY_LOG Janosch Frank
2017-02-20  8:05 ` Christian Borntraeger
2017-02-20  9:39   ` Dr. David Alan Gilbert
2017-02-20 13:46 ` Paolo Bonzini
2017-02-20 14:33   ` Janosch Frank

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).