* [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8
@ 2016-08-12 4:52 Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 1/9] util: Add UUID API Fam Zheng
` (9 more replies)
0 siblings, 10 replies; 13+ messages in thread
From: Fam Zheng @ 2016-08-12 4:52 UTC (permalink / raw)
To: qemu-devel
Cc: kwolf, qemu-block, sw, jcody, mdroth, armbru, pbonzini, mreitz, rth
v5: Add union fields in QemuUUID to help the alignment necessary for bswap, and
assert. [Richard]
Update the test case initializer syntax accordingly.
v4: Use memcpy instead of pointer type cast. [Richard]
Keep parameter order consistent with libuuid. [Jeff]
qemu_uuid_convert -> qemu_uuid_bswap. [Jeff]
v3: Negative tests. [Daniel]
Update QemuUUID type from array to struct. [Markus]
Add qemu_uuid_unparse_strdup.
Add qemu_uuid_convert.
Redirect configure obsoleted option message to stderr. [Jeff]
vdi: uuid_convert -> qemu_uuid_convert.
Fix commit message syntax errors in vpc patch. [Jeff]
Further cleanup around qemu_uuid.
v2: Fix the endianness wrongness. [Jeff]
Add tests/test-uuid.c. [Denial]
Add r-b of Stefan Weil to the VDI patch.
The facts how we use libuuid now are not particularly pleasant.
- VHDX driver depends on uuid, but is unconditionally checked in iotests 109.
If it is not built, the test would fail, leaving no hint about that. In fact
this even makes the feature implementation a bit ugly because it compromises
the write protection on block 0 with image probing, silently.
- A few other libuuid users, in block/ and crypto/, use it as an optional
dependency, and compromises certain functionalities if it is not available.
- On the other hand, there are already a few uuid function fallbacks in those
callers, as well as some duplicated sscanf, snprintf and g_strdup_printf
around UUID_FMT, which can be replaced with UUID parse/unparse routines.
So instead of making libuuid a hard requirement, let's simply move the
fallbacks to util and implement the random version of uuid generation, and be
done with it.
Fam
Fam Zheng (9):
util: Add UUID API
vhdx: Use QEMU UUID API
vdi: Use QEMU UUID API
vpc: Use QEMU UUID API
crypto: Switch to QEMU UUID API
tests: No longer dependent on CONFIG_UUID
configure: Remove detection code for UUID
vl: Switch qemu_uuid to QemuUUID
tests: Add uuid tests
arch_init.c | 19 -----
block/Makefile.objs | 2 +-
block/iscsi.c | 2 +-
block/vdi.c | 73 +++++--------------
block/vhdx-endian.c | 3 -
block/vhdx.c | 9 ++-
block/vpc.c | 10 +--
configure | 70 ++----------------
crypto/block-luks.c | 26 ++-----
hw/ipmi/ipmi_bmc_sim.c | 2 +-
hw/nvram/fw_cfg.c | 2 +-
hw/ppc/spapr.c | 7 +-
hw/smbios/smbios.c | 11 +--
hw/xenpv/xen_domainbuild.c | 6 +-
include/qemu/uuid.h | 59 ++++++++++++++++
include/sysemu/sysemu.h | 7 +-
qmp.c | 11 +--
stubs/uuid.c | 2 +-
tests/Makefile.include | 2 +
tests/test-crypto-block.c | 2 +-
tests/test-uuid.c | 173 +++++++++++++++++++++++++++++++++++++++++++++
util/Makefile.objs | 1 +
util/uuid.c | 93 ++++++++++++++++++++++++
vl.c | 7 +-
24 files changed, 389 insertions(+), 210 deletions(-)
create mode 100644 include/qemu/uuid.h
create mode 100644 tests/test-uuid.c
create mode 100644 util/uuid.c
--
2.7.4
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v5 1/9] util: Add UUID API
2016-08-12 4:52 [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8 Fam Zheng
@ 2016-08-12 4:52 ` Fam Zheng
2016-08-12 6:24 ` Richard Henderson
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 2/9] vhdx: Use QEMU " Fam Zheng
` (8 subsequent siblings)
9 siblings, 1 reply; 13+ messages in thread
From: Fam Zheng @ 2016-08-12 4:52 UTC (permalink / raw)
To: qemu-devel
Cc: kwolf, qemu-block, sw, jcody, mdroth, armbru, pbonzini, mreitz, rth
A number of different places across the code base use CONFIG_UUID. Some
of them are soft dependency, some are not built if libuuid is not
available, some come with dummy fallback, some throws runtime error.
It is hard to maintain, and hard to reason for users.
Since UUID is a simple standard with only a small number of operations,
it is cleaner to have a central support in libqemuutil. This patch adds
qemu_uuid_* the functions so that all uuid users in the code base can
rely on. Except for qemu_uuid_generate which is new code, all other
functions are just copy from existing fallbacks from other files.
Note that qemu_uuid_parse is moved without updating the function
signature to use QemuUUID, to keep this patch simple.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
arch_init.c | 19 ----------
block/iscsi.c | 2 +-
hw/smbios/smbios.c | 1 +
include/qemu/uuid.h | 59 +++++++++++++++++++++++++++++++
include/sysemu/sysemu.h | 4 ---
qmp.c | 1 +
stubs/uuid.c | 2 +-
util/Makefile.objs | 1 +
util/uuid.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++
vl.c | 1 +
10 files changed, 157 insertions(+), 25 deletions(-)
create mode 100644 include/qemu/uuid.h
create mode 100644 util/uuid.c
diff --git a/arch_init.c b/arch_init.c
index fa05973..5cc58b2 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -235,25 +235,6 @@ void audio_init(void)
}
}
-int qemu_uuid_parse(const char *str, uint8_t *uuid)
-{
- int ret;
-
- if (strlen(str) != 36) {
- return -1;
- }
-
- ret = sscanf(str, UUID_FMT, &uuid[0], &uuid[1], &uuid[2], &uuid[3],
- &uuid[4], &uuid[5], &uuid[6], &uuid[7], &uuid[8], &uuid[9],
- &uuid[10], &uuid[11], &uuid[12], &uuid[13], &uuid[14],
- &uuid[15]);
-
- if (ret != 16) {
- return -1;
- }
- return 0;
-}
-
void do_acpitable_option(const QemuOpts *opts)
{
#ifdef TARGET_I386
diff --git a/block/iscsi.c b/block/iscsi.c
index 95ce9e1..961ac76 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -36,7 +36,7 @@
#include "block/block_int.h"
#include "block/scsi.h"
#include "qemu/iov.h"
-#include "sysemu/sysemu.h"
+#include "qemu/uuid.h"
#include "qmp-commands.h"
#include "qapi/qmp/qstring.h"
#include "crypto/secret.h"
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
index 74c7102..0705eb1 100644
--- a/hw/smbios/smbios.c
+++ b/hw/smbios/smbios.c
@@ -20,6 +20,7 @@
#include "qemu/config-file.h"
#include "qemu/error-report.h"
#include "sysemu/sysemu.h"
+#include "qemu/uuid.h"
#include "sysemu/cpus.h"
#include "hw/smbios/smbios.h"
#include "hw/loader.h"
diff --git a/include/qemu/uuid.h b/include/qemu/uuid.h
new file mode 100644
index 0000000..1b2b564
--- /dev/null
+++ b/include/qemu/uuid.h
@@ -0,0 +1,59 @@
+/*
+ * QEMU UUID functions
+ *
+ * Copyright 2016 Red Hat, Inc.,
+ *
+ * Authors:
+ * Fam Zheng <famz@redhat.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ */
+
+#ifndef QEMU_UUID_H
+#define QEMU_UUID_H
+
+#include "qemu-common.h"
+
+/* Version 4 UUID (pseudo random numbers), RFC4122 4.4. */
+
+typedef struct {
+ union {
+ unsigned char data[16];
+ struct {
+ /* Generated in BE endian, can be swapped with qemu_uuid_bswap. */
+ uint32_t time_low;
+ uint16_t time_mid;
+ uint16_t time_high_and_version;
+ uint8_t clock_seq_and_reserved;
+ uint8_t clock_seq_low;
+ uint8_t node[6];
+ } fields;
+ };
+} QemuUUID;
+
+#define UUID_FMT "%02hhx%02hhx%02hhx%02hhx-" \
+ "%02hhx%02hhx-%02hhx%02hhx-" \
+ "%02hhx%02hhx-" \
+ "%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx"
+
+#define UUID_FMT_LEN 36
+
+#define UUID_NONE "00000000-0000-0000-0000-000000000000"
+
+void qemu_uuid_generate(QemuUUID *out);
+
+int qemu_uuid_is_null(const QemuUUID *uu);
+
+void qemu_uuid_unparse(const QemuUUID *uuid, char *out);
+
+char *qemu_uuid_unparse_strdup(const QemuUUID *uuid);
+
+int qemu_uuid_parse(const char *str, uint8_t *uuid);
+
+void qemu_uuid_bswap(QemuUUID *uuid);
+
+#endif
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index ee7c760..6111950 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -18,10 +18,6 @@ extern const char *bios_name;
extern const char *qemu_name;
extern uint8_t qemu_uuid[];
extern bool qemu_uuid_set;
-int qemu_uuid_parse(const char *str, uint8_t *uuid);
-
-#define UUID_FMT "%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx"
-#define UUID_NONE "00000000-0000-0000-0000-000000000000"
bool runstate_check(RunState state);
void runstate_set(RunState new_state);
diff --git a/qmp.c b/qmp.c
index b6d531e..0b65ba3 100644
--- a/qmp.c
+++ b/qmp.c
@@ -18,6 +18,7 @@
#include "qemu/cutils.h"
#include "monitor/monitor.h"
#include "sysemu/sysemu.h"
+#include "qemu/uuid.h"
#include "qmp-commands.h"
#include "sysemu/char.h"
#include "ui/qemu-spice.h"
diff --git a/stubs/uuid.c b/stubs/uuid.c
index 92ad717..a880de8 100644
--- a/stubs/uuid.c
+++ b/stubs/uuid.c
@@ -1,6 +1,6 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
-#include "sysemu/sysemu.h"
+#include "qemu/uuid.h"
#include "qmp-commands.h"
UuidInfo *qmp_query_uuid(Error **errp)
diff --git a/util/Makefile.objs b/util/Makefile.objs
index 96cb1e0..31bba15 100644
--- a/util/Makefile.objs
+++ b/util/Makefile.objs
@@ -20,6 +20,7 @@ util-obj-y += iov.o qemu-config.o qemu-sockets.o uri.o notify.o
util-obj-y += qemu-option.o qemu-progress.o
util-obj-y += hexdump.o
util-obj-y += crc32c.o
+util-obj-y += uuid.o
util-obj-y += throttle.o
util-obj-y += getauxval.o
util-obj-y += readline.o
diff --git a/util/uuid.c b/util/uuid.c
new file mode 100644
index 0000000..bc82310
--- /dev/null
+++ b/util/uuid.c
@@ -0,0 +1,92 @@
+/*
+ * QEMU UUID functions
+ *
+ * Copyright 2016 Red Hat, Inc.,
+ *
+ * Authors:
+ * Fam Zheng <famz@redhat.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ */
+
+#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "qemu/uuid.h"
+#include "qemu/bswap.h"
+#include <glib.h>
+
+void qemu_uuid_generate(QemuUUID *uuid)
+{
+ int i;
+ uint32_t tmp[4];
+
+ QEMU_BUILD_BUG_ON(sizeof(QemuUUID) != 16);
+
+ for (i = 0; i < 4; ++i) {
+ tmp[i] = g_random_int();
+ }
+ memcpy(uuid, tmp, sizeof(tmp));
+ /* Set the two most significant bits (bits 6 and 7) of the
+ clock_seq_hi_and_reserved to zero and one, respectively. */
+ uuid->data[8] = (uuid->data[8] & 0x3f) | 0x80;
+ /* Set the four most significant bits (bits 12 through 15) of the
+ time_hi_and_version field to the 4-bit version number.
+ */
+ uuid->data[6] = (uuid->data[6] & 0xf) | 0x40;
+}
+
+int qemu_uuid_is_null(const QemuUUID *uu)
+{
+ QemuUUID null_uuid = { 0 };
+ return memcmp(uu, &null_uuid, sizeof(QemuUUID)) == 0;
+}
+
+void qemu_uuid_unparse(const QemuUUID *uuid, char *out)
+{
+ const unsigned char *uu = &uuid->data[0];
+ snprintf(out, UUID_FMT_LEN + 1, UUID_FMT,
+ uu[0], uu[1], uu[2], uu[3], uu[4], uu[5], uu[6], uu[7],
+ uu[8], uu[9], uu[10], uu[11], uu[12], uu[13], uu[14], uu[15]);
+}
+
+char *qemu_uuid_unparse_strdup(const QemuUUID *uuid)
+{
+ const unsigned char *uu = &uuid->data[0];
+ return g_strdup_printf(UUID_FMT,
+ uu[0], uu[1], uu[2], uu[3], uu[4], uu[5], uu[6],
+ uu[7], uu[8], uu[9], uu[10], uu[11], uu[12],
+ uu[13], uu[14], uu[15]);
+}
+
+int qemu_uuid_parse(const char *str, uint8_t *uuid)
+{
+ int ret;
+
+ if (strlen(str) != 36) {
+ return -1;
+ }
+
+ ret = sscanf(str, UUID_FMT, &uuid[0], &uuid[1], &uuid[2], &uuid[3],
+ &uuid[4], &uuid[5], &uuid[6], &uuid[7], &uuid[8], &uuid[9],
+ &uuid[10], &uuid[11], &uuid[12], &uuid[13], &uuid[14],
+ &uuid[15]);
+
+ if (ret != 16) {
+ return -1;
+ }
+ return 0;
+}
+
+/* Swap from UUID format endian (BE) to the opposite or vice versa.
+ */
+void qemu_uuid_bswap(QemuUUID *uuid)
+{
+ assert(QEMU_IS_ALIGNED((uint64_t)uuid, sizeof(uint32_t)));
+ bswap32s(&uuid->fields.time_low);
+ bswap16s(&uuid->fields.time_mid);
+ bswap16s(&uuid->fields.time_high_and_version);
+}
diff --git a/vl.c b/vl.c
index b3c80d5..ceddef4 100644
--- a/vl.c
+++ b/vl.c
@@ -25,6 +25,7 @@
#include "qemu-version.h"
#include "qemu/cutils.h"
#include "qemu/help_option.h"
+#include "qemu/uuid.h"
#ifdef CONFIG_SECCOMP
#include "sysemu/seccomp.h"
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v5 2/9] vhdx: Use QEMU UUID API
2016-08-12 4:52 [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8 Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 1/9] util: Add UUID API Fam Zheng
@ 2016-08-12 4:52 ` Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 3/9] vdi: " Fam Zheng
` (7 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2016-08-12 4:52 UTC (permalink / raw)
To: qemu-devel
Cc: kwolf, qemu-block, sw, jcody, mdroth, armbru, pbonzini, mreitz, rth
This removes our dependency to libuuid, so that the driver can always be
built.
Similar to how we handled data plane configure options, --enable-vhdx
and --disable-vhdx are also changed to a nop with a message saying it's
obsolete.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
block/Makefile.objs | 2 +-
block/vhdx-endian.c | 3 ---
block/vhdx.c | 9 ++++-----
configure | 27 +++------------------------
4 files changed, 8 insertions(+), 33 deletions(-)
diff --git a/block/Makefile.objs b/block/Makefile.objs
index 2593a2f..013abb8 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -2,7 +2,7 @@ block-obj-y += raw_bsd.o qcow.o vdi.o vmdk.o cloop.o bochs.o vpc.o vvfat.o
block-obj-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o qcow2-cache.o
block-obj-y += qed.o qed-gencb.o qed-l2-cache.o qed-table.o qed-cluster.o
block-obj-y += qed-check.o
-block-obj-$(CONFIG_VHDX) += vhdx.o vhdx-endian.o vhdx-log.o
+block-obj-y += vhdx.o vhdx-endian.o vhdx-log.o
block-obj-y += quorum.o
block-obj-y += parallels.o blkdebug.o blkverify.o blkreplay.o
block-obj-y += block-backend.o snapshot.o qapi.o
diff --git a/block/vhdx-endian.c b/block/vhdx-endian.c
index c306b90..429d755 100644
--- a/block/vhdx-endian.c
+++ b/block/vhdx-endian.c
@@ -21,9 +21,6 @@
#include "qemu/bswap.h"
#include "block/vhdx.h"
-#include <uuid/uuid.h>
-
-
/*
* All the VHDX formats on disk are little endian - the following
* are helper import/export functions to correctly convert
diff --git a/block/vhdx.c b/block/vhdx.c
index 75ef2b1..0ba2f0a 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -25,8 +25,7 @@
#include "qemu/bswap.h"
#include "block/vhdx.h"
#include "migration/migration.h"
-
-#include <uuid/uuid.h>
+#include "qemu/uuid.h"
/* Options for VHDX creation */
@@ -213,11 +212,11 @@ bool vhdx_checksum_is_valid(uint8_t *buf, size_t size, int crc_offset)
*/
void vhdx_guid_generate(MSGUID *guid)
{
- uuid_t uuid;
+ QemuUUID uuid;
assert(guid != NULL);
- uuid_generate(uuid);
- memcpy(guid, uuid, sizeof(MSGUID));
+ qemu_uuid_generate(&uuid);
+ memcpy(guid, &uuid, sizeof(MSGUID));
}
/* Check for region overlaps inside the VHDX image */
diff --git a/configure b/configure
index 8d84919..b456b41 100755
--- a/configure
+++ b/configure
@@ -316,7 +316,6 @@ vte=""
virglrenderer=""
tpm="yes"
libssh2=""
-vhdx=""
numa=""
tcmalloc="no"
jemalloc="no"
@@ -1094,6 +1093,9 @@ for opt do
--disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane)
echo "$0: $opt is obsolete, virtio-blk data-plane is always on" >&2
;;
+ --enable-vhdx|--disable-vhdx)
+ echo "$0: $opt is obsolete, VHDX driver is always built" >&2
+ ;;
--disable-gtk) gtk="no"
;;
--enable-gtk) gtk="yes"
@@ -1134,10 +1136,6 @@ for opt do
;;
--enable-libssh2) libssh2="yes"
;;
- --enable-vhdx) vhdx="yes"
- ;;
- --disable-vhdx) vhdx="no"
- ;;
--disable-numa) numa="no"
;;
--enable-numa) numa="yes"
@@ -1376,7 +1374,6 @@ disabled with --disable-FEATURE, default is enabled if available:
archipelago Archipelago backend
tpm TPM support
libssh2 ssh block device support
- vhdx support for the Microsoft VHDX image format
numa libnuma support
tcmalloc tcmalloc support
jemalloc jemalloc support
@@ -2685,19 +2682,6 @@ EOF
fi
fi
-if test "$vhdx" = "yes" ; then
- if test "$uuid" = "no" ; then
- error_exit "uuid required for VHDX support"
- fi
-elif test "$vhdx" != "no" ; then
- if test "$uuid" = "yes" ; then
- vhdx=yes
- else
- vhdx=no
- fi
-fi
-
-##########################################
# xfsctl() probe, used for raw-posix
if test "$xfs" != "no" ; then
cat > $TMPC << EOF
@@ -4891,7 +4875,6 @@ echo "TPM support $tpm"
echo "libssh2 support $libssh2"
echo "TPM passthrough $tpm_passthrough"
echo "QOM debugging $qom_cast_debug"
-echo "vhdx $vhdx"
echo "lzo support $lzo"
echo "snappy support $snappy"
echo "bzip2 support $bzip2"
@@ -5412,10 +5395,6 @@ if test "$libssh2" = "yes" ; then
echo "LIBSSH2_LIBS=$libssh2_libs" >> $config_host_mak
fi
-if test "$vhdx" = "yes" ; then
- echo "CONFIG_VHDX=y" >> $config_host_mak
-fi
-
# USB host support
if test "$libusb" = "yes"; then
echo "HOST_USB=libusb legacy" >> $config_host_mak
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v5 3/9] vdi: Use QEMU UUID API
2016-08-12 4:52 [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8 Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 1/9] util: Add UUID API Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 2/9] vhdx: Use QEMU " Fam Zheng
@ 2016-08-12 4:52 ` Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 4/9] vpc: " Fam Zheng
` (6 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2016-08-12 4:52 UTC (permalink / raw)
To: qemu-devel
Cc: kwolf, qemu-block, sw, jcody, mdroth, armbru, pbonzini, mreitz, rth
The UUID operations we need from libuuid is fully supported by QEMU UUID
implementation. Use it, and remove the unused code.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
block/vdi.c | 73 ++++++++++++++-----------------------------------------------
1 file changed, 17 insertions(+), 56 deletions(-)
diff --git a/block/vdi.c b/block/vdi.c
index 8a1cf97..96b78d5 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -58,14 +58,7 @@
#include "migration/migration.h"
#include "qemu/coroutine.h"
#include "qemu/cutils.h"
-
-#if defined(CONFIG_UUID)
-#include <uuid/uuid.h>
-#else
-/* TODO: move uuid emulation to some central place in QEMU. */
-#include "sysemu/sysemu.h" /* UUID_FMT */
-typedef unsigned char uuid_t[16];
-#endif
+#include "qemu/uuid.h"
/* Code configuration options. */
@@ -140,28 +133,6 @@ typedef unsigned char uuid_t[16];
#define VDI_DISK_SIZE_MAX ((uint64_t)VDI_BLOCKS_IN_IMAGE_MAX * \
(uint64_t)DEFAULT_CLUSTER_SIZE)
-#if !defined(CONFIG_UUID)
-static inline void uuid_generate(uuid_t out)
-{
- memset(out, 0, sizeof(uuid_t));
-}
-
-static inline int uuid_is_null(const uuid_t uu)
-{
- uuid_t null_uuid = { 0 };
- return memcmp(uu, null_uuid, sizeof(uuid_t)) == 0;
-}
-
-# if defined(CONFIG_VDI_DEBUG)
-static inline void uuid_unparse(const uuid_t uu, char *out)
-{
- snprintf(out, 37, UUID_FMT,
- uu[0], uu[1], uu[2], uu[3], uu[4], uu[5], uu[6], uu[7],
- uu[8], uu[9], uu[10], uu[11], uu[12], uu[13], uu[14], uu[15]);
-}
-# endif
-#endif
-
typedef struct {
char text[0x40];
uint32_t signature;
@@ -182,10 +153,10 @@ typedef struct {
uint32_t block_extra; /* unused here */
uint32_t blocks_in_image;
uint32_t blocks_allocated;
- uuid_t uuid_image;
- uuid_t uuid_last_snap;
- uuid_t uuid_link;
- uuid_t uuid_parent;
+ QemuUUID uuid_image;
+ QemuUUID uuid_last_snap;
+ QemuUUID uuid_link;
+ QemuUUID uuid_parent;
uint64_t unused2[7];
} QEMU_PACKED VdiHeader;
@@ -206,16 +177,6 @@ typedef struct {
Error *migration_blocker;
} BDRVVdiState;
-/* Change UUID from little endian (IPRT = VirtualBox format) to big endian
- * format (network byte order, standard, see RFC 4122) and vice versa.
- */
-static void uuid_convert(uuid_t uuid)
-{
- bswap32s((uint32_t *)&uuid[0]);
- bswap16s((uint16_t *)&uuid[4]);
- bswap16s((uint16_t *)&uuid[6]);
-}
-
static void vdi_header_to_cpu(VdiHeader *header)
{
le32_to_cpus(&header->signature);
@@ -234,10 +195,10 @@ static void vdi_header_to_cpu(VdiHeader *header)
le32_to_cpus(&header->block_extra);
le32_to_cpus(&header->blocks_in_image);
le32_to_cpus(&header->blocks_allocated);
- uuid_convert(header->uuid_image);
- uuid_convert(header->uuid_last_snap);
- uuid_convert(header->uuid_link);
- uuid_convert(header->uuid_parent);
+ qemu_uuid_bswap(&header->uuid_image);
+ qemu_uuid_bswap(&header->uuid_last_snap);
+ qemu_uuid_bswap(&header->uuid_link);
+ qemu_uuid_bswap(&header->uuid_parent);
}
static void vdi_header_to_le(VdiHeader *header)
@@ -258,10 +219,10 @@ static void vdi_header_to_le(VdiHeader *header)
cpu_to_le32s(&header->block_extra);
cpu_to_le32s(&header->blocks_in_image);
cpu_to_le32s(&header->blocks_allocated);
- uuid_convert(header->uuid_image);
- uuid_convert(header->uuid_last_snap);
- uuid_convert(header->uuid_link);
- uuid_convert(header->uuid_parent);
+ qemu_uuid_bswap(&header->uuid_image);
+ qemu_uuid_bswap(&header->uuid_last_snap);
+ qemu_uuid_bswap(&header->uuid_link);
+ qemu_uuid_bswap(&header->uuid_parent);
}
#if defined(CONFIG_VDI_DEBUG)
@@ -469,11 +430,11 @@ static int vdi_open(BlockDriverState *bs, QDict *options, int flags,
(uint64_t)header.blocks_in_image * header.block_size);
ret = -ENOTSUP;
goto fail;
- } else if (!uuid_is_null(header.uuid_link)) {
+ } else if (!qemu_uuid_is_null(&header.uuid_link)) {
error_setg(errp, "unsupported VDI image (non-NULL link UUID)");
ret = -ENOTSUP;
goto fail;
- } else if (!uuid_is_null(header.uuid_parent)) {
+ } else if (!qemu_uuid_is_null(&header.uuid_parent)) {
error_setg(errp, "unsupported VDI image (non-NULL parent UUID)");
ret = -ENOTSUP;
goto fail;
@@ -821,8 +782,8 @@ static int vdi_create(const char *filename, QemuOpts *opts, Error **errp)
if (image_type == VDI_TYPE_STATIC) {
header.blocks_allocated = blocks;
}
- uuid_generate(header.uuid_image);
- uuid_generate(header.uuid_last_snap);
+ qemu_uuid_generate(&header.uuid_image);
+ qemu_uuid_generate(&header.uuid_last_snap);
/* There is no need to set header.uuid_link or header.uuid_parent here. */
#if defined(CONFIG_VDI_DEBUG)
vdi_header_print(&header);
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v5 4/9] vpc: Use QEMU UUID API
2016-08-12 4:52 [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8 Fam Zheng
` (2 preceding siblings ...)
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 3/9] vdi: " Fam Zheng
@ 2016-08-12 4:52 ` Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 5/9] crypto: Switch to " Fam Zheng
` (5 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2016-08-12 4:52 UTC (permalink / raw)
To: qemu-devel
Cc: kwolf, qemu-block, sw, jcody, mdroth, armbru, pbonzini, mreitz, rth
Previously we conditionally generated footer->uuid, when libuuid was
available. Now that we have a built-in implementation, we can switch to
it.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
block/vpc.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/block/vpc.c b/block/vpc.c
index 43707ed..8d5886f 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -30,9 +30,7 @@
#include "qemu/module.h"
#include "migration/migration.h"
#include "qemu/bswap.h"
-#if defined(CONFIG_UUID)
-#include <uuid/uuid.h>
-#endif
+#include "qemu/uuid.h"
/**************************************************************/
@@ -89,7 +87,7 @@ typedef struct vhd_footer {
uint32_t checksum;
/* UUID used to identify a parent hard disk (backing file) */
- uint8_t uuid[16];
+ QemuUUID uuid;
uint8_t in_saved_state;
} QEMU_PACKED VHDFooter;
@@ -980,9 +978,7 @@ static int vpc_create(const char *filename, QemuOpts *opts, Error **errp)
footer->type = cpu_to_be32(disk_type);
-#if defined(CONFIG_UUID)
- uuid_generate(footer->uuid);
-#endif
+ qemu_uuid_generate(&footer->uuid);
footer->checksum = cpu_to_be32(vpc_checksum(buf, HEADER_SIZE));
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v5 5/9] crypto: Switch to QEMU UUID API
2016-08-12 4:52 [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8 Fam Zheng
` (3 preceding siblings ...)
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 4/9] vpc: " Fam Zheng
@ 2016-08-12 4:52 ` Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 6/9] tests: No longer dependent on CONFIG_UUID Fam Zheng
` (4 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2016-08-12 4:52 UTC (permalink / raw)
To: qemu-devel
Cc: kwolf, qemu-block, sw, jcody, mdroth, armbru, pbonzini, mreitz, rth
The uuid generation doesn't return error, so update the function
signature and calling code accordingly.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
crypto/block-luks.c | 26 +++++++-------------------
1 file changed, 7 insertions(+), 19 deletions(-)
diff --git a/crypto/block-luks.c b/crypto/block-luks.c
index aba4455..da65dc0 100644
--- a/crypto/block-luks.c
+++ b/crypto/block-luks.c
@@ -29,10 +29,7 @@
#include "crypto/pbkdf.h"
#include "crypto/secret.h"
#include "crypto/random.h"
-
-#ifdef CONFIG_UUID
-#include <uuid/uuid.h>
-#endif
+#include "qemu/uuid.h"
#include "qemu/coroutine.h"
@@ -877,18 +874,12 @@ qcrypto_block_luks_open(QCryptoBlock *block,
}
-static int
-qcrypto_block_luks_uuid_gen(uint8_t *uuidstr, Error **errp)
+static void
+qcrypto_block_luks_uuid_gen(uint8_t *uuidstr)
{
-#ifdef CONFIG_UUID
- uuid_t uuid;
- uuid_generate(uuid);
- uuid_unparse(uuid, (char *)uuidstr);
- return 0;
-#else
- error_setg(errp, "Unable to generate uuids on this platform");
- return -1;
-#endif
+ QemuUUID uuid;
+ qemu_uuid_generate(&uuid);
+ qemu_uuid_unparse(&uuid, (char *)uuidstr);
}
static int
@@ -961,10 +952,7 @@ qcrypto_block_luks_create(QCryptoBlock *block,
* it out to disk
*/
luks->header.version = QCRYPTO_BLOCK_LUKS_VERSION;
- if (qcrypto_block_luks_uuid_gen(luks->header.uuid,
- errp) < 0) {
- goto error;
- }
+ qcrypto_block_luks_uuid_gen(luks->header.uuid);
cipher_alg = qcrypto_block_luks_cipher_alg_lookup(luks_opts.cipher_alg,
errp);
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v5 6/9] tests: No longer dependent on CONFIG_UUID
2016-08-12 4:52 [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8 Fam Zheng
` (4 preceding siblings ...)
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 5/9] crypto: Switch to " Fam Zheng
@ 2016-08-12 4:52 ` Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 7/9] configure: Remove detection code for UUID Fam Zheng
` (3 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2016-08-12 4:52 UTC (permalink / raw)
To: qemu-devel
Cc: kwolf, qemu-block, sw, jcody, mdroth, armbru, pbonzini, mreitz, rth
crypto now uses built-in uuid implementation, so this check is not
needed.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
tests/test-crypto-block.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test-crypto-block.c b/tests/test-crypto-block.c
index a38110d..1957a86 100644
--- a/tests/test-crypto-block.c
+++ b/tests/test-crypto-block.c
@@ -28,7 +28,7 @@
#include <sys/resource.h>
#endif
-#if defined(CONFIG_UUID) && (defined(_WIN32) || defined RUSAGE_THREAD)
+#if (defined(_WIN32) || defined RUSAGE_THREAD)
#define TEST_LUKS
#else
#undef TEST_LUKS
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v5 7/9] configure: Remove detection code for UUID
2016-08-12 4:52 [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8 Fam Zheng
` (5 preceding siblings ...)
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 6/9] tests: No longer dependent on CONFIG_UUID Fam Zheng
@ 2016-08-12 4:52 ` Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 8/9] vl: Switch qemu_uuid to QemuUUID Fam Zheng
` (2 subsequent siblings)
9 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2016-08-12 4:52 UTC (permalink / raw)
To: qemu-devel
Cc: kwolf, qemu-block, sw, jcody, mdroth, armbru, pbonzini, mreitz, rth
All code now uses built-in UUID implementation. Remove the code of
libuuid and make --enable-uuid and --disable-uuid only print a message.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
configure | 43 ++++---------------------------------------
1 file changed, 4 insertions(+), 39 deletions(-)
diff --git a/configure b/configure
index b456b41..f63071d 100755
--- a/configure
+++ b/configure
@@ -212,7 +212,6 @@ sdlabi=""
virtfs=""
vnc="yes"
sparse="no"
-uuid=""
vde=""
vnc_sasl=""
vnc_jpeg=""
@@ -881,10 +880,6 @@ for opt do
;;
--disable-slirp) slirp="no"
;;
- --disable-uuid) uuid="no"
- ;;
- --enable-uuid) uuid="yes"
- ;;
--disable-vde) vde="no"
;;
--enable-vde) vde="yes"
@@ -1096,6 +1091,9 @@ for opt do
--enable-vhdx|--disable-vhdx)
echo "$0: $opt is obsolete, VHDX driver is always built" >&2
;;
+ --enable-uuid|--disable-uuid)
+ echo "$0: $opt is obsolete, UUID support is always built" >&2
+ ;;
--disable-gtk) gtk="no"
;;
--enable-gtk) gtk="yes"
@@ -1350,7 +1348,6 @@ disabled with --disable-FEATURE, default is enabled if available:
bluez bluez stack connectivity
kvm KVM acceleration support
rdma RDMA-based migration support
- uuid uuid support
vde support for vde network
netmap support for netmap network
linux-aio Linux AIO support
@@ -2654,34 +2651,6 @@ if compile_prog "" "" ; then
fi
##########################################
-# uuid_generate() probe, used for vdi block driver
-# Note that on some systems (notably MacOSX) no extra library
-# need be linked to get the uuid functions.
-if test "$uuid" != "no" ; then
- uuid_libs="-luuid"
- cat > $TMPC << EOF
-#include <uuid/uuid.h>
-int main(void)
-{
- uuid_t my_uuid;
- uuid_generate(my_uuid);
- return 0;
-}
-EOF
- if compile_prog "" "" ; then
- uuid="yes"
- elif compile_prog "" "$uuid_libs" ; then
- uuid="yes"
- libs_softmmu="$uuid_libs $libs_softmmu"
- libs_tools="$uuid_libs $libs_tools"
- else
- if test "$uuid" = "yes" ; then
- feature_not_found "uuid" "Install libuuid devel"
- fi
- uuid=no
- fi
-fi
-
# xfsctl() probe, used for raw-posix
if test "$xfs" != "no" ; then
cat > $TMPC << EOF
@@ -4054,7 +4023,7 @@ EOF
if compile_prog "$vss_win32_include" "" ; then
guest_agent_with_vss="yes"
QEMU_CFLAGS="$QEMU_CFLAGS $vss_win32_include"
- libs_qga="-lole32 -loleaut32 -lshlwapi -luuid -lstdc++ -Wl,--enable-stdcall-fixup $libs_qga"
+ libs_qga="-lole32 -loleaut32 -lshlwapi -lstdc++ -Wl,--enable-stdcall-fixup $libs_qga"
qga_vss_provider="qga/vss-win32/qga-vss.dll qga/vss-win32/qga-vss.tlb"
else
if test "$vss_win32_sdk" != "" ; then
@@ -4842,7 +4811,6 @@ echo "preadv support $preadv"
echo "fdatasync $fdatasync"
echo "madvise $madvise"
echo "posix_madvise $posix_madvise"
-echo "uuid support $uuid"
echo "libcap-ng support $cap_ng"
echo "vhost-net support $vhost_net"
echo "vhost-scsi support $vhost_scsi"
@@ -5030,9 +4998,6 @@ fi
if test "$fnmatch" = "yes" ; then
echo "CONFIG_FNMATCH=y" >> $config_host_mak
fi
-if test "$uuid" = "yes" ; then
- echo "CONFIG_UUID=y" >> $config_host_mak
-fi
if test "$xfs" = "yes" ; then
echo "CONFIG_XFS=y" >> $config_host_mak
fi
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v5 8/9] vl: Switch qemu_uuid to QemuUUID
2016-08-12 4:52 [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8 Fam Zheng
` (6 preceding siblings ...)
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 7/9] configure: Remove detection code for UUID Fam Zheng
@ 2016-08-12 4:52 ` Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 9/9] tests: Add uuid tests Fam Zheng
2016-08-12 5:13 ` [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8 no-reply
9 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2016-08-12 4:52 UTC (permalink / raw)
To: qemu-devel
Cc: kwolf, qemu-block, sw, jcody, mdroth, armbru, pbonzini, mreitz, rth
Update all qemu_uuid users as well, especially get rid of the duplicated
low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API.
Since qemu_uuid_parse is quite tangled with qemu_uuid, it's switching to
QemuUUID is done here too to keep everything in sync and avoid code
churn.
Signed-off-by: Fam Zheng <famz@redhat.com>
---
hw/ipmi/ipmi_bmc_sim.c | 2 +-
hw/nvram/fw_cfg.c | 2 +-
hw/ppc/spapr.c | 7 +------
hw/smbios/smbios.c | 10 +++++-----
hw/xenpv/xen_domainbuild.c | 6 +-----
include/qemu/uuid.h | 2 +-
include/sysemu/sysemu.h | 3 ++-
qmp.c | 10 ++--------
util/uuid.c | 11 ++++++-----
vl.c | 6 +++---
10 files changed, 23 insertions(+), 36 deletions(-)
diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c
index dc9c14c..17c7c0e 100644
--- a/hw/ipmi/ipmi_bmc_sim.c
+++ b/hw/ipmi/ipmi_bmc_sim.c
@@ -1773,7 +1773,7 @@ static void ipmi_sim_realize(DeviceState *dev, Error **errp)
ibs->acpi_power_state[1] = 0;
if (qemu_uuid_set) {
- memcpy(&ibs->uuid, qemu_uuid, 16);
+ memcpy(&ibs->uuid, &qemu_uuid, 16);
} else {
memset(&ibs->uuid, 0, 16);
}
diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
index 6a68e59..0118299 100644
--- a/hw/nvram/fw_cfg.c
+++ b/hw/nvram/fw_cfg.c
@@ -883,7 +883,7 @@ static void fw_cfg_init1(DeviceState *dev)
qdev_init_nofail(dev);
fw_cfg_add_bytes(s, FW_CFG_SIGNATURE, (char *)"QEMU", 4);
- fw_cfg_add_bytes(s, FW_CFG_UUID, qemu_uuid, 16);
+ fw_cfg_add_bytes(s, FW_CFG_UUID, &qemu_uuid, 16);
fw_cfg_add_i16(s, FW_CFG_NOGRAPHIC, (uint16_t)!machine->enable_graphics);
fw_cfg_add_i16(s, FW_CFG_NB_CPUS, (uint16_t)smp_cpus);
fw_cfg_add_i16(s, FW_CFG_BOOT_MENU, (uint16_t)boot_menu);
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 0787c66..9bcfe32 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -375,12 +375,7 @@ static void *spapr_create_fdt_skel(hwaddr initrd_base,
g_free(buf);
}
- buf = g_strdup_printf(UUID_FMT, qemu_uuid[0], qemu_uuid[1],
- qemu_uuid[2], qemu_uuid[3], qemu_uuid[4],
- qemu_uuid[5], qemu_uuid[6], qemu_uuid[7],
- qemu_uuid[8], qemu_uuid[9], qemu_uuid[10],
- qemu_uuid[11], qemu_uuid[12], qemu_uuid[13],
- qemu_uuid[14], qemu_uuid[15]);
+ buf = qemu_uuid_unparse_strdup(&qemu_uuid);
_FDT((fdt_property_string(fdt, "vm,uuid", buf)));
if (qemu_uuid_set) {
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
index 0705eb1..3ae3047 100644
--- a/hw/smbios/smbios.c
+++ b/hw/smbios/smbios.c
@@ -409,7 +409,7 @@ static void smbios_build_type_1_fields(void)
* BIOS.
*/
smbios_add_field(1, offsetof(struct smbios_type_1, uuid),
- qemu_uuid, 16);
+ &qemu_uuid, 16);
}
}
@@ -484,9 +484,9 @@ static void smbios_build_type_0_table(void)
/* Encode UUID from the big endian encoding described on RFC4122 to the wire
* format specified by SMBIOS version 2.6.
*/
-static void smbios_encode_uuid(struct smbios_uuid *uuid, const uint8_t *buf)
+static void smbios_encode_uuid(struct smbios_uuid *uuid, QemuUUID *in)
{
- memcpy(uuid, buf, 16);
+ memcpy(uuid, &in, 16);
if (smbios_uuid_encoded) {
uuid->time_low = bswap32(uuid->time_low);
uuid->time_mid = bswap16(uuid->time_mid);
@@ -503,7 +503,7 @@ static void smbios_build_type_1_table(void)
SMBIOS_TABLE_SET_STR(1, version_str, type1.version);
SMBIOS_TABLE_SET_STR(1, serial_number_str, type1.serial);
if (qemu_uuid_set) {
- smbios_encode_uuid(&t->uuid, qemu_uuid);
+ smbios_encode_uuid(&t->uuid, &qemu_uuid);
} else {
memset(&t->uuid, 0, 16);
}
@@ -1002,7 +1002,7 @@ void smbios_entry_add(QemuOpts *opts)
val = qemu_opt_get(opts, "uuid");
if (val) {
- if (qemu_uuid_parse(val, qemu_uuid) != 0) {
+ if (qemu_uuid_parse(val, &qemu_uuid) != 0) {
error_report("Invalid UUID");
exit(1);
}
diff --git a/hw/xenpv/xen_domainbuild.c b/hw/xenpv/xen_domainbuild.c
index 5a9f5ac..b439b0e 100644
--- a/hw/xenpv/xen_domainbuild.c
+++ b/hw/xenpv/xen_domainbuild.c
@@ -53,11 +53,7 @@ int xenstore_domain_init1(const char *kernel, const char *ramdisk,
char *dom, uuid_string[42], vm[256], path[256];
int i;
- snprintf(uuid_string, sizeof(uuid_string), UUID_FMT,
- qemu_uuid[0], qemu_uuid[1], qemu_uuid[2], qemu_uuid[3],
- qemu_uuid[4], qemu_uuid[5], qemu_uuid[6], qemu_uuid[7],
- qemu_uuid[8], qemu_uuid[9], qemu_uuid[10], qemu_uuid[11],
- qemu_uuid[12], qemu_uuid[13], qemu_uuid[14], qemu_uuid[15]);
+ qemu_uuid_unparse(&qemu_uuid, uuid_string);
dom = xs_get_domain_path(xenstore, xen_domid);
snprintf(vm, sizeof(vm), "/vm/%s", uuid_string);
diff --git a/include/qemu/uuid.h b/include/qemu/uuid.h
index 1b2b564..bbc4c0a 100644
--- a/include/qemu/uuid.h
+++ b/include/qemu/uuid.h
@@ -52,7 +52,7 @@ void qemu_uuid_unparse(const QemuUUID *uuid, char *out);
char *qemu_uuid_unparse_strdup(const QemuUUID *uuid);
-int qemu_uuid_parse(const char *str, uint8_t *uuid);
+int qemu_uuid_parse(const char *str, QemuUUID *uuid);
void qemu_uuid_bswap(QemuUUID *uuid);
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 6111950..ef2c50b 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -9,6 +9,7 @@
#include "qemu/notify.h"
#include "qemu/main-loop.h"
#include "qemu/bitmap.h"
+#include "qemu/uuid.h"
#include "qom/object.h"
/* vl.c */
@@ -16,7 +17,7 @@
extern const char *bios_name;
extern const char *qemu_name;
-extern uint8_t qemu_uuid[];
+extern QemuUUID qemu_uuid;
extern bool qemu_uuid_set;
bool runstate_check(RunState state);
diff --git a/qmp.c b/qmp.c
index 0b65ba3..c579a7f 100644
--- a/qmp.c
+++ b/qmp.c
@@ -36,6 +36,7 @@
#include "qom/object_interfaces.h"
#include "hw/mem/pc-dimm.h"
#include "hw/acpi/acpi_dev_interface.h"
+#include "qemu/uuid.h"
NameInfo *qmp_query_name(Error **errp)
{
@@ -85,15 +86,8 @@ KvmInfo *qmp_query_kvm(Error **errp)
UuidInfo *qmp_query_uuid(Error **errp)
{
UuidInfo *info = g_malloc0(sizeof(*info));
- char uuid[64];
- snprintf(uuid, sizeof(uuid), UUID_FMT, qemu_uuid[0], qemu_uuid[1],
- qemu_uuid[2], qemu_uuid[3], qemu_uuid[4], qemu_uuid[5],
- qemu_uuid[6], qemu_uuid[7], qemu_uuid[8], qemu_uuid[9],
- qemu_uuid[10], qemu_uuid[11], qemu_uuid[12], qemu_uuid[13],
- qemu_uuid[14], qemu_uuid[15]);
-
- info->UUID = g_strdup(uuid);
+ info->UUID = qemu_uuid_unparse_strdup(&qemu_uuid);
return info;
}
diff --git a/util/uuid.c b/util/uuid.c
index bc82310..0cec4de 100644
--- a/util/uuid.c
+++ b/util/uuid.c
@@ -62,18 +62,19 @@ char *qemu_uuid_unparse_strdup(const QemuUUID *uuid)
uu[13], uu[14], uu[15]);
}
-int qemu_uuid_parse(const char *str, uint8_t *uuid)
+int qemu_uuid_parse(const char *str, QemuUUID *uuid)
{
+ unsigned char *uu = &uuid->data[0];
int ret;
if (strlen(str) != 36) {
return -1;
}
- ret = sscanf(str, UUID_FMT, &uuid[0], &uuid[1], &uuid[2], &uuid[3],
- &uuid[4], &uuid[5], &uuid[6], &uuid[7], &uuid[8], &uuid[9],
- &uuid[10], &uuid[11], &uuid[12], &uuid[13], &uuid[14],
- &uuid[15]);
+ ret = sscanf(str, UUID_FMT, &uu[0], &uu[1], &uu[2], &uu[3],
+ &uu[4], &uu[5], &uu[6], &uu[7], &uu[8], &uu[9],
+ &uu[10], &uu[11], &uu[12], &uu[13], &uu[14],
+ &uu[15]);
if (ret != 16) {
return -1;
diff --git a/vl.c b/vl.c
index ceddef4..24dfef9 100644
--- a/vl.c
+++ b/vl.c
@@ -182,10 +182,10 @@ uint8_t qemu_extra_params_fw[2];
int icount_align_option;
-/* The bytes in qemu_uuid[] are in the order specified by RFC4122, _not_ in the
+/* The bytes in qemu_uuid are in the order specified by RFC4122, _not_ in the
* little-endian "wire format" described in the SMBIOS 2.6 specification.
*/
-uint8_t qemu_uuid[16];
+QemuUUID qemu_uuid;
bool qemu_uuid_set;
static NotifierList exit_notifiers =
@@ -3725,7 +3725,7 @@ int main(int argc, char **argv, char **envp)
cursor_hide = 0;
break;
case QEMU_OPTION_uuid:
- if(qemu_uuid_parse(optarg, qemu_uuid) < 0) {
+ if (qemu_uuid_parse(optarg, &qemu_uuid) < 0) {
error_report("failed to parse UUID string: wrong format");
exit(1);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v5 9/9] tests: Add uuid tests
2016-08-12 4:52 [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8 Fam Zheng
` (7 preceding siblings ...)
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 8/9] vl: Switch qemu_uuid to QemuUUID Fam Zheng
@ 2016-08-12 4:52 ` Fam Zheng
2016-08-12 5:13 ` [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8 no-reply
9 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2016-08-12 4:52 UTC (permalink / raw)
To: qemu-devel
Cc: kwolf, qemu-block, sw, jcody, mdroth, armbru, pbonzini, mreitz, rth
Signed-off-by: Fam Zheng <famz@redhat.com>
---
tests/Makefile.include | 2 +
tests/test-uuid.c | 173 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 175 insertions(+)
create mode 100644 tests/test-uuid.c
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 14be491..aa4f832 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -112,6 +112,7 @@ check-unit-y += tests/test-crypto-xts$(EXESUF)
check-unit-y += tests/test-crypto-block$(EXESUF)
gcov-files-test-logging-y = tests/test-logging.c
check-unit-y += tests/test-logging$(EXESUF)
+check-unit-y += tests/test-uuid$(EXESUF)
check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
@@ -631,6 +632,7 @@ tests/test-filter-mirror$(EXESUF): tests/test-filter-mirror.o $(qtest-obj-y)
tests/test-filter-redirector$(EXESUF): tests/test-filter-redirector.o $(qtest-obj-y)
tests/ivshmem-test$(EXESUF): tests/ivshmem-test.o contrib/ivshmem-server/ivshmem-server.o $(libqos-pc-obj-y)
tests/vhost-user-bridge$(EXESUF): tests/vhost-user-bridge.o
+tests/test-uuid$(EXESUF): tests/test-uuid.o $(test-util-obj-y)
tests/migration/stress$(EXESUF): tests/migration/stress.o
$(call quiet-command, $(LINKPROG) -static -O3 $(PTHREAD_LIB) -o $@ $< ," LINK $(TARGET_DIR)$@")
diff --git a/tests/test-uuid.c b/tests/test-uuid.c
new file mode 100644
index 0000000..b891110
--- /dev/null
+++ b/tests/test-uuid.c
@@ -0,0 +1,173 @@
+/*
+ * QEMU UUID Library
+ *
+ * Copyright (c) 2016 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/uuid.h"
+
+struct {
+ const char *uuidstr;
+ QemuUUID uuid;
+ bool uuidstr_is_valid;
+ bool check_unparse;
+} uuid_test_data[] = {
+ { /* Normal */
+ "586ece27-7f09-41e0-9e74-e901317e9d42",
+ { .data = {
+ 0x58, 0x6e, 0xce, 0x27, 0x7f, 0x09, 0x41, 0xe0,
+ 0x9e, 0x74, 0xe9, 0x01, 0x31, 0x7e, 0x9d, 0x42,
+ } },
+ true, true,
+ }, { /* NULL */
+ "00000000-0000-0000-0000-000000000000",
+ { },
+ true, true,
+ }, { /* Upper case */
+ "0CC6C752-3961-4028-A286-C05CC616D396",
+ { .data = {
+ 0x0c, 0xc6, 0xc7, 0x52, 0x39, 0x61, 0x40, 0x28,
+ 0xa2, 0x86, 0xc0, 0x5c, 0xc6, 0x16, 0xd3, 0x96,
+ } },
+ true, false,
+ }, { /* Mixed case */
+ "0CC6C752-3961-4028-a286-c05cc616D396",
+ { .data = {
+ 0x0c, 0xc6, 0xc7, 0x52, 0x39, 0x61, 0x40, 0x28,
+ 0xa2, 0x86, 0xc0, 0x5c, 0xc6, 0x16, 0xd3, 0x96,
+ } },
+ true, false,
+ }, { /* Empty */
+ ""
+ }, { /* Too short */
+ "abc",
+ }, { /* Non-hex */
+ "abcdefgh-0000-0000-0000-000000000000",
+ }, { /* No '-' */
+ "0cc6c75239614028a286c05cc616d396",
+ }, { /* '-' in wrong position */
+ "0cc6c-7523961-4028-a286-c05cc616d396",
+ }, { /* Double '-' */
+ "0cc6c752--3961-4028-a286-c05cc616d396",
+ }, { /* Too long */
+ "0000000000000000000000000000000000000000000000",
+ }, { /* Invalid char in the beginning */
+ ")cc6c752--3961-4028-a286-c05cc616d396",
+ }, { /* Invalid char in the beginning, in extra */
+ ")0cc6c752--3961-4028-a286-c05cc616d396",
+ }, { /* Invalid char in the middle */
+ "0cc6c752--39*1-4028-a286-c05cc616d396",
+ }, { /* Invalid char in the middle, in extra */
+ "0cc6c752--39*61-4028-a286-c05cc616d396",
+ }, { /* Invalid char in the end */
+ "0cc6c752--3961-4028-a286-c05cc616d39&",
+ }, { /* Invalid char in the end, in extra */
+ "0cc6c752--3961-4028-a286-c05cc616d396&",
+ },
+};
+
+static inline bool uuid_is_valid(QemuUUID *uuid)
+{
+ return qemu_uuid_is_null(uuid) ||
+ ((uuid->data[6] & 0xf0) == 0x40 && (uuid->data[8] & 0xc0) == 0x80);
+}
+
+static void test_uuid_generate(void)
+{
+ QemuUUID uuid;
+ int i;
+
+ for (i = 0; i < 100; ++i) {
+ qemu_uuid_generate(&uuid);
+ g_assert(uuid_is_valid(&uuid));
+ }
+}
+
+static void test_uuid_is_null(void)
+{
+ QemuUUID uuid_null = { };
+ QemuUUID uuid_not_null = { .data = {
+ 0x58, 0x6e, 0xce, 0x27, 0x7f, 0x09, 0x41, 0xe0,
+ 0x9e, 0x74, 0xe9, 0x01, 0x31, 0x7e, 0x9d, 0x42
+ } };
+ QemuUUID uuid_not_null_2 = { .data = { 1 } };
+
+ g_assert(qemu_uuid_is_null(&uuid_null));
+ g_assert_false(qemu_uuid_is_null(&uuid_not_null));
+ g_assert_false(qemu_uuid_is_null(&uuid_not_null_2));
+}
+
+static void test_uuid_parse(void)
+{
+ int i, r;
+
+ for (i = 0; i < ARRAY_SIZE(uuid_test_data); i++) {
+ QemuUUID uuid;
+ bool is_valid = uuid_test_data[i].uuidstr_is_valid;
+
+ r = qemu_uuid_parse(uuid_test_data[i].uuidstr, &uuid);
+ g_assert_cmpint(!r, ==, is_valid);
+ if (is_valid) {
+ g_assert_cmpint(is_valid, ==, uuid_is_valid(&uuid));
+ g_assert_cmpmem(&uuid_test_data[i].uuid, sizeof(uuid),
+ &uuid, sizeof(uuid));
+ }
+ }
+}
+
+static void test_uuid_unparse(void)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(uuid_test_data); i++) {
+ char out[37];
+
+ if (!uuid_test_data[i].check_unparse) {
+ continue;
+ }
+ qemu_uuid_unparse(&uuid_test_data[i].uuid, out);
+ g_assert_cmpstr(uuid_test_data[i].uuidstr, ==, out);
+ }
+}
+
+static void test_uuid_unparse_strdup(void)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(uuid_test_data); i++) {
+ char *out;
+
+ if (!uuid_test_data[i].check_unparse) {
+ continue;
+ }
+ out = qemu_uuid_unparse_strdup(&uuid_test_data[i].uuid);
+ g_assert_cmpstr(uuid_test_data[i].uuidstr, ==, out);
+ }
+}
+
+int main(int argc, char **argv)
+{
+ g_test_init(&argc, &argv, NULL);
+ g_test_add_func("/uuid/generate", test_uuid_generate);
+ g_test_add_func("/uuid/is_null", test_uuid_is_null);
+ g_test_add_func("/uuid/parse", test_uuid_parse);
+ g_test_add_func("/uuid/unparse", test_uuid_unparse);
+ g_test_add_func("/uuid/unparse_strdup", test_uuid_unparse_strdup);
+
+ return g_test_run();
+}
--
2.7.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8
2016-08-12 4:52 [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8 Fam Zheng
` (8 preceding siblings ...)
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 9/9] tests: Add uuid tests Fam Zheng
@ 2016-08-12 5:13 ` no-reply
9 siblings, 0 replies; 13+ messages in thread
From: no-reply @ 2016-08-12 5:13 UTC (permalink / raw)
To: famz
Cc: qemu-devel, kwolf, qemu-block, sw, jcody, mdroth, armbru,
pbonzini, mreitz, rth
Hi,
Your series failed automatic build test. Please find the testing commands and
their output below. If you have docker installed, you can probably reproduce it
locally.
Message-id: 1470977536-18209-1-git-send-email-famz@redhat.com
Subject: [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8
Type: series
=== TEST SCRIPT BEGIN ===
#!/bin/bash
set -e
git submodule update --init dtc
make J=8 docker-test-quick@centos6
# we need CURL DPRINTF patch
# http://patchew.org/QEMU/1470027888-24381-1-git-send-email-famz%40redhat.com/
#make J=8 docker-test-mingw@fedora
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
4546912 tests: Add uuid tests
6dc951e vl: Switch qemu_uuid to QemuUUID
d044ec0 configure: Remove detection code for UUID
5ac6c43 tests: No longer dependent on CONFIG_UUID
a8b7678 crypto: Switch to QEMU UUID API
b350884 vpc: Use QEMU UUID API
f95aabf vdi: Use QEMU UUID API
f13e9ed vhdx: Use QEMU UUID API
bd859aa util: Add UUID API
=== OUTPUT BEGIN ===
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into 'dtc'...
Submodule path 'dtc': checked out '65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf'
BUILD centos6
ARCHIVE qemu.tgz
ARCHIVE dtc.tgz
COPY RUNNER
RUN test-quick in centos6
No C++ compiler available; disabling C++ specific optional code
Install prefix /tmp/qemu-test/src/tests/docker/install
BIOS directory /tmp/qemu-test/src/tests/docker/install/share/qemu
binary directory /tmp/qemu-test/src/tests/docker/install/bin
library directory /tmp/qemu-test/src/tests/docker/install/lib
module directory /tmp/qemu-test/src/tests/docker/install/lib/qemu
libexec directory /tmp/qemu-test/src/tests/docker/install/libexec
include directory /tmp/qemu-test/src/tests/docker/install/include
config directory /tmp/qemu-test/src/tests/docker/install/etc
local state directory /tmp/qemu-test/src/tests/docker/install/var
Manual directory /tmp/qemu-test/src/tests/docker/install/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /tmp/qemu-test/src
C compiler cc
Host C compiler cc
C++ compiler
Objective-C compiler cc
ARFLAGS rv
CFLAGS -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -g
QEMU_CFLAGS -I/usr/include/pixman-1 -fPIE -DPIE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-all
LDFLAGS -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g
make make
install install
python python -B
smbd /usr/sbin/smbd
module support no
host CPU x86_64
host big endian no
target list x86_64-softmmu aarch64-softmmu
tcg debug enabled no
gprof enabled no
sparse enabled no
strip binaries yes
profiler no
static build no
pixman system
SDL support yes (1.2.14)
GTK support no
GTK GL support no
VTE support no
TLS priority NORMAL
GNUTLS support no
GNUTLS rnd no
libgcrypt no
libgcrypt kdf no
nettle no
nettle kdf no
libtasn1 no
curses support no
virgl support no
curl support no
mingw32 support no
Audio drivers oss
Block whitelist (rw)
Block whitelist (ro)
VirtFS support no
VNC support yes
VNC SASL support no
VNC JPEG support no
VNC PNG support no
xen support no
brlapi support no
bluez support no
Documentation no
PIE yes
vde support no
netmap support no
Linux AIO support no
ATTR/XATTR support yes
Install blobs yes
KVM support yes
RDMA support no
TCG interpreter no
fdt support yes
preadv support yes
fdatasync yes
madvise yes
posix_madvise yes
libcap-ng support no
vhost-net support yes
vhost-scsi support yes
Trace backends log
spice support no
rbd support no
xfsctl support no
smartcard support no
libusb no
usb net redir no
OpenGL support no
OpenGL dmabufs no
libiscsi support no
libnfs support no
build guest agent yes
QGA VSS support no
QGA w32 disk info no
QGA MSI support no
seccomp support no
coroutine backend ucontext
coroutine pool yes
GlusterFS support no
Archipelago support no
gcov gcov
gcov enabled no
TPM support yes
libssh2 support no
TPM passthrough yes
QOM debugging yes
lzo support no
snappy support no
bzip2 support no
NUMA host support no
tcmalloc support no
jemalloc support no
avx2 optimization no
GEN x86_64-softmmu/config-devices.mak.tmp
GEN aarch64-softmmu/config-devices.mak.tmp
GEN config-host.h
GEN qemu-options.def
GEN qmp-commands.h
GEN qapi-types.h
GEN qapi-visit.h
GEN qapi-event.h
GEN x86_64-softmmu/config-devices.mak
GEN aarch64-softmmu/config-devices.mak
GEN qmp-introspect.h
GEN tests/test-qapi-types.h
GEN tests/test-qapi-visit.h
GEN tests/test-qmp-commands.h
GEN tests/test-qapi-event.h
GEN tests/test-qmp-introspect.h
GEN config-all-devices.mak
GEN trace/generated-events.h
GEN trace/generated-tracers.h
GEN trace/generated-tcg-tracers.h
GEN trace/generated-helpers-wrappers.h
GEN trace/generated-helpers.h
CC tests/qemu-iotests/socket_scm_helper.o
GEN qga/qapi-generated/qga-qapi-types.h
GEN qga/qapi-generated/qga-qapi-visit.h
GEN qga/qapi-generated/qga-qmp-commands.h
GEN qga/qapi-generated/qga-qapi-types.c
GEN qga/qapi-generated/qga-qapi-visit.c
GEN qga/qapi-generated/qga-qmp-marshal.c
GEN qmp-introspect.c
GEN qapi-types.c
GEN qapi-visit.c
GEN qapi-event.c
CC qapi/qapi-visit-core.o
CC qapi/qapi-dealloc-visitor.o
CC qapi/qmp-input-visitor.o
CC qapi/qmp-output-visitor.o
CC qapi/qmp-registry.o
CC qapi/qmp-dispatch.o
CC qapi/string-input-visitor.o
CC qapi/string-output-visitor.o
CC qapi/opts-visitor.o
CC qapi/qapi-clone-visitor.o
CC qapi/qmp-event.o
CC qapi/qapi-util.o
CC qobject/qnull.o
CC qobject/qint.o
CC qobject/qstring.o
CC qobject/qdict.o
CC qobject/qlist.o
CC qobject/qfloat.o
CC qobject/qbool.o
CC qobject/qjson.o
CC qobject/qobject.o
CC qobject/json-lexer.o
CC qobject/json-streamer.o
CC qobject/json-parser.o
GEN trace/generated-events.c
CC trace/control.o
CC trace/qmp.o
CC util/osdep.o
CC util/cutils.o
CC util/unicode.o
CC util/qemu-timer-common.o
CC util/compatfd.o
CC util/event_notifier-posix.o
CC util/mmap-alloc.o
CC util/oslib-posix.o
CC util/qemu-openpty.o
CC util/qemu-thread-posix.o
CC util/memfd.o
CC util/envlist.o
CC util/path.o
CC util/module.o
CC util/bitmap.o
CC util/bitops.o
CC util/hbitmap.o
CC util/fifo8.o
CC util/acl.o
CC util/error.o
CC util/qemu-error.o
CC util/id.o
CC util/iov.o
CC util/qemu-config.o
CC util/qemu-sockets.o
CC util/uri.o
CC util/notify.o
CC util/qemu-option.o
CC util/qemu-progress.o
CC util/hexdump.o
CC util/crc32c.o
CC util/uuid.o
CC util/throttle.o
CC util/getauxval.o
CC util/readline.o
CC util/rfifolock.o
CC util/rcu.o
CC util/qemu-coroutine.o
CC util/qemu-coroutine-lock.o
CC util/qemu-coroutine-io.o
CC util/qemu-coroutine-sleep.o
CC util/coroutine-ucontext.o
CC util/buffer.o
CC util/timed-average.o
CC util/base64.o
CC util/log.o
CC util/qdist.o
CC util/qht.o
CC util/range.o
CC crypto/pbkdf-stub.o
CC stubs/arch-query-cpu-def.o
CC stubs/bdrv-next-monitor-owned.o
CC stubs/blk-commit-all.o
/tmp/qemu-test/src/util/qht.c: In function ‘qht_reset_size’:
/tmp/qemu-test/src/util/qht.c:413: warning: ‘new’ may be used uninitialized in this function
CC stubs/blockdev-close-all-bdrv-states.o
CC stubs/clock-warp.o
CC stubs/cpu-get-clock.o
CC stubs/cpu-get-icount.o
CC stubs/dump.o
CC stubs/fdset-add-fd.o
CC stubs/fdset-find-fd.o
CC stubs/fdset-get-fd.o
CC stubs/fdset-remove-fd.o
CC stubs/get-next-serial.o
CC stubs/gdbstub.o
CC stubs/get-fd.o
CC stubs/iothread-lock.o
CC stubs/get-vm-name.o
CC stubs/is-daemonized.o
CC stubs/machine-init-done.o
CC stubs/migr-blocker.o
CC stubs/mon-is-qmp.o
CC stubs/mon-printf.o
CC stubs/monitor-init.o
CC stubs/notify-event.o
CC stubs/qtest.o
CC stubs/replay.o
CC stubs/replay-user.o
CC stubs/reset.o
CC stubs/runstate-check.o
CC stubs/set-fd-handler.o
CC stubs/slirp.o
CC stubs/sysbus.o
CC stubs/trace-control.o
CC stubs/uuid.o
CC stubs/vm-stop.o
CC stubs/vmstate.o
CC stubs/cpus.o
/tmp/qemu-test/src/util/uuid.c: In function ‘qemu_uuid_is_null’:
/tmp/qemu-test/src/util/uuid.c:44: warning: missing braces around initializer
/tmp/qemu-test/src/util/uuid.c:44: warning: (near initialization for ‘null_uuid.<anonymous>’)
CC stubs/kvm.o
CC stubs/qmp_pc_dimm_device_list.o
CC stubs/target-monitor-defs.o
CC stubs/target-get-monitor-def.o
CC stubs/vhost.o
CC stubs/iohandler.o
CC stubs/smbios_type_38.o
CC stubs/ipmi.o
CC stubs/pc_madt_cpu_entry.o
CC contrib/ivshmem-client/ivshmem-client.o
CC contrib/ivshmem-client/main.o
CC contrib/ivshmem-server/ivshmem-server.o
CC contrib/ivshmem-server/main.o
CC qemu-nbd.o
CC async.o
CC thread-pool.o
CC block.o
CC blockjob.o
CC main-loop.o
CC iohandler.o
CC qemu-timer.o
CC aio-posix.o
CC qemu-io-cmds.o
CC block/raw_bsd.o
CC block/qcow.o
CC block/vdi.o
CC block/vmdk.o
CC block/cloop.o
CC block/bochs.o
CC block/vpc.o
CC block/vvfat.o
CC block/qcow2.o
CC block/qcow2-refcount.o
CC block/qcow2-cluster.o
CC block/qcow2-snapshot.o
CC block/qcow2-cache.o
CC block/qed.o
CC block/qed-gencb.o
CC block/qed-l2-cache.o
CC block/qed-table.o
CC block/qed-cluster.o
CC block/qed-check.o
CC block/vhdx.o
CC block/vhdx-endian.o
CC block/vhdx-log.o
CC block/quorum.o
CC block/parallels.o
CC block/blkdebug.o
CC block/blkverify.o
CC block/blkreplay.o
CC block/block-backend.o
CC block/snapshot.o
CC block/qapi.o
CC block/raw-posix.o
CC block/null.o
CC block/mirror.o
CC block/commit.o
CC block/io.o
CC block/nbd.o
CC block/throttle-groups.o
CC block/nbd-client.o
CC block/sheepdog.o
CC block/accounting.o
CC block/dirty-bitmap.o
CC block/write-threshold.o
CC block/crypto.o
CC nbd/server.o
CC nbd/client.o
CC nbd/common.o
CC block/dmg.o
CC crypto/init.o
CC crypto/hash.o
CC crypto/hash-glib.o
CC crypto/desrfb.o
CC crypto/aes.o
CC crypto/cipher.o
CC crypto/tlscreds.o
CC crypto/tlscredsanon.o
CC crypto/tlscredsx509.o
CC crypto/tlssession.o
CC crypto/secret.o
CC crypto/random-platform.o
CC crypto/pbkdf.o
CC crypto/ivgen.o
CC crypto/ivgen-plain.o
CC crypto/ivgen-essiv.o
CC crypto/ivgen-plain64.o
CC crypto/afsplit.o
CC crypto/xts.o
CC crypto/block.o
CC crypto/block-qcow.o
CC crypto/block-luks.o
CC io/channel.o
CC io/channel-buffer.o
CC io/channel-command.o
CC io/channel-file.o
CC io/channel-socket.o
CC io/channel-tls.o
CC io/channel-watch.o
CC io/channel-websock.o
CC io/channel-util.o
CC io/task.o
CC qom/object.o
CC qom/container.o
CC qom/qom-qobject.o
CC qom/object_interfaces.o
GEN qemu-img-cmds.h
CC qemu-io.o
CC qemu-bridge-helper.o
CC blockdev.o
CC blockdev-nbd.o
CC iothread.o
CC qdev-monitor.o
CC device-hotplug.o
CC os-posix.o
CC qemu-char.o
CC page_cache.o
CC accel.o
CC bt-host.o
CC bt-vhci.o
CC dma-helpers.o
CC vl.o
CC tpm.o
CC device_tree.o
GEN qmp-marshal.c
CC qmp.o
CC hmp.o
CC tcg-runtime.o
CC audio/audio.o
CC audio/noaudio.o
CC audio/wavaudio.o
CC audio/mixeng.o
CC audio/sdlaudio.o
CC audio/ossaudio.o
CC audio/wavcapture.o
CC backends/rng.o
CC backends/rng-egd.o
CC backends/rng-random.o
CC backends/msmouse.o
CC backends/testdev.o
CC backends/tpm.o
CC backends/hostmem.o
CC backends/hostmem-ram.o
CC backends/hostmem-file.o
CC block/stream.o
CC block/backup.o
CC disas/arm.o
CC disas/i386.o
CC fsdev/qemu-fsdev-dummy.o
CC fsdev/qemu-fsdev-opts.o
CC hw/acpi/core.o
CC hw/acpi/piix4.o
CC hw/acpi/pcihp.o
CC hw/acpi/ich9.o
CC hw/acpi/tco.o
CC hw/acpi/cpu_hotplug.o
CC hw/acpi/memory_hotplug.o
CC hw/acpi/memory_hotplug_acpi_table.o
CC hw/acpi/cpu.o
CC hw/acpi/acpi_interface.o
CC hw/acpi/bios-linker-loader.o
CC hw/acpi/aml-build.o
CC hw/acpi/ipmi.o
CC hw/audio/sb16.o
CC hw/audio/es1370.o
CC hw/audio/ac97.o
CC hw/audio/fmopl.o
CC hw/audio/adlib.o
CC hw/audio/gus.o
CC hw/audio/gusemu_hal.o
CC hw/audio/gusemu_mixer.o
CC hw/audio/cs4231a.o
CC hw/audio/intel-hda.o
CC hw/audio/hda-codec.o
CC hw/audio/pcspk.o
CC hw/audio/wm8750.o
CC hw/audio/pl041.o
CC hw/audio/lm4549.o
CC hw/audio/marvell_88w8618.o
CC hw/block/block.o
CC hw/block/cdrom.o
CC hw/block/hd-geometry.o
CC hw/block/fdc.o
CC hw/block/m25p80.o
CC hw/block/nand.o
CC hw/block/pflash_cfi01.o
CC hw/block/pflash_cfi02.o
CC hw/block/ecc.o
CC hw/block/onenand.o
CC hw/block/nvme.o
CC hw/bt/core.o
CC hw/bt/l2cap.o
CC hw/bt/sdp.o
CC hw/bt/hci.o
CC hw/bt/hid.o
CC hw/bt/hci-csr.o
CC hw/char/ipoctal232.o
CC hw/char/parallel.o
CC hw/char/pl011.o
CC hw/char/serial.o
CC hw/char/serial-isa.o
CC hw/char/serial-pci.o
CC hw/char/virtio-console.o
CC hw/char/cadence_uart.o
CC hw/char/debugcon.o
CC hw/char/imx_serial.o
CC hw/core/qdev.o
CC hw/core/qdev-properties.o
CC hw/core/bus.o
CC hw/core/fw-path-provider.o
CC hw/core/irq.o
CC hw/core/hotplug.o
CC hw/core/ptimer.o
CC hw/core/sysbus.o
CC hw/core/machine.o
CC hw/core/null-machine.o
CC hw/core/loader.o
CC hw/core/qdev-properties-system.o
CC hw/core/register.o
CC hw/core/platform-bus.o
CC hw/display/ads7846.o
CC hw/display/cirrus_vga.o
CC hw/display/pl110.o
CC hw/display/ssd0303.o
CC hw/display/ssd0323.o
CC hw/display/vga-pci.o
CC hw/display/vga-isa.o
CC hw/display/vmware_vga.o
CC hw/display/blizzard.o
CC hw/display/exynos4210_fimd.o
CC hw/display/framebuffer.o
CC hw/display/tc6393xb.o
CC hw/dma/pl080.o
CC hw/dma/pl330.o
CC hw/dma/i8257.o
CC hw/dma/xlnx-zynq-devcfg.o
CC hw/gpio/max7310.o
CC hw/gpio/pl061.o
CC hw/gpio/zaurus.o
CC hw/gpio/gpio_key.o
CC hw/i2c/core.o
CC hw/i2c/smbus.o
CC hw/i2c/smbus_eeprom.o
CC hw/i2c/i2c-ddc.o
CC hw/i2c/versatile_i2c.o
CC hw/i2c/smbus_ich9.o
CC hw/i2c/pm_smbus.o
CC hw/i2c/bitbang_i2c.o
CC hw/i2c/exynos4210_i2c.o
CC hw/i2c/imx_i2c.o
CC hw/i2c/aspeed_i2c.o
CC hw/ide/core.o
CC hw/ide/atapi.o
CC hw/ide/qdev.o
CC hw/ide/pci.o
CC hw/ide/isa.o
CC hw/ide/piix.o
CC hw/ide/microdrive.o
CC hw/ide/ahci.o
CC hw/input/hid.o
CC hw/ide/ich.o
CC hw/input/lm832x.o
CC hw/input/pckbd.o
CC hw/input/pl050.o
CC hw/input/ps2.o
CC hw/input/stellaris_input.o
CC hw/input/tsc2005.o
CC hw/input/vmmouse.o
CC hw/input/virtio-input.o
CC hw/input/virtio-input-hid.o
CC hw/input/virtio-input-host.o
CC hw/intc/i8259_common.o
CC hw/intc/i8259.o
CC hw/intc/pl190.o
CC hw/intc/imx_avic.o
CC hw/intc/realview_gic.o
CC hw/intc/ioapic_common.o
CC hw/intc/arm_gic_common.o
CC hw/intc/arm_gic.o
CC hw/intc/arm_gicv2m.o
CC hw/intc/arm_gicv3_common.o
CC hw/intc/arm_gicv3.o
CC hw/intc/arm_gicv3_redist.o
CC hw/intc/arm_gicv3_dist.o
CC hw/ipack/ipack.o
CC hw/ipack/tpci200.o
CC hw/ipmi/ipmi.o
CC hw/ipmi/ipmi_bmc_sim.o
CC hw/ipmi/ipmi_bmc_extern.o
CC hw/ipmi/isa_ipmi_kcs.o
CC hw/ipmi/isa_ipmi_bt.o
CC hw/isa/isa-bus.o
CC hw/isa/apm.o
CC hw/mem/pc-dimm.o
CC hw/mem/nvdimm.o
CC hw/misc/applesmc.o
CC hw/misc/max111x.o
CC hw/misc/tmp105.o
CC hw/misc/debugexit.o
CC hw/misc/sga.o
CC hw/misc/pc-testdev.o
CC hw/misc/pci-testdev.o
CC hw/misc/arm_l2x0.o
CC hw/misc/arm_integrator_debug.o
CC hw/misc/a9scu.o
CC hw/misc/arm11scu.o
CC hw/net/ne2000.o
CC hw/net/eepro100.o
CC hw/net/pcnet-pci.o
CC hw/net/pcnet.o
CC hw/net/e1000.o
CC hw/net/e1000x_common.o
CC hw/net/net_tx_pkt.o
CC hw/net/net_rx_pkt.o
CC hw/net/e1000e.o
CC hw/net/e1000e_core.o
CC hw/net/rtl8139.o
CC hw/net/vmxnet3.o
CC hw/net/smc91c111.o
CC hw/net/lan9118.o
CC hw/net/ne2000-isa.o
CC hw/net/xgmac.o
CC hw/net/allwinner_emac.o
CC hw/net/imx_fec.o
CC hw/net/cadence_gem.o
CC hw/net/stellaris_enet.o
CC hw/net/rocker/rocker.o
CC hw/net/rocker/rocker_fp.o
CC hw/net/rocker/rocker_desc.o
CC hw/net/rocker/rocker_world.o
CC hw/net/rocker/rocker_of_dpa.o
CC hw/nvram/eeprom93xx.o
CC hw/nvram/fw_cfg.o
CC hw/pci-bridge/pci_bridge_dev.o
CC hw/pci-bridge/pci_expander_bridge.o
CC hw/pci-bridge/xio3130_upstream.o
CC hw/pci-bridge/xio3130_downstream.o
CC hw/pci-bridge/ioh3420.o
CC hw/pci-bridge/i82801b11.o
CC hw/pci-host/pam.o
CC hw/pci-host/versatile.o
CC hw/pci-host/piix.o
CC hw/pci-host/q35.o
CC hw/pci-host/gpex.o
CC hw/pci/pci.o
CC hw/pci/pci_bridge.o
CC hw/pci/msix.o
CC hw/pci/msi.o
CC hw/pci/shpc.o
CC hw/pci/slotid_cap.o
CC hw/pci/pci_host.o
CC hw/pci/pcie_host.o
CC hw/pci/pcie.o
CC hw/pci/pcie_aer.o
CC hw/pci/pcie_port.o
CC hw/pci/pci-stub.o
CC hw/pcmcia/pcmcia.o
CC hw/scsi/scsi-disk.o
CC hw/scsi/scsi-generic.o
/tmp/qemu-test/src/hw/nvram/fw_cfg.c: In function ‘fw_cfg_dma_transfer’:
/tmp/qemu-test/src/hw/nvram/fw_cfg.c:330: warning: ‘read’ may be used uninitialized in this function
CC hw/scsi/scsi-bus.o
CC hw/scsi/lsi53c895a.o
CC hw/scsi/mptsas.o
CC hw/scsi/mptconfig.o
CC hw/scsi/mptendian.o
CC hw/scsi/megasas.o
CC hw/scsi/vmw_pvscsi.o
CC hw/scsi/esp.o
CC hw/scsi/esp-pci.o
CC hw/sd/pl181.o
CC hw/sd/ssi-sd.o
CC hw/sd/sd.o
CC hw/sd/core.o
CC hw/sd/sdhci.o
CC hw/smbios/smbios.o
CC hw/smbios/smbios_type_38.o
CC hw/ssi/pl022.o
CC hw/ssi/ssi.o
CC hw/ssi/xilinx_spips.o
CC hw/ssi/aspeed_smc.o
CC hw/timer/arm_timer.o
CC hw/timer/arm_mptimer.o
CC hw/timer/a9gtimer.o
CC hw/timer/cadence_ttc.o
CC hw/timer/ds1338.o
CC hw/timer/hpet.o
CC hw/timer/i8254_common.o
CC hw/timer/i8254.o
CC hw/timer/pl031.o
CC hw/timer/twl92230.o
CC hw/timer/imx_epit.o
CC hw/timer/imx_gpt.o
CC hw/timer/stm32f2xx_timer.o
CC hw/timer/aspeed_timer.o
CC hw/tpm/tpm_tis.o
CC hw/tpm/tpm_passthrough.o
CC hw/tpm/tpm_util.o
CC hw/usb/core.o
CC hw/usb/combined-packet.o
CC hw/usb/bus.o
CC hw/usb/libhw.o
CC hw/usb/desc.o
CC hw/usb/desc-msos.o
CC hw/usb/hcd-uhci.o
CC hw/usb/hcd-ohci.o
CC hw/usb/hcd-ehci.o
CC hw/usb/hcd-ehci-pci.o
CC hw/usb/hcd-ehci-sysbus.o
CC hw/usb/hcd-xhci.o
CC hw/usb/hcd-musb.o
CC hw/usb/dev-hub.o
CC hw/usb/dev-hid.o
CC hw/usb/dev-wacom.o
CC hw/usb/dev-storage.o
CC hw/usb/dev-uas.o
CC hw/usb/dev-audio.o
CC hw/usb/dev-serial.o
CC hw/usb/dev-network.o
CC hw/usb/dev-bluetooth.o
CC hw/usb/dev-smartcard-reader.o
CC hw/usb/dev-mtp.o
CC hw/usb/host-stub.o
CC hw/virtio/virtio-rng.o
CC hw/virtio/virtio-pci.o
CC hw/virtio/virtio-bus.o
CC hw/virtio/virtio-mmio.o
CC hw/watchdog/watchdog.o
CC hw/watchdog/wdt_i6300esb.o
CC hw/watchdog/wdt_ib700.o
CC migration/migration.o
CC migration/socket.o
CC migration/fd.o
CC migration/exec.o
CC migration/tls.o
CC migration/vmstate.o
CC migration/qemu-file.o
CC migration/qemu-file-channel.o
CC migration/xbzrle.o
CC migration/postcopy-ram.o
CC migration/qjson.o
CC migration/block.o
CC net/net.o
CC net/queue.o
CC net/checksum.o
CC net/util.o
CC net/hub.o
CC net/socket.o
CC net/dump.o
CC net/eth.o
CC net/l2tpv3.o
CC net/tap.o
CC net/vhost-user.o
CC net/tap-linux.o
CC net/slirp.o
CC net/filter.o
CC net/filter-buffer.o
CC net/filter-mirror.o
CC qom/cpu.o
CC replay/replay.o
CC replay/replay-internal.o
CC replay/replay-events.o
CC replay/replay-input.o
CC replay/replay-time.o
CC replay/replay-char.o
CC slirp/cksum.o
CC slirp/if.o
CC slirp/ip_icmp.o
CC slirp/ip6_icmp.o
CC slirp/ip6_output.o
CC slirp/ip6_input.o
CC slirp/ip_input.o
CC slirp/ip_output.o
CC slirp/dnssearch.o
/tmp/qemu-test/src/replay/replay-internal.c: In function ‘replay_put_array’:
/tmp/qemu-test/src/replay/replay-internal.c:68: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
CC slirp/dhcpv6.o
CC slirp/slirp.o
CC slirp/mbuf.o
CC slirp/misc.o
CC slirp/sbuf.o
CC slirp/socket.o
CC slirp/tcp_input.o
CC slirp/tcp_output.o
CC slirp/tcp_subr.o
CC slirp/tcp_timer.o
/tmp/qemu-test/src/slirp/tcp_input.c: In function ‘tcp_input’:
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_p’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_len’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_tos’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_id’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_off’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_ttl’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_sum’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_src.s_addr’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_dst.s_addr’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:220: warning: ‘save_ip6.ip_nh’ may be used uninitialized in this function
CC slirp/udp6.o
CC slirp/udp.o
CC slirp/bootp.o
CC slirp/tftp.o
CC slirp/arp_table.o
CC slirp/ndp_table.o
CC ui/keymaps.o
CC ui/console.o
CC ui/cursor.o
CC ui/qemu-pixman.o
CC ui/input.o
CC ui/input-keymap.o
CC ui/input-legacy.o
CC ui/input-linux.o
CC ui/sdl.o
CC ui/sdl_zoom.o
CC ui/x_keymap.o
CC ui/vnc.o
CC ui/vnc-enc-zlib.o
CC ui/vnc-enc-hextile.o
CC ui/vnc-enc-tight.o
CC ui/vnc-palette.o
CC ui/vnc-enc-zrle.o
CC ui/vnc-auth-vencrypt.o
CC ui/vnc-ws.o
CC ui/vnc-jobs.o
LINK tests/qemu-iotests/socket_scm_helper
CC qga/commands.o
CC qga/guest-agent-command-state.o
CC qga/main.o
CC qga/commands-posix.o
CC qga/channel-posix.o
CC qga/qapi-generated/qga-qapi-types.o
CC qga/qapi-generated/qga-qapi-visit.o
CC qmp-introspect.o
CC qga/qapi-generated/qga-qmp-marshal.o
CC qapi-types.o
AS optionrom/multiboot.o
AS optionrom/linuxboot.o
CC optionrom/linuxboot_dma.o
CC qapi-visit.o
AS optionrom/kvmvapic.o
cc: unrecognized option '-no-integrated-as'
cc: unrecognized option '-no-integrated-as'
CC qapi-event.o
Building optionrom/linuxboot_dma.img
Building optionrom/multiboot.img
AR libqemustub.a
CC qemu-img.o
Building optionrom/linuxboot.img
Building optionrom/linuxboot_dma.raw
Building optionrom/kvmvapic.img
CC qmp-marshal.o
Building optionrom/multiboot.raw
Building optionrom/linuxboot.raw
Signing optionrom/linuxboot_dma.bin
CC trace/generated-events.o
Building optionrom/kvmvapic.raw
Signing optionrom/multiboot.bin
Signing optionrom/linuxboot.bin
Signing optionrom/kvmvapic.bin
AR libqemuutil.a
LINK qemu-ga
LINK ivshmem-client
LINK ivshmem-server
LINK qemu-nbd
LINK qemu-io
LINK qemu-bridge-helper
LINK qemu-img
GEN x86_64-softmmu/hmp-commands.h
GEN x86_64-softmmu/hmp-commands-info.h
GEN x86_64-softmmu/qmp-commands-old.h
GEN x86_64-softmmu/config-target.h
GEN aarch64-softmmu/hmp-commands.h
GEN aarch64-softmmu/hmp-commands-info.h
GEN aarch64-softmmu/qmp-commands-old.h
GEN aarch64-softmmu/config-target.h
CC x86_64-softmmu/exec.o
CC x86_64-softmmu/translate-all.o
CC x86_64-softmmu/cpu-exec.o
CC x86_64-softmmu/translate-common.o
CC x86_64-softmmu/cpu-exec-common.o
CC x86_64-softmmu/tcg/tcg.o
CC x86_64-softmmu/tcg/tcg-op.o
CC x86_64-softmmu/tcg/optimize.o
CC x86_64-softmmu/tcg/tcg-common.o
CC x86_64-softmmu/fpu/softfloat.o
CC x86_64-softmmu/disas.o
CC x86_64-softmmu/arch_init.o
CC x86_64-softmmu/cpus.o
CC aarch64-softmmu/exec.o
CC x86_64-softmmu/monitor.o
CC x86_64-softmmu/gdbstub.o
CC x86_64-softmmu/balloon.o
CC x86_64-softmmu/ioport.o
CC aarch64-softmmu/translate-all.o
CC x86_64-softmmu/numa.o
CC aarch64-softmmu/cpu-exec.o
CC aarch64-softmmu/translate-common.o
CC aarch64-softmmu/cpu-exec-common.o
CC aarch64-softmmu/tcg/tcg.o
CC aarch64-softmmu/tcg/tcg-op.o
CC aarch64-softmmu/tcg/optimize.o
CC aarch64-softmmu/tcg/tcg-common.o
CC aarch64-softmmu/fpu/softfloat.o
CC aarch64-softmmu/disas.o
GEN aarch64-softmmu/gdbstub-xml.c
CC aarch64-softmmu/kvm-stub.o
CC aarch64-softmmu/arch_init.o
CC aarch64-softmmu/cpus.o
CC x86_64-softmmu/qtest.o
CC x86_64-softmmu/bootdevice.o
CC aarch64-softmmu/monitor.o
CC x86_64-softmmu/kvm-all.o
CC aarch64-softmmu/gdbstub.o
CC x86_64-softmmu/memory.o
CC x86_64-softmmu/cputlb.o
CC aarch64-softmmu/balloon.o
CC aarch64-softmmu/ioport.o
CC x86_64-softmmu/memory_mapping.o
CC aarch64-softmmu/numa.o
CC x86_64-softmmu/dump.o
CC x86_64-softmmu/migration/ram.o
CC x86_64-softmmu/migration/savevm.o
CC x86_64-softmmu/xen-common-stub.o
CC aarch64-softmmu/qtest.o
CC x86_64-softmmu/xen-hvm-stub.o
CC aarch64-softmmu/bootdevice.o
CC x86_64-softmmu/hw/acpi/nvdimm.o
CC aarch64-softmmu/memory.o
CC x86_64-softmmu/hw/block/virtio-blk.o
CC aarch64-softmmu/cputlb.o
CC aarch64-softmmu/memory_mapping.o
CC aarch64-softmmu/dump.o
CC x86_64-softmmu/hw/block/dataplane/virtio-blk.o
CC aarch64-softmmu/migration/ram.o
CC aarch64-softmmu/migration/savevm.o
CC aarch64-softmmu/xen-common-stub.o
CC aarch64-softmmu/xen-hvm-stub.o
CC aarch64-softmmu/hw/block/virtio-blk.o
CC x86_64-softmmu/hw/char/virtio-serial-bus.o
CC x86_64-softmmu/hw/core/nmi.o
CC aarch64-softmmu/hw/block/dataplane/virtio-blk.o
CC x86_64-softmmu/hw/cpu/core.o
CC x86_64-softmmu/hw/display/vga.o
CC x86_64-softmmu/hw/display/virtio-gpu.o
CC aarch64-softmmu/hw/char/exynos4210_uart.o
CC x86_64-softmmu/hw/display/virtio-gpu-3d.o
CC aarch64-softmmu/hw/char/omap_uart.o
CC x86_64-softmmu/hw/display/virtio-gpu-pci.o
CC aarch64-softmmu/hw/char/digic-uart.o
CC x86_64-softmmu/hw/display/virtio-vga.o
CC aarch64-softmmu/hw/char/stm32f2xx_usart.o
CC x86_64-softmmu/hw/intc/apic.o
CC aarch64-softmmu/hw/char/bcm2835_aux.o
CC aarch64-softmmu/hw/char/virtio-serial-bus.o
CC aarch64-softmmu/hw/core/nmi.o
CC aarch64-softmmu/hw/cpu/arm11mpcore.o
CC aarch64-softmmu/hw/cpu/realview_mpcore.o
CC aarch64-softmmu/hw/cpu/a9mpcore.o
CC aarch64-softmmu/hw/cpu/a15mpcore.o
CC aarch64-softmmu/hw/cpu/core.o
CC aarch64-softmmu/hw/display/omap_dss.o
CC aarch64-softmmu/hw/display/omap_lcdc.o
CC x86_64-softmmu/hw/intc/apic_common.o
CC aarch64-softmmu/hw/display/pxa2xx_lcd.o
CC x86_64-softmmu/hw/intc/ioapic.o
CC x86_64-softmmu/hw/isa/lpc_ich9.o
CC x86_64-softmmu/hw/misc/vmport.o
CC x86_64-softmmu/hw/misc/ivshmem.o
CC aarch64-softmmu/hw/display/bcm2835_fb.o
CC aarch64-softmmu/hw/display/vga.o
CC aarch64-softmmu/hw/display/virtio-gpu.o
CC x86_64-softmmu/hw/misc/pvpanic.o
CC aarch64-softmmu/hw/display/virtio-gpu-3d.o
CC x86_64-softmmu/hw/misc/edu.o
CC x86_64-softmmu/hw/misc/hyperv_testdev.o
CC x86_64-softmmu/hw/net/virtio-net.o
CC aarch64-softmmu/hw/display/virtio-gpu-pci.o
CC x86_64-softmmu/hw/net/vhost_net.o
CC x86_64-softmmu/hw/scsi/virtio-scsi.o
CC aarch64-softmmu/hw/display/dpcd.o
CC aarch64-softmmu/hw/display/xlnx_dp.o
CC aarch64-softmmu/hw/dma/xlnx_dpdma.o
CC x86_64-softmmu/hw/scsi/virtio-scsi-dataplane.o
CC aarch64-softmmu/hw/dma/omap_dma.o
CC aarch64-softmmu/hw/dma/soc_dma.o
CC x86_64-softmmu/hw/scsi/vhost-scsi.o
CC aarch64-softmmu/hw/dma/pxa2xx_dma.o
CC aarch64-softmmu/hw/dma/bcm2835_dma.o
CC x86_64-softmmu/hw/timer/mc146818rtc.o
CC aarch64-softmmu/hw/gpio/omap_gpio.o
CC aarch64-softmmu/hw/gpio/imx_gpio.o
CC aarch64-softmmu/hw/i2c/omap_i2c.o
CC x86_64-softmmu/hw/vfio/common.o
CC x86_64-softmmu/hw/vfio/pci.o
CC x86_64-softmmu/hw/vfio/pci-quirks.o
CC aarch64-softmmu/hw/input/pxa2xx_keypad.o
CC x86_64-softmmu/hw/vfio/platform.o
CC x86_64-softmmu/hw/vfio/calxeda-xgmac.o
CC aarch64-softmmu/hw/input/tsc210x.o
CC aarch64-softmmu/hw/intc/armv7m_nvic.o
CC x86_64-softmmu/hw/vfio/amd-xgbe.o
CC aarch64-softmmu/hw/intc/exynos4210_gic.o
CC x86_64-softmmu/hw/vfio/spapr.o
CC aarch64-softmmu/hw/intc/exynos4210_combiner.o
CC x86_64-softmmu/hw/virtio/virtio.o
CC aarch64-softmmu/hw/intc/omap_intc.o
CC aarch64-softmmu/hw/intc/bcm2835_ic.o
CC x86_64-softmmu/hw/virtio/virtio-balloon.o
CC aarch64-softmmu/hw/intc/bcm2836_control.o
CC x86_64-softmmu/hw/virtio/vhost.o
CC x86_64-softmmu/hw/virtio/vhost-backend.o
CC aarch64-softmmu/hw/intc/allwinner-a10-pic.o
CC x86_64-softmmu/hw/virtio/vhost-user.o
CC x86_64-softmmu/hw/i386/multiboot.o
CC x86_64-softmmu/hw/i386/pc.o
CC aarch64-softmmu/hw/intc/aspeed_vic.o
CC aarch64-softmmu/hw/intc/arm_gicv3_cpuif.o
CC aarch64-softmmu/hw/misc/ivshmem.o
CC aarch64-softmmu/hw/misc/arm_sysctl.o
CC x86_64-softmmu/hw/i386/pc_piix.o
CC x86_64-softmmu/hw/i386/pc_q35.o
CC aarch64-softmmu/hw/misc/cbus.o
CC aarch64-softmmu/hw/misc/exynos4210_pmu.o
CC x86_64-softmmu/hw/i386/pc_sysfw.o
CC x86_64-softmmu/hw/i386/x86-iommu.o
CC x86_64-softmmu/hw/i386/intel_iommu.o
CC x86_64-softmmu/hw/i386/kvmvapic.o
CC x86_64-softmmu/hw/i386/acpi-build.o
CC x86_64-softmmu/hw/i386/pci-assign-load-rom.o
CC aarch64-softmmu/hw/misc/imx_ccm.o
CC aarch64-softmmu/hw/misc/imx31_ccm.o
CC aarch64-softmmu/hw/misc/imx25_ccm.o
CC x86_64-softmmu/hw/i386/kvm/clock.o
CC aarch64-softmmu/hw/misc/imx6_ccm.o
CC aarch64-softmmu/hw/misc/imx6_src.o
CC x86_64-softmmu/hw/i386/kvm/apic.o
CC x86_64-softmmu/hw/i386/kvm/i8259.o
CC x86_64-softmmu/hw/i386/kvm/ioapic.o
CC aarch64-softmmu/hw/misc/mst_fpga.o
/tmp/qemu-test/src/hw/i386/pc_piix.c: In function ‘igd_passthrough_isa_bridge_create’:
/tmp/qemu-test/src/hw/i386/pc_piix.c:1037: warning: ‘pch_rev_id’ may be used uninitialized in this function
CC aarch64-softmmu/hw/misc/omap_clk.o
CC x86_64-softmmu/hw/i386/kvm/i8254.o
CC x86_64-softmmu/hw/i386/kvm/pci-assign.o
CC aarch64-softmmu/hw/misc/omap_gpmc.o
CC x86_64-softmmu/target-i386/translate.o
CC aarch64-softmmu/hw/misc/omap_l4.o
CC x86_64-softmmu/target-i386/helper.o
CC aarch64-softmmu/hw/misc/omap_sdrc.o
CC x86_64-softmmu/target-i386/cpu.o
CC aarch64-softmmu/hw/misc/omap_tap.o
CC aarch64-softmmu/hw/misc/bcm2835_mbox.o
CC aarch64-softmmu/hw/misc/bcm2835_property.o
CC aarch64-softmmu/hw/misc/zynq_slcr.o
CC aarch64-softmmu/hw/misc/zynq-xadc.o
CC x86_64-softmmu/target-i386/bpt_helper.o
CC x86_64-softmmu/target-i386/excp_helper.o
CC aarch64-softmmu/hw/misc/stm32f2xx_syscfg.o
CC aarch64-softmmu/hw/misc/edu.o
CC aarch64-softmmu/hw/misc/auxbus.o
CC aarch64-softmmu/hw/misc/aspeed_scu.o
CC aarch64-softmmu/hw/net/virtio-net.o
CC aarch64-softmmu/hw/net/vhost_net.o
CC x86_64-softmmu/target-i386/fpu_helper.o
/tmp/qemu-test/src/hw/i386/acpi-build.c: In function ‘build_append_pci_bus_devices’:
/tmp/qemu-test/src/hw/i386/acpi-build.c:471: warning: ‘notify_method’ may be used uninitialized in this function
CC aarch64-softmmu/hw/pcmcia/pxa2xx.o
CC x86_64-softmmu/target-i386/cc_helper.o
CC aarch64-softmmu/hw/scsi/virtio-scsi.o
CC aarch64-softmmu/hw/scsi/virtio-scsi-dataplane.o
CC x86_64-softmmu/target-i386/int_helper.o
CC x86_64-softmmu/target-i386/svm_helper.o
CC x86_64-softmmu/target-i386/smm_helper.o
CC x86_64-softmmu/target-i386/misc_helper.o
CC aarch64-softmmu/hw/scsi/vhost-scsi.o
CC x86_64-softmmu/target-i386/mem_helper.o
CC aarch64-softmmu/hw/sd/omap_mmc.o
CC aarch64-softmmu/hw/sd/pxa2xx_mmci.o
CC aarch64-softmmu/hw/ssi/omap_spi.o
CC aarch64-softmmu/hw/ssi/imx_spi.o
CC aarch64-softmmu/hw/timer/exynos4210_mct.o
CC aarch64-softmmu/hw/timer/exynos4210_pwm.o
CC aarch64-softmmu/hw/timer/exynos4210_rtc.o
CC aarch64-softmmu/hw/timer/omap_gptimer.o
CC aarch64-softmmu/hw/timer/omap_synctimer.o
CC x86_64-softmmu/target-i386/seg_helper.o
CC x86_64-softmmu/target-i386/mpx_helper.o
CC aarch64-softmmu/hw/timer/pxa2xx_timer.o
CC x86_64-softmmu/target-i386/gdbstub.o
CC x86_64-softmmu/target-i386/machine.o
CC x86_64-softmmu/target-i386/arch_memory_mapping.o
CC aarch64-softmmu/hw/timer/digic-timer.o
CC aarch64-softmmu/hw/timer/allwinner-a10-pit.o
CC x86_64-softmmu/target-i386/arch_dump.o
CC x86_64-softmmu/target-i386/monitor.o
CC x86_64-softmmu/target-i386/kvm.o
CC x86_64-softmmu/target-i386/hyperv.o
CC aarch64-softmmu/hw/usb/tusb6010.o
CC aarch64-softmmu/hw/vfio/common.o
CC aarch64-softmmu/hw/vfio/pci.o
CC aarch64-softmmu/hw/vfio/pci-quirks.o
CC aarch64-softmmu/hw/vfio/platform.o
CC aarch64-softmmu/hw/vfio/calxeda-xgmac.o
CC aarch64-softmmu/hw/vfio/amd-xgbe.o
CC aarch64-softmmu/hw/vfio/spapr.o
GEN trace/generated-helpers.c
CC aarch64-softmmu/hw/virtio/virtio.o
CC aarch64-softmmu/hw/virtio/virtio-balloon.o
CC x86_64-softmmu/trace/control-target.o
CC aarch64-softmmu/hw/virtio/vhost.o
CC aarch64-softmmu/hw/virtio/vhost-backend.o
CC aarch64-softmmu/hw/virtio/vhost-user.o
CC aarch64-softmmu/hw/arm/boot.o
CC aarch64-softmmu/hw/arm/collie.o
CC aarch64-softmmu/hw/arm/exynos4_boards.o
CC aarch64-softmmu/hw/arm/gumstix.o
CC aarch64-softmmu/hw/arm/highbank.o
CC aarch64-softmmu/hw/arm/digic_boards.o
CC aarch64-softmmu/hw/arm/integratorcp.o
CC aarch64-softmmu/hw/arm/mainstone.o
CC aarch64-softmmu/hw/arm/musicpal.o
CC aarch64-softmmu/hw/arm/nseries.o
CC aarch64-softmmu/hw/arm/omap_sx1.o
CC aarch64-softmmu/hw/arm/palm.o
CC x86_64-softmmu/trace/generated-helpers.o
CC aarch64-softmmu/hw/arm/realview.o
CC aarch64-softmmu/hw/arm/spitz.o
LINK x86_64-softmmu/qemu-system-x86_64
CC aarch64-softmmu/hw/arm/stellaris.o
CC aarch64-softmmu/hw/arm/tosa.o
CC aarch64-softmmu/hw/arm/versatilepb.o
CC aarch64-softmmu/hw/arm/vexpress.o
CC aarch64-softmmu/hw/arm/virt.o
CC aarch64-softmmu/hw/arm/xilinx_zynq.o
CC aarch64-softmmu/hw/arm/z2.o
CC aarch64-softmmu/hw/arm/virt-acpi-build.o
CC aarch64-softmmu/hw/arm/netduino2.o
CC aarch64-softmmu/hw/arm/sysbus-fdt.o
CC aarch64-softmmu/hw/arm/armv7m.o
CC aarch64-softmmu/hw/arm/exynos4210.o
CC aarch64-softmmu/hw/arm/pxa2xx.o
CC aarch64-softmmu/hw/arm/pxa2xx_gpio.o
CC aarch64-softmmu/hw/arm/pxa2xx_pic.o
CC aarch64-softmmu/hw/arm/digic.o
CC aarch64-softmmu/hw/arm/omap1.o
CC aarch64-softmmu/hw/arm/omap2.o
CC aarch64-softmmu/hw/arm/strongarm.o
CC aarch64-softmmu/hw/arm/allwinner-a10.o
CC aarch64-softmmu/hw/arm/cubieboard.o
CC aarch64-softmmu/hw/arm/bcm2835_peripherals.o
CC aarch64-softmmu/hw/arm/bcm2836.o
CC aarch64-softmmu/hw/arm/raspi.o
CC aarch64-softmmu/hw/arm/stm32f205_soc.o
CC aarch64-softmmu/hw/arm/xlnx-zynqmp.o
CC aarch64-softmmu/hw/arm/xlnx-ep108.o
CC aarch64-softmmu/hw/arm/fsl-imx25.o
CC aarch64-softmmu/hw/arm/imx25_pdk.o
CC aarch64-softmmu/hw/arm/fsl-imx31.o
CC aarch64-softmmu/hw/arm/kzm.o
CC aarch64-softmmu/hw/arm/fsl-imx6.o
CC aarch64-softmmu/hw/arm/sabrelite.o
CC aarch64-softmmu/hw/arm/ast2400.o
CC aarch64-softmmu/hw/arm/palmetto-bmc.o
CC aarch64-softmmu/target-arm/arm-semi.o
CC aarch64-softmmu/target-arm/machine.o
CC aarch64-softmmu/target-arm/psci.o
CC aarch64-softmmu/target-arm/arch_dump.o
CC aarch64-softmmu/target-arm/monitor.o
CC aarch64-softmmu/target-arm/kvm-stub.o
CC aarch64-softmmu/target-arm/translate.o
CC aarch64-softmmu/target-arm/op_helper.o
CC aarch64-softmmu/target-arm/helper.o
CC aarch64-softmmu/target-arm/cpu.o
CC aarch64-softmmu/target-arm/neon_helper.o
CC aarch64-softmmu/target-arm/iwmmxt_helper.o
CC aarch64-softmmu/target-arm/gdbstub.o
CC aarch64-softmmu/target-arm/cpu64.o
CC aarch64-softmmu/target-arm/translate-a64.o
CC aarch64-softmmu/target-arm/helper-a64.o
/tmp/qemu-test/src/target-arm/translate-a64.c: In function ‘handle_shri_with_rndacc’:
/tmp/qemu-test/src/target-arm/translate-a64.c:6308: warning: ‘tcg_src_hi’ may be used uninitialized in this function
/tmp/qemu-test/src/target-arm/translate-a64.c: In function ‘disas_simd_scalar_two_reg_misc’:
/tmp/qemu-test/src/target-arm/translate-a64.c:8035: warning: ‘rmode’ may be used uninitialized in this function
CC aarch64-softmmu/target-arm/gdbstub64.o
CC aarch64-softmmu/target-arm/crypto_helper.o
CC aarch64-softmmu/target-arm/arm-powerctl.o
GEN trace/generated-helpers.c
CC aarch64-softmmu/trace/control-target.o
CC aarch64-softmmu/gdbstub-xml.o
CC aarch64-softmmu/trace/generated-helpers.o
LINK aarch64-softmmu/qemu-system-aarch64
TEST tests/qapi-schema/alternate-any.out
TEST tests/qapi-schema/alternate-array.out
TEST tests/qapi-schema/alternate-base.out
TEST tests/qapi-schema/alternate-clash.out
TEST tests/qapi-schema/alternate-conflict-dict.out
TEST tests/qapi-schema/alternate-conflict-string.out
TEST tests/qapi-schema/alternate-empty.out
TEST tests/qapi-schema/alternate-nested.out
TEST tests/qapi-schema/alternate-unknown.out
TEST tests/qapi-schema/args-alternate.out
TEST tests/qapi-schema/args-any.out
TEST tests/qapi-schema/args-array-empty.out
TEST tests/qapi-schema/args-array-unknown.out
TEST tests/qapi-schema/args-bad-boxed.out
TEST tests/qapi-schema/args-boxed-anon.out
TEST tests/qapi-schema/args-boxed-empty.out
TEST tests/qapi-schema/args-boxed-string.out
TEST tests/qapi-schema/args-int.out
TEST tests/qapi-schema/args-invalid.out
TEST tests/qapi-schema/args-member-array-bad.out
TEST tests/qapi-schema/args-member-case.out
TEST tests/qapi-schema/args-member-unknown.out
TEST tests/qapi-schema/args-name-clash.out
TEST tests/qapi-schema/args-union.out
TEST tests/qapi-schema/args-unknown.out
TEST tests/qapi-schema/bad-base.out
TEST tests/qapi-schema/bad-data.out
TEST tests/qapi-schema/bad-ident.out
TEST tests/qapi-schema/bad-type-bool.out
TEST tests/qapi-schema/bad-type-dict.out
TEST tests/qapi-schema/bad-type-int.out
TEST tests/qapi-schema/base-cycle-direct.out
TEST tests/qapi-schema/base-cycle-indirect.out
TEST tests/qapi-schema/command-int.out
TEST tests/qapi-schema/comments.out
TEST tests/qapi-schema/double-data.out
TEST tests/qapi-schema/double-type.out
TEST tests/qapi-schema/duplicate-key.out
TEST tests/qapi-schema/empty.out
TEST tests/qapi-schema/enum-bad-name.out
TEST tests/qapi-schema/enum-bad-prefix.out
TEST tests/qapi-schema/enum-clash-member.out
TEST tests/qapi-schema/enum-dict-member.out
TEST tests/qapi-schema/enum-int-member.out
TEST tests/qapi-schema/enum-member-case.out
TEST tests/qapi-schema/enum-missing-data.out
TEST tests/qapi-schema/enum-wrong-data.out
TEST tests/qapi-schema/escape-outside-string.out
TEST tests/qapi-schema/escape-too-big.out
TEST tests/qapi-schema/escape-too-short.out
TEST tests/qapi-schema/event-boxed-empty.out
TEST tests/qapi-schema/event-case.out
TEST tests/qapi-schema/event-nest-struct.out
TEST tests/qapi-schema/flat-union-array-branch.out
TEST tests/qapi-schema/flat-union-bad-base.out
TEST tests/qapi-schema/flat-union-bad-discriminator.out
TEST tests/qapi-schema/flat-union-base-any.out
TEST tests/qapi-schema/flat-union-base-union.out
TEST tests/qapi-schema/flat-union-clash-member.out
TEST tests/qapi-schema/flat-union-empty.out
TEST tests/qapi-schema/flat-union-incomplete-branch.out
TEST tests/qapi-schema/flat-union-inline.out
TEST tests/qapi-schema/flat-union-int-branch.out
TEST tests/qapi-schema/flat-union-invalid-branch-key.out
TEST tests/qapi-schema/flat-union-invalid-discriminator.out
TEST tests/qapi-schema/flat-union-no-base.out
TEST tests/qapi-schema/flat-union-optional-discriminator.out
TEST tests/qapi-schema/flat-union-string-discriminator.out
TEST tests/qapi-schema/funny-char.out
TEST tests/qapi-schema/ident-with-escape.out
TEST tests/qapi-schema/include-before-err.out
TEST tests/qapi-schema/include-cycle.out
TEST tests/qapi-schema/include-format-err.out
TEST tests/qapi-schema/include-nested-err.out
TEST tests/qapi-schema/include-no-file.out
TEST tests/qapi-schema/include-non-file.out
TEST tests/qapi-schema/include-relpath.out
TEST tests/qapi-schema/include-repetition.out
TEST tests/qapi-schema/include-self-cycle.out
TEST tests/qapi-schema/include-simple.out
TEST tests/qapi-schema/indented-expr.out
TEST tests/qapi-schema/leading-comma-list.out
TEST tests/qapi-schema/leading-comma-object.out
TEST tests/qapi-schema/missing-colon.out
TEST tests/qapi-schema/missing-comma-list.out
TEST tests/qapi-schema/missing-comma-object.out
TEST tests/qapi-schema/missing-type.out
TEST tests/qapi-schema/nested-struct-data.out
TEST tests/qapi-schema/non-objects.out
TEST tests/qapi-schema/qapi-schema-test.out
TEST tests/qapi-schema/quoted-structural-chars.out
TEST tests/qapi-schema/redefined-builtin.out
TEST tests/qapi-schema/redefined-command.out
TEST tests/qapi-schema/redefined-event.out
TEST tests/qapi-schema/redefined-type.out
TEST tests/qapi-schema/reserved-command-q.out
TEST tests/qapi-schema/reserved-enum-q.out
TEST tests/qapi-schema/reserved-member-has.out
TEST tests/qapi-schema/reserved-member-q.out
TEST tests/qapi-schema/reserved-member-u.out
TEST tests/qapi-schema/reserved-member-underscore.out
TEST tests/qapi-schema/reserved-type-kind.out
TEST tests/qapi-schema/reserved-type-list.out
TEST tests/qapi-schema/returns-alternate.out
TEST tests/qapi-schema/returns-array-bad.out
TEST tests/qapi-schema/returns-dict.out
TEST tests/qapi-schema/returns-unknown.out
TEST tests/qapi-schema/returns-whitelist.out
TEST tests/qapi-schema/struct-base-clash-deep.out
TEST tests/qapi-schema/struct-base-clash.out
TEST tests/qapi-schema/struct-data-invalid.out
TEST tests/qapi-schema/struct-member-invalid.out
TEST tests/qapi-schema/trailing-comma-list.out
TEST tests/qapi-schema/trailing-comma-object.out
TEST tests/qapi-schema/type-bypass-bad-gen.out
TEST tests/qapi-schema/unclosed-list.out
TEST tests/qapi-schema/unclosed-object.out
TEST tests/qapi-schema/unclosed-string.out
TEST tests/qapi-schema/unicode-str.out
TEST tests/qapi-schema/union-base-no-discriminator.out
TEST tests/qapi-schema/union-branch-case.out
TEST tests/qapi-schema/union-clash-branches.out
TEST tests/qapi-schema/union-empty.out
TEST tests/qapi-schema/union-invalid-base.out
TEST tests/qapi-schema/union-optional-branch.out
TEST tests/qapi-schema/union-unknown.out
TEST tests/qapi-schema/unknown-escape.out
TEST tests/qapi-schema/unknown-expr-key.out
CC tests/check-qdict.o
CC tests/check-qfloat.o
CC tests/check-qint.o
CC tests/check-qstring.o
CC tests/check-qlist.o
CC tests/check-qnull.o
CC tests/check-qjson.o
CC tests/test-qmp-output-visitor.o
GEN tests/test-qapi-visit.c
GEN tests/test-qapi-types.c
GEN tests/test-qapi-event.c
GEN tests/test-qmp-introspect.c
CC tests/test-clone-visitor.o
CC tests/test-qmp-input-visitor.o
CC tests/test-qmp-input-strict.o
CC tests/test-qmp-commands.o
GEN tests/test-qmp-marshal.c
CC tests/test-string-input-visitor.o
CC tests/test-string-output-visitor.o
CC tests/test-qmp-event.o
CC tests/test-opts-visitor.o
CC tests/test-coroutine.o
CC tests/test-visitor-serialization.o
CC tests/test-iov.o
CC tests/test-aio.o
CC tests/test-rfifolock.o
CC tests/test-throttle.o
CC tests/test-thread-pool.o
CC tests/test-hbitmap.o
CC tests/test-blockjob.o
CC tests/test-blockjob-txn.o
CC tests/test-x86-cpuid.o
CC tests/test-xbzrle.o
CC tests/test-vmstate.o
CC tests/test-cutils.o
CC tests/test-mul64.o
CC tests/test-int128.o
CC tests/rcutorture.o
CC tests/test-rcu-list.o
CC tests/test-qdist.o
CC tests/test-qht.o
CC tests/test-qht-par.o
/tmp/qemu-test/src/tests/test-int128.c:180: warning: ‘__noclone__’ attribute directive ignored
CC tests/qht-bench.o
CC tests/test-bitops.o
CC tests/check-qom-interface.o
CC tests/check-qom-proplist.o
CC tests/test-qemu-opts.o
CC tests/test-write-threshold.o
CC tests/test-crypto-hash.o
CC tests/test-crypto-cipher.o
CC tests/test-crypto-secret.o
CC tests/test-qga.o
CC tests/libqtest.o
CC tests/test-timed-average.o
CC tests/test-io-task.o
CC tests/test-io-channel-socket.o
CC tests/io-channel-helpers.o
CC tests/test-io-channel-file.o
CC tests/test-io-channel-command.o
CC tests/test-io-channel-buffer.o
CC tests/test-base64.o
CC tests/test-crypto-ivgen.o
CC tests/test-crypto-afsplit.o
CC tests/test-crypto-xts.o
CC tests/test-crypto-block.o
CC tests/test-logging.o
CC tests/test-uuid.o
CC tests/vhost-user-test.o
CC tests/endianness-test.o
CC tests/fdc-test.o
CC tests/ide-test.o
CC tests/libqos/pci.o
CC tests/libqos/fw_cfg.o
CC tests/libqos/malloc.o
/tmp/qemu-test/src/tests/ide-test.c: In function ‘cdrom_pio_impl’:
/tmp/qemu-test/src/tests/ide-test.c:739: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
/tmp/qemu-test/src/tests/ide-test.c: In function ‘test_cdrom_dma’:
/tmp/qemu-test/src/tests/ide-test.c:832: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
CC tests/libqos/i2c.o
CC tests/libqos/libqos.o
CC tests/libqos/pci-pc.o
CC tests/libqos/malloc-pc.o
CC tests/libqos/libqos-pc.o
CC tests/libqos/ahci.o
CC tests/ahci-test.o
CC tests/hd-geo-test.o
CC tests/boot-order-test.o
CC tests/bios-tables-test.o
CC tests/boot-sector.o
CC tests/pxe-test.o
CC tests/rtc-test.o
CC tests/ipmi-kcs-test.o
CC tests/ipmi-bt-test.o
/tmp/qemu-test/src/tests/boot-sector.c: In function ‘boot_sector_init’:
/tmp/qemu-test/src/tests/boot-sector.c:80: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
CC tests/i440fx-test.o
CC tests/fw_cfg-test.o
CC tests/drive_del-test.o
CC tests/wdt_ib700-test.o
CC tests/tco-test.o
CC tests/e1000-test.o
CC tests/e1000e-test.o
CC tests/rtl8139-test.o
CC tests/pcnet-test.o
CC tests/eepro100-test.o
CC tests/ne2000-test.o
CC tests/nvme-test.o
CC tests/ac97-test.o
CC tests/es1370-test.o
CC tests/virtio-net-test.o
CC tests/libqos/virtio.o
CC tests/libqos/virtio-pci.o
CC tests/libqos/virtio-mmio.o
CC tests/libqos/malloc-generic.o
CC tests/virtio-balloon-test.o
CC tests/virtio-blk-test.o
/tmp/qemu-test/src/tests/test-uuid.c:32: error: unknown field ‘data’ specified in initializer
/tmp/qemu-test/src/tests/test-uuid.c:33: warning: missing braces around initializer
/tmp/qemu-test/src/tests/test-uuid.c:33: warning: (near initialization for ‘uuid_test_data[0].uuid.<anonymous>.data’)
/tmp/qemu-test/src/tests/test-uuid.c:43: error: unknown field ‘data’ specified in initializer
/tmp/qemu-test/src/tests/test-uuid.c:50: error: unknown field ‘data’ specified in initializer
/tmp/qemu-test/src/tests/test-uuid.c: In function ‘test_uuid_is_null’:
/tmp/qemu-test/src/tests/test-uuid.c:104: error: unknown field ‘data’ specified in initializer
/tmp/qemu-test/src/tests/test-uuid.c:105: warning: missing braces around initializer
/tmp/qemu-test/src/tests/test-uuid.c:105: warning: (near initialization for ‘uuid_not_null.<anonymous>.data’)
/tmp/qemu-test/src/tests/test-uuid.c:108: error: unknown field ‘data’ specified in initializer
/tmp/qemu-test/src/tests/test-uuid.c:108: warning: missing braces around initializer
/tmp/qemu-test/src/tests/test-uuid.c:108: warning: (near initialization for ‘uuid_not_null_2.<anonymous>.data’)
make: *** [tests/test-uuid.o] Error 1
make: *** Waiting for unfinished jobs....
CC tests/virtio-rng-test.o
tests/docker/Makefile.include:104: recipe for target 'docker-run-test-quick@centos6' failed
make: *** [docker-run-test-quick@centos6] Error 1
=== OUTPUT END ===
Test command exited with code: 2
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v5 1/9] util: Add UUID API
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 1/9] util: Add UUID API Fam Zheng
@ 2016-08-12 6:24 ` Richard Henderson
2016-08-12 6:29 ` Fam Zheng
0 siblings, 1 reply; 13+ messages in thread
From: Richard Henderson @ 2016-08-12 6:24 UTC (permalink / raw)
To: Fam Zheng, qemu-devel
Cc: kwolf, qemu-block, sw, jcody, mdroth, armbru, pbonzini, mreitz
On 08/12/2016 05:52 AM, Fam Zheng wrote:
> +/* Version 4 UUID (pseudo random numbers), RFC4122 4.4. */
> +
> +typedef struct {
> + union {
> + unsigned char data[16];
> + struct {
> + /* Generated in BE endian, can be swapped with qemu_uuid_bswap. */
Nit: BE endian is redundant. big-endian or just BE, please.
> + uint32_t time_low;
> + uint16_t time_mid;
> + uint16_t time_high_and_version;
> + uint8_t clock_seq_and_reserved;
> + uint8_t clock_seq_low;
> + uint8_t node[6];
> + } fields;
> + };
> +} QemuUUID;
Wait, didn't you just tell me that you *couldn't* add this union because of the
packed usage within some file?
But of course if you're going to do this, you should actually use these fields,
> + /* Set the two most significant bits (bits 6 and 7) of the
> + clock_seq_hi_and_reserved to zero and one, respectively. */
> + uuid->data[8] = (uuid->data[8] & 0x3f) | 0x80;
> + /* Set the four most significant bits (bits 12 through 15) of the
> + time_hi_and_version field to the 4-bit version number.
> + */
> + uuid->data[6] = (uuid->data[6] & 0xf) | 0x40;
Here,
> +void qemu_uuid_bswap(QemuUUID *uuid)
> +{
> + assert(QEMU_IS_ALIGNED((uint64_t)uuid, sizeof(uint32_t)));
> + bswap32s(&uuid->fields.time_low);
> + bswap16s(&uuid->fields.time_mid);
> + bswap16s(&uuid->fields.time_high_and_version);
And then you don't need this assert.
r~
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v5 1/9] util: Add UUID API
2016-08-12 6:24 ` Richard Henderson
@ 2016-08-12 6:29 ` Fam Zheng
0 siblings, 0 replies; 13+ messages in thread
From: Fam Zheng @ 2016-08-12 6:29 UTC (permalink / raw)
To: Richard Henderson
Cc: qemu-devel, kwolf, qemu-block, sw, jcody, mdroth, armbru,
pbonzini, mreitz
On Fri, 08/12 07:24, Richard Henderson wrote:
> On 08/12/2016 05:52 AM, Fam Zheng wrote:
> >+/* Version 4 UUID (pseudo random numbers), RFC4122 4.4. */
> >+
> >+typedef struct {
> >+ union {
> >+ unsigned char data[16];
> >+ struct {
> >+ /* Generated in BE endian, can be swapped with qemu_uuid_bswap. */
>
> Nit: BE endian is redundant. big-endian or just BE, please.
>
> >+ uint32_t time_low;
> >+ uint16_t time_mid;
> >+ uint16_t time_high_and_version;
> >+ uint8_t clock_seq_and_reserved;
> >+ uint8_t clock_seq_low;
> >+ uint8_t node[6];
> >+ } fields;
> >+ };
> >+} QemuUUID;
>
> Wait, didn't you just tell me that you *couldn't* add this union
> because of the packed usage within some file?
I was just saying even with this union added, packed usage can still result in
unaligned QemuUUID allocation, in theory. That's why I said I could assert too.
(In practise the only qemu_uuid_bswap is putting QemuUUID in a packed struct,
but that is happily aligned.)
>
> But of course if you're going to do this, you should actually use these fields,
>
> >+ /* Set the two most significant bits (bits 6 and 7) of the
> >+ clock_seq_hi_and_reserved to zero and one, respectively. */
> >+ uuid->data[8] = (uuid->data[8] & 0x3f) | 0x80;
> >+ /* Set the four most significant bits (bits 12 through 15) of the
> >+ time_hi_and_version field to the 4-bit version number.
> >+ */
> >+ uuid->data[6] = (uuid->data[6] & 0xf) | 0x40;
>
> Here,
Using these fields here requires an extra cpu_to_be16s for no compelling
reason, so I refrained to.
Fam
>
> >+void qemu_uuid_bswap(QemuUUID *uuid)
> >+{
> >+ assert(QEMU_IS_ALIGNED((uint64_t)uuid, sizeof(uint32_t)));
> >+ bswap32s(&uuid->fields.time_low);
> >+ bswap16s(&uuid->fields.time_mid);
> >+ bswap16s(&uuid->fields.time_high_and_version);
>
> And then you don't need this assert.
>
>
> r~
>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2016-08-12 6:36 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-12 4:52 [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8 Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 1/9] util: Add UUID API Fam Zheng
2016-08-12 6:24 ` Richard Henderson
2016-08-12 6:29 ` Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 2/9] vhdx: Use QEMU " Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 3/9] vdi: " Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 4/9] vpc: " Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 5/9] crypto: Switch to " Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 6/9] tests: No longer dependent on CONFIG_UUID Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 7/9] configure: Remove detection code for UUID Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 8/9] vl: Switch qemu_uuid to QemuUUID Fam Zheng
2016-08-12 4:52 ` [Qemu-devel] [PATCH v5 9/9] tests: Add uuid tests Fam Zheng
2016-08-12 5:13 ` [Qemu-devel] [PATCH v5 0/9] UUID clean ups for 2.8 no-reply
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.