Re: [libvirt] [PATCH v4 2/2] conf: Add support for dtb option in QEMU
On 03/13/2013 03:58 PM, Eric Blake wrote: > On 03/12/2013 10:35 PM, Olivia Yin wrote: >> Signed-off-by: Olivia Yin >> >> This patch adds support to set the device trees file. >> --- > >> + dtb >> + The contents of this element specify the fully-qualified path >> +to the (optional) device tree binary (dtb) image in the host OS. >> +Since 1.0.4 > > I've added markup that we use in other "since ..." notations, for > consistency. Also, I had to squash this in, to keep 'make check' happy: diff --git i/docs/schemas/domaincommon.rng w/docs/schemas/domaincommon.rng index 88e89dd..4d97892 100644 --- i/docs/schemas/domaincommon.rng +++ w/docs/schemas/domaincommon.rng @@ -367,6 +367,7 @@ g3beige mac99 prep +ppce500v2 I didn't see anywhere else in our code where we validated against g3beige or mac99; so for now, I didn't feel too bad adding yet another unchecked string. But it seems like someday, we will need to add code in src/conf/domain_conf.* that lists the entire set of ppc architecture machine names that we are willing to pass on to qemu, and/or relax the RNG grammar to support an arbitrary set of machine names the way we do for arch='x86'. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v4 2/2] conf: Add support for dtb option in QEMU
On 03/12/2013 10:35 PM, Olivia Yin wrote: > Signed-off-by: Olivia Yin > > This patch adds support to set the device trees file. > --- > + dtb > + The contents of this element specify the fully-qualified path > +to the (optional) device tree binary (dtb) image in the host OS. > +Since 1.0.4 I've added markup that we use in other "since ..." notations, for consistency. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v4 2/2] conf: Add support for dtb option in QEMU
On Wed, Mar 13, 2013 at 12:35:55PM +0800, Olivia Yin wrote: > Signed-off-by: Olivia Yin > > This patch adds support to set the device trees file. > --- > docs/formatdomain.html.in |5 + > docs/schemas/domaincommon.rng |5 + > src/conf/domain_conf.c|4 > src/conf/domain_conf.h|1 + > 4 files changed, 15 insertions(+), 0 deletions(-) ACK Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH v4 2/2] conf: Add support for dtb option in QEMU
Signed-off-by: Olivia Yin This patch adds support to set the device trees file. --- docs/formatdomain.html.in |5 + docs/schemas/domaincommon.rng |5 + src/conf/domain_conf.c|4 src/conf/domain_conf.h|1 + 4 files changed, 15 insertions(+), 0 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 4cafc92..e589df5 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -232,6 +232,7 @@/root/f8-i386-vmlinuz /root/f8-i386-initrd console=ttyS0 ks=http://example.com/f8-i386/os/ ; +/root/ppc.dtb ... @@ -253,6 +254,10 @@ the kernel (or installer) at boottime. This is often used to specify an alternate primary console (eg serial port), or the installation media source / kickstart file + dtb + The contents of this element specify the fully-qualified path +to the (optional) device tree binary (dtb) image in the host OS. +Since 1.0.4 Container boot diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 372aab7..88e89dd 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -832,6 +832,11 @@ + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 717fc20..18e4906 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1785,6 +1785,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); @@ -10063,6 +10064,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); } @@ -14675,6 +14677,8 @@ virDomainDefFormatInternal(virDomainDefPtr def, def->os.initrd); virBufferEscapeString(buf, "%s\n", def->os.cmdline); +virBufferEscapeString(buf, "%s\n", + def->os.dtb); virBufferEscapeString(buf, "%s\n", def->os.root); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 2509193..03a5c33 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1535,6 +1535,7 @@ struct _virDomainOSDef { char *kernel; char *initrd; char *cmdline; +char *dtb; char *root; char *loader; char *bootloader; -- 1.6.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list