mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
* Optional use of Meson wrap for slirp * Coverity fixes * Avoid -Werror=maybe-uninitialized * Mark coroutine QMP command functions as coroutine_fn * Mark functions that suspend as coroutine_mixed_fn * target/i386: Fix SGX CPUID leaf * First batch of qatomic_mb_read() removal * Small atomic.rst improvement * NBD cleanup * Update libvirt-ci submodule # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmRBAzwUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroP64gf+NzLW95tylCfhKuuLq/TjuOTQqHCD # KVLlA1I3pwJfk4SUuigrnaJtwfa/tBiWxfaivUdPAzPzeXyxcVSOps0neohrmFBh # 2e3ylBWWz22K0gkLtrFwJT99TVy6w6Xhj9SX8HPRfxl4k8yMPrUJNW78hh6APAwq # /etZY6+ieHC7cwG4xluhxsHnxnBYBYD+18hUd+b5LchD/yvCSCNNiursutpa0Ar/ # r/HtDwNFKlaApO3sU4R3yYgdS1Fvcas4tDZaumADsQlSG5z+UeJldc98LiRlFrAA # gnskBSaaly/NgWqY3hVCYaBGyjD4lWPkX/FEChi0XX6Fl1P0umQAv/7z3w== # =XSAs # -----END PGP SIGNATURE----- # gpg: Signature made Thu 20 Apr 2023 10:17:48 AM BST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [undefined] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (25 commits) tests: lcitool: Switch to OpenSUSE Leap 15.4 tests: libvirt-ci: Update to commit '2fa24dce8bc' configure: Honour cross-prefix when finding ObjC compiler coverity: unify Fedora dockerfiles nbd: a BlockExport always has a BlockBackend docs: explain effect of smp_read_barrier_depends() on modern architectures qemu-coroutine: remove qatomic_mb_read() postcopy-ram: do not use qatomic_mb_read block-backend: remove qatomic_mb_read() target/i386: Change wrong XFRM value in SGX CPUID leaf monitor: mark mixed functions that can suspend migration: mark mixed functions that can suspend io: mark mixed functions that can suspend qapi-gen: mark coroutine QMP command functions as coroutine_fn target/mips: tcg: detect out-of-bounds accesses to cpu_gpr and cpu_gpr_hi coverity: update COMPONENTS.md lasi: fix RTC migration target/i386: Avoid unreachable variable declaration in mmu_translate() configure: Avoid -Werror=maybe-uninitialized tests: bios-tables-test: replace memset with initializer ... Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
@@ -20,3 +20,5 @@ GTAGS
|
||||
*.swp
|
||||
*.patch
|
||||
*.gcov
|
||||
|
||||
/subprojects/slirp
|
||||
|
||||
@@ -1845,7 +1845,7 @@ void blk_drain(BlockBackend *blk)
|
||||
|
||||
/* 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);
|
||||
@@ -1867,7 +1867,7 @@ void blk_drain_all(void)
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -316,6 +316,8 @@ for opt do
|
||||
;;
|
||||
--cxx=*) CXX="$optarg"
|
||||
;;
|
||||
--objcc=*) objcc="$optarg"
|
||||
;;
|
||||
--cpu=*) cpu="$optarg"
|
||||
;;
|
||||
--extra-cflags=*)
|
||||
@@ -361,6 +363,21 @@ else
|
||||
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}"
|
||||
@@ -647,13 +664,6 @@ do
|
||||
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.
|
||||
@@ -713,7 +723,7 @@ for opt do
|
||||
;;
|
||||
--cxx=*)
|
||||
;;
|
||||
--objcc=*) objcc="$optarg"
|
||||
--objcc=*)
|
||||
;;
|
||||
--make=*) make="$optarg"
|
||||
;;
|
||||
@@ -1749,13 +1759,9 @@ if test "$sanitizers" = "yes" ; then
|
||||
# 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
|
||||
@@ -2615,6 +2621,10 @@ if test "$skip_meson" = no; 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
|
||||
|
||||
@@ -220,10 +220,9 @@ They come in six kinds:
|
||||
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
|
||||
@@ -231,6 +230,10 @@ They come in six kinds:
|
||||
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
|
||||
|
||||
+2
-2
@@ -194,7 +194,7 @@ static const MemoryRegionOps lasi_chip_ops = {
|
||||
|
||||
static const VMStateDescription vmstate_lasi = {
|
||||
.name = "Lasi",
|
||||
.version_id = 1,
|
||||
.version_id = 2,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT32(irr, LasiState),
|
||||
@@ -204,6 +204,7 @@ static const VMStateDescription vmstate_lasi = {
|
||||
VMSTATE_UINT32(iar, LasiState),
|
||||
VMSTATE_UINT32(errlog, LasiState),
|
||||
VMSTATE_UINT32(amr, LasiState),
|
||||
VMSTATE_UINT32_V(rtc_ref, LasiState, 2),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
@@ -233,7 +234,6 @@ static void lasi_reset(DeviceState *dev)
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -7158,9 +7158,7 @@ static int nvme_start_ctrl(NvmeCtrl *n)
|
||||
|
||||
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])) {
|
||||
|
||||
@@ -187,7 +187,7 @@ pci_nvme_err_startfail_asqent_sz_zero(void) "nvme_start_ctrl failed because the
|
||||
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"
|
||||
|
||||
|
||||
@@ -69,8 +69,7 @@ struct LasiState {
|
||||
|
||||
uint32_t errlog;
|
||||
uint32_t amr;
|
||||
uint32_t rtc;
|
||||
time_t rtc_ref;
|
||||
uint32_t rtc_ref;
|
||||
|
||||
MemoryRegion this_mem;
|
||||
};
|
||||
|
||||
+39
-39
@@ -301,10 +301,10 @@ ssize_t qio_channel_writev_full(QIOChannel *ioc,
|
||||
* 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:
|
||||
@@ -328,10 +328,10 @@ int qio_channel_readv_all_eof(QIOChannel *ioc,
|
||||
*
|
||||
* 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);
|
||||
|
||||
|
||||
/**
|
||||
@@ -353,10 +353,10 @@ int qio_channel_readv_all(QIOChannel *ioc,
|
||||
*
|
||||
* 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:
|
||||
@@ -437,10 +437,10 @@ ssize_t qio_channel_write(QIOChannel *ioc,
|
||||
* 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:
|
||||
@@ -457,10 +457,10 @@ int qio_channel_read_all_eof(QIOChannel *ioc,
|
||||
*
|
||||
* 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:
|
||||
@@ -476,10 +476,10 @@ int qio_channel_read_all(QIOChannel *ioc,
|
||||
*
|
||||
* 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:
|
||||
@@ -812,11 +812,11 @@ void qio_channel_set_aio_fd_handler(QIOChannel *ioc,
|
||||
* 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:
|
||||
@@ -838,11 +838,11 @@ int qio_channel_readv_full_all_eof(QIOChannel *ioc,
|
||||
* 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:
|
||||
@@ -872,11 +872,11 @@ int qio_channel_readv_full_all(QIOChannel *ioc,
|
||||
* 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:
|
||||
|
||||
@@ -35,7 +35,7 @@ void qemu_put_byte(QEMUFile *f, int v);
|
||||
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);
|
||||
|
||||
@@ -161,7 +161,7 @@ static inline void qemu_get_sbe64s(QEMUFile *f, int64_t *pv)
|
||||
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);
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@ bool qmp_command_available(const QmpCommand *cmd, Error **errp);
|
||||
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);
|
||||
|
||||
+39
-39
@@ -109,27 +109,27 @@ ssize_t qio_channel_writev_full(QIOChannel *ioc,
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
@@ -215,11 +215,11 @@ next_iter:
|
||||
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);
|
||||
|
||||
@@ -234,19 +234,19 @@ int qio_channel_readv_full_all(QIOChannel *ioc,
|
||||
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);
|
||||
@@ -325,30 +325,30 @@ ssize_t qio_channel_write(QIOChannel *ioc,
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
|
||||
@@ -1500,7 +1500,7 @@ static PostcopyState incoming_postcopy_state;
|
||||
|
||||
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 */
|
||||
|
||||
@@ -392,7 +392,7 @@ size_t ram_control_save_page(QEMUFile *f, ram_addr_t block_offset,
|
||||
* 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;
|
||||
@@ -585,7 +585,7 @@ void qemu_file_skip(QEMUFile *f, int size)
|
||||
* 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;
|
||||
@@ -633,7 +633,7 @@ size_t qemu_peek_buffer(QEMUFile *f, uint8_t **buf, size_t size, size_t offset)
|
||||
* 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;
|
||||
@@ -674,7 +674,7 @@ size_t qemu_get_buffer(QEMUFile *f, uint8_t *buf, size_t size)
|
||||
* 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;
|
||||
@@ -696,7 +696,7 @@ size_t qemu_get_buffer_in_place(QEMUFile *f, uint8_t **buf, size_t size)
|
||||
* 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;
|
||||
|
||||
@@ -713,7 +713,7 @@ int qemu_peek_byte(QEMUFile *f, int offset)
|
||||
return f->buf[index];
|
||||
}
|
||||
|
||||
int qemu_get_byte(QEMUFile *f)
|
||||
int coroutine_mixed_fn qemu_get_byte(QEMUFile *f)
|
||||
{
|
||||
int result;
|
||||
|
||||
@@ -894,7 +894,7 @@ int qemu_put_qemu_file(QEMUFile *f_des, QEMUFile *f_src)
|
||||
* 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);
|
||||
|
||||
@@ -108,8 +108,8 @@ bool qemu_file_is_writable(QEMUFile *f);
|
||||
|
||||
#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);
|
||||
@@ -119,7 +119,7 @@ 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:
|
||||
|
||||
+6
-8
@@ -1847,15 +1847,13 @@ static void nbd_export_delete(BlockExport *blk_exp)
|
||||
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);
|
||||
|
||||
+2
-2
@@ -134,8 +134,8 @@ static void do_qmp_dispatch_bh(void *opaque)
|
||||
* 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;
|
||||
|
||||
@@ -12,6 +12,9 @@ avr
|
||||
cris
|
||||
~ (/qemu)?((/include)?/hw/cris/.*|/target/cris/.*)
|
||||
|
||||
hexagon-gen (component should be ignored in analysis)
|
||||
~ (/qemu)?(/target/hexagon/.*generated.*)
|
||||
|
||||
hexagon
|
||||
~ (/qemu)?(/target/hexagon/.*)
|
||||
|
||||
@@ -64,14 +67,11 @@ audio
|
||||
~ (/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.*)
|
||||
|
||||
@@ -108,9 +108,6 @@ qemu-ga
|
||||
scsi
|
||||
~ (/qemu)?(/scsi/.*|/hw/scsi/.*|/include/hw/scsi/.*)
|
||||
|
||||
slirp (component should be ignored in analysis)
|
||||
~ (/qemu)?(/slirp/.*)
|
||||
|
||||
tcg
|
||||
~ (/qemu)?(/accel/tcg/.*|/replay/.*|/(.*/)?softmmu.*)
|
||||
|
||||
|
||||
@@ -15,112 +15,152 @@
|
||||
# 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
|
||||
|
||||
@@ -51,10 +51,11 @@ def process_tests(test, targets, suites):
|
||||
|
||||
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')
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user