[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v5 2/3] qemu: add dtb option supprt



On 03/19/2013 06:24 AM, Daniel P. Berrange wrote:
> On Thu, Mar 14, 2013 at 12:49:43PM +0800, Olivia Yin wrote:

s/supprt/support/ in the subject

>> 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>
>>

> ACK

I will push these soon.

>> -              "virtio-ccw"
>> +              "virtio-ccw",
>> +              "dtb",

Oops - we let the previous person to touch this enum forget to use a
trailing comma.  Oh well, not your fault.

>>  
>> -    if (version >= 11000)
>> +    if (version >= 11000) {
>>          virQEMUCapsSet(qemuCaps, QEMU_CAPS_CPU_HOST);
>> +        virQEMUCapsSet(qemuCaps, QEMU_CAPS_DTB);
>> +    }
> 
> Doesn't  '-dtb' show up in the -help output ?  If it does, then it
> is preferrable to check for that, instead of using a version number
> based check

It does; in fact, it showed up in 1.1 (and NOT in 0.11).  Here's what I
will squash in:

diff --git i/src/qemu/qemu_capabilities.c w/src/qemu/qemu_capabilities.c
index 48fd971..50f8084 100644
--- i/src/qemu/qemu_capabilities.c
+++ w/src/qemu/qemu_capabilities.c
@@ -1087,6 +1087,9 @@ virQEMUCapsComputeCmdFlags(const char *help,
     if (strstr(help, "dump-guest-core=on|off"))
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_DUMP_GUEST_CORE);

+    if (strstr(help, "-dtb"))
+        virQEMUCapsSet(qemuCaps, QEMU_CAPS_DTB);
+
     /*
      * Handling of -incoming arg with varying features
      *  -incoming tcp    (kvm >= 79, qemu >= 0.10.0)
@@ -1174,10 +1177,8 @@ virQEMUCapsComputeCmdFlags(const char *help,
     if (version >= 12000)
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_PCI_ROMBAR);

-    if (version >= 11000) {
+    if (version >= 11000)
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_CPU_HOST);
-        virQEMUCapsSet(qemuCaps, QEMU_CAPS_DTB);
-    }

     if (version >= 1002000)
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
diff --git i/tests/qemuhelptest.c w/tests/qemuhelptest.c
index 1cceffa..059fa86 100644
--- i/tests/qemuhelptest.c
+++ w/tests/qemuhelptest.c
@@ -339,8 +339,7 @@ mymain(void)
             QEMU_CAPS_NO_ACPI,
             QEMU_CAPS_VIRTIO_BLK_SG_IO,
             QEMU_CAPS_CPU_HOST,
-            QEMU_CAPS_VNC,
-            QEMU_CAPS_DTB);
+            QEMU_CAPS_VNC);
     DO_TEST("qemu-kvm-0.12.1.2-rhel60", 12001, 1, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,
@@ -398,8 +397,7 @@ mymain(void)
             QEMU_CAPS_DEVICE_CIRRUS_VGA,
             QEMU_CAPS_DEVICE_VMWARE_SVGA,
             QEMU_CAPS_DEVICE_USB_SERIAL,
-            QEMU_CAPS_DEVICE_USB_NET,
-            QEMU_CAPS_DTB);
+            QEMU_CAPS_DEVICE_USB_NET);
     DO_TEST("qemu-kvm-0.12.3", 12003, 1, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,
@@ -442,8 +440,7 @@ mymain(void)
             QEMU_CAPS_NO_ACPI,
             QEMU_CAPS_VIRTIO_BLK_SG_IO,
             QEMU_CAPS_CPU_HOST,
-            QEMU_CAPS_VNC,
-            QEMU_CAPS_DTB);
+            QEMU_CAPS_VNC);
     DO_TEST("qemu-kvm-0.13.0", 13000, 1, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,
@@ -509,8 +506,7 @@ mymain(void)
             QEMU_CAPS_DEVICE_CIRRUS_VGA,
             QEMU_CAPS_DEVICE_VMWARE_SVGA,
             QEMU_CAPS_DEVICE_USB_SERIAL,
-            QEMU_CAPS_DEVICE_USB_NET,
-            QEMU_CAPS_DTB);
+            QEMU_CAPS_DEVICE_USB_NET);
     DO_TEST("qemu-kvm-0.12.1.2-rhel61", 12001, 1, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,
@@ -575,8 +571,7 @@ mymain(void)
             QEMU_CAPS_DEVICE_CIRRUS_VGA,
             QEMU_CAPS_DEVICE_VMWARE_SVGA,
             QEMU_CAPS_DEVICE_USB_SERIAL,
-            QEMU_CAPS_DEVICE_USB_NET,
-            QEMU_CAPS_DTB);
+            QEMU_CAPS_DEVICE_USB_NET);
     DO_TEST("qemu-kvm-0.12.1.2-rhel62-beta", 12001, 1, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,
@@ -648,8 +643,7 @@ mymain(void)
             QEMU_CAPS_VNC,
             QEMU_CAPS_DEVICE_QXL,
             QEMU_CAPS_DEVICE_VGA,
-            QEMU_CAPS_DEVICE_CIRRUS_VGA,
-            QEMU_CAPS_DTB);
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST("qemu-1.0", 1000000, 0, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,
@@ -729,8 +723,7 @@ mymain(void)
             QEMU_CAPS_DEVICE_CIRRUS_VGA,
             QEMU_CAPS_DEVICE_VMWARE_SVGA,
             QEMU_CAPS_DEVICE_USB_SERIAL,
-            QEMU_CAPS_DEVICE_USB_NET,
-            QEMU_CAPS_DTB);
+            QEMU_CAPS_DEVICE_USB_NET);
     DO_TEST("qemu-1.1.0", 1001000, 0, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]