On 03/12/2013 10:35 PM, Olivia Yin wrote:
Signed-off-by: Olivia Yin <hong-hua.yin(a)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:
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
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. Can you please repost your patches, and
this time ensure that 'make check' passes after each patch is applies?
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). Also, don't
forget Dan's comment to tweak the security managers to allow SELinux
labeling of the dtb file.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org