[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [xen-unstable test] 12132: regressions - FAIL



On Fri, 2012-03-02 at 00:54 +0000, xen.org wrote:
> flight 12132 xen-unstable real [real]
> http://www.chiark.greenend.org.uk/~xensrcts/logs/12132/
> 
> Regressions :-(
> 
> Tests which did not succeed and are blocking,
> including tests which could not be run:
>  test-i386-i386-xl             9 guest-start               fail REGR. vs. 
> 12130
>  test-amd64-amd64-xl           9 guest-start               fail REGR. vs. 
> 12130
>  test-amd64-amd64-xl-sedf      9 guest-start               fail REGR. vs. 
> 12130
>  test-amd64-i386-xl-credit2    9 guest-start               fail REGR. vs. 
> 12130
>  test-amd64-i386-xl-multivcpu  9 guest-start               fail REGR. vs. 
> 12130
>  test-amd64-i386-xl            9 guest-start               fail REGR. vs. 
> 12130

I forgot to retest PV guests when adding "libxl: Select BIOS using
libxl_domain_build_info_setdefaults" to my series. Setting
info->u.hvm.bios when type == PV was clobbering info->u.pv.something.

I'm starting to think we should make the union a struct and be damned
the (tiny) waste of space. Either that or somehow hide/discourage direct
use of b_info->u.* and instead provide an accessor of some sort.

Anyway, the following fixes the immediate issue. I intend to commit
shortly per the permission given by IanJ in
<20302.18856.140051.792707@xxxxxxxxxxxxxxxxxxxxxxxx>.

Ian.

8<--------------------------------------------

# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1330678988 0
# Node ID 892bc1242d45b0a532b78833b633c68fc64a2906
# Parent  94eddab0b7cc2a0a4da71275efeea3a0962c125b
libxl: only set b_info->u.hvm.bios if type if HVM

This fixes a PV guest breakage causes by 24932:6eac4a1ee646 "libxl: Select BIOS
using libxl_domain_build_info_setdefaults".

I have also included a sanity check on b_info->type.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 94eddab0b7cc -r 892bc1242d45 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Thu Mar 01 14:49:58 2012 +0000
+++ b/tools/libxl/libxl_create.c        Fri Mar 02 09:03:08 2012 +0000
@@ -74,28 +74,33 @@ int libxl__domain_create_info_setdefault
 int libxl__domain_build_info_setdefault(libxl__gc *gc,
                                         libxl_domain_build_info *b_info)
 {
+    if (!b_info->type || b_info->type == -1)
+        return ERROR_INVAL;
+
     if (!b_info->device_model_version)
         b_info->device_model_version =
             LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL;
 
-    if (!b_info->u.hvm.bios)
+    if (b_info->type == LIBXL_DOMAIN_TYPE_HVM) {
+        if (!b_info->u.hvm.bios)
+            switch (b_info->device_model_version) {
+            case 1: b_info->u.hvm.bios = LIBXL_BIOS_TYPE_ROMBIOS; break;
+            case 2: b_info->u.hvm.bios = LIBXL_BIOS_TYPE_SEABIOS; break;
+            default:return ERROR_INVAL;
+            }
+
+        /* Enforce BIOS<->Device Model version relationship */
         switch (b_info->device_model_version) {
-        case 1: b_info->u.hvm.bios = LIBXL_BIOS_TYPE_ROMBIOS; break;
-        case 2: b_info->u.hvm.bios = LIBXL_BIOS_TYPE_SEABIOS; break;
-        default:return ERROR_INVAL;
-    }
-
-    /* Enforce BIOS<->Device Model version relationship */
-    switch (b_info->device_model_version) {
-    case 1:
-        if (b_info->u.hvm.bios != LIBXL_BIOS_TYPE_ROMBIOS)
-            return ERROR_INVAL;
-        break;
-    case 2:
-        if (b_info->u.hvm.bios == LIBXL_BIOS_TYPE_ROMBIOS)
-            return ERROR_INVAL;
-        break;
-    default:abort();
+        case 1:
+            if (b_info->u.hvm.bios != LIBXL_BIOS_TYPE_ROMBIOS)
+                return ERROR_INVAL;
+            break;
+        case 2:
+            if (b_info->u.hvm.bios == LIBXL_BIOS_TYPE_ROMBIOS)
+                return ERROR_INVAL;
+            break;
+        default:abort();
+        }
     }
 
     libxl_defbool_setdefault(&b_info->device_model_stubdomain, false);



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.