From: Olaf Hering <olaf@aepfle.de>
To: Juergen Gross <jgross@suse.com>
Cc: xen-devel@lists.xen.org
Subject: Re: how to recognize in libxl that a domU has qemu-xen attached?
Date: Thu, 17 May 2018 17:29:57 +0200 [thread overview]
Message-ID: <20180517172957.51a92068.olaf@aepfle.de> (raw)
In-Reply-To: <20180517165400.6b9b9825.olaf@aepfle.de>
[-- Attachment #1.1: Type: text/plain, Size: 1629 bytes --]
Am Thu, 17 May 2018 16:54:00 +0200
schrieb Olaf Hering <olaf@aepfle.de>:
> Am Thu, 17 May 2018 14:55:10 +0200
> schrieb Juergen Gross <jgross@suse.com>:
> > libxl__need_xenpv_qemu() is used to determine whether a pv domain needs
> > a qemu process for at least one backend.
> Thanks. Too bad, d_config is not available in that context. It is probably known somewhere by the callers. I guess such caller needs to pass a bool down to suspend/resume.
I think we may get around that missing d_config like that, I will test this approach:
--- xen-4.10.0-testing.orig/tools/libxl/libxl_dom_suspend.c
+++ xen-4.10.0-testing/tools/libxl/libxl_dom_suspend.c
@@ -377,7 +377,9 @@ static void domain_suspend_common_guest_
libxl__ev_xswatch_deregister(gc, &dsps->guest_watch);
libxl__ev_time_deregister(gc, &dsps->guest_timeout);
- if (dsps->type == LIBXL_DOMAIN_TYPE_HVM) {
+ if (dsps->type == LIBXL_DOMAIN_TYPE_HVM ||
+ libxl__device_model_version_running(gc, domid) ==
+ LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
rc = libxl__domain_suspend_device_model(gc, dsps);
if (rc) {
LOGD(ERROR, dsps->domid,
@@ -460,7 +462,9 @@ int libxl__domain_resume(libxl__gc *gc,
goto out;
}
- if (type == LIBXL_DOMAIN_TYPE_HVM) {
+ if (type == LIBXL_DOMAIN_TYPE_HVM ||
+ libxl__device_model_version_running(gc, domid) ==
+ LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN) {
rc = libxl__domain_resume_device_model(gc, domid);
if (rc) {
LOGD(ERROR, domid, "failed to resume device model:%d", rc);
Olaf
[-- Attachment #1.2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
prev parent reply other threads:[~2018-05-17 15:29 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
2018-05-17 14:54 ` Olaf Hering
2018-05-17 15:09 ` Olaf Hering
2018-05-17 15:29 ` Olaf Hering [this message]
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=20180517172957.51a92068.olaf@aepfle.de \
--to=olaf@aepfle.de \
--cc=jgross@suse.com \
--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).