提交 fedbb015 编写于 作者: A Andrea Bolognani

qemu: Introduce QEMU_CAPS_DEVICE_VIRTIO_NET

This capability can be used to detect whether or not the QEMU
binary supports the virtio-net-* network device.
上级 fb58318d
......@@ -295,6 +295,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"xio3130-downstream", /* 195 */
"rtl8139",
"e1000",
"virtio-net",
);
......@@ -1581,6 +1582,10 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
{ "xio3130-downstream", QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM },
{ "rtl8139", QEMU_CAPS_DEVICE_RTL8139 },
{ "e1000", QEMU_CAPS_DEVICE_E1000 },
{ "virtio-net-pci", QEMU_CAPS_DEVICE_VIRTIO_NET },
{ "virtio-net-ccw", QEMU_CAPS_DEVICE_VIRTIO_NET },
{ "virtio-net-s390", QEMU_CAPS_DEVICE_VIRTIO_NET },
{ "virtio-net-device", QEMU_CAPS_DEVICE_VIRTIO_NET },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBlk[] = {
......
......@@ -237,6 +237,7 @@ typedef enum {
QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM = 195, /* -device xio3130-downstream */
QEMU_CAPS_DEVICE_RTL8139 = 196, /* -device rtl8139 */
QEMU_CAPS_DEVICE_E1000 = 197, /* -device e1000 */
QEMU_CAPS_DEVICE_VIRTIO_NET = 198, /* -device virtio-net-* */
QEMU_CAPS_LAST, /* this must always be the last item */
} virQEMUCapsFlags;
......
......@@ -125,4 +125,5 @@
<flag name='xio3130-downstream'/>
<flag name='rtl8139'/>
<flag name='e1000'/>
<flag name='virtio-net'/>
</qemuCaps>
......@@ -140,4 +140,5 @@
<flag name='xio3130-downstream'/>
<flag name='rtl8139'/>
<flag name='e1000'/>
<flag name='virtio-net'/>
</qemuCaps>
......@@ -141,4 +141,5 @@
<flag name='xio3130-downstream'/>
<flag name='rtl8139'/>
<flag name='e1000'/>
<flag name='virtio-net'/>
</qemuCaps>
......@@ -150,4 +150,5 @@
<flag name='xio3130-downstream'/>
<flag name='rtl8139'/>
<flag name='e1000'/>
<flag name='virtio-net'/>
</qemuCaps>
......@@ -156,4 +156,5 @@
<flag name='xio3130-downstream'/>
<flag name='rtl8139'/>
<flag name='e1000'/>
<flag name='virtio-net'/>
</qemuCaps>
......@@ -156,4 +156,5 @@
<flag name='xio3130-downstream'/>
<flag name='rtl8139'/>
<flag name='e1000'/>
<flag name='virtio-net'/>
</qemuCaps>
......@@ -172,4 +172,5 @@
<flag name='xio3130-downstream'/>
<flag name='rtl8139'/>
<flag name='e1000'/>
<flag name='virtio-net'/>
</qemuCaps>
......@@ -411,7 +411,8 @@ mymain(void)
QEMU_CAPS_DEVICE_USB_KBD,
QEMU_CAPS_DEVICE_PCI_BRIDGE,
QEMU_CAPS_DEVICE_RTL8139,
QEMU_CAPS_DEVICE_E1000);
QEMU_CAPS_DEVICE_E1000,
QEMU_CAPS_DEVICE_VIRTIO_NET);
DO_TEST("qemu-kvm-0.12.3", 12003, 1, 0,
QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT,
......@@ -528,7 +529,8 @@ mymain(void)
QEMU_CAPS_HOST_PCI_MULTIDOMAIN,
QEMU_CAPS_DEVICE_IVSHMEM,
QEMU_CAPS_DEVICE_RTL8139,
QEMU_CAPS_DEVICE_E1000);
QEMU_CAPS_DEVICE_E1000,
QEMU_CAPS_DEVICE_VIRTIO_NET);
DO_TEST("qemu-kvm-0.12.1.2-rhel61", 12001, 1, 0,
QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT,
......@@ -597,7 +599,8 @@ mymain(void)
QEMU_CAPS_DEVICE_USB_KBD,
QEMU_CAPS_DEVICE_PCI_BRIDGE,
QEMU_CAPS_DEVICE_RTL8139,
QEMU_CAPS_DEVICE_E1000);
QEMU_CAPS_DEVICE_E1000,
QEMU_CAPS_DEVICE_VIRTIO_NET);
DO_TEST("qemu-kvm-0.12.1.2-rhel62-beta", 12001, 1, 0,
QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT,
......@@ -674,7 +677,8 @@ mymain(void)
QEMU_CAPS_DEVICE_USB_KBD,
QEMU_CAPS_DEVICE_USB_STORAGE,
QEMU_CAPS_DEVICE_RTL8139,
QEMU_CAPS_DEVICE_E1000);
QEMU_CAPS_DEVICE_E1000,
QEMU_CAPS_DEVICE_VIRTIO_NET);
DO_TEST("qemu-1.0", 1000000, 0, 0,
QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT,
......@@ -766,7 +770,8 @@ mymain(void)
QEMU_CAPS_DEVICE_X3130_UPSTREAM,
QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM,
QEMU_CAPS_DEVICE_RTL8139,
QEMU_CAPS_DEVICE_E1000);
QEMU_CAPS_DEVICE_E1000,
QEMU_CAPS_DEVICE_VIRTIO_NET);
DO_TEST("qemu-1.1.0", 1001000, 0, 0,
QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT,
......@@ -871,7 +876,8 @@ mymain(void)
QEMU_CAPS_DEVICE_X3130_UPSTREAM,
QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM,
QEMU_CAPS_DEVICE_RTL8139,
QEMU_CAPS_DEVICE_E1000);
QEMU_CAPS_DEVICE_E1000,
QEMU_CAPS_DEVICE_VIRTIO_NET);
DO_TEST_FULL("qemu-1.2.0", 1002000, 0, 0, VIR_ERR_CONFIG_UNSUPPORTED,
QEMU_CAPS_LAST);
DO_TEST_FULL("qemu-kvm-1.2.0", 1002000, 1, 0, VIR_ERR_CONFIG_UNSUPPORTED,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册