3ec523
From 589e1c627bcfe2d8f26c6cb9ea0c68e9b902a931 Mon Sep 17 00:00:00 2001
3ec523
From: Michal Privoznik <mprivozn@redhat.com>
3ec523
Date: Wed, 6 Aug 2014 13:18:53 +0200
3ec523
Subject: [PATCH] conf: Extend <loader/> and introduce <nvram/>
3ec523
3ec523
Up to now, users can configure BIOS via the <loader/> element. With
3ec523
the upcoming implementation of UEFI this is not enough as BIOS and
3ec523
UEFI are conceptually different. For instance, while BIOS is ROM, UEFI
3ec523
is programmable flash (although all writes to code section are
3ec523
denied). Therefore we need new attribute @type which will
3ec523
differentiate the two. Then, new attribute @readonly is introduced to
3ec523
reflect the fact that some images are RO.
3ec523
3ec523
Moreover, the OVMF (which is going to be used mostly), works in two
3ec523
modes:
3ec523
1) Code and UEFI variable store is mixed in one file.
3ec523
2) Code and UEFI variable store is separated in two files
3ec523
3ec523
The latter has advantage of updating the UEFI code without losing the
3ec523
configuration. However, in order to represent the latter case we need
3ec523
yet another XML element: <nvram/>. Currently, it has no additional
3ec523
attributes, it's just a bare element containing path to the variable
3ec523
store file.
3ec523
3ec523
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
3ec523
Acked-by: Laszlo Ersek <lersek@redhat.com>
3ec523
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
3ec523
(cherry picked from commit 68bf13dbef8342eaee0bf57c73cebb60b7de11e8)
3ec523
---
3ec523
 docs/formatdomain.html.in                          | 19 ++++-
3ec523
 docs/schemas/domaincommon.rng                      | 21 ++++++
3ec523
 src/conf/domain_conf.c                             | 87 +++++++++++++++++++++-
3ec523
 src/conf/domain_conf.h                             | 22 +++++-
3ec523
 src/libvirt_private.syms                           |  3 +
3ec523
 src/qemu/qemu_command.c                            |  5 +-
3ec523
 src/security/virt-aa-helper.c                      |  4 +-
3ec523
 src/vbox/vbox_common.c                             |  7 +-
3ec523
 src/xenapi/xenapi_driver.c                         |  3 +-
3ec523
 src/xenconfig/xen_common.c                         |  7 +-
3ec523
 src/xenconfig/xen_sxpr.c                           | 16 ++--
3ec523
 tests/qemuxml2argvdata/qemuxml2argv-bios-nvram.xml | 40 ++++++++++
3ec523
 .../qemuxml2xmlout-pci-bridge-many-disks.xml       |  2 +-
3ec523
 tests/qemuxml2xmltest.c                            |  2 +
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml      |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml  |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml    |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml  |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml        |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-legacy-vfb.xml    |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml     |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml     |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml  |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml  |  2 +-
3ec523
 .../sexpr2xml-fv-serial-dev-2-ports.xml            |  2 +-
3ec523
 .../sexpr2xml-fv-serial-dev-2nd-port.xml           |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml   |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml   |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml   |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml    |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml  |  2 +-
3ec523
 .../sexpr2xml-fv-serial-tcp-telnet.xml             |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml    |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml    |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml   |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml     |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-sound.xml         |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml      |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml     |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-utc.xml           |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv-v2.xml            |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-fv.xml               |  2 +-
3ec523
 tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml  |  2 +-
3ec523
 tests/xmconfigdata/test-escape-paths.xml           |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-force-hpet.xml    |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-force-nohpet.xml  |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-localtime.xml     |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-net-ioemu.xml     |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-net-netfront.xml  |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-new-cdrom.xml     |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-old-cdrom.xml     |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-parallel-tcp.xml  |  2 +-
3ec523
 .../test-fullvirt-serial-dev-2-ports.xml           |  2 +-
3ec523
 .../test-fullvirt-serial-dev-2nd-port.xml          |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-serial-file.xml   |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-serial-null.xml   |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-serial-pipe.xml   |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-serial-pty.xml    |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-serial-stdio.xml  |  2 +-
3ec523
 .../test-fullvirt-serial-tcp-telnet.xml            |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-serial-tcp.xml    |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-serial-udp.xml    |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-serial-unix.xml   |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-sound.xml         |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-usbmouse.xml      |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-usbtablet.xml     |  2 +-
3ec523
 tests/xmconfigdata/test-fullvirt-utc.xml           |  2 +-
3ec523
 tests/xmconfigdata/test-no-source-cdrom.xml        |  2 +-
3ec523
 tests/xmconfigdata/test-pci-devs.xml               |  2 +-
3ec523
 69 files changed, 269 insertions(+), 79 deletions(-)
3ec523
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-bios-nvram.xml
3ec523
3ec523
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
3ec523
index 94236dd..757035a 100644
3ec523
--- a/docs/formatdomain.html.in
3ec523
+++ b/docs/formatdomain.html.in
3ec523
@@ -102,7 +102,8 @@
3ec523
   ...
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader readonly='on' type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <nvram>/var/lib/libvirt/nvram/guest_VARS.fd</nvram>
3ec523
     <boot dev='hd'/>
3ec523
     <boot dev='cdrom'/>
3ec523
     <bootmenu enable='yes' timeout='3000'/>
3ec523
@@ -129,7 +130,21 @@
3ec523
         used to assist the domain creation process. It is used by Xen
3ec523
         fully virtualized domains as well as setting the QEMU BIOS file
3ec523
         path for QEMU/KVM domains. Xen since 0.1.0,
3ec523
-        QEMU/KVM since 0.9.12
3ec523
+        QEMU/KVM since 0.9.12 Then, since
3ec523
+        1.2.8 it's possible for the element to have two
3ec523
+        optional attributes: readonly (accepted values are
3ec523
+        yes and no) to reflect the fact that the
3ec523
+        image should be writable or read-only. The second attribute
3ec523
+        type accepts values rom and
3ec523
+        pflash. It tells the hypervisor where in the guest
3ec523
+        memory the file should be mapped.  For instance, if the loader
3ec523
+        path points to an UEFI image, type should be
3ec523
+        pflash.
3ec523
+      
nvram
3ec523
+      
Some UEFI firmwares may want to use a non-volatile memory to store
3ec523
+        some variables. In the host, this is represented as a file and the
3ec523
+        path to the file is stored in this element. Since
3ec523
+        1.2.8
3ec523
       
boot
3ec523
       
The dev attribute takes one of the values "fd", "hd",
3ec523
         "cdrom" or "network" and is used to specify the next boot device
3ec523
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
3ec523
index cedceae..5d9c21c 100644
3ec523
--- a/docs/schemas/domaincommon.rng
3ec523
+++ b/docs/schemas/domaincommon.rng
3ec523
@@ -242,6 +242,27 @@
3ec523
       <interleave>
3ec523
         <optional>
3ec523
           <element name="loader">
3ec523
+            <optional>
3ec523
+              <attribute name="readonly">
3ec523
+                <choice>
3ec523
+                  <value>yes</value>
3ec523
+                  <value>no</value>
3ec523
+                </choice>
3ec523
+              </attribute>
3ec523
+            </optional>
3ec523
+            <optional>
3ec523
+              <attribute name="type">
3ec523
+                <choice>
3ec523
+                  <value>rom</value>
3ec523
+                  <value>pflash</value>
3ec523
+                </choice>
3ec523
+              </attribute>
3ec523
+            </optional>
3ec523
+            <ref name="absFilePath"/>
3ec523
+          </element>
3ec523
+        </optional>
3ec523
+        <optional>
3ec523
+          <element name="nvram">
3ec523
             <ref name="absFilePath"/>
3ec523
           </element>
3ec523
         </optional>
3ec523
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
3ec523
index 53ef694..6ee5c17 100644
3ec523
--- a/src/conf/domain_conf.c
3ec523
+++ b/src/conf/domain_conf.c
3ec523
@@ -777,6 +777,11 @@ VIR_ENUM_IMPL(virDomainDiskMirrorState, VIR_DOMAIN_DISK_MIRROR_STATE_LAST,
3ec523
               "abort",
3ec523
               "pivot")
3ec523
 
3ec523
+VIR_ENUM_IMPL(virDomainLoader,
3ec523
+              VIR_DOMAIN_LOADER_TYPE_LAST,
3ec523
+              "rom",
3ec523
+              "pflash")
3ec523
+
3ec523
 /* Internal mapping: subset of block job types that can be present in
3ec523
  * <mirror> XML (remaining types are not two-phase). */
3ec523
 VIR_ENUM_DECL(virDomainBlockJob)
3ec523
@@ -2010,6 +2015,17 @@ virDomainPanicDefFree(virDomainPanicDefPtr panic)
3ec523
     VIR_FREE(panic);
3ec523
 }
3ec523
 
3ec523
+void
3ec523
+virDomainLoaderDefFree(virDomainLoaderDefPtr loader)
3ec523
+{
3ec523
+    if (!loader)
3ec523
+        return;
3ec523
+
3ec523
+    VIR_FREE(loader->path);
3ec523
+    VIR_FREE(loader->nvram);
3ec523
+    VIR_FREE(loader);
3ec523
+}
3ec523
+
3ec523
 void virDomainDefFree(virDomainDefPtr def)
3ec523
 {
3ec523
     size_t i;
3ec523
@@ -2115,7 +2131,7 @@ void virDomainDefFree(virDomainDefPtr def)
3ec523
     VIR_FREE(def->os.cmdline);
3ec523
     VIR_FREE(def->os.dtb);
3ec523
     VIR_FREE(def->os.root);
3ec523
-    VIR_FREE(def->os.loader);
3ec523
+    virDomainLoaderDefFree(def->os.loader);
3ec523
     VIR_FREE(def->os.bootloader);
3ec523
     VIR_FREE(def->os.bootloaderArgs);
3ec523
 
3ec523
@@ -11661,6 +11677,42 @@ virDomainDefMaybeAddHostdevSCSIcontroller(virDomainDefPtr def)
3ec523
     return 0;
3ec523
 }
3ec523
 
3ec523
+static int
3ec523
+virDomainLoaderDefParseXML(xmlNodePtr node,
3ec523
+                           virDomainLoaderDefPtr loader)
3ec523
+{
3ec523
+    int ret = -1;
3ec523
+    char *readonly_str = NULL;
3ec523
+    char *type_str = NULL;
3ec523
+
3ec523
+    readonly_str = virXMLPropString(node, "readonly");
3ec523
+    type_str = virXMLPropString(node, "type");
3ec523
+    loader->path = (char *) xmlNodeGetContent(node);
3ec523
+
3ec523
+    if (readonly_str &&
3ec523
+        (loader->readonly = virTristateBoolTypeFromString(readonly_str)) <= 0) {
3ec523
+        virReportError(VIR_ERR_XML_DETAIL,
3ec523
+                       _("unknown readonly value: %s"), readonly_str);
3ec523
+        goto cleanup;
3ec523
+    }
3ec523
+
3ec523
+    if (type_str) {
3ec523
+        int type;
3ec523
+        if ((type = virDomainLoaderTypeFromString(type_str)) < 0) {
3ec523
+            virReportError(VIR_ERR_XML_DETAIL,
3ec523
+                           _("unknown type value: %s"), type_str);
3ec523
+            goto cleanup;
3ec523
+        }
3ec523
+        loader->type = type;
3ec523
+    }
3ec523
+
3ec523
+    ret = 0;
3ec523
+ cleanup:
3ec523
+    VIR_FREE(readonly_str);
3ec523
+    VIR_FREE(type_str);
3ec523
+    return ret;
3ec523
+}
3ec523
+
3ec523
 static virDomainDefPtr
3ec523
 virDomainDefParseXML(xmlDocPtr xml,
3ec523
                      xmlNodePtr root,
3ec523
@@ -12701,12 +12753,22 @@ virDomainDefParseXML(xmlDocPtr xml,
3ec523
     if (STREQ(def->os.type, "xen") ||
3ec523
         STREQ(def->os.type, "hvm") ||
3ec523
         STREQ(def->os.type, "uml")) {
3ec523
+        xmlNodePtr loader_node;
3ec523
+
3ec523
         def->os.kernel = virXPathString("string(./os/kernel[1])", ctxt);
3ec523
         def->os.initrd = virXPathString("string(./os/initrd[1])", ctxt);
3ec523
         def->os.cmdline = virXPathString("string(./os/cmdline[1])", ctxt);
3ec523
         def->os.dtb = virXPathString("string(./os/dtb[1])", ctxt);
3ec523
         def->os.root = virXPathString("string(./os/root[1])", ctxt);
3ec523
-        def->os.loader = virXPathString("string(./os/loader[1])", ctxt);
3ec523
+        if ((loader_node = virXPathNode("./os/loader[1]", ctxt))) {
3ec523
+            if (VIR_ALLOC(def->os.loader) < 0)
3ec523
+                goto error;
3ec523
+
3ec523
+            if (virDomainLoaderDefParseXML(loader_node, def->os.loader) < 0)
3ec523
+                goto error;
3ec523
+
3ec523
+            def->os.loader->nvram = virXPathString("string(./os/nvram[1])", ctxt);
3ec523
+        }
3ec523
     }
3ec523
 
3ec523
     if (STREQ(def->os.type, "hvm")) {
3ec523
@@ -17789,6 +17851,23 @@ virDomainHugepagesFormat(virBufferPtr buf,
3ec523
     virBufferAddLit(buf, "</hugepages>\n");
3ec523
 }
3ec523
 
3ec523
+static void
3ec523
+virDomainLoaderDefFormat(virBufferPtr buf,
3ec523
+                         virDomainLoaderDefPtr loader)
3ec523
+{
3ec523
+    const char *readonly = virTristateBoolTypeToString(loader->readonly);
3ec523
+    const char *type = virDomainLoaderTypeToString(loader->type);
3ec523
+
3ec523
+    virBufferAddLit(buf, "
3ec523
+
3ec523
+    if (loader->readonly)
3ec523
+        virBufferAsprintf(buf, " readonly='%s'", readonly);
3ec523
+
3ec523
+    virBufferAsprintf(buf, " type='%s'>", type);
3ec523
+
3ec523
+    virBufferEscapeString(buf, "%s</loader>\n", loader->path);
3ec523
+    virBufferEscapeString(buf, "<nvram>%s</nvram>\n", loader->nvram);
3ec523
+}
3ec523
 
3ec523
 static bool
3ec523
 virDomainDefHasCapabilitiesFeatures(virDomainDefPtr def)
3ec523
@@ -18109,8 +18188,8 @@ virDomainDefFormatInternal(virDomainDefPtr def,
3ec523
     for (i = 0; def->os.initargv && def->os.initargv[i]; i++)
3ec523
         virBufferEscapeString(buf, "<initarg>%s</initarg>\n",
3ec523
                               def->os.initargv[i]);
3ec523
-    virBufferEscapeString(buf, "<loader>%s</loader>\n",
3ec523
-                          def->os.loader);
3ec523
+    if (def->os.loader)
3ec523
+        virDomainLoaderDefFormat(buf, def->os.loader);
3ec523
     virBufferEscapeString(buf, "<kernel>%s</kernel>\n",
3ec523
                           def->os.kernel);
3ec523
     virBufferEscapeString(buf, "<initrd>%s</initrd>\n",
3ec523
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
3ec523
index 9586c3b..c97a10c 100644
3ec523
--- a/src/conf/domain_conf.h
3ec523
+++ b/src/conf/domain_conf.h
3ec523
@@ -1628,6 +1628,26 @@ struct _virDomainBIOSDef {
3ec523
     int rt_delay;
3ec523
 };
3ec523
 
3ec523
+typedef enum {
3ec523
+    VIR_DOMAIN_LOADER_TYPE_ROM = 0,
3ec523
+    VIR_DOMAIN_LOADER_TYPE_PFLASH,
3ec523
+
3ec523
+    VIR_DOMAIN_LOADER_TYPE_LAST
3ec523
+} virDomainLoader;
3ec523
+
3ec523
+VIR_ENUM_DECL(virDomainLoader)
3ec523
+
3ec523
+typedef struct _virDomainLoaderDef virDomainLoaderDef;
3ec523
+typedef virDomainLoaderDef *virDomainLoaderDefPtr;
3ec523
+struct _virDomainLoaderDef {
3ec523
+    char *path;
3ec523
+    int readonly;   /* enum virTristateBool */
3ec523
+    virDomainLoader type;
3ec523
+    char *nvram;    /* path to non-volatile RAM */
3ec523
+};
3ec523
+
3ec523
+void virDomainLoaderDefFree(virDomainLoaderDefPtr loader);
3ec523
+
3ec523
 /* Operating system configuration data & machine / arch */
3ec523
 typedef struct _virDomainOSDef virDomainOSDef;
3ec523
 typedef virDomainOSDef *virDomainOSDefPtr;
3ec523
@@ -1647,7 +1667,7 @@ struct _virDomainOSDef {
3ec523
     char *cmdline;
3ec523
     char *dtb;
3ec523
     char *root;
3ec523
-    char *loader;
3ec523
+    virDomainLoaderDefPtr loader;
3ec523
     char *bootloader;
3ec523
     char *bootloaderArgs;
3ec523
     int smbios_mode;
3ec523
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
3ec523
index f8d9b95..18cf0c2 100644
3ec523
--- a/src/libvirt_private.syms
3ec523
+++ b/src/libvirt_private.syms
3ec523
@@ -313,6 +313,9 @@ virDomainLifecycleTypeFromString;
3ec523
 virDomainLifecycleTypeToString;
3ec523
 virDomainListFree;
3ec523
 virDomainLiveConfigHelperMethod;
3ec523
+virDomainLoaderDefFree;
3ec523
+virDomainLoaderTypeFromString;
3ec523
+virDomainLoaderTypeToString;
3ec523
 virDomainLockFailureTypeFromString;
3ec523
 virDomainLockFailureTypeToString;
3ec523
 virDomainMemballoonModelTypeFromString;
3ec523
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
3ec523
index 2184caa..3cb2e0b 100644
3ec523
--- a/src/qemu/qemu_command.c
3ec523
+++ b/src/qemu/qemu_command.c
3ec523
@@ -7527,7 +7527,7 @@ qemuBuildCommandLine(virConnectPtr conn,
3ec523
 
3ec523
     if (def->os.loader) {
3ec523
         virCommandAddArg(cmd, "-bios");
3ec523
-        virCommandAddArg(cmd, def->os.loader);
3ec523
+        virCommandAddArg(cmd, def->os.loader->path);
3ec523
     }
3ec523
 
3ec523
     /* Set '-m MB' based on maxmem, because the lower 'memory' limit
3ec523
@@ -11347,7 +11347,8 @@ qemuParseCommandLine(virCapsPtr qemuCaps,
3ec523
                 goto error;
3ec523
         } else if (STREQ(arg, "-bios")) {
3ec523
             WANT_VALUE();
3ec523
-            if (VIR_STRDUP(def->os.loader, val) < 0)
3ec523
+            if (VIR_ALLOC(def->os.loader) < 0 ||
3ec523
+                VIR_STRDUP(def->os.loader->path, val) < 0)
3ec523
                 goto error;
3ec523
         } else if (STREQ(arg, "-initrd")) {
3ec523
             WANT_VALUE();
3ec523
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
3ec523
index a0b104c..311ce3b 100644
3ec523
--- a/src/security/virt-aa-helper.c
3ec523
+++ b/src/security/virt-aa-helper.c
3ec523
@@ -1006,8 +1006,8 @@ get_files(vahControl * ctl)
3ec523
         if (vah_add_file(&buf, ctl->def->os.dtb, "r") != 0)
3ec523
             goto cleanup;
3ec523
 
3ec523
-    if (ctl->def->os.loader && ctl->def->os.loader)
3ec523
-        if (vah_add_file(&buf, ctl->def->os.loader, "r") != 0)
3ec523
+    if (ctl->def->os.loader && ctl->def->os.loader->path)
3ec523
+        if (vah_add_file(&buf, ctl->def->os.loader->path, "r") != 0)
3ec523
             goto cleanup;
3ec523
 
3ec523
     for (i = 0; i < ctl->def->ngraphics; i++) {
3ec523
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
3ec523
index b186ea8..6f56c59 100644
3ec523
--- a/src/vbox/vbox_common.c
3ec523
+++ b/src/vbox/vbox_common.c
3ec523
@@ -988,7 +988,12 @@ vboxSetBootDeviceOrder(virDomainDefPtr def, vboxGlobalData *data,
3ec523
     VIR_DEBUG("def->os.initrd           %s", def->os.initrd);
3ec523
     VIR_DEBUG("def->os.cmdline          %s", def->os.cmdline);
3ec523
     VIR_DEBUG("def->os.root             %s", def->os.root);
3ec523
-    VIR_DEBUG("def->os.loader           %s", def->os.loader);
3ec523
+    if (def->os.loader) {
3ec523
+        VIR_DEBUG("def->os.loader->path     %s", def->os.loader->path);
3ec523
+        VIR_DEBUG("def->os.loader->readonly %d", def->os.loader->readonly);
3ec523
+        VIR_DEBUG("def->os.loader->type     %d", def->os.loader->type);
3ec523
+        VIR_DEBUG("def->os.loader->nvram    %s", def->os.loader->nvram);
3ec523
+    }
3ec523
     VIR_DEBUG("def->os.bootloader       %s", def->os.bootloader);
3ec523
     VIR_DEBUG("def->os.bootloaderArgs   %s", def->os.bootloaderArgs);
3ec523
 
3ec523
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
3ec523
index 50331c9..a6eaccc 100644
3ec523
--- a/src/xenapi/xenapi_driver.c
3ec523
+++ b/src/xenapi/xenapi_driver.c
3ec523
@@ -1427,7 +1427,8 @@ xenapiDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
3ec523
             VIR_FREE(boot_policy);
3ec523
             goto error;
3ec523
         }
3ec523
-        if (VIR_STRDUP(defPtr->os.loader, "pygrub") < 0) {
3ec523
+        if (VIR_ALLOC(defPtr->os.loader) < 0 ||
3ec523
+            VIR_STRDUP(defPtr->os.loader->path, "pygrub") < 0) {
3ec523
             VIR_FREE(boot_policy);
3ec523
             goto error;
3ec523
         }
3ec523
diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c
3ec523
index 9beaf6c..abd77b5 100644
3ec523
--- a/src/xenconfig/xen_common.c
3ec523
+++ b/src/xenconfig/xen_common.c
3ec523
@@ -1065,7 +1065,8 @@ xenParseOS(virConfPtr conf, virDomainDefPtr def)
3ec523
     if (STREQ(def->os.type, "hvm")) {
3ec523
         const char *boot;
3ec523
 
3ec523
-       if (xenConfigCopyString(conf, "kernel", &def->os.loader) < 0)
3ec523
+        if (VIR_ALLOC(def->os.loader) < 0 ||
3ec523
+            xenConfigCopyString(conf, "kernel", &def->os.loader->path) < 0)
3ec523
             return -1;
3ec523
 
3ec523
         if (xenConfigGetString(conf, "boot", &boot, "c") < 0)
3ec523
@@ -1740,8 +1741,8 @@ xenFormatOS(virConfPtr conf, virDomainDefPtr def)
3ec523
         if (xenXMConfigSetString(conf, "builder", "hvm") < 0)
3ec523
             return -1;
3ec523
 
3ec523
-        if (def->os.loader &&
3ec523
-            xenXMConfigSetString(conf, "kernel", def->os.loader) < 0)
3ec523
+        if (def->os.loader && def->os.loader->path &&
3ec523
+            xenXMConfigSetString(conf, "kernel", def->os.loader->path) < 0)
3ec523
             return -1;
3ec523
 
3ec523
         for (i = 0; i < def->os.nBootDevs; i++) {
3ec523
diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c
3ec523
index ff81c36..e8b9f59 100644
3ec523
--- a/src/xenconfig/xen_sxpr.c
3ec523
+++ b/src/xenconfig/xen_sxpr.c
3ec523
@@ -93,13 +93,15 @@ xenParseSxprOS(const struct sexpr *node,
3ec523
                int hvm)
3ec523
 {
3ec523
     if (hvm) {
3ec523
-        if (sexpr_node_copy(node, "domain/image/hvm/loader", &def->os.loader) < 0)
3ec523
+        if (VIR_ALLOC(def->os.loader) < 0)
3ec523
             goto error;
3ec523
-        if (def->os.loader == NULL) {
3ec523
-            if (sexpr_node_copy(node, "domain/image/hvm/kernel", &def->os.loader) < 0)
3ec523
+        if (sexpr_node_copy(node, "domain/image/hvm/loader", &def->os.loader->path) < 0)
3ec523
+            goto error;
3ec523
+        if (def->os.loader->path == NULL) {
3ec523
+            if (sexpr_node_copy(node, "domain/image/hvm/kernel", &def->os.loader->path) < 0)
3ec523
                 goto error;
3ec523
 
3ec523
-            if (def->os.loader == NULL) {
3ec523
+            if (def->os.loader->path == NULL) {
3ec523
                 virReportError(VIR_ERR_INTERNAL_ERROR,
3ec523
                                "%s", _("domain information incomplete, missing HVM loader"));
3ec523
                 return -1;
3ec523
@@ -128,7 +130,7 @@ xenParseSxprOS(const struct sexpr *node,
3ec523
     /* If HVM kenrel == loader, then old xend, so kill off kernel */
3ec523
     if (hvm &&
3ec523
         def->os.kernel &&
3ec523
-        STREQ(def->os.kernel, def->os.loader)) {
3ec523
+        STREQ(def->os.kernel, def->os.loader->path)) {
3ec523
         VIR_FREE(def->os.kernel);
3ec523
     }
3ec523
     /* Drop kernel argument that has no value */
3ec523
@@ -2279,9 +2281,9 @@ xenFormatSxpr(virConnectPtr conn,
3ec523
         if (hvm) {
3ec523
             char bootorder[VIR_DOMAIN_BOOT_LAST+1];
3ec523
             if (def->os.kernel)
3ec523
-                virBufferEscapeSexpr(&buf, "(loader '%s')", def->os.loader);
3ec523
+                virBufferEscapeSexpr(&buf, "(loader '%s')", def->os.loader->path);
3ec523
             else
3ec523
-                virBufferEscapeSexpr(&buf, "(kernel '%s')", def->os.loader);
3ec523
+                virBufferEscapeSexpr(&buf, "(kernel '%s')", def->os.loader->path);
3ec523
 
3ec523
             virBufferAsprintf(&buf, "(vcpus %u)", def->maxvcpus);
3ec523
             if (def->vcpus < def->maxvcpus)
3ec523
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bios-nvram.xml b/tests/qemuxml2argvdata/qemuxml2argv-bios-nvram.xml
3ec523
new file mode 100644
3ec523
index 0000000..d8270b1
3ec523
--- /dev/null
3ec523
+++ b/tests/qemuxml2argvdata/qemuxml2argv-bios-nvram.xml
3ec523
@@ -0,0 +1,40 @@
3ec523
+<domain type='qemu'>
3ec523
+  <name>test-bios</name>
3ec523
+  <uuid>362d1fc1-df7d-193e-5c18-49a71bd1da66</uuid>
3ec523
+  <memory unit='KiB'>1048576</memory>
3ec523
+  <currentMemory unit='KiB'>1048576</currentMemory>
3ec523
+  <vcpu placement='static'>1</vcpu>
3ec523
+  <os>
3ec523
+    <type arch='x86_64' machine='pc'>hvm</type>
3ec523
+    <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
3ec523
+    <nvram>/usr/share/OVMF/OVMF_VARS.fd</nvram>
3ec523
+    <boot dev='hd'/>
3ec523
+    <bootmenu enable='yes'/>
3ec523
+  </os>
3ec523
+  <features>
3ec523
+    <acpi/>
3ec523
+  </features>
3ec523
+  <clock offset='utc'/>
3ec523
+  <on_poweroff>destroy</on_poweroff>
3ec523
+  <on_reboot>restart</on_reboot>
3ec523
+  <on_crash>restart</on_crash>
3ec523
+  <devices>
3ec523
+    <emulator>/usr/bin/qemu</emulator>
3ec523
+    <disk type='block' device='disk'>
3ec523
+      <source dev='/dev/HostVG/QEMUGuest1'/>
3ec523
+      <target dev='hda' bus='ide'/>
3ec523
+      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
3ec523
+    </disk>
3ec523
+    <controller type='usb' index='0'/>
3ec523
+    <controller type='ide' index='0'/>
3ec523
+    <controller type='pci' index='0' model='pci-root'/>
3ec523
+    <serial type='pty'>
3ec523
+      <target port='0'/>
3ec523
+    </serial>
3ec523
+    <console type='pty'>
3ec523
+      <target type='serial' port='0'/>
3ec523
+    </console>
3ec523
+    <input type='tablet' bus='usb'/>
3ec523
+    <memballoon model='virtio'/>
3ec523
+  </devices>
3ec523
+</domain>
3ec523
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-bridge-many-disks.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-bridge-many-disks.xml
3ec523
index d469b8b..d49f5f4 100644
3ec523
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-bridge-many-disks.xml
3ec523
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pci-bridge-many-disks.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='x86_64' machine='pc-i440fx-1.4'>hvm</type>
3ec523
-    <loader>/usr/share/seabios/bios.bin</loader>
3ec523
+    <loader type='rom'>/usr/share/seabios/bios.bin</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
3ec523
index b4ab671..1835fe6 100644
3ec523
--- a/tests/qemuxml2xmltest.c
3ec523
+++ b/tests/qemuxml2xmltest.c
3ec523
@@ -395,6 +395,8 @@ mymain(void)
3ec523
     DO_TEST_DIFFERENT("numatune-memnode");
3ec523
     DO_TEST("numatune-memnode-no-memory");
3ec523
 
3ec523
+    DO_TEST("bios-nvram");
3ec523
+
3ec523
     virObjectUnref(driver.caps);
3ec523
     virObjectUnref(driver.xmlopt);
3ec523
 
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml
3ec523
index 69fe9ef..761952c 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml
3ec523
index 3c3147d..2898098 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml
3ec523
index 716f16b..a0fe30d 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml
3ec523
index 3dd648b..851797d 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml b/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml
3ec523
index 29c1335..09cfe19 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>2</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
3ec523
     <initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
3ec523
     <cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os  </cmdline>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-legacy-vfb.xml b/tests/sexpr2xmldata/sexpr2xml-fv-legacy-vfb.xml
3ec523
index 9c59644..44c0f61 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-legacy-vfb.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-legacy-vfb.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml
3ec523
index 67b0b95..29007f0 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml b/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml
3ec523
index 86b32e9..3dbc999 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml
3ec523
index ed7da80..d96350e 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml
3ec523
index ed3fde6..7ad377c 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml
3ec523
index 7f5a729..adba6cb 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2-ports.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml
3ec523
index 10f84dc..b6c3601 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-dev-2nd-port.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml
3ec523
index a3fd231..dabe679 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml
3ec523
index b3f77c9..fb19d74 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml
3ec523
index e217161..5aa425b 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml
3ec523
index 3ad2264..3c2ca21 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml
3ec523
index 001df56..160edbd 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml
3ec523
index c2496fd..4396efc 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp-telnet.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml
3ec523
index 6dc047e..3d17b58 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml
3ec523
index 7ccaeac..fc3d457 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml
3ec523
index b5ad413..14b54f1 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml
3ec523
index 7183e79..912df56 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml
3ec523
index 7183e79..912df56 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-sound.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml
3ec523
index ae90e33..19eac3b 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml
3ec523
index f81c47a..40ac8a9 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml
3ec523
index c783d93..97f2beb 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-utc.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml
3ec523
index bd3b107..493d1b5 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-v2.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv.xml b/tests/sexpr2xmldata/sexpr2xml-fv.xml
3ec523
index c783d93..97f2beb 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-fv.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-fv.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml
3ec523
index 00d18ce..a3cd7be 100644
3ec523
--- a/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml
3ec523
+++ b/tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-escape-paths.xml b/tests/xmconfigdata/test-escape-paths.xml
3ec523
index de3a7e2..623eaa1 100644
3ec523
--- a/tests/xmconfigdata/test-escape-paths.xml
3ec523
+++ b/tests/xmconfigdata/test-escape-paths.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader&test</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader&test</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-force-hpet.xml b/tests/xmconfigdata/test-fullvirt-force-hpet.xml
3ec523
index 75f8724..57a6531 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-force-hpet.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-force-hpet.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml
3ec523
index e5741b6..f6ebcf6 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-force-nohpet.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-force-nohpet.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-localtime.xml b/tests/xmconfigdata/test-fullvirt-localtime.xml
3ec523
index 8b97e5b..36ab389 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-localtime.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-localtime.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-net-ioemu.xml b/tests/xmconfigdata/test-fullvirt-net-ioemu.xml
3ec523
index f22c085..3618bae 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-net-ioemu.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-net-ioemu.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-net-netfront.xml b/tests/xmconfigdata/test-fullvirt-net-netfront.xml
3ec523
index 177bb6a..6a2a439 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-net-netfront.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-net-netfront.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml
3ec523
index f22c085..3618bae 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-new-cdrom.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-new-cdrom.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-old-cdrom.xml b/tests/xmconfigdata/test-fullvirt-old-cdrom.xml
3ec523
index a592630..7d6014d 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-old-cdrom.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-old-cdrom.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml
3ec523
index 738e5ab..9b1fd26 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-parallel-tcp.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml
3ec523
index 753831a..a64d40b 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml
3ec523
index 1a55080..ce2cddb 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-serial-file.xml b/tests/xmconfigdata/test-fullvirt-serial-file.xml
3ec523
index 0d2ac79..36883de 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-serial-file.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-serial-file.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-serial-null.xml b/tests/xmconfigdata/test-fullvirt-serial-null.xml
3ec523
index d4b4ae9..982f9d6 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-serial-null.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-serial-null.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml
3ec523
index 6596dfc..82a1d9b 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-serial-pipe.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-serial-pipe.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-serial-pty.xml b/tests/xmconfigdata/test-fullvirt-serial-pty.xml
3ec523
index 6c55abb..56ccbea 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-serial-pty.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-serial-pty.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml
3ec523
index 461f143..e2e9330 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-serial-stdio.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-serial-stdio.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml
3ec523
index d2fa7bf..d68d77c 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml
3ec523
index 60ab8bd..aa3ed5c 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-serial-tcp.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-serial-tcp.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-serial-udp.xml b/tests/xmconfigdata/test-fullvirt-serial-udp.xml
3ec523
index 6c21cd2..256c722 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-serial-udp.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-serial-udp.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-serial-unix.xml b/tests/xmconfigdata/test-fullvirt-serial-unix.xml
3ec523
index f21534e..235c8d4 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-serial-unix.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-serial-unix.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-sound.xml b/tests/xmconfigdata/test-fullvirt-sound.xml
3ec523
index f09c16d..1429d10 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-sound.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-sound.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-usbmouse.xml b/tests/xmconfigdata/test-fullvirt-usbmouse.xml
3ec523
index 18a7ff0..25857f1 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-usbmouse.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-usbmouse.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet.xml b/tests/xmconfigdata/test-fullvirt-usbtablet.xml
3ec523
index 5cbb007..31b1176 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-usbtablet.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-usbtablet.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-fullvirt-utc.xml b/tests/xmconfigdata/test-fullvirt-utc.xml
3ec523
index f22c085..3618bae 100644
3ec523
--- a/tests/xmconfigdata/test-fullvirt-utc.xml
3ec523
+++ b/tests/xmconfigdata/test-fullvirt-utc.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='cdrom'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-no-source-cdrom.xml b/tests/xmconfigdata/test-no-source-cdrom.xml
3ec523
index 2a457b2..74f1be1 100644
3ec523
--- a/tests/xmconfigdata/test-no-source-cdrom.xml
3ec523
+++ b/tests/xmconfigdata/test-no-source-cdrom.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>
3ec523
diff --git a/tests/xmconfigdata/test-pci-devs.xml b/tests/xmconfigdata/test-pci-devs.xml
3ec523
index f828056..1911734 100644
3ec523
--- a/tests/xmconfigdata/test-pci-devs.xml
3ec523
+++ b/tests/xmconfigdata/test-pci-devs.xml
3ec523
@@ -6,7 +6,7 @@
3ec523
   <vcpu placement='static'>1</vcpu>
3ec523
   <os>
3ec523
     <type arch='i686' machine='xenfv'>hvm</type>
3ec523
-    <loader>/usr/lib/xen/boot/hvmloader</loader>
3ec523
+    <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
3ec523
     <boot dev='hd'/>
3ec523
   </os>
3ec523
   <features>