*.swp
*.patch
*.gcov
+
+/subprojects/slirp
/* We may have -ENOMEDIUM completions in flight */
AIO_WAIT_WHILE(blk_get_aio_context(blk),
- qatomic_mb_read(&blk->in_flight) > 0);
+ qatomic_read(&blk->in_flight) > 0);
if (bs) {
bdrv_drained_end(bs);
aio_context_acquire(ctx);
/* We may have -ENOMEDIUM completions in flight */
- AIO_WAIT_WHILE(ctx, qatomic_mb_read(&blk->in_flight) > 0);
+ AIO_WAIT_WHILE(ctx, qatomic_read(&blk->in_flight) > 0);
aio_context_release(ctx);
}
;;
--cxx=*) CXX="$optarg"
;;
+ --objcc=*) objcc="$optarg"
+ ;;
--cpu=*) cpu="$optarg"
;;
--extra-cflags=*)
cxx="${CXX-${cross_prefix}g++}"
fi
+# Preferred ObjC compiler:
+# $objcc (if set, i.e. via --objcc option)
+# ${cross_prefix}clang (if cross-prefix specified)
+# clang (if available)
+# $cc
+if test -z "${objcc}${cross_prefix}"; then
+ if has clang; then
+ objcc=clang
+ else
+ objcc="$cc"
+ fi
+else
+ objcc="${objcc-${cross_prefix}clang}"
+fi
+
ar="${AR-${cross_prefix}ar}"
as="${AS-${cross_prefix}as}"
ccas="${CCAS-$cc}"
fi
done
-# Default objcc to clang if available, otherwise use CC
-if has clang; then
- objcc=clang
-else
- objcc="$cc"
-fi
-
if test "$mingw32" = "yes" ; then
EXESUF=".exe"
# MinGW needs -mthreads for TLS and macro _MT.
;;
--cxx=*)
;;
- --objcc=*) objcc="$optarg"
+ --objcc=*)
;;
--make=*) make="$optarg"
;;
# detect the static linking issue of ubsan, see also:
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84285
cat > $TMPC << EOF
-#include <stdlib.h>
-int main(void) {
- void *tmp = malloc(10);
- if (tmp != NULL) {
- return *(int *)(tmp + 2);
- }
- return 1;
+int main(int argc, char **argv)
+{
+ return argc + 1;
}
EOF
if compile_prog "$CPU_CFLAGS -Werror -fsanitize=undefined" ""; then
rm -rf meson-private meson-info meson-logs
+ # Prevent meson from automatically downloading wrapped subprojects when missing.
+ # You can use 'meson subprojects download' before running configure.
+ meson_option_add "--wrap-mode=nodownload"
+
# Built-in options
test "$bindir" != "bin" && meson_option_add "-Dbindir=$bindir"
test "$default_feature" = no && meson_option_add -Dauto_features=disabled
retrieves the address to which the second load will be directed),
the processor will guarantee that the first LOAD will appear to happen
before the second with respect to the other components of the system.
- However, this is not always true---for example, it was not true on
- Alpha processors. Whenever this kind of access happens to shared
- memory (that is not protected by a lock), a read barrier is needed,
- and ``smp_read_barrier_depends()`` can be used instead of ``smp_rmb()``.
+ Therefore, unlike ``smp_rmb()`` or ``qatomic_load_acquire()``,
+ ``smp_read_barrier_depends()`` can be just a compiler barrier on
+ weakly-ordered architectures such as Arm or PPC[#]_.
Note that the first load really has to have a _data_ dependency and not
a control dependency. If the address for the second load is dependent
than actually loading the address itself, then it's a _control_
dependency and a full read barrier or better is required.
+.. [#] The DEC Alpha is an exception, because ``smp_read_barrier_depends()``
+ needs a processor barrier. On strongly-ordered architectures such
+ as x86 or s390, ``smp_rmb()`` and ``qatomic_load_acquire()`` can
+ also be compiler barriers only.
Memory barriers and ``qatomic_load_acquire``/``qatomic_store_release`` are
mostly used when a data structure has one thread that is always a writer
static const VMStateDescription vmstate_lasi = {
.name = "Lasi",
- .version_id = 1,
+ .version_id = 2,
.minimum_version_id = 1,
.fields = (VMStateField[]) {
VMSTATE_UINT32(irr, LasiState),
VMSTATE_UINT32(iar, LasiState),
VMSTATE_UINT32(errlog, LasiState),
VMSTATE_UINT32(amr, LasiState),
+ VMSTATE_UINT32_V(rtc_ref, LasiState, 2),
VMSTATE_END_OF_LIST()
}
};
s->iar = 0xFFFB0000 + 3; /* CPU_HPA + 3 */
/* Real time clock (RTC), it's only one 32-bit counter @9000 */
- s->rtc = time(NULL);
s->rtc_ref = 0;
}
if (pci_is_vf(PCI_DEVICE(n)) && !sctrl->scs) {
trace_pci_nvme_err_startfail_virt_state(le16_to_cpu(sctrl->nvi),
- le16_to_cpu(sctrl->nvq),
- sctrl->scs ? "ONLINE" :
- "OFFLINE");
+ le16_to_cpu(sctrl->nvq));
return -1;
}
if (unlikely(n->cq[0])) {
pci_nvme_err_startfail_acqent_sz_zero(void) "nvme_start_ctrl failed because the admin completion queue size is zero"
pci_nvme_err_startfail_zasl_too_small(uint32_t zasl, uint32_t pagesz) "nvme_start_ctrl failed because zone append size limit %"PRIu32" is too small, needs to be >= %"PRIu32""
pci_nvme_err_startfail(void) "setting controller enable bit failed"
-pci_nvme_err_startfail_virt_state(uint16_t vq, uint16_t vi, const char *state) "nvme_start_ctrl failed due to ctrl state: vi=%u vq=%u %s"
+pci_nvme_err_startfail_virt_state(uint16_t vq, uint16_t vi) "nvme_start_ctrl failed due to ctrl state: vi=%u vq=%u"
pci_nvme_err_invalid_mgmt_action(uint8_t action) "action=0x%"PRIx8""
pci_nvme_err_ignored_mmio_vf_offline(uint64_t addr, unsigned size) "addr 0x%"PRIx64" size %d"
uint32_t errlog;
uint32_t amr;
- uint32_t rtc;
- time_t rtc_ref;
+ uint32_t rtc_ref;
MemoryRegion this_mem;
};
* Returns: 1 if all bytes were read, 0 if end-of-file
* occurs without data, or -1 on error
*/
-int qio_channel_readv_all_eof(QIOChannel *ioc,
- const struct iovec *iov,
- size_t niov,
- Error **errp);
+int coroutine_mixed_fn qio_channel_readv_all_eof(QIOChannel *ioc,
+ const struct iovec *iov,
+ size_t niov,
+ Error **errp);
/**
* qio_channel_readv_all:
*
* Returns: 0 if all bytes were read, or -1 on error
*/
-int qio_channel_readv_all(QIOChannel *ioc,
- const struct iovec *iov,
- size_t niov,
- Error **errp);
+int coroutine_mixed_fn qio_channel_readv_all(QIOChannel *ioc,
+ const struct iovec *iov,
+ size_t niov,
+ Error **errp);
/**
*
* Returns: 0 if all bytes were written, or -1 on error
*/
-int qio_channel_writev_all(QIOChannel *ioc,
- const struct iovec *iov,
- size_t niov,
- Error **errp);
+int coroutine_mixed_fn qio_channel_writev_all(QIOChannel *ioc,
+ const struct iovec *iov,
+ size_t niov,
+ Error **errp);
/**
* qio_channel_readv:
* Returns: 1 if all bytes were read, 0 if end-of-file occurs
* without data, or -1 on error
*/
-int qio_channel_read_all_eof(QIOChannel *ioc,
- char *buf,
- size_t buflen,
- Error **errp);
+int coroutine_mixed_fn qio_channel_read_all_eof(QIOChannel *ioc,
+ char *buf,
+ size_t buflen,
+ Error **errp);
/**
* qio_channel_read_all:
*
* Returns: 0 if all bytes were read, or -1 on error
*/
-int qio_channel_read_all(QIOChannel *ioc,
- char *buf,
- size_t buflen,
- Error **errp);
+int coroutine_mixed_fn qio_channel_read_all(QIOChannel *ioc,
+ char *buf,
+ size_t buflen,
+ Error **errp);
/**
* qio_channel_write_all:
*
* Returns: 0 if all bytes were written, or -1 on error
*/
-int qio_channel_write_all(QIOChannel *ioc,
- const char *buf,
- size_t buflen,
- Error **errp);
+int coroutine_mixed_fn qio_channel_write_all(QIOChannel *ioc,
+ const char *buf,
+ size_t buflen,
+ Error **errp);
/**
* qio_channel_set_blocking:
* occurs without data, or -1 on error
*/
-int qio_channel_readv_full_all_eof(QIOChannel *ioc,
- const struct iovec *iov,
- size_t niov,
- int **fds, size_t *nfds,
- Error **errp);
+int coroutine_mixed_fn qio_channel_readv_full_all_eof(QIOChannel *ioc,
+ const struct iovec *iov,
+ size_t niov,
+ int **fds, size_t *nfds,
+ Error **errp);
/**
* qio_channel_readv_full_all:
* Returns: 0 if all bytes were read, or -1 on error
*/
-int qio_channel_readv_full_all(QIOChannel *ioc,
- const struct iovec *iov,
- size_t niov,
- int **fds, size_t *nfds,
- Error **errp);
+int coroutine_mixed_fn qio_channel_readv_full_all(QIOChannel *ioc,
+ const struct iovec *iov,
+ size_t niov,
+ int **fds, size_t *nfds,
+ Error **errp);
/**
* qio_channel_writev_full_all:
* Returns: 0 if all bytes were written, or -1 on error
*/
-int qio_channel_writev_full_all(QIOChannel *ioc,
- const struct iovec *iov,
- size_t niov,
- int *fds, size_t nfds,
- int flags, Error **errp);
+int coroutine_mixed_fn qio_channel_writev_full_all(QIOChannel *ioc,
+ const struct iovec *iov,
+ size_t niov,
+ int *fds, size_t nfds,
+ int flags, Error **errp);
/**
* qio_channel_flush:
void qemu_put_be16(QEMUFile *f, unsigned int v);
void qemu_put_be32(QEMUFile *f, unsigned int v);
void qemu_put_be64(QEMUFile *f, uint64_t v);
-size_t qemu_get_buffer(QEMUFile *f, uint8_t *buf, size_t size);
+size_t coroutine_mixed_fn qemu_get_buffer(QEMUFile *f, uint8_t *buf, size_t size);
int qemu_get_byte(QEMUFile *f);
qemu_get_be64s(f, (uint64_t *)pv);
}
-size_t qemu_get_counted_string(QEMUFile *f, char buf[256]);
+size_t coroutine_mixed_fn qemu_get_counted_string(QEMUFile *f, char buf[256]);
void qemu_put_counted_string(QEMUFile *f, const char *name);
const char *qmp_command_name(const QmpCommand *cmd);
bool qmp_has_success_response(const QmpCommand *cmd);
QDict *qmp_error_response(Error *err);
-QDict *qmp_dispatch(const QmpCommandList *cmds, QObject *request,
- bool allow_oob, Monitor *cur_mon);
+QDict *coroutine_mixed_fn qmp_dispatch(const QmpCommandList *cmds, QObject *request,
+ bool allow_oob, Monitor *cur_mon);
bool qmp_is_oob(const QDict *dict);
typedef void (*qmp_cmd_callback_fn)(const QmpCommand *cmd, void *opaque);
}
-int qio_channel_readv_all_eof(QIOChannel *ioc,
- const struct iovec *iov,
- size_t niov,
- Error **errp)
+int coroutine_mixed_fn qio_channel_readv_all_eof(QIOChannel *ioc,
+ const struct iovec *iov,
+ size_t niov,
+ Error **errp)
{
return qio_channel_readv_full_all_eof(ioc, iov, niov, NULL, NULL, errp);
}
-int qio_channel_readv_all(QIOChannel *ioc,
- const struct iovec *iov,
- size_t niov,
- Error **errp)
+int coroutine_mixed_fn qio_channel_readv_all(QIOChannel *ioc,
+ const struct iovec *iov,
+ size_t niov,
+ Error **errp)
{
return qio_channel_readv_full_all(ioc, iov, niov, NULL, NULL, errp);
}
-int qio_channel_readv_full_all_eof(QIOChannel *ioc,
- const struct iovec *iov,
- size_t niov,
- int **fds, size_t *nfds,
- Error **errp)
+int coroutine_mixed_fn qio_channel_readv_full_all_eof(QIOChannel *ioc,
+ const struct iovec *iov,
+ size_t niov,
+ int **fds, size_t *nfds,
+ Error **errp)
{
int ret = -1;
struct iovec *local_iov = g_new(struct iovec, niov);
return ret;
}
-int qio_channel_readv_full_all(QIOChannel *ioc,
- const struct iovec *iov,
- size_t niov,
- int **fds, size_t *nfds,
- Error **errp)
+int coroutine_mixed_fn qio_channel_readv_full_all(QIOChannel *ioc,
+ const struct iovec *iov,
+ size_t niov,
+ int **fds, size_t *nfds,
+ Error **errp)
{
int ret = qio_channel_readv_full_all_eof(ioc, iov, niov, fds, nfds, errp);
return ret;
}
-int qio_channel_writev_all(QIOChannel *ioc,
- const struct iovec *iov,
- size_t niov,
- Error **errp)
+int coroutine_mixed_fn qio_channel_writev_all(QIOChannel *ioc,
+ const struct iovec *iov,
+ size_t niov,
+ Error **errp)
{
return qio_channel_writev_full_all(ioc, iov, niov, NULL, 0, 0, errp);
}
-int qio_channel_writev_full_all(QIOChannel *ioc,
- const struct iovec *iov,
- size_t niov,
- int *fds, size_t nfds,
- int flags, Error **errp)
+int coroutine_mixed_fn qio_channel_writev_full_all(QIOChannel *ioc,
+ const struct iovec *iov,
+ size_t niov,
+ int *fds, size_t nfds,
+ int flags, Error **errp)
{
int ret = -1;
struct iovec *local_iov = g_new(struct iovec, niov);
}
-int qio_channel_read_all_eof(QIOChannel *ioc,
- char *buf,
- size_t buflen,
- Error **errp)
+int coroutine_mixed_fn qio_channel_read_all_eof(QIOChannel *ioc,
+ char *buf,
+ size_t buflen,
+ Error **errp)
{
struct iovec iov = { .iov_base = buf, .iov_len = buflen };
return qio_channel_readv_all_eof(ioc, &iov, 1, errp);
}
-int qio_channel_read_all(QIOChannel *ioc,
- char *buf,
- size_t buflen,
- Error **errp)
+int coroutine_mixed_fn qio_channel_read_all(QIOChannel *ioc,
+ char *buf,
+ size_t buflen,
+ Error **errp)
{
struct iovec iov = { .iov_base = buf, .iov_len = buflen };
return qio_channel_readv_all(ioc, &iov, 1, errp);
}
-int qio_channel_write_all(QIOChannel *ioc,
- const char *buf,
- size_t buflen,
- Error **errp)
+int coroutine_mixed_fn qio_channel_write_all(QIOChannel *ioc,
+ const char *buf,
+ size_t buflen,
+ Error **errp)
{
struct iovec iov = { .iov_base = (char *)buf, .iov_len = buflen };
return qio_channel_writev_all(ioc, &iov, 1, errp);
PostcopyState postcopy_state_get(void)
{
- return qatomic_mb_read(&incoming_postcopy_state);
+ return qatomic_load_acquire(&incoming_postcopy_state);
}
/* Set the state and return the old state */
* case if the underlying file descriptor gives a short read, and that can
* happen even on a blocking fd.
*/
-static ssize_t qemu_fill_buffer(QEMUFile *f)
+static ssize_t coroutine_mixed_fn qemu_fill_buffer(QEMUFile *f)
{
int len;
int pending;
* return as many as it managed to read (assuming blocking fd's which
* all current QEMUFile are)
*/
-size_t qemu_peek_buffer(QEMUFile *f, uint8_t **buf, size_t size, size_t offset)
+size_t coroutine_mixed_fn qemu_peek_buffer(QEMUFile *f, uint8_t **buf, size_t size, size_t offset)
{
ssize_t pending;
size_t index;
* return as many as it managed to read (assuming blocking fd's which
* all current QEMUFile are)
*/
-size_t qemu_get_buffer(QEMUFile *f, uint8_t *buf, size_t size)
+size_t coroutine_mixed_fn qemu_get_buffer(QEMUFile *f, uint8_t *buf, size_t size)
{
size_t pending = size;
size_t done = 0;
* Note: Since **buf may get changed, the caller should take care to
* keep a pointer to the original buffer if it needs to deallocate it.
*/
-size_t qemu_get_buffer_in_place(QEMUFile *f, uint8_t **buf, size_t size)
+size_t coroutine_mixed_fn qemu_get_buffer_in_place(QEMUFile *f, uint8_t **buf, size_t size)
{
if (size < IO_BUF_SIZE) {
size_t res;
* Peeks a single byte from the buffer; this isn't guaranteed to work if
* offset leaves a gap after the previous read/peeked data.
*/
-int qemu_peek_byte(QEMUFile *f, int offset)
+int coroutine_mixed_fn qemu_peek_byte(QEMUFile *f, int offset)
{
int index = f->buf_index + offset;
return f->buf[index];
}
-int qemu_get_byte(QEMUFile *f)
+int coroutine_mixed_fn qemu_get_byte(QEMUFile *f)
{
int result;
* else 0
* (Note a 0 length string will return 0 either way)
*/
-size_t qemu_get_counted_string(QEMUFile *f, char buf[256])
+size_t coroutine_fn qemu_get_counted_string(QEMUFile *f, char buf[256])
{
size_t len = qemu_get_byte(f);
size_t res = qemu_get_buffer(f, (uint8_t *)buf, len);
#include "migration/qemu-file-types.h"
-size_t qemu_peek_buffer(QEMUFile *f, uint8_t **buf, size_t size, size_t offset);
-size_t qemu_get_buffer_in_place(QEMUFile *f, uint8_t **buf, size_t size);
+size_t coroutine_mixed_fn qemu_peek_buffer(QEMUFile *f, uint8_t **buf, size_t size, size_t offset);
+size_t coroutine_mixed_fn qemu_get_buffer_in_place(QEMUFile *f, uint8_t **buf, size_t size);
ssize_t qemu_put_compression_data(QEMUFile *f, z_stream *stream,
const uint8_t *p, size_t size);
int qemu_put_qemu_file(QEMUFile *f_des, QEMUFile *f_src);
* is; you aren't guaranteed to be able to peak to +n bytes unless you've
* previously peeked +n-1.
*/
-int qemu_peek_byte(QEMUFile *f, int offset);
+int coroutine_mixed_fn qemu_peek_byte(QEMUFile *f, int offset);
void qemu_file_skip(QEMUFile *f, int size);
/*
* qemu_file_credit_transfer:
g_free(exp->description);
exp->description = NULL;
- if (exp->common.blk) {
- if (exp->eject_notifier_blk) {
- notifier_remove(&exp->eject_notifier);
- blk_unref(exp->eject_notifier_blk);
- }
- blk_remove_aio_context_notifier(exp->common.blk, blk_aio_attached,
- blk_aio_detach, exp);
- blk_set_disable_request_queuing(exp->common.blk, false);
+ if (exp->eject_notifier_blk) {
+ notifier_remove(&exp->eject_notifier);
+ blk_unref(exp->eject_notifier_blk);
}
+ blk_remove_aio_context_notifier(exp->common.blk, blk_aio_attached,
+ blk_aio_detach, exp);
+ blk_set_disable_request_queuing(exp->common.blk, false);
for (i = 0; i < exp->nr_export_bitmaps; i++) {
bdrv_dirty_bitmap_set_busy(exp->export_bitmaps[i], false);
* Runs outside of coroutine context for OOB commands, but in coroutine
* context for everything else.
*/
-QDict *qmp_dispatch(const QmpCommandList *cmds, QObject *request,
- bool allow_oob, Monitor *cur_mon)
+QDict *coroutine_mixed_fn qmp_dispatch(const QmpCommandList *cmds, QObject *request,
+ bool allow_oob, Monitor *cur_mon)
{
Error *err = NULL;
bool oob;
cris
~ (/qemu)?((/include)?/hw/cris/.*|/target/cris/.*)
+hexagon-gen (component should be ignored in analysis)
+ ~ (/qemu)?(/target/hexagon/.*generated.*)
+
hexagon
~ (/qemu)?(/target/hexagon/.*)
~ (/qemu)?((/include)?/(audio|hw/audio)/.*)
block
- ~ (/qemu)?(/block.*|(/include?)(/hw)?/(block|storage-daemon)/.*|(/include)?/hw/ide/.*|/qemu-(img|io).*|/util/(aio|async|thread-pool).*)
+ ~ (/qemu)?(/block.*|(/include?)/(block|storage-daemon)/.*|(/include)?/hw/(block|ide|nvme)/.*|/qemu-(img|io).*|/util/(aio|async|thread-pool).*)
char
~ (/qemu)?(/qemu-char\.c|/include/sysemu/char\.h|(/include)?/hw/char/.*)
-capstone
- ~ (/qemu)?(/capstone/.*)
-
crypto
~ (/qemu)?((/include)?/crypto/.*|/hw/.*/crypto.*)
scsi
~ (/qemu)?(/scsi/.*|/hw/scsi/.*|/include/hw/scsi/.*)
-slirp (component should be ignored in analysis)
- ~ (/qemu)?(/slirp/.*)
-
tcg
~ (/qemu)?(/accel/tcg/.*|/replay/.*|/(.*/)?softmmu.*)
# The work of actually doing the build is handled by the
# run-coverity-scan script.
-FROM fedora:30
-ENV PACKAGES \
- alsa-lib-devel \
- bc \
- brlapi-devel \
- bzip2 \
- bzip2-devel \
- ccache \
- clang \
- curl \
- cyrus-sasl-devel \
- dbus-daemon \
- device-mapper-multipath-devel \
- findutils \
- gcc \
- gcc-c++ \
- gettext \
- git \
- glib2-devel \
- glusterfs-api-devel \
- gnutls-devel \
- gtk3-devel \
- hostname \
- libaio-devel \
- libasan \
- libattr-devel \
- libblockdev-mpath-devel \
- libcap-devel \
- libcap-ng-devel \
- libcurl-devel \
- libepoxy-devel \
- libfdt-devel \
- libgbm-devel \
- libiscsi-devel \
- libjpeg-devel \
- libpmem-devel \
- libnfs-devel \
- libpng-devel \
- librbd-devel \
- libseccomp-devel \
- libssh-devel \
- libubsan \
- libudev-devel \
- libusbx-devel \
- libzstd-devel \
- llvm \
- lzo-devel \
- make \
- mingw32-bzip2 \
- mingw32-curl \
- mingw32-glib2 \
- mingw32-gmp \
- mingw32-gnutls \
- mingw32-gtk3 \
- mingw32-libjpeg-turbo \
- mingw32-libpng \
- mingw32-libtasn1 \
- mingw32-nettle \
- mingw32-nsis \
- mingw32-pixman \
- mingw32-pkg-config \
- mingw32-SDL2 \
- mingw64-bzip2 \
- mingw64-curl \
- mingw64-glib2 \
- mingw64-gmp \
- mingw64-gnutls \
- mingw64-gtk3 \
- mingw64-libjpeg-turbo \
- mingw64-libpng \
- mingw64-libtasn1 \
- mingw64-nettle \
- mingw64-pixman \
- mingw64-pkg-config \
- mingw64-SDL2 \
- ncurses-devel \
- nettle-devel \
- numactl-devel \
- perl \
- perl-Test-Harness \
- pixman-devel \
- pulseaudio-libs-devel \
- python3 \
- python3-sphinx \
- PyYAML \
- rdma-core-devel \
- SDL2-devel \
- snappy-devel \
- sparse \
- spice-server-devel \
- systemd-devel \
- systemtap-sdt-devel \
- tar \
- usbredir-devel \
- virglrenderer-devel \
- vte291-devel \
- wget \
- which \
- xen-devel \
- xfsprogs-devel \
- zlib-devel
-ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
+FROM registry.fedoraproject.org/fedora:37
-RUN dnf install -y $PACKAGES
-RUN rpm -q $PACKAGES | sort > /packages.txt
-ENV PATH $PATH:/usr/libexec/python3-sphinx/
+RUN dnf install -y nosync && \
+ echo -e '#!/bin/sh\n\
+if test -d /usr/lib64\n\
+then\n\
+ export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\
+else\n\
+ export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\
+fi\n\
+exec "$@"' > /usr/bin/nosync && \
+ chmod +x /usr/bin/nosync && \
+ nosync dnf update -y && \
+ nosync dnf install -y \
+ SDL2-devel \
+ SDL2_image-devel \
+ alsa-lib-devel \
+ bash \
+ bc \
+ bison \
+ brlapi-devel \
+ bzip2 \
+ bzip2-devel \
+ ca-certificates \
+ capstone-devel \
+ ccache \
+ clang \
+ ctags \
+ cyrus-sasl-devel \
+ daxctl-devel \
+ dbus-daemon \
+ device-mapper-multipath-devel \
+ diffutils \
+ findutils \
+ flex \
+ fuse3-devel \
+ gcc \
+ gcc-c++ \
+ gcovr \
+ genisoimage \
+ gettext \
+ git \
+ glib2-devel \
+ glib2-static \
+ glibc-langpack-en \
+ glibc-static \
+ glusterfs-api-devel \
+ gnutls-devel \
+ gtk3-devel \
+ hostname \
+ jemalloc-devel \
+ json-c-devel \
+ libaio-devel \
+ libasan \
+ libattr-devel \
+ libbpf-devel \
+ libcacard-devel \
+ libcap-ng-devel \
+ libcmocka-devel \
+ libcurl-devel \
+ libdrm-devel \
+ libepoxy-devel \
+ libfdt-devel \
+ libffi-devel \
+ libgcrypt-devel \
+ libiscsi-devel \
+ libjpeg-devel \
+ libnfs-devel \
+ libpmem-devel \
+ libpng-devel \
+ librbd-devel \
+ libseccomp-devel \
+ libselinux-devel \
+ libslirp-devel \
+ libssh-devel \
+ libtasn1-devel \
+ libubsan \
+ liburing-devel \
+ libusbx-devel \
+ libzstd-devel \
+ llvm \
+ lttng-ust-devel \
+ lzo-devel \
+ make \
+ mesa-libgbm-devel \
+ meson \
+ ncurses-devel \
+ nettle-devel \
+ ninja-build \
+ nmap-ncat \
+ numactl-devel \
+ openssh-clients \
+ pam-devel \
+ pcre-static \
+ pixman-devel \
+ pkgconfig \
+ pulseaudio-libs-devel \
+ python3 \
+ python3-PyYAML \
+ python3-numpy \
+ python3-opencv \
+ python3-pillow \
+ python3-pip \
+ python3-sphinx \
+ python3-sphinx_rtd_theme \
+ rdma-core-devel \
+ rpm \
+ sed \
+ snappy-devel \
+ socat \
+ sparse \
+ spice-protocol \
+ spice-server-devel \
+ systemd-devel \
+ systemtap-sdt-devel \
+ tar \
+ tesseract \
+ tesseract-langpack-eng \
+ usbredir-devel \
+ util-linux \
+ virglrenderer-devel \
+ vte291-devel \
+ which \
+ xen-devel \
+ xfsprogs-devel \
+ zlib-devel \
+ zlib-static \
+ zstd && \
+ nosync dnf autoremove -y && \
+ nosync dnf clean all -y && \
+ rpm -qa | sort > /packages.txt && \
+ mkdir -p /usr/libexec/ccache-wrappers && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/c++ && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/cc && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/clang && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \
+ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc
+
+ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
+ENV LANG "en_US.UTF-8"
+ENV MAKE "/usr/bin/make"
+ENV NINJA "/usr/bin/ninja"
+ENV PYTHON "/usr/bin/python3"
+ENV QEMU_CONFIGURE_OPTS --meson=internal
+
+RUN dnf install -y curl wget
ENV COVERITY_TOOL_BASE=/coverity-tools
COPY coverity_tool.tgz coverity_tool.tgz
RUN mkdir -p /coverity-tools/coverity_tool && cd /coverity-tools/coverity_tool && tar xf /coverity_tool.tgz
test_suites = test['suite'] or ['default']
for s in test_suites:
- # The suite name in the introspection info is "PROJECT:SUITE"
- s = s.split(':')[1]
- if s == 'slow' or s == 'thorough':
- continue
+ # The suite name in the introspection info is "PROJECT" or "PROJECT:SUITE"
+ if ':' in s:
+ s = s.split(':')[1]
+ if s == 'slow' or s == 'thorough':
+ continue
if s.endswith('-slow'):
s = s[:-5]
suites[s].speeds.append('slow')
def gen_command_decl(name: str,
arg_type: Optional[QAPISchemaObjectType],
boxed: bool,
- ret_type: Optional[QAPISchemaType]) -> str:
+ ret_type: Optional[QAPISchemaType],
+ coroutine: bool) -> str:
return mcgen('''
-%(c_type)s qmp_%(c_name)s(%(params)s);
+%(c_type)s %(coroutine_fn)sqmp_%(c_name)s(%(params)s);
''',
c_type=(ret_type and ret_type.c_type()) or 'void',
+ coroutine_fn='coroutine_fn ' if coroutine else '',
c_name=c_name(name),
params=build_params(arg_type, boxed, 'Error **errp'))
c_type=ret_type.c_type(), c_name=ret_type.c_name())
-def build_marshal_proto(name: str) -> str:
- return ('void qmp_marshal_%s(QDict *args, QObject **ret, Error **errp)'
- % c_name(name))
+def build_marshal_proto(name: str,
+ coroutine: bool) -> str:
+ return ('void %(coroutine_fn)sqmp_marshal_%(c_name)s(%(params)s)' % {
+ 'coroutine_fn': 'coroutine_fn ' if coroutine else '',
+ 'c_name': c_name(name),
+ 'params': 'QDict *args, QObject **ret, Error **errp',
+ })
-def gen_marshal_decl(name: str) -> str:
+def gen_marshal_decl(name: str,
+ coroutine: bool) -> str:
return mcgen('''
%(proto)s;
''',
- proto=build_marshal_proto(name))
+ proto=build_marshal_proto(name, coroutine))
def gen_trace(name: str) -> str:
arg_type: Optional[QAPISchemaObjectType],
boxed: bool,
ret_type: Optional[QAPISchemaType],
- gen_tracing: bool) -> str:
+ gen_tracing: bool,
+ coroutine: bool) -> str:
have_args = boxed or (arg_type and not arg_type.is_empty())
if have_args:
assert arg_type is not None
bool ok = false;
Visitor *v;
''',
- proto=build_marshal_proto(name))
+ proto=build_marshal_proto(name, coroutine))
if ret_type:
ret += mcgen('''
self._genh, self._genc):
self._genc.add(gen_marshal_output(ret_type))
with ifcontext(ifcond, self._genh, self._genc):
- self._genh.add(gen_command_decl(name, arg_type, boxed, ret_type))
- self._genh.add(gen_marshal_decl(name))
+ self._genh.add(gen_command_decl(name, arg_type, boxed,
+ ret_type, coroutine))
+ self._genh.add(gen_marshal_decl(name, coroutine))
self._genc.add(gen_marshal(name, arg_type, boxed, ret_type,
- self._gen_tracing))
+ self._gen_tracing, coroutine))
if self._gen_tracing:
self._gen_trace_events.add(gen_trace(name))
with self._temp_module('./init'):
--- /dev/null
+[wrap-git]
+url = https://gitlab.freedesktop.org/slirp/libslirp
+revision = 15c52d697529eb3e78c5d8aa324d61715bce33b6
+
+[provide]
+slirp = libslirp_dep
} else {
*eax &= env->features[FEAT_SGX_12_1_EAX];
*ebx &= 0; /* ebx reserve */
- *ecx &= env->features[FEAT_XSAVE_XSS_LO];
- *edx &= env->features[FEAT_XSAVE_XSS_HI];
+ *ecx &= env->features[FEAT_XSAVE_XCR0_LO];
+ *edx &= env->features[FEAT_XSAVE_XCR0_HI];
/* FP and SSE are always allowed regardless of XSAVE/XCR0. */
*ecx |= XSTATE_FP_MASK | XSTATE_SSE_MASK;
hwaddr pte_addr, paddr;
uint32_t pkr;
int page_size;
+ int error_code;
restart_all:
rsvd_mask = ~MAKE_64BIT_MASK(0, env_archcpu(env)->phys_bits);
out->page_size = page_size;
return true;
- int error_code;
do_fault_rsvd:
error_code = PG_ERROR_RSVD_MASK;
goto do_fault_cont;
/* General purpose registers moves. */
void gen_load_gpr(TCGv t, int reg)
{
+ assert(reg >= 0 && reg <= ARRAY_SIZE(cpu_gpr));
if (reg == 0) {
tcg_gen_movi_tl(t, 0);
} else {
void gen_store_gpr(TCGv t, int reg)
{
+ assert(reg >= 0 && reg <= ARRAY_SIZE(cpu_gpr));
if (reg != 0) {
tcg_gen_mov_tl(cpu_gpr[reg], t);
}
#if defined(TARGET_MIPS64)
void gen_load_gpr_hi(TCGv_i64 t, int reg)
{
+ assert(reg >= 0 && reg <= ARRAY_SIZE(cpu_gpr_hi));
if (reg == 0) {
tcg_gen_movi_i64(t, 0);
} else {
void gen_store_gpr_hi(TCGv_i64 t, int reg)
{
+ assert(reg >= 0 && reg <= ARRAY_SIZE(cpu_gpr_hi));
if (reg != 0) {
tcg_gen_mov_i64(cpu_gpr_hi[reg], t);
}
python38-setuptools \
python38-wheel \
rdma-core-devel \
- rpm \
sed \
snappy-devel \
socat \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
- echo "[binaries]\n\
+ printf "[binaries]\n\
c = '/usr/bin/x86_64-linux-gnu-gcc'\n\
ar = '/usr/bin/x86_64-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/x86_64-linux-gnu-strip'\n\
system = 'linux'\n\
cpu_family = 'x86_64'\n\
cpu = 'x86_64'\n\
-endian = 'little'" > /usr/local/share/meson/cross/x86_64-linux-gnu && \
+endian = 'little'\n" > /usr/local/share/meson/cross/x86_64-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-linux-gnu-c++ && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
- echo "[binaries]\n\
+ printf "[binaries]\n\
c = '/usr/bin/aarch64-linux-gnu-gcc'\n\
ar = '/usr/bin/aarch64-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/aarch64-linux-gnu-strip'\n\
system = 'linux'\n\
cpu_family = 'aarch64'\n\
cpu = 'aarch64'\n\
-endian = 'little'" > /usr/local/share/meson/cross/aarch64-linux-gnu && \
+endian = 'little'\n" > /usr/local/share/meson/cross/aarch64-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-c++ && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
- echo "[binaries]\n\
+ printf "[binaries]\n\
c = '/usr/bin/arm-linux-gnueabi-gcc'\n\
ar = '/usr/bin/arm-linux-gnueabi-gcc-ar'\n\
strip = '/usr/bin/arm-linux-gnueabi-strip'\n\
system = 'linux'\n\
cpu_family = 'arm'\n\
cpu = 'arm'\n\
-endian = 'little'" > /usr/local/share/meson/cross/arm-linux-gnueabi && \
+endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabi && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabi-c++ && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
- echo "[binaries]\n\
+ printf "[binaries]\n\
c = '/usr/bin/arm-linux-gnueabihf-gcc'\n\
ar = '/usr/bin/arm-linux-gnueabihf-gcc-ar'\n\
strip = '/usr/bin/arm-linux-gnueabihf-strip'\n\
system = 'linux'\n\
cpu_family = 'arm'\n\
cpu = 'armhf'\n\
-endian = 'little'" > /usr/local/share/meson/cross/arm-linux-gnueabihf && \
+endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabihf && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-c++ && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
- echo "[binaries]\n\
+ printf "[binaries]\n\
c = '/usr/bin/mips64el-linux-gnuabi64-gcc'\n\
ar = '/usr/bin/mips64el-linux-gnuabi64-gcc-ar'\n\
strip = '/usr/bin/mips64el-linux-gnuabi64-strip'\n\
system = 'linux'\n\
cpu_family = 'mips64'\n\
cpu = 'mips64el'\n\
-endian = 'little'" > /usr/local/share/meson/cross/mips64el-linux-gnuabi64 && \
+endian = 'little'\n" > /usr/local/share/meson/cross/mips64el-linux-gnuabi64 && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mips64el-linux-gnuabi64-c++ && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
- echo "[binaries]\n\
+ printf "[binaries]\n\
c = '/usr/bin/mipsel-linux-gnu-gcc'\n\
ar = '/usr/bin/mipsel-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/mipsel-linux-gnu-strip'\n\
system = 'linux'\n\
cpu_family = 'mips'\n\
cpu = 'mipsel'\n\
-endian = 'little'" > /usr/local/share/meson/cross/mipsel-linux-gnu && \
+endian = 'little'\n" > /usr/local/share/meson/cross/mipsel-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/mipsel-linux-gnu-c++ && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
- echo "[binaries]\n\
+ printf "[binaries]\n\
c = '/usr/bin/powerpc64le-linux-gnu-gcc'\n\
ar = '/usr/bin/powerpc64le-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/powerpc64le-linux-gnu-strip'\n\
system = 'linux'\n\
cpu_family = 'ppc64'\n\
cpu = 'powerpc64le'\n\
-endian = 'little'" > /usr/local/share/meson/cross/powerpc64le-linux-gnu && \
+endian = 'little'\n" > /usr/local/share/meson/cross/powerpc64le-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/powerpc64le-linux-gnu-c++ && \
eatmydata apt-get autoremove -y && \
eatmydata apt-get autoclean -y && \
mkdir -p /usr/local/share/meson/cross && \
- echo "[binaries]\n\
+ printf "[binaries]\n\
c = '/usr/bin/s390x-linux-gnu-gcc'\n\
ar = '/usr/bin/s390x-linux-gnu-gcc-ar'\n\
strip = '/usr/bin/s390x-linux-gnu-strip'\n\
system = 'linux'\n\
cpu_family = 's390x'\n\
cpu = 's390x'\n\
-endian = 'big'" > /usr/local/share/meson/cross/s390x-linux-gnu && \
+endian = 'big'\n" > /usr/local/share/meson/cross/s390x-linux-gnu && \
dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
mkdir -p /usr/libexec/ccache-wrappers && \
ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/s390x-linux-gnu-c++ && \
FROM registry.fedoraproject.org/fedora:37
RUN dnf install -y nosync && \
- echo -e '#!/bin/sh\n\
+ printf '#!/bin/sh\n\
if test -d /usr/lib64\n\
then\n\
export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\
else\n\
export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\
fi\n\
-exec "$@"' > /usr/bin/nosync && \
+exec "$@"\n' > /usr/bin/nosync && \
chmod +x /usr/bin/nosync && \
nosync dnf update -y && \
nosync dnf install -y \
python3-pip \
python3-sphinx \
python3-sphinx_rtd_theme \
- rpm \
sed \
socat \
sparse \
FROM registry.fedoraproject.org/fedora:37
RUN dnf install -y nosync && \
- echo -e '#!/bin/sh\n\
+ printf '#!/bin/sh\n\
if test -d /usr/lib64\n\
then\n\
export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\
else\n\
export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\
fi\n\
-exec "$@"' > /usr/bin/nosync && \
+exec "$@"\n' > /usr/bin/nosync && \
chmod +x /usr/bin/nosync && \
nosync dnf update -y && \
nosync dnf install -y \
python3-pip \
python3-sphinx \
python3-sphinx_rtd_theme \
- rpm \
sed \
socat \
sparse \
FROM registry.fedoraproject.org/fedora:37
RUN dnf install -y nosync && \
- echo -e '#!/bin/sh\n\
+ printf '#!/bin/sh\n\
if test -d /usr/lib64\n\
then\n\
export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\
else\n\
export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\
fi\n\
-exec "$@"' > /usr/bin/nosync && \
+exec "$@"\n' > /usr/bin/nosync && \
chmod +x /usr/bin/nosync && \
nosync dnf update -y && \
nosync dnf install -y \
python3-sphinx \
python3-sphinx_rtd_theme \
rdma-core-devel \
- rpm \
sed \
snappy-devel \
socat \
# THIS FILE WAS AUTO-GENERATED
#
-# $ lcitool dockerfile --layers all opensuse-leap-153 qemu
+# $ lcitool dockerfile --layers all opensuse-leap-15 qemu
#
# https://gitlab.com/libvirt/libvirt-ci
-FROM registry.opensuse.org/opensuse/leap:15.3
+FROM registry.opensuse.org/opensuse/leap:15.4
RUN zypper update -y && \
zypper install -y \
python39-pip \
python39-setuptools \
rdma-core-devel \
- rpm \
sed \
snappy-devel \
sndio-devel \
-Subproject commit 232f41f160d4567b8c82dd52aa96c2bc3a5b75c1
+Subproject commit 85487e140415b2ac54b01a9a6b600fd7c21edc2f
mappings:
flake8:
CentOSStream8:
- OpenSUSELeap153:
+ OpenSUSELeap15:
meson:
CentOSStream8:
- OpenSUSELeap153:
+ OpenSUSELeap15:
python3:
CentOSStream8: python38
- OpenSUSELeap153: python39-base
+ OpenSUSELeap15: python39-base
python3-PyYAML:
CentOSStream8: python38-PyYAML
- OpenSUSELeap153:
+ OpenSUSELeap15:
python3-devel:
CentOSStream8: python38-devel
- OpenSUSELeap153: python39-devel
+ OpenSUSELeap15: python39-devel
python3-docutils:
CentOSStream8:
- OpenSUSELeap153:
+ OpenSUSELeap15:
python3-numpy:
CentOSStream8: python38-numpy
- OpenSUSELeap153:
+ OpenSUSELeap15:
python3-opencv:
CentOSStream8:
- OpenSUSELeap153:
+ OpenSUSELeap15:
python3-pillow:
CentOSStream8:
- OpenSUSELeap153:
+ OpenSUSELeap15:
python3-pip:
CentOSStream8: python38-pip
- OpenSUSELeap153: python39-pip
+ OpenSUSELeap15: python39-pip
python3-pillow:
CentOSStream8:
- OpenSUSELeap153:
+ OpenSUSELeap15:
python3-selinux:
CentOSStream8:
- OpenSUSELeap153:
+ OpenSUSELeap15:
python3-setuptools:
CentOSStream8: python38-setuptools
- OpenSUSELeap153: python39-setuptools
+ OpenSUSELeap15: python39-setuptools
python3-sphinx:
CentOSStream8:
- OpenSUSELeap153:
+ OpenSUSELeap15:
python3-sphinx-rtd-theme:
CentOSStream8:
- OpenSUSELeap153:
+ OpenSUSELeap15:
python3-venv:
CentOSStream8: python38
- OpenSUSELeap153: python39-base
+ OpenSUSELeap15: python39-base
python3-wheel:
CentOSStream8: python38-wheel
- OpenSUSELeap153: python39-pip
+ OpenSUSELeap15: python39-pip
pypi_mappings:
# Request more recent version
# Drop packages that need devel headers
python3-numpy:
- OpenSUSELeap153:
+ OpenSUSELeap15:
generate_dockerfile("debian-amd64", "debian-11",
trailer="".join(debian11_extras))
generate_dockerfile("fedora", "fedora-37")
- generate_dockerfile("opensuse-leap", "opensuse-leap-153")
+ generate_dockerfile("opensuse-leap", "opensuse-leap-15")
generate_dockerfile("ubuntu2004", "ubuntu-2004")
generate_dockerfile("ubuntu2204", "ubuntu-2204")
--- /dev/null
+paths:
+ pip3: /usr/bin/pip3.9
+ python: /usr/bin/python3.9
+++ /dev/null
-paths:
- pip3: /usr/bin/pip3.9
- python: /usr/bin/python3.9
{
int i;
AcpiSdtTable *sdt, *exp_sdt;
- test_data exp_data;
+ test_data exp_data = {};
gboolean exp_err, err, all_tables_match = true;
- memset(&exp_data, 0, sizeof(exp_data));
exp_data.tables = load_expected_aml(data);
dump_aml_files(data, false);
for (i = 0; i < data->tables->len; ++i) {
static void test_acpi_piix4_tcg(void)
{
- test_data data;
+ test_data data = {};
/* Supplying -machine accel argument overrides the default (qtest).
* This is to make guest actually run.
*/
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.required_struct_types = base_required_struct_types;
data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
static void test_acpi_piix4_tcg_bridge(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.variant = ".bridge";
data.required_struct_types = base_required_struct_types;
static void test_acpi_piix4_no_root_hotplug(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.variant = ".roothp";
data.required_struct_types = base_required_struct_types;
static void test_acpi_piix4_no_bridge_hotplug(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.variant = ".hpbridge";
data.required_struct_types = base_required_struct_types;
static void test_acpi_piix4_no_acpi_pci_hotplug(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.variant = ".hpbrroot";
data.required_struct_types = base_required_struct_types;
static void test_acpi_q35_tcg(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.required_struct_types = base_required_struct_types;
data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
static void test_acpi_q35_tcg_bridge(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".bridge";
data.required_struct_types = base_required_struct_types;
static void test_acpi_q35_tcg_no_acpi_hotplug(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".noacpihp";
data.required_struct_types = base_required_struct_types;
static void test_acpi_piix4_tcg_cphp(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.variant = ".cphp";
test_acpi_one("-smp 2,cores=3,sockets=2,maxcpus=6"
static void test_acpi_q35_tcg_cphp(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".cphp";
test_acpi_one(" -smp 2,cores=3,sockets=2,maxcpus=6"
static void test_acpi_q35_tcg_ipmi(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".ipmibt";
data.required_struct_types = ipmi_required_struct_types;
static void test_acpi_q35_tcg_smbus_ipmi(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".ipmismbus";
data.required_struct_types = ipmi_required_struct_types;
static void test_acpi_piix4_tcg_ipmi(void)
{
- test_data data;
+ test_data data = {};
/* Supplying -machine accel argument overrides the default (qtest).
* This is to make guest actually run.
*/
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.variant = ".ipmikcs";
data.required_struct_types = ipmi_required_struct_types;
static void test_acpi_q35_tcg_memhp(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".memhp";
test_acpi_one(" -m 128,slots=3,maxmem=1G"
static void test_acpi_piix4_tcg_memhp(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.variant = ".memhp";
test_acpi_one(" -m 128,slots=3,maxmem=1G"
static void test_acpi_piix4_tcg_nosmm(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.variant = ".nosmm";
test_acpi_one("-machine smm=off", &data);
static void test_acpi_piix4_tcg_smm_compat(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.variant = ".smm-compat";
test_acpi_one("-global PIIX4_PM.smm-compat=on", &data);
static void test_acpi_piix4_tcg_smm_compat_nosmm(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.variant = ".smm-compat-nosmm";
test_acpi_one("-global PIIX4_PM.smm-compat=on -machine smm=off", &data);
static void test_acpi_piix4_tcg_nohpet(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.machine_param = ",hpet=off";
data.variant = ".nohpet";
static void test_acpi_q35_tcg_numamem(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".numamem";
test_acpi_one(" -object memory-backend-ram,id=ram0,size=128M"
static void test_acpi_q35_kvm_xapic(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".xapic";
test_acpi_one(" -object memory-backend-ram,id=ram0,size=128M"
static void test_acpi_q35_tcg_nosmm(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".nosmm";
test_acpi_one("-machine smm=off", &data);
static void test_acpi_q35_tcg_smm_compat(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".smm-compat";
test_acpi_one("-global ICH9-LPC.smm-compat=on", &data);
static void test_acpi_q35_tcg_smm_compat_nosmm(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".smm-compat-nosmm";
test_acpi_one("-global ICH9-LPC.smm-compat=on -machine smm=off", &data);
static void test_acpi_q35_tcg_nohpet(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.machine_param = ",hpet=off";
data.variant = ".nohpet";
static void test_acpi_q35_kvm_dmar(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".dmar";
test_acpi_one("-machine kernel-irqchip=split -accel kvm"
static void test_acpi_q35_tcg_ivrs(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".ivrs";
data.tcg_only = true,
static void test_acpi_piix4_tcg_numamem(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.variant = ".numamem";
test_acpi_one(" -object memory-backend-ram,id=ram0,size=128M"
machine, tpm_if);
char *tmp_path = g_dir_make_tmp(tmp_dir_name, NULL);
TPMTestState test;
- test_data data;
+ test_data data = {};
GThread *thread;
const char *suffix = tpm_version == TPM_VERSION_2_0 ? "tpm2" : "tpm12";
char *args, *variant = g_strdup_printf(".%s.%s", tpm_if, suffix);
thread = g_thread_new(NULL, tpm_emu_ctrl_thread, &test);
tpm_emu_test_wait_cond(&test);
- memset(&data, 0, sizeof(data));
data.machine = machine;
data.variant = variant;
static void test_acpi_tcg_dimm_pxm(const char *machine)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = machine;
data.variant = ".dimmpxm";
test_acpi_one(" -machine nvdimm=on,nvdimm-persistence=cpu"
static void test_acpi_microvm_prepare(test_data *data)
{
- memset(data, 0, sizeof(*data));
data->machine = "microvm";
data->required_struct_types = NULL; /* no smbios */
data->required_struct_types_len = 0;
static void test_acpi_microvm_tcg(void)
{
- test_data data;
+ test_data data = {};
test_acpi_microvm_prepare(&data);
test_acpi_one(" -machine microvm,acpi=on,ioapic2=off,rtc=off",
static void test_acpi_microvm_usb_tcg(void)
{
- test_data data;
+ test_data data = {};
test_acpi_microvm_prepare(&data);
data.variant = ".usb";
static void test_acpi_microvm_rtc_tcg(void)
{
- test_data data;
+ test_data data = {};
test_acpi_microvm_prepare(&data);
data.variant = ".rtc";
static void test_acpi_microvm_pcie_tcg(void)
{
- test_data data;
+ test_data data = {};
test_acpi_microvm_prepare(&data);
data.variant = ".pcie";
static void test_acpi_microvm_ioapic2_tcg(void)
{
- test_data data;
+ test_data data = {};
test_acpi_microvm_prepare(&data);
data.variant = ".ioapic2";
static void test_acpi_tcg_acpi_hmat(const char *machine)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = machine;
data.variant = ".acpihmat";
test_acpi_one(" -machine hmat=on"
static void test_acpi_q35_tcg_acpi_hmat_noinitiator(void)
{
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.variant = ".acpihmat-noinitiator";
test_acpi_one(" -machine hmat=on"
{
gchar *tmp_path = g_dir_make_tmp("qemu-test-erst.XXXXXX", NULL);
gchar *params;
- test_data data;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = machine;
data.variant = ".acpierst";
params = g_strdup_printf(
{
gchar *tmp_path = g_dir_make_tmp("qemu-test-erst.XXXXXX", NULL);
gchar *params;
- test_data data;
+ test_data data = {};
test_acpi_microvm_prepare(&data);
data.variant = ".pcie";
static void test_acpi_piix4_oem_fields(void)
{
- test_data data;
char *args;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_PC;
data.required_struct_types = base_required_struct_types;
data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
static void test_acpi_q35_oem_fields(void)
{
- test_data data;
char *args;
+ test_data data = {};
- memset(&data, 0, sizeof(data));
data.machine = MACHINE_Q35;
data.required_struct_types = base_required_struct_types;
data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types);
static void test_acpi_microvm_oem_fields(void)
{
- test_data data;
+ test_data data = {};
char *args;
test_acpi_microvm_prepare(&data);
addr->type = SOCKET_ADDRESS_TYPE_INET;
inet = &addr->u.inet;
- if (addrstr[0] == '[' && addrstr[hostlen - 1] == ']') {
+ if (hostlen && addrstr[0] == '[' && addrstr[hostlen - 1] == ']') {
inet->host = g_strndup(addrstr + 1, hostlen - 2);
} else {
inet->host = g_strndup(addrstr, hostlen);
Coroutine *to = QSIMPLEQ_FIRST(&pending);
CoroutineAction ret;
- /* Cannot rely on the read barrier for to in aio_co_wake(), as there are
- * callers outside of aio_co_wake() */
- const char *scheduled = qatomic_mb_read(&to->scheduled);
+ /*
+ * Read to before to->scheduled; pairs with qatomic_cmpxchg in
+ * qemu_co_sleep(), aio_co_schedule() etc.
+ */
+ smp_read_barrier_depends();
+
+ const char *scheduled = qatomic_read(&to->scheduled);
QSIMPLEQ_REMOVE_HEAD(&pending, co_queue_next);