qemu: add socket datagram capability

Datagram socket is available since qemu 4.0, commit
fdec16e3c2a614e2861f3086b05d444b5d8c3406 ("net/socket: learn to talk
with a unix dgram socket").

Required for slirp-helper communication.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Marc-André Lureau 2019-08-08 18:54:56 +04:00 committed by Michal Privoznik
parent 861882d314
commit 0cebb6422a
9 changed files with 13 additions and 0 deletions

View File

@ -537,6 +537,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
/* 335 */
"bochs-display",
"migration-file-drop-cache",
"net-socket-dgram",
);
@ -4391,6 +4392,10 @@ virQEMUCapsInitQMPVersionCaps(virQEMUCapsPtr qemuCaps)
ARCH_IS_PPC64(qemuCaps->arch)) {
virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT);
}
/* -net socket,fd= with dgram socket (for ex, with slirp helper) */
if (qemuCaps->version >= 4000000)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_NET_SOCKET_DGRAM);
}

View File

@ -518,6 +518,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
/* 335 */
QEMU_CAPS_DEVICE_BOCHS_DISPLAY, /* -device bochs-display */
QEMU_CAPS_MIGRATION_FILE_DROP_CACHE, /* migration with disk cache on is safe for type='file' disks */
QEMU_CAPS_NET_SOCKET_DGRAM, /* -net socket,fd= with dgram socket */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;

View File

@ -165,6 +165,7 @@
<flag name='nbd-bitmap'/>
<flag name='bochs-display'/>
<flag name='migration-file-drop-cache'/>
<flag name='net-socket-dgram'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>61700758</microcodeVersion>

View File

@ -170,6 +170,7 @@
<flag name='nbd-bitmap'/>
<flag name='bochs-display'/>
<flag name='migration-file-drop-cache'/>
<flag name='net-socket-dgram'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900758</microcodeVersion>

View File

@ -168,6 +168,7 @@
<flag name='nbd-bitmap'/>
<flag name='bochs-display'/>
<flag name='migration-file-drop-cache'/>
<flag name='net-socket-dgram'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>0</microcodeVersion>

View File

@ -168,6 +168,7 @@
<flag name='nbd-bitmap'/>
<flag name='bochs-display'/>
<flag name='migration-file-drop-cache'/>
<flag name='net-socket-dgram'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>0</microcodeVersion>

View File

@ -132,6 +132,7 @@
<flag name='bitmap-merge'/>
<flag name='nbd-bitmap'/>
<flag name='migration-file-drop-cache'/>
<flag name='net-socket-dgram'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>39100758</microcodeVersion>

View File

@ -207,6 +207,7 @@
<flag name='x86-max-cpu'/>
<flag name='bochs-display'/>
<flag name='migration-file-drop-cache'/>
<flag name='net-socket-dgram'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100758</microcodeVersion>

View File

@ -209,6 +209,7 @@
<flag name='canonical-cpu-features'/>
<flag name='bochs-display'/>
<flag name='migration-file-drop-cache'/>
<flag name='net-socket-dgram'/>
<version>4000050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100759</microcodeVersion>