xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Olaf Hering <olaf@aepfle.de>, xen-devel@lists.xen.org
Subject: Re: how to recognize in libxl that a domU has qemu-xen attached?
Date: Thu, 17 May 2018 14:55:10 +0200	[thread overview]
Message-ID: <f4845c2b-d967-7b3b-b567-d83e18fb6f66@suse.com> (raw)
In-Reply-To: <20180517143352.1227b39e.olaf@aepfle.de>

On 17/05/18 14:33, Olaf Hering wrote:
> In the other thread about the unsolved migration bugs in qemu-xen it became clear that "xen-save-devices-state" must not only be called for HVM, but for every domU that has qemu-xen attached to it. I wonder how to check for that fact from the migration code. While it can continue to rely on LIBXL_DOMAIN_TYPE_HVM make that call, for  LIBXL_DOMAIN_TYPE_PV it is apparently not that easy. Is libxl__need_xenpv_qemu the API to use for the decision if libxl__qmp_stop/libxl__qmp_save/libxl__qmp_resume have to be called during migration?

libxl__need_xenpv_qemu() is used to determine whether a pv domain needs
a qemu process for at least one backend. To check for the correct qemu
type you need to call libxl__device_model_version_running() and test the
return value being LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN. So you need:

if (libxl__need_xenpv_qemu(gc, d_config) &&
    libxl__device_model_version_running(gc, domid) ==
        LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN)
    libxl__qmp_stop(...);


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-05-17 12:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 12:33 how to recognize in libxl that a domU has qemu-xen attached? Olaf Hering
2018-05-17 12:55 ` Juergen Gross [this message]
2018-05-17 14:54   ` Olaf Hering
2018-05-17 15:09     ` Olaf Hering
2018-05-17 15:29     ` Olaf Hering

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=f4845c2b-d967-7b3b-b567-d83e18fb6f66@suse.com \
    --to=jgross@suse.com \
    --cc=olaf@aepfle.de \
    --cc=xen-devel@lists.xen.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).