From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
xen-devel@lists.xenproject.org,
Ian Jackson <ian.jackson@eu.citrix.com>, Wei Liu <wl@xen.org>
Subject: Re: [Xen-devel] [xen-unstable bisection] complete test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm
Date: Tue, 21 Jan 2020 10:21:09 +0000 [thread overview]
Message-ID: <20200121102109.GG11756@Air-de-Roger> (raw)
In-Reply-To: <E1it15N-0001Ge-Go@osstest.test-lab.xenproject.org>
On Sun, Jan 19, 2020 at 03:17:13AM +0000, osstest service owner wrote:
> branch xen-unstable
> xenbranch xen-unstable
> job test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm
> testid debian-hvm-install
>
> Tree: linux git://xenbits.xen.org/linux-pvops.git
> Tree: linuxfirmware git://xenbits.xen.org/osstest/linux-firmware.git
> Tree: qemu git://xenbits.xen.org/qemu-xen-traditional.git
> Tree: qemuu git://xenbits.xen.org/qemu-xen.git
> Tree: xen git://xenbits.xen.org/xen.git
>
> *** Found and reproduced problem changeset ***
>
> Bug is in tree: xen git://xenbits.xen.org/xen.git
> Bug introduced: aacc143006429de46932aabae17c13846c71fa45
> Bug not present: 2572c7d76e1aee9b11a23c548cee69b15a35401f
> Last fail repro: http://logs.test-lab.xenproject.org/osstest/logs/146234/
>
>
> commit aacc143006429de46932aabae17c13846c71fa45
> Author: Andrew Cooper <andrew.cooper3@citrix.com>
> Date: Thu Jan 2 21:37:36 2020 +0000
>
> tools/libxl: Plumb domain_create_state down into libxl__build_pre()
>
> To fix CPUID handling, libxl__build_pre() is going to have to distinguish
> between a brand new VM vs one which is being migrated-in/resumed.
>
> No functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
The issue is that this change is passing the guest domain_create_state
to libxl__domain_build in libxl__spawn_stub_dm, and hence the
stubdomain doesn't get created. I have the following patch that fixes
it, but it's kind of dirty.
---8<---
From 688fde95992d07bb1123d324a68006dd08bc6512 Mon Sep 17 00:00:00 2001
From: Roger Pau Monne <roger.pau@citrix.com>
Date: Tue, 21 Jan 2020 10:14:09 +0000
Subject: [PATCH] libxl: fix stubdomain creation after aacc143006429de
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
aacc143006429de broke stubdomain creation by passing the guest
domain_create_state to libxl__domain_build in libxl__spawn_stub_dm,
when it should instead be crafting a new domain_create_state for the
stubdomain.
Fixes: aacc143006429de ('tools/libxl: Plumb domain_create_state down into libxl__build_pre()')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
tools/libxl/libxl_dm.c | 22 +++++++++++++---------
tools/libxl/libxl_internal.h | 3 +--
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 3f08ccad1b..b1ddde77e8 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -2110,17 +2110,21 @@ void libxl__spawn_stub_dm(libxl__egc *egc, libxl__domain_create_state *dcs)
xs_transaction_t t;
/* convenience aliases */
- libxl_domain_config *const dm_config = &sdss->dm_config;
libxl_domain_config *const guest_config = sdss->dm.guest_config;
const int guest_domid = sdss->dm.guest_domid;
libxl__domain_build_state *const d_state = sdss->dm.build_state;
- libxl__domain_build_state *const stubdom_state = &sdss->dm_state;
+ libxl__domain_build_state *stubdom_state;
+ libxl_domain_config *dm_config;
/* Initialise private part of sdss */
- libxl__domain_build_state_init(stubdom_state);
dmss_init(&sdss->dm);
dmss_init(&sdss->pvqemu);
libxl__xswait_init(&sdss->xswait);
+ GCNEW(sdss->dcs);
+ stubdom_state = &sdss->dcs->build_state;
+ libxl__domain_build_state_init(stubdom_state);
+ GCNEW(sdss->dcs->guest_config);
+ dm_config = sdss->dcs->guest_config;
if (guest_config->b_info.device_model_version !=
LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL) {
@@ -2198,7 +2202,7 @@ void libxl__spawn_stub_dm(libxl__egc *egc, libxl__domain_create_state *dcs)
if (ret)
goto out;
uint32_t dm_domid = sdss->pvqemu.guest_domid;
- ret = libxl__domain_build(gc, dm_domid, dcs);
+ ret = libxl__domain_build(gc, dm_domid, sdss->dcs);
if (ret)
goto out;
@@ -2264,11 +2268,11 @@ static void spawn_stub_launch_dm(libxl__egc *egc,
libxl__device_console *console;
/* convenience aliases */
- libxl_domain_config *const dm_config = &sdss->dm_config;
+ libxl_domain_config *const dm_config = sdss->dcs->guest_config;
libxl_domain_config *const guest_config = sdss->dm.guest_config;
const int guest_domid = sdss->dm.guest_domid;
libxl__domain_build_state *const d_state = sdss->dm.build_state;
- libxl__domain_build_state *const stubdom_state = &sdss->dm_state;
+ libxl__domain_build_state *const stubdom_state = &sdss->dcs->build_state;
uint32_t dm_domid = sdss->pvqemu.guest_domid;
int need_qemu;
@@ -2354,8 +2358,8 @@ static void spawn_stub_launch_dm(libxl__egc *egc,
sdss->pvqemu.spawn.ao = ao;
sdss->pvqemu.guest_domid = dm_domid;
- sdss->pvqemu.guest_config = &sdss->dm_config;
- sdss->pvqemu.build_state = &sdss->dm_state;
+ sdss->pvqemu.guest_config = sdss->dcs->guest_config;
+ sdss->pvqemu.build_state = &sdss->dcs->build_state;
sdss->pvqemu.callback = spawn_stubdom_pvqemu_cb;
if (!need_qemu) {
@@ -2464,7 +2468,7 @@ static void stubdom_xswait_cb(libxl__egc *egc, libxl__xswait_state *xswait,
if (strcmp(p, "running"))
return;
out:
- libxl__domain_build_state_dispose(&sdss->dm_state);
+ libxl__domain_build_state_dispose(&sdss->dcs->build_state);
libxl__xswait_stop(gc, xswait);
dmss_dispose(gc, &sdss->dm);
dmss_dispose(gc, &sdss->pvqemu);
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index d919f91882..abf88dfd76 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -4102,8 +4102,7 @@ typedef struct {
/* filled in by user, must remain valid: */
libxl__dm_spawn_cb *callback; /* called as callback(,&sdss->dm,) */
/* private to libxl__spawn_stub_dm: */
- libxl_domain_config dm_config;
- libxl__domain_build_state dm_state;
+ libxl__domain_create_state *dcs;
libxl__dm_spawn_state pvqemu;
libxl__destroy_domid_state dis;
libxl__multidev multidev;
--
2.25.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2020-01-21 10:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-19 3:17 [Xen-devel] [xen-unstable bisection] complete test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm osstest service owner
2020-01-21 10:21 ` Roger Pau Monné [this message]
2020-01-23 15:34 ` Anthony PERARD
2020-01-23 17:17 ` Roger Pau Monné
2020-01-23 18:15 ` Anthony PERARD
2020-01-23 18:32 ` Andrew Cooper
-- strict thread matches above, loose matches on Subject: below --
2020-02-02 8:41 osstest service owner
2019-10-28 19:35 osstest service owner
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=20200121102109.GG11756@Air-de-Roger \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=wl@xen.org \
--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).