[libvirt] [PATCH v4 1/2] qemu: add support for dtb option
Yin Olivia-R63875
r63875 at freescale.com
Thu Mar 14 05:22:11 UTC 2013
> -----Original Message-----
> From: Eric Blake [mailto:eblake at redhat.com]
> Sent: Thursday, March 14, 2013 6:48 AM
> To: Yin Olivia-R63875
> Cc: libvir-list at redhat.com
> Subject: Re: [libvirt] [PATCH v4 1/2] qemu: add support for dtb option
>
> On 03/12/2013 10:35 PM, Olivia Yin wrote:
> > Signed-off-by: Olivia Yin <hong-hua.yin at freescale.com>
>
> Libvirt does not (currently) require Signed-off-by lines (but someday, we
> may decide to have a flag day where we declare that all future
> contributions follow the same developer certificate of origin as what the
> qemu and kernel projects currently use). But if you are going to include
> one, it is typical to put it...
>
> >
> > The "dtb" option sets the filename for the device tree.
> > If without this option support, "-dtb file" will be converted into
> > <qemu:commandline> in domain XML file.
> > For example, '-dtb /media/ram/test.dtb' will be converted into
> > <qemu:commandline>
> > <qemu:arg value='-dtb'/>
> > <qemu:arg value='/media/ram/test.dtb'/>
> > </qemu:commandline>
> >
> > This is not very friendly.
> > This patchset add special <dtb> tag like <kernel> and <initrd> which
> > is easier for user to write domain XML file.
> > <os>
> > <type arch='ppc' machine='ppce500v2'>hvm</type>
> > <kernel>/media/ram/uImage</kernel>
> > <initrd>/media/ram/ramdisk</initrd>
> > <dtb>/media/ram/test.dtb</dtb>
> > <cmdline>root=/dev/ram rw console=ttyS0,115200</cmdline>
> > </os>
>
> ...here, at the bottom of the commit message.
>
> > ---
> > src/qemu/qemu_capabilities.c | 6 ++++
> > src/qemu/qemu_capabilities.h | 1 +
> > src/qemu/qemu_command.c | 6 ++++
> > tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args | 1 +
> > tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.xml | 28
> ++++++++++++++++++++++
> > tests/qemuxml2argvtest.c | 2 +
> > 6 files changed, 44 insertions(+), 0 deletions(-) create mode 100644
> > tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.args
> > create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-ppc-dtb.xml
>
> Even after applying patch 2/2 and fixing the RNG to accept the new machine
> type of your new .xml file, this patch fails 'make check'
> because you forgot to update existing tests:
Yes, I need also add testQemuAddPPCGuest() in tests/testutilsqemu.c.
> 259) QEMU XML-2-ARGV ppc-dtb
> ... libvirt: Domain Config error : internal error No guest options
> available for arch 'ppc'
> FAILED
> FAIL: qemuxml2argvtest
>
> ...
> 17) QEMU Help String Parsing qemu-kvm-1.2.0 ... qemu-kvm-1.2.0: computed
> flags do not match: got 0x00000000000000106fb4bff2f1bffffffdeffd76fffdfd6e,
> expected 0x00000000000000006fb4bff2f1bffffffdeffd76fffdfd6e
> Extra flag 132
> FAILED
> FAIL: qemuhelptest
Thanks for the detail information.
It needs add QEMU_CAPS_DTB flags in the newer versions.
> At this point, I gave up - it looks like you are the first person to
> attempt arch='ppc' in the testsuite, and that we haven't prepped the
> testsuite to handle this yet.
I'll add testQemuAddPPCGuest() in tests/testutilsqemu.c which handle the testsuite for ppc arch.
Can you please repost your patches, and this
> time ensure that 'make check' passes after each patch is applies?
I'll make sure pass 'make syntax-check' and 'make check' before post next version.
> Reorder things so that domain_conf is edited before the qemu files, and
> make sure the subject lines are accurate (2/2 was about XML and not QEMU,
> and only 1/2 added qemu support for the new XML).
OK.
Also, don't forget Dan's
> comment to tweak the security managers to allow SELinux labeling of the dtb
> file.
The new patchset includes:
1/3 conf: support <dtb> tag in XML domain file
2/3 qemu: add dtb option supprt
3/3 selinux: deal with dtb file
Thanks a lot.
Best Regards,
Olivia
> --
> Eric Blake eblake redhat com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
More information about the libvir-list
mailing list