xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
	xen-devel@lists.xenproject.org,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>
Subject: Re: [Xen-devel] [PATCH v5] libxl: fix migration of PV and PVH domUs with and without qemu
Date: Tue, 14 May 2019 13:19:42 +0200	[thread overview]
Message-ID: <20190514111942.6h3rrvxkpz7nlqet@Air-de-Roger> (raw)
Message-ID: <20190514111942.0dzPXm7oA58OSN94Xzsi8T9IY8r-dK1i4m4SXC6bAUo@z> (raw)
In-Reply-To: <20190514080558.14540-1-olaf@aepfle.de>

On Tue, May 14, 2019 at 10:05:58AM +0200, Olaf Hering wrote:
> If a domU has a qemu-xen instance attached, it is required to call qemus
> "xen-save-devices-state" method. Without it, the receiving side of a PV or
> PVH migration may be unable to lock the image:
> 
> xen be: qdisk-51712: xen be: qdisk-51712: error: Failed to get "write" lock
> error: Failed to get "write" lock
> xen be: qdisk-51712: xen be: qdisk-51712: initialise() failed
> initialise() failed
> 
> To fix this bug, libxl__domain_suspend_device_model() and
> libxl__domain_resume_device_model() have to be called not only for HVM,
> but also if the active device_model is QEMU_XEN.
> 
> Unfortunately, libxl__domain_build_info_setdefault() used to hardcode
> b_info->device_model_version to QEMU_XEN if it does not know it any
> better. As a result libxl__device_model_version_running() will return
> incorrect values. This breaks domUs without a device_model.
> libxl__qmp_stop() would wait 10 seconds in qmp_open() for a qemu that
> will never appear. During this long timeframe the domU remains in state
> paused on the sending side. As a result network connections may be
> dropped. Once this bug is fixed as well, by just removing the assumption
> that every domU has a QEMU_XEN, there is no code to actually initialise
> b_info->device_model_version.
> 
> There is a helper function libxl__need_xenpv_qemu(), which is used in
> various places to decide if a device_model has to be spawned. This
> function can not be used as is, just to fill device_model_version,
> because store_libxl_entry() was already called earlier.
> 
> Introduce LIBXL_DEVICE_MODEL_VERSION_NONE for PV and PVH that have no
> need for a device_model to make the state explicit. Indicate this new
> state via LIBXL_HAVE macro in libxl.h.
> 
> v05:
> - move initialization of device_model_version to extra commit
> - return error from libxl__need_xenpv_qemu
> - add LIBXL_HAVE_DEVICE_MODEL_VERSION_NONE
> v04:
> - make sure device_model_stubdomain is initialized
> v03:
> - rearrange code to make sure device_model_version is initialized before
>   store_libxl_entry() is called
> v02:
> - update wording in a comment
> - remove stale goto in domcreate_launch_dm
> - initialize ret in libxl__need_xenpv_qemu
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.

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

  parent reply	other threads:[~2019-05-14 11:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-14  8:05 [PATCH v5] libxl: fix migration of PV and PVH domUs with and without qemu Olaf Hering
2019-05-14  8:05 ` [Xen-devel] " Olaf Hering
2019-05-14  8:14 ` Olaf Hering
2019-05-14  8:14   ` [Xen-devel] " Olaf Hering
2019-05-14 14:38   ` Wei Liu
2019-05-14 14:38     ` [Xen-devel] " Wei Liu
2019-05-14 14:44     ` Olaf Hering
2019-05-14 14:44       ` [Xen-devel] " Olaf Hering
2019-05-14 15:42       ` Wei Liu
2019-05-14 15:42         ` [Xen-devel] " Wei Liu
2019-05-14 11:19 ` Roger Pau Monné [this message]
2019-05-14 11:19   ` Roger Pau Monné

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=20190514111942.6h3rrvxkpz7nlqet@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=olaf@aepfle.de \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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).