Skip to contentSkip to conversation

complete test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm

Xen-devel osstest service owner 4 participants 6 messages Jan 19, 2020 – Jan 23, 2020

lore
Share & tools
lore

osstest service owner

author Acked-by Ian Jackson Acked-by Ian Jackson
#0 lore raw

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 <[email protected]>
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.

For bisection revision-tuple graph see:
http://logs.test-lab.xenproject.org/osstest/results/bisect/xen-unstable/test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm.debian-hvm-install.html
Revision IDs in each graph node refer, respectively, to the Trees above.

----------------------------------------
Running cs-bisection-step --graph-out=/home/logs/results/bisect/xen-unstable/test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm.debian-hvm-install --summary-out=tmp/146234.bisection-summary --basis-template=146058 --blessings=real,real-bisect xen-unstable test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm debian-hvm-install
Searching for failure / basis pass:
146205 fail [host=albana1] / 146119 [host=pinot1] 146094 [host=rimava1] 146050 [host=italia0] 146039 [host=debina1] 146030 [host=godello0] 146018 [host=albana0] 146006 [host=elbling1] 145982 [host=chardonnay0] 145955 [host=pinot1] 145903 [host=huxelrebe1] 145879 [host=huxelrebe0] 145851 [host=chardonnay1] 145826 [host=pinot0] 145796 [host=fiano0] 145773 [host=elbling0] 145749 ok.
Failure / basis pass flights: 146205 / 145749
(tree with no url: minios)
(tree with no url: ovmf)
(tree with no url: seabios)
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
Latest b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef 97f10daf5f4bac91db732ef45c562839686f2c04
Basis pass b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef f383de87a2fb077f1fdbd4594493af613b15c233
Generating revisions with ./adhoc-revtuple-generator git://xenbits.xen.org/linux-pvops.git#b98aebd298246df37b472c52a2ee1023256d02e3-b98aebd298246df37b472c52a2ee1023256d02e3 git://xenbits.xen.org/osstest/linux-firmware.git#c530a75c1e6a472b0eb9558310b518f0dfcd8860-c530a75c1e6a472b0eb9558310b518f0dfcd8860 git://xenbits.xen.org/qemu-xen-traditional.git#d0d8ad39ecb51cd7497cd524484fe09f50876798-d0d8ad39ecb51cd7497cd524484fe09f50876798 git://xenbits.xen.org/qemu-xen.git#933ebad2470a169504799a1d95b8e41\
0bd9847ef-933ebad2470a169504799a1d95b8e410bd9847ef git://xenbits.xen.org/xen.git#f383de87a2fb077f1fdbd4594493af613b15c233-97f10daf5f4bac91db732ef45c562839686f2c04
Loaded 5001 nodes in revision graph
Searching for test results:
145749 pass b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef f383de87a2fb077f1fdbd4594493af613b15c233
145773 [host=elbling0]
145796 [host=fiano0]
145826 [host=pinot0]
145851 [host=chardonnay1]
145879 [host=huxelrebe0]
145903 [host=huxelrebe1]
145955 [host=pinot1]
146006 [host=elbling1]
145982 [host=chardonnay0]
146030 [host=godello0]
146018 [host=albana0]
146039 [host=debina1]
146050 [host=italia0]
146094 [host=rimava1]
146205 fail b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef 97f10daf5f4bac91db732ef45c562839686f2c04
146119 [host=pinot1]
146206 pass b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef f383de87a2fb077f1fdbd4594493af613b15c233
146176 fail b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef 97f10daf5f4bac91db732ef45c562839686f2c04
146234 fail b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef aacc143006429de46932aabae17c13846c71fa45
146215 fail b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef 97f10daf5f4bac91db732ef45c562839686f2c04
146217 pass b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef ba322a175059a712802401e8337c6c7952b265d1
146219 pass b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef 8d1d28bfcfd04d15c07c2f5c63aed3c7d220b024
146220 pass b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef b663b30c21466b919046cfc0187f086df19e0368
146222 pass b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef dda31ce9521c3b6a7750076f79427be77dea9b5b
146226 fail b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef aacc143006429de46932aabae17c13846c71fa45
146227 pass b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef 2572c7d76e1aee9b11a23c548cee69b15a35401f
146229 fail b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef aacc143006429de46932aabae17c13846c71fa45
146230 pass b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef 2572c7d76e1aee9b11a23c548cee69b15a35401f
146231 fail b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef aacc143006429de46932aabae17c13846c71fa45
146232 pass b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef 2572c7d76e1aee9b11a23c548cee69b15a35401f
Searching for interesting versions
Result found: flight 145749 (pass), for basis pass
Result found: flight 146176 (fail), for basis failure
Repro found: flight 146206 (pass), for basis pass
Repro found: flight 146215 (fail), for basis failure
0 revisions at b98aebd298246df37b472c52a2ee1023256d02e3 c530a75c1e6a472b0eb9558310b518f0dfcd8860 d0d8ad39ecb51cd7497cd524484fe09f50876798 933ebad2470a169504799a1d95b8e410bd9847ef 2572c7d76e1aee9b11a23c548cee69b15a35401f
No revisions left to test, checking graph state.
Result found: flight 146227 (pass), for last pass
Result found: flight 146229 (fail), for first failure
Repro found: flight 146230 (pass), for last pass
Repro found: flight 146231 (fail), for first failure
Repro found: flight 146232 (pass), for last pass
Repro found: flight 146234 (fail), for first failure

*** 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 <[email protected]>
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.

Revision graph left in /home/logs/results/bisect/xen-unstable/test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm.debian-hvm-install.{dot,ps,png,html,svg}.
----------------------------------------
146234: tolerable ALL FAIL

flight 146234 xen-unstable real-bisect [real]
http://logs.test-lab.xenproject.org/osstest/logs/146234/

Failures :-/ but no regressions.

Tests which did not succeed,
including tests which could not be run:
test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm 10 debian-hvm-install fail baseline untested

jobs:
test-amd64-amd64-xl-qemut-stubdom-debianhvm-amd64-xsm fail

------------------------------------------------------------
sg-report-flight on osstest.test-lab.xenproject.org
logs: /home/logs/logs
images: /home/logs/images

Logs, config files, etc. are available at
http://logs.test-lab.xenproject.org/osstest/logs

Explanation of these reports, and of osstest in general, is at
http://xenbits.xen.org/gitweb/?p=osstest.git;a=blob;f=README.email;hb=master
http://xenbits.xen.org/gitweb/?p=osstest.git;a=blob;f=README;hb=master

Test harness code can be found at
http://xenbits.xen.org/gitweb?p=osstest.git;a=summary

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#1 lore raw
Quoted 25 lines · osstest service owner

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 <[email protected]>
Date: Thu Jan 2 21:37:36 2020 +0000

tools/libxl: Plumb domain_create_state down into libxl__build_pre()

Quoted 7 lines

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.

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 <[email protected]>
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()')
---
 tools/libxl/libxl_dm.c       | 22 +++++++++++++---------
 tools/libxl/libxl_internal.h |  3 +--
 2 files changed, 14 insertions(+), 11 deletions(-)
tools/libxl/libxl_dm.c +13 -9
index 3f08ccad1b..b1ddde77e8 100644
@@ -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);
tools/libxl/libxl_internal.h +1 -2
index d919f91882..abf88dfd76 100644
@@ -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;
Signature · 7 lines
2.25.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#2 lore raw
Quoted 5 lines · Roger Pau Monné

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.

Quoted 7 lines

---8<---
From 688fde95992d07bb1123d324a68006dd08bc6512 Mon Sep 17 00:00:00 2001
From: Roger Pau Monne <[email protected]>
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

:-(, this is a lie. The email I've received has a different charset. git complained about it. Maybe next time the patch could be attached, or it could be a proper patch with some note (after ---) (git send-email can do --in-reply-to), or it could be two separated emails with the first one replying to the report and the second the patch (all in the same thread).

Quoted 30 lines

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()')
---
 tools/libxl/libxl_dm.c       | 22 +++++++++++++---------
 tools/libxl/libxl_internal.h |  3 +--
 2 files changed, 14 insertions(+), 11 deletions(-)
tools/libxl/libxl_dm.c +2 -2
index 3f08ccad1b..b1ddde77e8 100644
@@ -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;
 

tools/libxl/libxl_dm.c void libxl__spawn_stub_dm(libxl__egc *egc, libxl__domain_create_state *dcs) · line 2127

Quoted 10 lines
tools/libxl/libxl_dm.c +5 -1
     /* 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;

I don't think that's enough, we need to initialize the dcs properly. Otherwise, libxl__domain_build() might start using thing that aren't set properly. Maybe we would need a new struct which could be pass to libxl__domain_build*, or that might be more complicated than needed.

Quoted 8 lines
tools/libxl/libxl_dm.c +0 -0
     if (guest_config->b_info.device_model_version !=
         LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL) {
tools/libxl/libxl_internal.h +0 -0
index d919f91882..abf88dfd76 100644

tools/libxl/libxl_internal.h typedef struct { · line 4105

Quoted 6 lines
tools/libxl/libxl_internal.h +1 -2
@@ -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;

This should be named dm_dcs, I think, to follow the same pattern as before.

Thanks for tracking this down.

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#3 lore raw
Quoted 14 lines · Anthony PERARD
Quoted 5 lines · Roger Pau Monné

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.

Quoted 7 lines

---8<---
From 688fde95992d07bb1123d324a68006dd08bc6512 Mon Sep 17 00:00:00 2001
From: Roger Pau Monne <[email protected]>
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

Quoted 1 line

:-(, this is a lie. The email I've received has a different charset.

Really? The email headers also contain the same tag, and hence all my emails would have a wrong encoding then.

Quoted 6 lines

git
complained about it. Maybe next time the patch could be attached, or it could be a proper patch with some note (after ---) (git send-email can do --in-reply-to), or it could be two separated emails with the first one replying to the report and the second the patch (all in the same thread).

I can certainly send the patch separately as a reply as you say above, but I would still need to fix my email client to set the proper encoding then.

Quoted 31 lines
Quoted 31 lines

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()')
---
 tools/libxl/libxl_dm.c       | 22 +++++++++++++---------
 tools/libxl/libxl_internal.h |  3 +--
 2 files changed, 14 insertions(+), 11 deletions(-)
tools/libxl/libxl_dm.c +2 -2
index 3f08ccad1b..b1ddde77e8 100644
@@ -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;
 
Quoted 15 lines

tools/libxl/libxl_dm.c void libxl__spawn_stub_dm(libxl__egc *egc, libxl__domain_create_state *dcs) · line 2127

Quoted 10 lines
tools/libxl/libxl_dm.c +5 -1
     /* 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;

I don't think that's enough, we need to initialize the dcs properly. Otherwise, libxl__domain_build() might start using thing that aren't set properly. Maybe we would need a new struct which could be pass to libxl__domain_build*, or that might be more complicated than needed.

Er likely yes, but creating a complete domain_create_state for the stubdom will be very cumbersome I think. Maybe we can copy the one from the guest over the stubdom one in order to initialize it?

Not sure that's any better than just using an empty one.

Quoted 17 lines
Quoted 8 lines
tools/libxl/libxl_dm.c +0 -0
     if (guest_config->b_info.device_model_version !=
         LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL) {
tools/libxl/libxl_internal.h +0 -0
index d919f91882..abf88dfd76 100644

tools/libxl/libxl_internal.h typedef struct { · line 4105

Quoted 6 lines
tools/libxl/libxl_internal.h +1 -2
@@ -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;

This should be named dm_dcs, I think, to follow the same pattern as before.

Sure.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#4 lore raw
Quoted 15 lines · Roger Pau Monné
Quoted 14 lines · Anthony PERARD
Quoted 12 lines · Roger Pau Monné

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 <[email protected]>
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

Quoted 4 lines
Quoted 1 line

:-(, this is a lie. The email I've received has a different charset.

Really? The email headers also contain the same tag, and hence all my emails would have a wrong encoding then.

For emails sent by your MUA, I have:
Content-Type: text/plain; charset="iso-8859-1"
There's nothing wrong with that, my MUA uses the same charset. If, in the patch that I try to apply, I replace the content-type line of the patch by the one from the email header, git applied the patch just fine and don't complain.

So, the email encoding is fine.

It is just the copy of an email into another email's body that was an issue.

Quoted 11 lines
Quoted 7 lines

git
complained about it. Maybe next time the patch could be attached, or it could be a proper patch with some note (after ---) (git send-email can do --in-reply-to), or it could be two separated emails with the first one replying to the report and the second the patch (all in the same thread).

I can certainly send the patch separately as a reply as you say above, but I would still need to fix my email client to set the proper encoding then.

The email I received was just fine, encoded properly (I think). It is just trying to apply the patch embedded into the body of the email that was annoying.

Quoted 32 lines
Quoted 16 lines
Quoted 16 lines
tools/libxl/libxl_dm.c +2 -2
index 3f08ccad1b..b1ddde77e8 100644
@@ -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;
 
Quoted 15 lines

tools/libxl/libxl_dm.c void libxl__spawn_stub_dm(libxl__egc *egc, libxl__domain_create_state *dcs) · line 2127

Quoted 10 lines
tools/libxl/libxl_dm.c +5 -1
     /* 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;

I don't think that's enough, we need to initialize the dcs properly. Otherwise, libxl__domain_build() might start using thing that aren't set properly. Maybe we would need a new struct which could be pass to libxl__domain_build*, or that might be more complicated than needed.

Quoted 3 lines

Er likely yes, but creating a complete domain_create_state for the stubdom will be very cumbersome I think. Maybe we can copy the one from the guest over the stubdom one in order to initialize it?

That's not going to work.

Quoted 1 line

Not sure that's any better than just using an empty one.

And an "empty one" doesn't work either, the dcs created here contains more that just the build_state' and guest_config', it also contains for all the _fd field set to something.

The _fd thing is important because Andrew check the value of `restore_fd' to figure out if a domain is been restored or not.

I don't have better suggestion for now, I'll try to think about it.

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#5 lore raw
Quoted 79 lines · Anthony PERARD
Quoted 14 lines · Roger Pau Monné
Quoted 13 lines · Anthony PERARD
Quoted 12 lines · Roger Pau Monné

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 <[email protected]>
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

Quoted 3 lines
Quoted 1 line

:-(, this is a lie. The email I've received has a different charset.

Really? The email headers also contain the same tag, and hence all my emails would have a wrong encoding then.

For emails sent by your MUA, I have:
Content-Type: text/plain; charset="iso-8859-1"
There's nothing wrong with that, my MUA uses the same charset. If, in the patch that I try to apply, I replace the content-type line of the patch by the one from the email header, git applied the patch just fine and don't complain.

So, the email encoding is fine.

It is just the copy of an email into another email's body that was an issue.

Quoted 9 lines
Quoted 6 lines

git
complained about it. Maybe next time the patch could be attached, or it could be a proper patch with some note (after ---) (git send-email can do --in-reply-to), or it could be two separated emails with the first one replying to the report and the second the patch (all in the same thread).

I can certainly send the patch separately as a reply as you say above, but I would still need to fix my email client to set the proper encoding then.

The email I received was just fine, encoded properly (I think). It is just trying to apply the patch embedded into the body of the email that was annoying.

Quoted 30 lines
Quoted 16 lines
Quoted 16 lines
tools/libxl/libxl_dm.c +2 -2
index 3f08ccad1b..b1ddde77e8 100644
@@ -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;
 
Quoted 14 lines

tools/libxl/libxl_dm.c void libxl__spawn_stub_dm(libxl__egc *egc, libxl__domain_create_state *dcs) · line 2127

Quoted 10 lines
tools/libxl/libxl_dm.c +5 -1
     /* 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;

I don't think that's enough, we need to initialize the dcs properly. Otherwise, libxl__domain_build() might start using thing that aren't set properly. Maybe we would need a new struct which could be pass to libxl__domain_build*, or that might be more complicated than needed.

Quoted 3 lines

Er likely yes, but creating a complete domain_create_state for the stubdom will be very cumbersome I think. Maybe we can copy the one from the guest over the stubdom one in order to initialize it?

That's not going to work.

Quoted 1 line

Not sure that's any better than just using an empty one.

Quoted 8 lines

And an "empty one" doesn't work either, the dcs created here contains more that just the build_state' and guest_config', it also contains for all the _fd field set to something.

The _fd thing is important because Andrew check the value of `restore_fd' to figure out if a domain is been restored or not.

I don't have better suggestion for now, I'll try to think about it.

So I did discuss my patch being horrible in the commit message commentary, but got an ack without any further discussion.  The structs vs "where useful information is" map is chronically twisted.

An alternative would be to pass down an explicit "clean build" vs "restore from serialised state" flag, which is the information actually needed.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel