Signed-off-by: Olivia Yin <hong-hua.yin@xxxxxxxxxxxxx> --- src/conf/domain_conf.c | 4 ++++ src/conf/domain_conf.h | 1 + src/qemu/qemu_command.c | 6 ++++++ 3 files changed, 11 insertions(+), 0 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0c75838..07ad6b9 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1771,6 +1771,7 @@ void virDomainDefFree(virDomainDefPtr def) VIR_FREE(def->os.kernel); VIR_FREE(def->os.initrd); VIR_FREE(def->os.cmdline); + VIR_FREE(def->os.dtb); VIR_FREE(def->os.root); VIR_FREE(def->os.loader); VIR_FREE(def->os.bootloader); @@ -9993,6 +9994,7 @@ virDomainDefParseXML(virCapsPtr caps, def->os.kernel = virXPathString("string(./os/kernel[1])", ctxt); def->os.initrd = virXPathString("string(./os/initrd[1])", ctxt); def->os.cmdline = virXPathString("string(./os/cmdline[1])", ctxt); + def->os.dtb = virXPathString("string(./os/dtb[1])", ctxt); def->os.root = virXPathString("string(./os/root[1])", ctxt); def->os.loader = virXPathString("string(./os/loader[1])", ctxt); } @@ -14506,6 +14508,8 @@ virDomainDefFormatInternal(virDomainDefPtr def, def->os.initrd); virBufferEscapeString(buf, " <cmdline>%s</cmdline>\n", def->os.cmdline); + virBufferEscapeString(buf, " <dtb>%s</dtb>\n", + def->os.dtb); virBufferEscapeString(buf, " <root>%s</root>\n", def->os.root); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 4ffa4aa..892640f 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1545,6 +1545,7 @@ struct _virDomainOSDef { char *kernel; char *initrd; char *cmdline; + char *dtb; char *root; char *loader; char *bootloader; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index dee493f..0c68778 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5628,6 +5628,8 @@ qemuBuildCommandLine(virConnectPtr conn, virCommandAddArgList(cmd, "-initrd", def->os.initrd, NULL); if (def->os.cmdline) virCommandAddArgList(cmd, "-append", def->os.cmdline, NULL); + if (def->os.dtb) + virCommandAddArgList(cmd, "-dtb", def->os.dtb, NULL); } else { virCommandAddArgList(cmd, "-bootloader", def->os.bootloader, NULL); } @@ -8794,6 +8796,10 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr qemuCaps, WANT_VALUE(); if (!(def->os.cmdline = strdup(val))) goto no_memory; + } else if (STREQ(arg, "-dtb")) { + WANT_VALUE(); + if (!(def->os.dtb = strdup(val))) + goto no_memory; } else if (STREQ(arg, "-boot")) { const char *token = NULL; WANT_VALUE(); -- 1.6.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list