diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 91663946de..0a01746cea 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -647,7 +647,10 @@ pages: - mkdir -p public # HTML-ised source tree - make gtags - - htags -anT --tree-view=filetree -m qemu_init + # We unset variables to work around a bug in some htags versions + # which causes it to fail when the environment is large + - CI_COMMIT_MESSAGE= CI_COMMIT_TAG_MESSAGE= htags + -anT --tree-view=filetree -m qemu_init -t "Welcome to the QEMU sourcecode" - mv HTML public/src # Project documentation diff --git a/.gitmodules b/.gitmodules index 73cae4cd4d..76d26f77c3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,12 @@ [submodule "roms/seabios"] path = roms/seabios - url = https://gitlab.com/qemu-project/seabios.git/ + url = https://github.com/openSUSE/qemu-seabios.git [submodule "roms/SLOF"] path = roms/SLOF - url = https://gitlab.com/qemu-project/SLOF.git + url = https://github.com/openSUSE/qemu-SLOF.git [submodule "roms/ipxe"] path = roms/ipxe - url = https://gitlab.com/qemu-project/ipxe.git + url = https://github.com/openSUSE/qemu-ipxe.git [submodule "roms/openbios"] path = roms/openbios url = https://gitlab.com/qemu-project/openbios.git @@ -18,7 +18,7 @@ url = https://gitlab.com/qemu-project/u-boot.git [submodule "roms/skiboot"] path = roms/skiboot - url = https://gitlab.com/qemu-project/skiboot.git + url = https://github.com/openSUSE/qemu-skiboot.git [submodule "roms/QemuMacDrivers"] path = roms/QemuMacDrivers url = https://gitlab.com/qemu-project/QemuMacDrivers.git @@ -36,10 +36,25 @@ url = https://gitlab.com/qemu-project/opensbi.git [submodule "roms/qboot"] path = roms/qboot - url = https://gitlab.com/qemu-project/qboot.git + url = https://github.com/openSUSE/qemu-qboot.git [submodule "roms/vbootrom"] path = roms/vbootrom url = https://gitlab.com/qemu-project/vbootrom.git [submodule "tests/lcitool/libvirt-ci"] path = tests/lcitool/libvirt-ci url = https://gitlab.com/libvirt/libvirt-ci.git +[submodule "subprojects/berkeley-softfloat-3"] + path = subprojects/berkeley-softfloat-3 + url = https://gitlab.com/qemu-project/berkeley-softfloat-3 +[submodule "subprojects/berkeley-testfloat-3"] + path = subprojects/berkeley-testfloat-3 + url = https://gitlab.com/qemu-project/berkeley-testfloat-3 +[submodule "subprojects/dtc"] + path = subprojects/dtc + url = https://gitlab.com/qemu-project/dtc.git +[submodule "subprojects/libvfio-user"] + path = subprojects/libvfio-user + url = https://gitlab.com/qemu-project/libvfio-user.git +[submodule "subprojects/keycodemapdb"] + path = subprojects/keycodemapdb + url = https://gitlab.com/qemu-project/keycodemapdb.git diff --git a/.obs/workflows.yml b/.obs/workflows.yml new file mode 100644 index 0000000000..d183bac809 --- /dev/null +++ b/.obs/workflows.yml @@ -0,0 +1,22 @@ +pr_workflow: + steps: + - branch_package: + source_project: Virtualization:Staging + source_package: qemu + target_project: Virtualization:Staging:PRs + filters: + event: pull_request + branches: + only: + - factory +rebuild_workflow: + steps: + # Will automatically rebuild the package + - trigger_services: + project: Virtualization:Staging + package: qemu + filters: + event: push + branches: + only: + - factory diff --git a/.readthedocs.yml b/.readthedocs.yml index 7fb7b8dd61..0b262469ce 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,16 +5,21 @@ # Required version: 2 +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + # Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/conf.py +# We recommend specifying your dependencies to enable reproducible builds: +# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: docs/requirements.txt + # We want all the document formats formats: all - -# For consistency, we require that QEMU's Sphinx extensions -# run with at least the same minimum version of Python that -# we require for other Python in our codebase (our conf.py -# enforces this, and some code needs it.) -python: - version: 3.6 diff --git a/VERSION b/VERSION index fbb9ea12de..2b0aa21219 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.2.0 +8.2.1 diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index c938eb96f8..6a4af14d32 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -183,7 +183,7 @@ static bool tb_lookup_cmp(const void *p, const void *d) const TranslationBlock *tb = p; const struct tb_desc *desc = d; - if ((tb_cflags(tb) & CF_PCREL || tb->pc == desc->pc) && + if (tb->pc == desc->pc && tb_page_addr0(tb) == desc->page_addr0 && tb->cs_base == desc->cs_base && tb->flags == desc->flags && @@ -233,7 +233,7 @@ static TranslationBlock *tb_htable_lookup(CPUState *cpu, vaddr pc, return NULL; } desc.page_addr0 = phys_pc; - h = tb_hash_func(phys_pc, (cflags & CF_PCREL ? 0 : pc), + h = tb_hash_func(phys_pc, pc, flags, cs_base, cflags); return qht_lookup_custom(&tb_ctx.htable, &desc, h, tb_lookup_cmp); } diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 3d2a896220..0d069a081e 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -47,7 +47,7 @@ static bool tb_cmp(const void *ap, const void *bp) const TranslationBlock *a = ap; const TranslationBlock *b = bp; - return ((tb_cflags(a) & CF_PCREL || a->pc == b->pc) && + return (a->pc == b->pc && a->cs_base == b->cs_base && a->flags == b->flags && (tb_cflags(a) & ~CF_INVALID) == (tb_cflags(b) & ~CF_INVALID) && @@ -916,7 +916,7 @@ static void do_tb_phys_invalidate(TranslationBlock *tb, bool rm_from_page_list) /* remove the TB from the hash list */ phys_pc = tb_page_addr0(tb); - h = tb_hash_func(phys_pc, (orig_cflags & CF_PCREL ? 0 : tb->pc), + h = tb_hash_func(phys_pc, tb->pc, tb->flags, tb->cs_base, orig_cflags); if (!qht_remove(&tb_ctx.htable, tb, h)) { return; @@ -983,7 +983,7 @@ TranslationBlock *tb_link_page(TranslationBlock *tb) tb_record(tb); /* add in the hash table */ - h = tb_hash_func(tb_page_addr0(tb), (tb->cflags & CF_PCREL ? 0 : tb->pc), + h = tb_hash_func(tb_page_addr0(tb), tb->pc, tb->flags, tb->cs_base, tb->cflags); qht_insert(&tb_ctx.htable, tb, h, &existing_tb); diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 79a88f5fb7..c1708afcb0 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -327,9 +327,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu, gen_code_buf = tcg_ctx->code_gen_ptr; tb->tc.ptr = tcg_splitwx_to_rx(gen_code_buf); - if (!(cflags & CF_PCREL)) { - tb->pc = pc; - } + tb->pc = pc; tb->cs_base = cs_base; tb->flags = flags; tb->cflags = cflags; diff --git a/audio/audio.c b/audio/audio.c index 8d1e4ad922..7ac74f9e16 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -1744,7 +1744,7 @@ static AudioState *audio_init(Audiodev *dev, Error **errp) if (driver) { done = !audio_driver_init(s, driver, dev, errp); } else { - error_setg(errp, "Unknown audio driver `%s'\n", drvname); + error_setg(errp, "Unknown audio driver `%s'", drvname); } if (!done) { goto out; diff --git a/backends/cryptodev.c b/backends/cryptodev.c index e5006bd215..fff89fd62a 100644 --- a/backends/cryptodev.c +++ b/backends/cryptodev.c @@ -398,6 +398,7 @@ static void cryptodev_backend_set_ops(Object *obj, Visitor *v, static void cryptodev_backend_complete(UserCreatable *uc, Error **errp) { + ERRP_GUARD(); CryptoDevBackend *backend = CRYPTODEV_BACKEND(uc); CryptoDevBackendClass *bc = CRYPTODEV_BACKEND_GET_CLASS(uc); uint32_t services; @@ -406,11 +407,20 @@ cryptodev_backend_complete(UserCreatable *uc, Error **errp) QTAILQ_INIT(&backend->opinfos); value = backend->tc.buckets[THROTTLE_OPS_TOTAL].avg; cryptodev_backend_set_throttle(backend, THROTTLE_OPS_TOTAL, value, errp); + if (*errp) { + return; + } value = backend->tc.buckets[THROTTLE_BPS_TOTAL].avg; cryptodev_backend_set_throttle(backend, THROTTLE_BPS_TOTAL, value, errp); + if (*errp) { + return; + } if (bc->init) { bc->init(backend, errp); + if (*errp) { + return; + } } services = backend->conf.crypto_services; diff --git a/block.c b/block.c index bfb0861ec6..1d20040c1d 100644 --- a/block.c +++ b/block.c @@ -6344,7 +6344,7 @@ BlockDeviceInfoList *bdrv_named_nodes_list(bool flat, BlockDriverState *bs; GLOBAL_STATE_CODE(); - GRAPH_RDLOCK_GUARD_MAINLOOP(); + GRAPH_RDLOCK_GUARD(); list = NULL; QTAILQ_FOREACH(bs, &graph_bdrv_states, node_list) { diff --git a/block/blklogwrites.c b/block/blklogwrites.c index 3678f6cf42..84e03f309f 100644 --- a/block/blklogwrites.c +++ b/block/blklogwrites.c @@ -328,22 +328,39 @@ static void coroutine_fn GRAPH_RDLOCK blk_log_writes_co_do_log(BlkLogWritesLogReq *lr) { BDRVBlkLogWritesState *s = lr->bs->opaque; - uint64_t cur_log_offset = s->cur_log_sector << s->sectorbits; + + /* + * Determine the offsets and sizes of different parts of the entry, and + * update the state of the driver. + * + * This needs to be done in one go, before any actual I/O is done, as the + * log entry may have to be written in two parts, and the state of the + * driver may be modified by other driver operations while waiting for the + * I/O to complete. + */ + const uint64_t entry_start_sector = s->cur_log_sector; + const uint64_t entry_offset = entry_start_sector << s->sectorbits; + const uint64_t qiov_aligned_size = ROUND_UP(lr->qiov->size, s->sectorsize); + const uint64_t entry_aligned_size = qiov_aligned_size + + ROUND_UP(lr->zero_size, s->sectorsize); + const uint64_t entry_nr_sectors = entry_aligned_size >> s->sectorbits; s->nr_entries++; - s->cur_log_sector += - ROUND_UP(lr->qiov->size, s->sectorsize) >> s->sectorbits; + s->cur_log_sector += entry_nr_sectors; - lr->log_ret = bdrv_co_pwritev(s->log_file, cur_log_offset, lr->qiov->size, + /* + * Write the log entry. Note that if this is a "write zeroes" operation, + * only the entry header is written here, with the zeroing being done + * separately below. + */ + lr->log_ret = bdrv_co_pwritev(s->log_file, entry_offset, lr->qiov->size, lr->qiov, 0); /* Logging for the "write zeroes" operation */ if (lr->log_ret == 0 && lr->zero_size) { - cur_log_offset = s->cur_log_sector << s->sectorbits; - s->cur_log_sector += - ROUND_UP(lr->zero_size, s->sectorsize) >> s->sectorbits; + const uint64_t zeroes_offset = entry_offset + qiov_aligned_size; - lr->log_ret = bdrv_co_pwrite_zeroes(s->log_file, cur_log_offset, + lr->log_ret = bdrv_co_pwrite_zeroes(s->log_file, zeroes_offset, lr->zero_size, 0); } diff --git a/block/file-posix.c b/block/file-posix.c index b862406c71..f59f7a57ae 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -226,6 +226,9 @@ typedef struct RawPosixAIOData { struct { unsigned long op; } zone_mgmt; + struct { + struct stat *st; + } fstat; }; } RawPosixAIOData; @@ -2613,6 +2616,34 @@ static void raw_close(BlockDriverState *bs) } } +static int handle_aiocb_fstat(void *opaque) +{ + RawPosixAIOData *aiocb = opaque; + + if (fstat(aiocb->aio_fildes, aiocb->fstat.st) < 0) { + return -errno; + } + + return 0; +} + +static int coroutine_fn raw_co_fstat(BlockDriverState *bs, struct stat *st) +{ + BDRVRawState *s = bs->opaque; + RawPosixAIOData acb; + + acb = (RawPosixAIOData) { + .bs = bs, + .aio_fildes = s->fd, + .aio_type = QEMU_AIO_FSTAT, + .fstat = { + .st = st, + }, + }; + + return raw_thread_pool_submit(handle_aiocb_fstat, &acb); +} + /** * Truncates the given regular file @fd to @offset and, when growing, fills the * new space according to @prealloc. @@ -2857,11 +2888,14 @@ static int64_t coroutine_fn raw_co_getlength(BlockDriverState *bs) static int64_t coroutine_fn raw_co_get_allocated_file_size(BlockDriverState *bs) { struct stat st; - BDRVRawState *s = bs->opaque; + int ret; - if (fstat(s->fd, &st) < 0) { - return -errno; + ret = raw_co_fstat(bs, &st); + + if (ret) { + return ret; } + return (int64_t)st.st_blocks * 512; } diff --git a/block/io.c b/block/io.c index 7e62fabbf5..d202987770 100644 --- a/block/io.c +++ b/block/io.c @@ -2619,6 +2619,16 @@ bdrv_co_do_block_status(BlockDriverState *bs, bool want_zero, ret |= (ret2 & BDRV_BLOCK_ZERO); } } + + /* + * Now that the recursive search was done, clear the flag. Otherwise, + * with more complicated block graphs like snapshot-access -> + * copy-before-write -> qcow2, where the return value will be propagated + * further up to a parent bdrv_co_do_block_status() call, both the + * BDRV_BLOCK_RECURSE and BDRV_BLOCK_ZERO flags would be set, which is + * not allowed. + */ + ret &= ~BDRV_BLOCK_RECURSE; } out: diff --git a/block/meson.build b/block/meson.build index 59ff6d380c..1ac0c68f94 100644 --- a/block/meson.build +++ b/block/meson.build @@ -149,6 +149,7 @@ block_gen_c = custom_target('block-gen.c', '../include/block/dirty-bitmap.h', '../include/block/block_int-io.h', '../include/block/block-global-state.h', + '../include/block/qapi.h', '../include/sysemu/block-backend-global-state.h', '../include/sysemu/block-backend-io.h', 'coroutines.h' diff --git a/block/monitor/block-hmp-cmds.c b/block/monitor/block-hmp-cmds.c index c729cbf1eb..99791aba33 100644 --- a/block/monitor/block-hmp-cmds.c +++ b/block/monitor/block-hmp-cmds.c @@ -400,7 +400,7 @@ void hmp_nbd_server_start(Monitor *mon, const QDict *qdict) bool writable = qdict_get_try_bool(qdict, "writable", false); bool all = qdict_get_try_bool(qdict, "all", false); Error *local_err = NULL; - BlockInfoList *block_list, *info; + BlockBackend *blk; SocketAddress *addr; NbdServerAddOptions export; @@ -425,18 +425,24 @@ void hmp_nbd_server_start(Monitor *mon, const QDict *qdict) return; } - /* Then try adding all block devices. If one fails, close all and + /* + * Then try adding all block devices. If one fails, close all and * exit. */ - block_list = qmp_query_block(NULL); + for (blk = blk_all_next(NULL); blk; blk = blk_all_next(blk)) { + BlockDriverState *bs = blk_bs(blk); - for (info = block_list; info; info = info->next) { - if (!info->value->inserted) { + if (!*blk_name(blk) && !blk_get_attached_dev(blk)) { + continue; + } + + bs = bdrv_skip_implicit_filters(bs); + if (!bs || !bs->drv) { continue; } export = (NbdServerAddOptions) { - .device = info->value->device, + .device = g_strdup(blk_name(blk)), .has_writable = true, .writable = writable, }; @@ -449,8 +455,6 @@ void hmp_nbd_server_start(Monitor *mon, const QDict *qdict) } } - qapi_free_BlockInfoList(block_list); - exit: hmp_handle_error(mon, local_err); } @@ -744,7 +748,7 @@ static void print_block_info(Monitor *mon, BlockInfo *info, } } -void hmp_info_block(Monitor *mon, const QDict *qdict) +void coroutine_fn hmp_info_block(Monitor *mon, const QDict *qdict) { BlockInfoList *block_list, *info; BlockDeviceInfoList *blockdev_list, *blockdev; diff --git a/block/qapi.c b/block/qapi.c index 82a30b38fe..ed0434a18f 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -41,10 +41,10 @@ #include "qemu/qemu-print.h" #include "sysemu/block-backend.h" -BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk, - BlockDriverState *bs, - bool flat, - Error **errp) +BlockDeviceInfo *coroutine_fn bdrv_block_device_info(BlockBackend *blk, + BlockDriverState *bs, + bool flat, + Error **errp) { ImageInfo **p_image_info; ImageInfo *backing_info; @@ -234,8 +234,6 @@ bdrv_do_query_node_info(BlockDriverState *bs, BlockNodeInfo *info, Error **errp) int ret; Error *err = NULL; - aio_context_acquire(bdrv_get_aio_context(bs)); - size = bdrv_getlength(bs); if (size < 0) { error_setg_errno(errp, -size, "Can't get image size '%s'", @@ -248,7 +246,9 @@ bdrv_do_query_node_info(BlockDriverState *bs, BlockNodeInfo *info, Error **errp) info->filename = g_strdup(bs->filename); info->format = g_strdup(bdrv_get_format_name(bs)); info->virtual_size = size; - info->actual_size = bdrv_get_allocated_file_size(bs); + bdrv_graph_co_rdlock(); + info->actual_size = bdrv_co_get_allocated_file_size(bs); + bdrv_graph_co_rdunlock(); info->has_actual_size = info->actual_size >= 0; if (bs->encrypted) { info->encrypted = true; @@ -304,7 +304,7 @@ bdrv_do_query_node_info(BlockDriverState *bs, BlockNodeInfo *info, Error **errp) } out: - aio_context_release(bdrv_get_aio_context(bs)); + return; } /** @@ -374,7 +374,7 @@ fail: } /** - * bdrv_query_block_graph_info: + * bdrv_co_query_block_graph_info: * @bs: root node to start from * @p_info: location to store image information * @errp: location to store error information @@ -383,15 +383,17 @@ fail: * * @p_info will be set only on success. On error, store error in @errp. */ -void bdrv_query_block_graph_info(BlockDriverState *bs, - BlockGraphInfo **p_info, - Error **errp) +void coroutine_fn bdrv_co_query_block_graph_info(BlockDriverState *bs, + BlockGraphInfo **p_info, + Error **errp) { BlockGraphInfo *info; BlockChildInfoList **children_list_tail; BdrvChild *c; ERRP_GUARD(); + assert_bdrv_graph_readable(); + info = g_new0(BlockGraphInfo, 1); bdrv_do_query_node_info(bs, qapi_BlockGraphInfo_base(info), errp); if (*errp) { @@ -407,7 +409,7 @@ void bdrv_query_block_graph_info(BlockDriverState *bs, QAPI_LIST_APPEND(children_list_tail, c_info); c_info->name = g_strdup(c->name); - bdrv_query_block_graph_info(c->bs, &c_info->info, errp); + bdrv_co_query_block_graph_info(c->bs, &c_info->info, errp); if (*errp) { goto fail; } @@ -665,13 +667,13 @@ bdrv_query_bds_stats(BlockDriverState *bs, bool blk_level) return s; } -BlockInfoList *qmp_query_block(Error **errp) +BlockInfoList *coroutine_fn qmp_query_block(Error **errp) { BlockInfoList *head = NULL, **p_next = &head; BlockBackend *blk; Error *local_err = NULL; - GRAPH_RDLOCK_GUARD_MAINLOOP(); + GRAPH_RDLOCK_GUARD(); for (blk = blk_all_next(NULL); blk; blk = blk_all_next(blk)) { BlockInfoList *info; diff --git a/block/snapshot.c b/block/snapshot.c index ec8cf4810b..4d0d5d65ec 100644 --- a/block/snapshot.c +++ b/block/snapshot.c @@ -196,8 +196,10 @@ bdrv_snapshot_fallback(BlockDriverState *bs) int bdrv_can_snapshot(BlockDriverState *bs) { BlockDriver *drv = bs->drv; + GLOBAL_STATE_CODE(); - if (!drv || !bdrv_is_inserted(bs) || bdrv_is_read_only(bs)) { + + if (!drv || !bdrv_is_inserted(bs) || !bdrv_is_writable(bs)) { return 0; } @@ -387,7 +389,7 @@ int bdrv_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_info) { GLOBAL_STATE_CODE(); - GRAPH_RDLOCK_GUARD_MAINLOOP(); + GRAPH_RDLOCK_GUARD(); BlockDriver *drv = bs->drv; BlockDriverState *fallback_bs = bdrv_snapshot_fallback(bs); diff --git a/blockdev.c b/blockdev.c index c91f49e7b6..1e49304745 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2871,9 +2871,9 @@ void qmp_drive_backup(DriveBackup *backup, Error **errp) blockdev_do_action(&action, errp); } -BlockDeviceInfoList *qmp_query_named_block_nodes(bool has_flat, - bool flat, - Error **errp) +BlockDeviceInfoList *coroutine_fn qmp_query_named_block_nodes(bool has_flat, + bool flat, + Error **errp) { bool return_flat = has_flat && flat; diff --git a/chardev/char-fe.c b/chardev/char-fe.c index 7789f7be9c..c7556602c7 100644 --- a/chardev/char-fe.c +++ b/chardev/char-fe.c @@ -21,6 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ +#define HW_POISON_H /* avoid poison since we patch against rules it "enforces" */ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "qapi/error.h" diff --git a/chardev/char-mux.c b/chardev/char-mux.c index ee2d47b20d..5a7c66e746 100644 --- a/chardev/char-mux.c +++ b/chardev/char-mux.c @@ -22,6 +22,7 @@ * THE SOFTWARE. */ +#define HW_POISON_H /* avoid poison since we patch against rules it "enforces" */ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/module.h" @@ -198,6 +199,17 @@ static void mux_chr_accept_input(Chardev *chr) be->chr_read(be->opaque, &d->buffer[m][d->cons[m]++ & MUX_BUFFER_MASK], 1); } + +#if defined(TARGET_S390X) + /* + * We're still not able to sync producer and consumer, so let's wait a bit + * and try again by then. + */ + if (d->prod[m] != d->cons[m]) { + qemu_mod_timer(d->accept_timer, qemu_get_clock_ns(vm_clock) + + (int64_t)100000); + } +#endif } static int mux_chr_can_read(void *opaque) @@ -332,6 +344,10 @@ static void qemu_chr_open_mux(Chardev *chr, } d->focus = -1; +#if defined(TARGET_S390X) + d->accept_timer = qemu_new_timer_ns(vm_clock, + (QEMUTimerCB *)mux_chr_accept_input, chr); +#endif /* only default to opened state if we've realized the initial * set of muxes */ diff --git a/chardev/char.c b/chardev/char.c index 996a024c7a..54f286d078 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -22,6 +22,7 @@ * THE SOFTWARE. */ +#define HW_POISON_H /* avoid poison since we patch against rules it "enforces" */ #include "qemu/osdep.h" #include "qemu/cutils.h" #include "monitor/monitor.h" @@ -518,7 +519,7 @@ static const ChardevClass *char_get_class(const char *driver, Error **errp) if (object_class_is_abstract(oc)) { error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "driver", - "an abstract device type"); + "a non-abstract device type"); return NULL; } diff --git a/chardev/chardev-internal.h b/chardev/chardev-internal.h index 4e03af3147..ae5738ae4e 100644 --- a/chardev/chardev-internal.h +++ b/chardev/chardev-internal.h @@ -37,6 +37,9 @@ struct MuxChardev { Chardev parent; CharBackend *backends[MAX_MUX]; CharBackend chr; +#if defined(TARGET_S390X) + QEMUTimer *accept_timer; +#endif int focus; int mux_cnt; int term_got_escape; diff --git a/configure b/configure index bdda912f36..d7e0926ff1 100755 --- a/configure +++ b/configure @@ -1387,8 +1387,8 @@ probe_target_compiler() { done try=cross - # For softmmu/roms we might be able to use the host compiler - if [ "${1%softmmu}" != "$1" ]; then + # For softmmu/roms also look for a bi-endian or multilib-enabled host compiler + if [ "${1%softmmu}" != "$1" ] || test "$target_arch" = "$cpu"; then case "$target_arch:$cpu" in aarch64_be:aarch64 | \ armeb:arm | \ diff --git a/contrib/ivshmem-client/meson.build b/contrib/ivshmem-client/meson.build index ce8dcca84d..bc77336258 100644 --- a/contrib/ivshmem-client/meson.build +++ b/contrib/ivshmem-client/meson.build @@ -1,4 +1,4 @@ executable('ivshmem-client', files('ivshmem-client.c', 'main.c'), genh, dependencies: glib, build_by_default: targetos == 'linux', - install: false) + install: true) diff --git a/contrib/ivshmem-server/meson.build b/contrib/ivshmem-server/meson.build index c6c3c82e89..185879a0c6 100644 --- a/contrib/ivshmem-server/meson.build +++ b/contrib/ivshmem-server/meson.build @@ -1,4 +1,4 @@ executable('ivshmem-server', files('ivshmem-server.c', 'main.c'), genh, dependencies: [qemuutil, rt], build_by_default: targetos == 'linux', - install: false) + install: true) diff --git a/docs/meson.build b/docs/meson.build index 9040f860ae..899755cad8 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -13,12 +13,12 @@ if sphinx_build.found() sphinx_version = run_command(SPHINX_ARGS + ['--version'], check: true).stdout().split()[1] if sphinx_version.version_compare('>=1.7.0') - SPHINX_ARGS += ['-j', 'auto'] + SPHINX_ARGS += ['-j', '1'] else nproc = find_program('nproc') if nproc.found() jobs = run_command(nproc, check: true).stdout() - SPHINX_ARGS += ['-j', jobs] + SPHINX_ARGS += ['-j', '1'] endif endif diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000000..691e5218ec --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +sphinx==5.3.0 +sphinx_rtd_theme==1.1.1 diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index f5b37eb74a..521c555903 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -65,6 +65,7 @@ ERST .help = "show info of one block device or all block devices " "(-n: show named nodes; -v: show details)", .cmd = hmp_info_block, + .coroutine = true, }, SRST diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 62056b1d74..5e848a9b4c 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -80,16 +80,39 @@ struct PFlashCFI01 { uint16_t ident3; uint8_t cfi_table[0x52]; uint64_t counter; - unsigned int writeblock_size; + uint32_t writeblock_size; MemoryRegion mem; char *name; void *storage; VMChangeStateEntry *vmstate; bool old_multiple_chip_handling; + + /* block update buffer */ + unsigned char *blk_bytes; + uint32_t blk_offset; }; static int pflash_post_load(void *opaque, int version_id); +static bool pflash_blk_write_state_needed(void *opaque) +{ + PFlashCFI01 *pfl = opaque; + + return (pfl->blk_offset != -1); +} + +static const VMStateDescription vmstate_pflash_blk_write = { + .name = "pflash_cfi01_blk_write", + .version_id = 1, + .minimum_version_id = 1, + .needed = pflash_blk_write_state_needed, + .fields = (const VMStateField[]) { + VMSTATE_VBUFFER_UINT32(blk_bytes, PFlashCFI01, 0, NULL, writeblock_size), + VMSTATE_UINT32(blk_offset, PFlashCFI01), + VMSTATE_END_OF_LIST() + } +}; + static const VMStateDescription vmstate_pflash = { .name = "pflash_cfi01", .version_id = 1, @@ -101,6 +124,10 @@ static const VMStateDescription vmstate_pflash = { VMSTATE_UINT8(status, PFlashCFI01), VMSTATE_UINT64(counter, PFlashCFI01), VMSTATE_END_OF_LIST() + }, + .subsections = (const VMStateDescription * []) { + &vmstate_pflash_blk_write, + NULL } }; @@ -225,34 +252,10 @@ static uint32_t pflash_data_read(PFlashCFI01 *pfl, hwaddr offset, uint32_t ret; p = pfl->storage; - switch (width) { - case 1: - ret = p[offset]; - break; - case 2: - if (be) { - ret = p[offset] << 8; - ret |= p[offset + 1]; - } else { - ret = p[offset]; - ret |= p[offset + 1] << 8; - } - break; - case 4: - if (be) { - ret = p[offset] << 24; - ret |= p[offset + 1] << 16; - ret |= p[offset + 2] << 8; - ret |= p[offset + 3]; - } else { - ret = p[offset]; - ret |= p[offset + 1] << 8; - ret |= p[offset + 2] << 16; - ret |= p[offset + 3] << 24; - } - break; - default: - abort(); + if (be) { + ret = ldn_be_p(p + offset, width); + } else { + ret = ldn_le_p(p + offset, width); } trace_pflash_data_read(pfl->name, offset, width, ret); return ret; @@ -400,40 +403,61 @@ static void pflash_update(PFlashCFI01 *pfl, int offset, } } +/* copy current flash content to block update buffer */ +static void pflash_blk_write_start(PFlashCFI01 *pfl, hwaddr offset) +{ + hwaddr mask = ~(pfl->writeblock_size - 1); + + trace_pflash_write_block_start(pfl->name, pfl->counter); + pfl->blk_offset = offset & mask; + memcpy(pfl->blk_bytes, pfl->storage + pfl->blk_offset, + pfl->writeblock_size); +} + +/* commit block update buffer changes */ +static void pflash_blk_write_flush(PFlashCFI01 *pfl) +{ + g_assert(pfl->blk_offset != -1); + trace_pflash_write_block_flush(pfl->name); + memcpy(pfl->storage + pfl->blk_offset, pfl->blk_bytes, + pfl->writeblock_size); + pflash_update(pfl, pfl->blk_offset, pfl->writeblock_size); + pfl->blk_offset = -1; +} + +/* discard block update buffer changes */ +static void pflash_blk_write_abort(PFlashCFI01 *pfl) +{ + trace_pflash_write_block_abort(pfl->name); + pfl->blk_offset = -1; +} + static inline void pflash_data_write(PFlashCFI01 *pfl, hwaddr offset, uint32_t value, int width, int be) { - uint8_t *p = pfl->storage; + uint8_t *p; - trace_pflash_data_write(pfl->name, offset, width, value, pfl->counter); - switch (width) { - case 1: - p[offset] = value; - break; - case 2: - if (be) { - p[offset] = value >> 8; - p[offset + 1] = value; - } else { - p[offset] = value; - p[offset + 1] = value >> 8; + if (pfl->blk_offset != -1) { + /* block write: redirect writes to block update buffer */ + if ((offset < pfl->blk_offset) || + (offset + width > pfl->blk_offset + pfl->writeblock_size)) { + pfl->status |= 0x10; /* Programming error */ + return; } - break; - case 4: - if (be) { - p[offset] = value >> 24; - p[offset + 1] = value >> 16; - p[offset + 2] = value >> 8; - p[offset + 3] = value; - } else { - p[offset] = value; - p[offset + 1] = value >> 8; - p[offset + 2] = value >> 16; - p[offset + 3] = value >> 24; - } - break; + trace_pflash_data_write_block(pfl->name, offset, width, value, + pfl->counter); + p = pfl->blk_bytes + (offset - pfl->blk_offset); + } else { + /* write directly to storage */ + trace_pflash_data_write(pfl->name, offset, width, value); + p = pfl->storage + offset; } + if (be) { + stn_be_p(p, width, value); + } else { + stn_le_p(p, width, value); + } } static void pflash_write(PFlashCFI01 *pfl, hwaddr offset, @@ -548,9 +572,9 @@ static void pflash_write(PFlashCFI01 *pfl, hwaddr offset, } else { value = extract32(value, 0, pfl->bank_width * 8); } - trace_pflash_write_block(pfl->name, value); pfl->counter = value; pfl->wcycle++; + pflash_blk_write_start(pfl, offset); break; case 0x60: if (cmd == 0xd0) { @@ -581,12 +605,7 @@ static void pflash_write(PFlashCFI01 *pfl, hwaddr offset, switch (pfl->cmd) { case 0xe8: /* Block write */ /* FIXME check @offset, @width */ - if (!pfl->ro) { - /* - * FIXME writing straight to memory is *wrong*. We - * should write to a buffer, and flush it to memory - * only on confirm command (see below). - */ + if (!pfl->ro && (pfl->blk_offset != -1)) { pflash_data_write(pfl, offset, value, width, be); } else { pfl->status |= 0x10; /* Programming error */ @@ -595,18 +614,8 @@ static void pflash_write(PFlashCFI01 *pfl, hwaddr offset, pfl->status |= 0x80; if (!pfl->counter) { - hwaddr mask = pfl->writeblock_size - 1; - mask = ~mask; - trace_pflash_write(pfl->name, "block write finished"); pfl->wcycle++; - if (!pfl->ro) { - /* Flush the entire write buffer onto backing storage. */ - /* FIXME premature! */ - pflash_update(pfl, offset & mask, pfl->writeblock_size); - } else { - pfl->status |= 0x10; /* Programming error */ - } } pfl->counter--; @@ -618,20 +627,17 @@ static void pflash_write(PFlashCFI01 *pfl, hwaddr offset, case 3: /* Confirm mode */ switch (pfl->cmd) { case 0xe8: /* Block write */ - if (cmd == 0xd0) { - /* FIXME this is where we should write out the buffer */ + if ((cmd == 0xd0) && !(pfl->status & 0x10)) { + pflash_blk_write_flush(pfl); pfl->wcycle = 0; pfl->status |= 0x80; } else { - qemu_log_mask(LOG_UNIMP, - "%s: Aborting write to buffer not implemented," - " the data is already written to storage!\n" - "Flash device reset into READ mode.\n", - __func__); + pflash_blk_write_abort(pfl); goto mode_read_array; } break; default: + pflash_blk_write_abort(pfl); goto error_flash; } break; @@ -865,6 +871,9 @@ static void pflash_cfi01_realize(DeviceState *dev, Error **errp) pfl->cmd = 0x00; pfl->status = 0x80; /* WSM ready */ pflash_cfi01_fill_cfi_table(pfl); + + pfl->blk_bytes = g_malloc(pfl->writeblock_size); + pfl->blk_offset = -1; } static void pflash_cfi01_system_reset(DeviceState *dev) @@ -884,6 +893,8 @@ static void pflash_cfi01_system_reset(DeviceState *dev) * This model deliberately ignores this delay. */ pfl->status = 0x80; + + pfl->blk_offset = -1; } static Property pflash_cfi01_properties[] = { diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index 2a99b286b0..6fa56f14c0 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw/block/pflash_cfi02.c @@ -546,7 +546,7 @@ static void pflash_write(void *opaque, hwaddr offset, uint64_t value, } goto reset_flash; } - trace_pflash_data_write(pfl->name, offset, width, value, 0); + trace_pflash_data_write(pfl->name, offset, width, value); if (!pfl->ro) { p = (uint8_t *)pfl->storage + offset; if (pfl->be) { diff --git a/hw/block/trace-events b/hw/block/trace-events index bab21d3a1c..cc9a9f2460 100644 --- a/hw/block/trace-events +++ b/hw/block/trace-events @@ -12,7 +12,8 @@ fdctrl_tc_pulse(int level) "TC pulse: %u" pflash_chip_erase_invalid(const char *name, uint64_t offset) "%s: chip erase: invalid address 0x%" PRIx64 pflash_chip_erase_start(const char *name) "%s: start chip erase" pflash_data_read(const char *name, uint64_t offset, unsigned size, uint32_t value) "%s: data offset:0x%04"PRIx64" size:%u value:0x%04x" -pflash_data_write(const char *name, uint64_t offset, unsigned size, uint32_t value, uint64_t counter) "%s: data offset:0x%04"PRIx64" size:%u value:0x%04x counter:0x%016"PRIx64 +pflash_data_write(const char *name, uint64_t offset, unsigned size, uint32_t value) "%s: data offset:0x%04"PRIx64" size:%u value:0x%04x" +pflash_data_write_block(const char *name, uint64_t offset, unsigned size, uint32_t value, uint64_t counter) "%s: data offset:0x%04"PRIx64" size:%u value:0x%04x counter:0x%016"PRIx64 pflash_device_id(const char *name, uint16_t id) "%s: read device ID: 0x%04x" pflash_device_info(const char *name, uint64_t offset) "%s: read device information offset:0x%04" PRIx64 pflash_erase_complete(const char *name) "%s: sector erase complete" @@ -32,7 +33,9 @@ pflash_unlock0_failed(const char *name, uint64_t offset, uint8_t cmd, uint16_t a pflash_unlock1_failed(const char *name, uint64_t offset, uint8_t cmd) "%s: unlock0 failed 0x%" PRIx64 " 0x%02x" pflash_unsupported_device_configuration(const char *name, uint8_t width, uint8_t max) "%s: unsupported device configuration: device_width:%d max_device_width:%d" pflash_write(const char *name, const char *str) "%s: %s" -pflash_write_block(const char *name, uint32_t value) "%s: block write: bytes:0x%x" +pflash_write_block_start(const char *name, uint32_t value) "%s: block write start: bytes:0x%x" +pflash_write_block_flush(const char *name) "%s: block write flush" +pflash_write_block_abort(const char *name) "%s: block write abort" pflash_write_block_erase(const char *name, uint64_t offset, uint64_t len) "%s: block erase offset:0x%" PRIx64 " bytes:0x%" PRIx64 pflash_write_failed(const char *name, uint64_t offset, uint8_t cmd) "%s: command failed 0x%" PRIx64 " 0x%02x" pflash_write_invalid(const char *name, uint8_t cmd) "%s: invalid write for command 0x%02x" diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c index aed1d5c330..f0fb3d305d 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c @@ -418,6 +418,9 @@ static void xen_block_realize(XenDevice *xendev, Error **errp) xen_block_set_size(blockdev); + if (!monitor_add_blk(conf->blk, blockdev->drive->id, errp)) { + return; + } blockdev->dataplane = xen_block_dataplane_create(xendev, blk, conf->logical_block_size, blockdev->props.iothread); @@ -874,6 +877,8 @@ static XenBlockDrive *xen_block_drive_create(const char *id, const char *mode = qdict_get_try_str(opts, "mode"); const char *direct_io_safe = qdict_get_try_str(opts, "direct-io-safe"); const char *discard_enable = qdict_get_try_str(opts, "discard-enable"); + const char *suse_diskcache_disable_flush = qdict_get_try_str(opts, + "suse-diskcache-disable-flush"); char *driver = NULL; char *filename = NULL; XenBlockDrive *drive = NULL; @@ -954,6 +959,16 @@ static XenBlockDrive *xen_block_drive_create(const char *id, } } + if (suse_diskcache_disable_flush) { + unsigned long value; + if (!qemu_strtoul(suse_diskcache_disable_flush, NULL, 2, &value) && !!value) { + QDict *cache_qdict = qdict_new(); + + qdict_put_bool(cache_qdict, "no-flush", true); + qdict_put_obj(file_layer, "cache", QOBJECT(cache_qdict)); + } + } + /* * It is necessary to turn file locking off as an emulated device * may have already opened the same image file. diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index c8da7c18d5..9e611620cc 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -36,8 +36,8 @@ #define MIN_SEABIOS_HPPA_VERSION 12 /* require at least this fw version */ -/* Power button address at &PAGE0->pad[4] */ -#define HPA_POWER_BUTTON (0x40 + 4 * sizeof(uint32_t)) +#define HPA_POWER_BUTTON (FIRMWARE_END - 0x10) +static hwaddr soft_power_reg; #define enable_lasi_lan() 0 @@ -45,7 +45,6 @@ static DeviceState *lasi_dev; static void hppa_powerdown_req(Notifier *n, void *opaque) { - hwaddr soft_power_reg = HPA_POWER_BUTTON; uint32_t val; val = ldl_be_phys(&address_space_memory, soft_power_reg); @@ -221,7 +220,7 @@ static FWCfgState *create_fw_cfg(MachineState *ms, PCIBus *pci_bus, fw_cfg_add_file(fw_cfg, "/etc/hppa/machine", g_memdup(mc->name, len), len); - val = cpu_to_le64(HPA_POWER_BUTTON); + val = cpu_to_le64(soft_power_reg); fw_cfg_add_file(fw_cfg, "/etc/hppa/power-button-addr", g_memdup(&val, sizeof(val)), sizeof(val)); @@ -276,6 +275,7 @@ static TranslateFn *machine_HP_common_init_cpus(MachineState *machine) unsigned int smp_cpus = machine->smp.cpus; TranslateFn *translate; MemoryRegion *cpu_region; + uint64_t ram_max; /* Create CPUs. */ for (unsigned int i = 0; i < smp_cpus; i++) { @@ -288,10 +288,14 @@ static TranslateFn *machine_HP_common_init_cpus(MachineState *machine) */ if (hppa_is_pa20(&cpu[0]->env)) { translate = translate_pa20; + ram_max = 0xf0000000; /* 3.75 GB (limited by 32-bit firmware) */ } else { translate = translate_pa10; + ram_max = 0xf0000000; /* 3.75 GB (32-bit CPU) */ } + soft_power_reg = translate(NULL, HPA_POWER_BUTTON); + for (unsigned int i = 0; i < smp_cpus; i++) { g_autofree char *name = g_strdup_printf("cpu%u-io-eir", i); @@ -311,9 +315,9 @@ static TranslateFn *machine_HP_common_init_cpus(MachineState *machine) cpu_region); /* Main memory region. */ - if (machine->ram_size > 3 * GiB) { - error_report("RAM size is currently restricted to 3GB"); - exit(EXIT_FAILURE); + if (machine->ram_size > ram_max) { + info_report("Max RAM size limited to %" PRIu64 " MB", ram_max / MiB); + machine->ram_size = ram_max; } memory_region_add_subregion_overlap(addr_space, 0, machine->ram, -1); @@ -343,8 +347,10 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus, SysBusDevice *s; /* SCSI disk setup. */ - dev = DEVICE(pci_create_simple(pci_bus, -1, "lsi53c895a")); - lsi53c8xx_handle_legacy_cmdline(dev); + if (drive_get_max_bus(IF_SCSI) >= 0) { + dev = DEVICE(pci_create_simple(pci_bus, -1, "lsi53c895a")); + lsi53c8xx_handle_legacy_cmdline(dev); + } /* Graphics setup. */ if (machine->enable_graphics && vga_interface_type != VGA_NONE) { @@ -357,7 +363,7 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus, } /* Network setup. */ - if (enable_lasi_lan()) { + if (nd_table[0].used && enable_lasi_lan()) { lasi_82596_init(addr_space, translate(NULL, LASI_LAN_HPA), qdev_get_gpio_in(lasi_dev, LASI_IRQ_LAN_HPA)); } @@ -382,7 +388,7 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus, pci_set_word(&pci_dev->config[PCI_SUBSYSTEM_ID], 0x1227); /* Powerbar */ /* create a second serial PCI card when running Astro */ - if (!lasi_dev) { + if (serial_hd(1) && !lasi_dev) { pci_dev = pci_new(-1, "pci-serial-4x"); qdev_prop_set_chr(DEVICE(pci_dev), "chardev1", serial_hd(1)); qdev_prop_set_chr(DEVICE(pci_dev), "chardev2", serial_hd(2)); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 4f3e5412f6..bc3fd28baf 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -412,10 +412,6 @@ static void pc_q35_8_0_machine_options(MachineClass *m) pc_q35_8_1_machine_options(m); compat_props_add(m->compat_props, hw_compat_8_0, hw_compat_8_0_len); compat_props_add(m->compat_props, pc_compat_8_0, pc_compat_8_0_len); - - /* For pc-q35-8.0 and older, use SMBIOS 2.8 by default */ - pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_32; - m->max_cpus = 288; } DEFINE_Q35_MACHINE(v8_0, "pc-q35-8.0", NULL, @@ -448,6 +444,10 @@ static void pc_q35_7_0_machine_options(MachineClass *m) pcmc->enforce_amd_1tb_hole = false; compat_props_add(m->compat_props, hw_compat_7_0, hw_compat_7_0_len); compat_props_add(m->compat_props, pc_compat_7_0, pc_compat_7_0_len); + + /* For pc-q35-7.0 and older, use SMBIOS 2.8 by default */ + pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_32; + m->max_cpus = 288; } DEFINE_Q35_MACHINE(v7_0, "pc-q35-7.0", NULL, diff --git a/hw/i386/sgx-stub.c b/hw/i386/sgx-stub.c index 26833eb233..16b1dfd90b 100644 --- a/hw/i386/sgx-stub.c +++ b/hw/i386/sgx-stub.c @@ -34,5 +34,5 @@ void pc_machine_init_sgx_epc(PCMachineState *pcms) bool sgx_epc_get_section(int section_nr, uint64_t *addr, uint64_t *size) { - g_assert_not_reached(); + return true; } diff --git a/hw/intc/arm_gicv3_cpuif.c b/hw/intc/arm_gicv3_cpuif.c index ab1a00508e..258dee1b80 100644 --- a/hw/intc/arm_gicv3_cpuif.c +++ b/hw/intc/arm_gicv3_cpuif.c @@ -1434,16 +1434,25 @@ static void icv_eoir_write(CPUARMState *env, const ARMCPRegInfo *ri, idx = icv_find_active(cs, irq); if (idx < 0) { - /* No valid list register corresponding to EOI ID */ - icv_increment_eoicount(cs); + /* + * No valid list register corresponding to EOI ID; if this is a vLPI + * not in the list regs then do nothing; otherwise increment EOI count + */ + if (irq < GICV3_LPI_INTID_START) { + icv_increment_eoicount(cs); + } } else { uint64_t lr = cs->ich_lr_el2[idx]; int thisgrp = (lr & ICH_LR_EL2_GROUP) ? GICV3_G1NS : GICV3_G0; int lr_gprio = ich_lr_prio(lr) & icv_gprio_mask(cs, grp); if (thisgrp == grp && lr_gprio == dropprio) { - if (!icv_eoi_split(env, cs)) { - /* Priority drop and deactivate not split: deactivate irq now */ + if (!icv_eoi_split(env, cs) || irq >= GICV3_LPI_INTID_START) { + /* + * Priority drop and deactivate not split: deactivate irq now. + * LPIs always get their active state cleared immediately + * because no separate deactivate is expected. + */ icv_deactivate_irq(cs, idx); } } diff --git a/hw/misc/edu.c b/hw/misc/edu.c index a1f8bc77e7..e64a246d3f 100644 --- a/hw/misc/edu.c +++ b/hw/misc/edu.c @@ -115,7 +115,7 @@ static void edu_check_range(uint64_t addr, uint64_t size1, uint64_t start, uint64_t end2 = start + size2; if (within(addr, start, end2) && - end1 > addr && within(end1, start, end2)) { + end1 > addr && end1 <= end2) { return; } diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index 296bba238e..472ce9c8cf 100644 --- a/hw/net/cadence_gem.c +++ b/hw/net/cadence_gem.c @@ -199,8 +199,8 @@ REG32(PHYMNTNC, 0x34) /* Phy Maintenance reg */ FIELD(PHYMNTNC, PHY_ADDR, 23, 5) FIELD(PHYMNTNC, OP, 28, 2) FIELD(PHYMNTNC, ST, 30, 2) -#define MDIO_OP_READ 0x3 -#define MDIO_OP_WRITE 0x2 +#define MDIO_OP_READ 0x2 +#define MDIO_OP_WRITE 0x1 REG32(RXPAUSE, 0x38) /* RX Pause Time reg */ REG32(TXPAUSE, 0x3c) /* TX Pause Time reg */ diff --git a/hw/net/can/can_sja1000.c b/hw/net/can/can_sja1000.c index 73201f9139..575df7d2f8 100644 --- a/hw/net/can/can_sja1000.c +++ b/hw/net/can/can_sja1000.c @@ -108,7 +108,7 @@ void can_sja_single_filter(struct qemu_can_filter *filter, } filter->can_mask = (uint32_t)amr[0] << 3; - filter->can_mask |= (uint32_t)amr[1] << 5; + filter->can_mask |= (uint32_t)amr[1] >> 5; filter->can_mask = ~filter->can_mask & QEMU_CAN_SFF_MASK; if (!(amr[1] & 0x10)) { filter->can_mask |= QEMU_CAN_RTR_FLAG; diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 80c56f0cfc..73024babd4 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -674,6 +674,11 @@ static void virtio_net_set_mrg_rx_bufs(VirtIONet *n, int mergeable_rx_bufs, n->mergeable_rx_bufs = mergeable_rx_bufs; + /* + * Note: when extending the vnet header, please make sure to + * change the vnet header copying logic in virtio_net_flush_tx() + * as well. + */ if (version_1) { n->guest_hdr_len = hash_report ? sizeof(struct virtio_net_hdr_v1_hash) : @@ -2693,7 +2698,7 @@ static int32_t virtio_net_flush_tx(VirtIONetQueue *q) ssize_t ret; unsigned int out_num; struct iovec sg[VIRTQUEUE_MAX_SIZE], sg2[VIRTQUEUE_MAX_SIZE + 1], *out_sg; - struct virtio_net_hdr_mrg_rxbuf mhdr; + struct virtio_net_hdr_v1_hash vhdr; elem = virtqueue_pop(q->tx_vq, sizeof(VirtQueueElement)); if (!elem) { @@ -2710,7 +2715,7 @@ static int32_t virtio_net_flush_tx(VirtIONetQueue *q) } if (n->has_vnet_hdr) { - if (iov_to_buf(out_sg, out_num, 0, &mhdr, n->guest_hdr_len) < + if (iov_to_buf(out_sg, out_num, 0, &vhdr, n->guest_hdr_len) < n->guest_hdr_len) { virtio_error(vdev, "virtio-net header incorrect"); virtqueue_detach_element(q->tx_vq, elem, 0); @@ -2718,8 +2723,8 @@ static int32_t virtio_net_flush_tx(VirtIONetQueue *q) return -EINVAL; } if (n->needs_vnet_hdr_swap) { - virtio_net_hdr_swap(vdev, (void *) &mhdr); - sg2[0].iov_base = &mhdr; + virtio_net_hdr_swap(vdev, (void *) &vhdr); + sg2[0].iov_base = &vhdr; sg2[0].iov_len = n->guest_hdr_len; out_num = iov_copy(&sg2[1], ARRAY_SIZE(sg2) - 1, out_sg, out_num, diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c index 7d68ccee7e..cb2c8a828d 100644 --- a/hw/pci-host/astro.c +++ b/hw/pci-host/astro.c @@ -166,6 +166,8 @@ static MemTxResult elroy_chip_write_with_attrs(void *opaque, hwaddr addr, trace_elroy_write(addr, size, val); switch ((addr >> 3) << 3) { + case 0x000: /* PCI_ID & PCI_COMMAND_STATUS_REG */ + break; case 0x080: put_val_in_int64(&s->arb_mask, addr, size, val); break; @@ -175,6 +177,9 @@ static MemTxResult elroy_chip_write_with_attrs(void *opaque, hwaddr addr, case 0x200 ... 0x250 - 1: /* LMMIO, GMMIO, WLMMIO, WGMMIO, ... */ put_val_in_arrary(s->mmio_base, 0x200, addr, size, val); break; + case 0x300: /* ibase */ + case 0x308: /* imask */ + break; case 0x0680: put_val_in_int64(&s->error_config, addr, size, val); break; @@ -538,6 +543,9 @@ static MemTxResult astro_chip_read_with_attrs(void *opaque, hwaddr addr, case 0x0030: /* HP-UX 10.20 and 11.11 reads it. No idea. */ val = -1; break; + case 0x0078: /* NetBSD reads 0x78 ? */ + val = -1; + break; case 0x0300 ... 0x03d8: /* LMMIO_DIRECT0_BASE... */ index = (addr - 0x300) / 8; val = s->ioc_ranges[index]; @@ -624,31 +632,43 @@ static MemTxResult astro_chip_write_with_attrs(void *opaque, hwaddr addr, case 0x10220: case 0x10230: /* HP-UX 11.11 reads it. No idea. */ break; - case 0x22108: /* IOC STATUS_CONTROL */ - put_val_in_int64(&s->ioc_status_ctrl, addr, size, val); - break; case 0x20200 ... 0x20240 - 1: /* IOC Rope0_Control ... */ put_val_in_arrary(s->ioc_rope_control, 0x20200, addr, size, val); break; case 0x20040: /* IOC Rope config */ + case 0x22040: put_val_in_int64(&s->ioc_rope_config, addr, size, val); break; case 0x20300: + case 0x22300: put_val_in_int64(&s->tlb_ibase, addr, size, val); break; case 0x20308: + case 0x22308: put_val_in_int64(&s->tlb_imask, addr, size, val); break; case 0x20310: + case 0x22310: put_val_in_int64(&s->tlb_pcom, addr, size, val); /* TODO: flush iommu */ break; case 0x20318: + case 0x22318: put_val_in_int64(&s->tlb_tcnfg, addr, size, val); break; case 0x20320: + case 0x22320: put_val_in_int64(&s->tlb_pdir_base, addr, size, val); break; + case 0x22000: /* func_id */ + break; + case 0x22008: /* func_class */ + break; + case 0x22050: /* rope_debug */ + break; + case 0x22108: /* IOC STATUS_CONTROL */ + put_val_in_int64(&s->ioc_status_ctrl, addr, size, val); + break; /* * empty placeholders for non-existent elroys, e.g. * func_class, pci config & data diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 347580ebac..3e57d5faca 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci-bus.c @@ -151,20 +151,12 @@ static void s390_pci_shutdown_notifier(Notifier *n, void *opaque) pci_device_reset(pbdev->pdev); } -static void s390_pci_reset_cb(void *opaque) -{ - S390PCIBusDevice *pbdev = opaque; - - pci_device_reset(pbdev->pdev); -} - static void s390_pci_perform_unplug(S390PCIBusDevice *pbdev) { HotplugHandler *hotplug_ctrl; if (pbdev->pft == ZPCI_PFT_ISM) { notifier_remove(&pbdev->shutdown_notifier); - qemu_unregister_reset(s390_pci_reset_cb, pbdev); } /* Unplug the PCI device */ @@ -1132,7 +1124,6 @@ static void s390_pcihost_plug(HotplugHandler *hotplug_dev, DeviceState *dev, if (pbdev->pft == ZPCI_PFT_ISM) { pbdev->shutdown_notifier.notify = s390_pci_shutdown_notifier; qemu_register_shutdown_notifier(&pbdev->shutdown_notifier); - qemu_register_reset(s390_pci_reset_cb, pbdev); } } else { pbdev->fh |= FH_SHM_EMUL; @@ -1279,6 +1270,23 @@ static void s390_pci_enumerate_bridge(PCIBus *bus, PCIDevice *pdev, pci_default_write_config(pdev, PCI_SUBORDINATE_BUS, s->bus_no, 1); } +void s390_pci_ism_reset(void) +{ + S390pciState *s = s390_get_phb(); + + S390PCIBusDevice *pbdev, *next; + + /* Trigger reset event for each passthrough ISM device currently in-use */ + QTAILQ_FOREACH_SAFE(pbdev, &s->zpci_devs, link, next) { + if (pbdev->interp && pbdev->pft == ZPCI_PFT_ISM && + pbdev->fh & FH_MASK_ENABLE) { + s390_pci_kvm_aif_disable(pbdev); + + pci_device_reset(pbdev->pdev); + } + } +} + static void s390_pcihost_reset(DeviceState *dev) { S390pciState *s = S390_PCI_HOST_BRIDGE(dev); diff --git a/hw/s390x/s390-pci-kvm.c b/hw/s390x/s390-pci-kvm.c index ff41e4106d..9eef4fc3ec 100644 --- a/hw/s390x/s390-pci-kvm.c +++ b/hw/s390x/s390-pci-kvm.c @@ -18,6 +18,7 @@ #include "hw/s390x/s390-pci-bus.h" #include "hw/s390x/s390-pci-kvm.h" #include "hw/s390x/s390-pci-inst.h" +#include "hw/s390x/s390-pci-vfio.h" #include "cpu_models.h" bool s390_pci_kvm_interp_allowed(void) @@ -27,6 +28,7 @@ bool s390_pci_kvm_interp_allowed(void) int s390_pci_kvm_aif_enable(S390PCIBusDevice *pbdev, ZpciFib *fib, bool assist) { + int rc; struct kvm_s390_zpci_op args = { .fh = pbdev->fh, .op = KVM_S390_ZPCIOP_REG_AEN, @@ -38,15 +40,43 @@ int s390_pci_kvm_aif_enable(S390PCIBusDevice *pbdev, ZpciFib *fib, bool assist) .u.reg_aen.flags = (assist) ? 0 : KVM_S390_ZPCIOP_REGAEN_HOST }; - return kvm_vm_ioctl(kvm_state, KVM_S390_ZPCI_OP, &args); + if (pbdev->aif) { + return -EINVAL; + } + + rc = kvm_vm_ioctl(kvm_state, KVM_S390_ZPCI_OP, &args); + if (rc == 0) { + pbdev->aif = true; + } + + return rc; } int s390_pci_kvm_aif_disable(S390PCIBusDevice *pbdev) { + int rc; + struct kvm_s390_zpci_op args = { .fh = pbdev->fh, .op = KVM_S390_ZPCIOP_DEREG_AEN }; - return kvm_vm_ioctl(kvm_state, KVM_S390_ZPCI_OP, &args); + if (!pbdev->aif) { + return -EINVAL; + } + + /* + * The device may have already been reset but we still want to relinquish + * the guest ISC, so always be sure to use an up-to-date host fh. + */ + if (!s390_pci_get_host_fh(pbdev, &args.fh)) { + return -EPERM; + } + + rc = kvm_vm_ioctl(kvm_state, KVM_S390_ZPCI_OP, &args); + if (rc == 0) { + pbdev->aif = false; + } + + return rc; } diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 7262725d2e..2d6b86624f 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -118,6 +118,14 @@ static void subsystem_reset(void) DeviceState *dev; int i; + /* + * ISM firmware is sensitive to unexpected changes to the IOMMU, which can + * occur during reset of the vfio-pci device (unmap of entire aperture). + * Ensure any passthrough ISM devices are reset now, while CPUs are paused + * but before vfio-pci cleanup occurs. + */ + s390_pci_ism_reset(); + for (i = 0; i < ARRAY_SIZE(reset_dev_types); i++) { dev = DEVICE(object_resolve_path_type("", reset_dev_types[i], NULL)); if (dev) { diff --git a/hw/scsi/esp-pci.c b/hw/scsi/esp-pci.c index 4e890db0e2..51f0157934 100644 --- a/hw/scsi/esp-pci.c +++ b/hw/scsi/esp-pci.c @@ -77,6 +77,41 @@ struct PCIESPState { ESPState esp; }; +static void esp_pci_update_irq(PCIESPState *pci) +{ + int scsi_level = !!(pci->dma_regs[DMA_STAT] & DMA_STAT_SCSIINT); + int dma_level = (pci->dma_regs[DMA_CMD] & DMA_CMD_INTE_D) ? + !!(pci->dma_regs[DMA_STAT] & DMA_STAT_DONE) : 0; + int level = scsi_level || dma_level; + + pci_set_irq(PCI_DEVICE(pci), level); +} + +static void esp_irq_handler(void *opaque, int irq_num, int level) +{ + PCIESPState *pci = PCI_ESP(opaque); + + if (level) { + pci->dma_regs[DMA_STAT] |= DMA_STAT_SCSIINT; + + /* + * If raising the ESP IRQ to indicate end of DMA transfer, set + * DMA_STAT_DONE at the same time. In theory this should be done in + * esp_pci_dma_memory_rw(), however there is a delay between setting + * DMA_STAT_DONE and the ESP IRQ arriving which is visible to the + * guest that can cause confusion e.g. Linux + */ + if ((pci->dma_regs[DMA_CMD] & DMA_CMD_MASK) == 0x3 && + pci->dma_regs[DMA_WBC] == 0) { + pci->dma_regs[DMA_STAT] |= DMA_STAT_DONE; + } + } else { + pci->dma_regs[DMA_STAT] &= ~DMA_STAT_SCSIINT; + } + + esp_pci_update_irq(pci); +} + static void esp_pci_handle_idle(PCIESPState *pci, uint32_t val) { ESPState *s = &pci->esp; @@ -89,6 +124,7 @@ static void esp_pci_handle_blast(PCIESPState *pci, uint32_t val) { trace_esp_pci_dma_blast(val); qemu_log_mask(LOG_UNIMP, "am53c974: cmd BLAST not implemented\n"); + pci->dma_regs[DMA_STAT] |= DMA_STAT_BCMBLT; } static void esp_pci_handle_abort(PCIESPState *pci, uint32_t val) @@ -151,6 +187,7 @@ static void esp_pci_dma_write(PCIESPState *pci, uint32_t saddr, uint32_t val) /* clear some bits on write */ uint32_t mask = DMA_STAT_ERROR | DMA_STAT_ABORT | DMA_STAT_DONE; pci->dma_regs[DMA_STAT] &= ~(val & mask); + esp_pci_update_irq(pci); } break; default: @@ -161,17 +198,14 @@ static void esp_pci_dma_write(PCIESPState *pci, uint32_t saddr, uint32_t val) static uint32_t esp_pci_dma_read(PCIESPState *pci, uint32_t saddr) { - ESPState *s = &pci->esp; uint32_t val; val = pci->dma_regs[saddr]; if (saddr == DMA_STAT) { - if (s->rregs[ESP_RSTAT] & STAT_INT) { - val |= DMA_STAT_SCSIINT; - } if (!(pci->sbac & SBAC_STATUS)) { pci->dma_regs[DMA_STAT] &= ~(DMA_STAT_ERROR | DMA_STAT_ABORT | DMA_STAT_DONE); + esp_pci_update_irq(pci); } } @@ -275,7 +309,7 @@ static void esp_pci_dma_memory_rw(PCIESPState *pci, uint8_t *buf, int len, qemu_log_mask(LOG_UNIMP, "am53c974: MDL transfer not implemented\n"); } - addr = pci->dma_regs[DMA_SPA]; + addr = pci->dma_regs[DMA_WAC]; if (pci->dma_regs[DMA_WBC] < len) { len = pci->dma_regs[DMA_WBC]; } @@ -285,9 +319,6 @@ static void esp_pci_dma_memory_rw(PCIESPState *pci, uint8_t *buf, int len, /* update status registers */ pci->dma_regs[DMA_WBC] -= len; pci->dma_regs[DMA_WAC] += len; - if (pci->dma_regs[DMA_WBC] == 0) { - pci->dma_regs[DMA_STAT] |= DMA_STAT_DONE; - } } static void esp_pci_dma_memory_read(void *opaque, uint8_t *buf, int len) @@ -342,23 +373,13 @@ static const VMStateDescription vmstate_esp_pci_scsi = { } }; -static void esp_pci_command_complete(SCSIRequest *req, size_t resid) -{ - ESPState *s = req->hba_private; - PCIESPState *pci = container_of(s, PCIESPState, esp); - - esp_command_complete(req, resid); - pci->dma_regs[DMA_WBC] = 0; - pci->dma_regs[DMA_STAT] |= DMA_STAT_DONE; -} - static const struct SCSIBusInfo esp_pci_scsi_info = { .tcq = false, .max_target = ESP_MAX_DEVS, .max_lun = 7, .transfer_data = esp_transfer_data, - .complete = esp_pci_command_complete, + .complete = esp_command_complete, .cancel = esp_request_cancelled, }; @@ -386,7 +407,7 @@ static void esp_pci_scsi_realize(PCIDevice *dev, Error **errp) "esp-io", 0x80); pci_register_bar(dev, 0, PCI_BASE_ADDRESS_SPACE_IO, &pci->io); - s->irq = pci_allocate_irq(dev); + s->irq = qemu_allocate_irq(esp_irq_handler, pci, 0); scsi_bus_init(&s->bus, sizeof(s->bus), d, &esp_pci_scsi_info); } diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 32c70c9e99..6ffe2478b5 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -1928,7 +1928,7 @@ static void megasas_command_cancelled(SCSIRequest *req) { MegasasCmd *cmd = req->hba_private; - if (!cmd) { + if (!cmd || !cmd->frame) { return; } cmd->frame->header.cmd_status = MFI_STAT_SCSI_IO_FAILED; diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c index 2417f0ad84..8969977f4e 100644 --- a/hw/scsi/scsi-generic.c +++ b/hw/scsi/scsi-generic.c @@ -327,11 +327,17 @@ static void scsi_read_complete(void * opaque, int ret) if (r->req.cmd.buf[0] == READ_CAPACITY_10 && (ldl_be_p(&r->buf[0]) != 0xffffffffU || s->max_lba == 0)) { s->blocksize = ldl_be_p(&r->buf[4]); - s->max_lba = ldl_be_p(&r->buf[0]) & 0xffffffffULL; + BlockBackend *blk = s->conf.blk; + BlockDriverState *bs = blk_bs(blk); + s->max_lba = bs->total_sectors - 1; + stl_be_p(&r->buf[0], s->max_lba); } else if (r->req.cmd.buf[0] == SERVICE_ACTION_IN_16 && (r->req.cmd.buf[1] & 31) == SAI_READ_CAPACITY_16) { s->blocksize = ldl_be_p(&r->buf[8]); - s->max_lba = ldq_be_p(&r->buf[0]); + BlockBackend *blk = s->conf.blk; + BlockDriverState *bs = blk_bs(blk); + s->max_lba = bs->total_sectors - 1; + stq_be_p(&r->buf[0], s->max_lba); } /* @@ -396,7 +402,10 @@ static void scsi_write_complete(void * opaque, int ret) assert(r->req.aiocb != NULL); r->req.aiocb = NULL; - if (ret || r->req.io_canceled) { + if (ret || r->req.io_canceled || + r->io_header.status != SCSI_HOST_OK || + (r->io_header.driver_status & SG_ERR_DRIVER_TIMEOUT) || + r->io_header.status != GOOD) { scsi_command_complete_noio(r, ret); goto done; } diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 2a90601ac5..3b70658d0b 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -1251,6 +1251,7 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) struct smbios_structure_header *header; int size; struct smbios_table *table; /* legacy mode only */ + uint8_t *dbl_nulls, *orig_end; if (!qemu_opts_validate(opts, qemu_smbios_file_opts, errp)) { return; @@ -1263,11 +1264,21 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) } /* - * NOTE: standard double '\0' terminator expected, per smbios spec. - * (except in legacy mode, where the second '\0' is implicit and - * will be inserted by the BIOS). + * NOTE: standard double '\0' terminator expected, per smbios spec, + * unless the data is formatted for legacy mode, which is used by + * pc-i440fx-2.0 and earlier machine types. Legacy mode structures + * without strings have no '\0' terminators, and those with strings + * also don't have an additional '\0' terminator at the end of the + * final string '\0' terminator. The BIOS will add the '\0' terminators + * to comply with the smbios spec. + * For greater compatibility, regardless of the machine type used, + * either format is accepted. */ - smbios_tables = g_realloc(smbios_tables, smbios_tables_len + size); + smbios_tables = g_realloc(smbios_tables, smbios_tables_len + size + 2); + orig_end = smbios_tables + smbios_tables_len + size; + /* add extra null bytes to end in case of legacy file data */ + *orig_end = '\0'; + *(orig_end + 1) = '\0'; header = (struct smbios_structure_header *)(smbios_tables + smbios_tables_len); @@ -1285,6 +1296,20 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) } set_bit(header->type, have_binfile_bitmap); } + for (dbl_nulls = smbios_tables + smbios_tables_len + header->length; + dbl_nulls + 2 <= orig_end; dbl_nulls++) { + if (*dbl_nulls == '\0' && *(dbl_nulls + 1) == '\0') { + break; + } + } + if (dbl_nulls + 2 < orig_end) { + error_setg(errp, "SMBIOS file data malformed"); + return; + } + /* increase size by how many extra nulls were actually needed */ + size += dbl_nulls + 2 - orig_end; + smbios_tables = g_realloc(smbios_tables, smbios_tables_len + size); + set_bit(header->type, have_binfile_bitmap); if (header->type == 4) { smbios_type4_count++; @@ -1304,6 +1329,17 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) * delete the one we don't need from smbios_set_defaults(), * once we know which machine version has been requested. */ + if (dbl_nulls + 2 == orig_end) { + /* chop off nulls to get legacy format */ + if (header->length + 2 == size) { + size -= 2; + } else { + size -= 1; + } + } else { + /* undo conversion from legacy format to per-spec format */ + size -= dbl_nulls + 2 - orig_end; + } if (!smbios_entries) { smbios_entries_len = sizeof(uint16_t); smbios_entries = g_malloc0(smbios_entries_len); diff --git a/hw/vfio/common.c b/hw/vfio/common.c index e70fdf5e0c..a5dfc2d27e 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -73,7 +73,7 @@ bool vfio_mig_active(void) return false; } - QLIST_FOREACH(vbasedev, &vfio_device_list, next) { + QLIST_FOREACH(vbasedev, &vfio_device_list, global_next) { if (vbasedev->migration_blocker) { return false; } @@ -94,7 +94,7 @@ static bool vfio_multiple_devices_migration_is_supported(void) unsigned int device_num = 0; bool all_support_p2p = true; - QLIST_FOREACH(vbasedev, &vfio_device_list, next) { + QLIST_FOREACH(vbasedev, &vfio_device_list, global_next) { if (vbasedev->migration) { device_num++; @@ -1352,13 +1352,13 @@ void vfio_reset_handler(void *opaque) { VFIODevice *vbasedev; - QLIST_FOREACH(vbasedev, &vfio_device_list, next) { + QLIST_FOREACH(vbasedev, &vfio_device_list, global_next) { if (vbasedev->dev->realized) { vbasedev->ops->vfio_compute_needs_reset(vbasedev); } } - QLIST_FOREACH(vbasedev, &vfio_device_list, next) { + QLIST_FOREACH(vbasedev, &vfio_device_list, global_next) { if (vbasedev->dev->realized && vbasedev->needs_reset) { vbasedev->ops->vfio_hot_reset_multi(vbasedev); } diff --git a/hw/vfio/container.c b/hw/vfio/container.c index 242010036a..adc3005beb 100644 --- a/hw/vfio/container.c +++ b/hw/vfio/container.c @@ -848,7 +848,8 @@ static void vfio_put_base_device(VFIODevice *vbasedev) static int vfio_device_groupid(VFIODevice *vbasedev, Error **errp) { - char *tmp, group_path[PATH_MAX], *group_name; + char *tmp, group_path[PATH_MAX]; + g_autofree char *group_name = NULL; int ret, groupid; ssize_t len; @@ -864,7 +865,7 @@ static int vfio_device_groupid(VFIODevice *vbasedev, Error **errp) group_path[len] = 0; - group_name = basename(group_path); + group_name = g_path_get_basename(group_path); if (sscanf(group_name, "%d", &groupid) != 1) { error_setg_errno(errp, errno, "failed to read %s", group_path); return -errno; diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index c62c02f7b6..e167bef2ad 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -824,9 +824,11 @@ static void vfio_msix_disable(VFIOPCIDevice *vdev) } } - if (vdev->nr_vectors) { - vfio_disable_irqindex(&vdev->vbasedev, VFIO_PCI_MSIX_IRQ_INDEX); - } + /* + * Always clear MSI-X IRQ index. A PF device could have enabled + * MSI-X with no vectors. See vfio_msix_enable(). + */ + vfio_disable_irqindex(&vdev->vbasedev, VFIO_PCI_MSIX_IRQ_INDEX); vfio_msi_disable_common(vdev); vfio_intx_enable(vdev, &err); diff --git a/include/block/block-hmp-cmds.h b/include/block/block-hmp-cmds.h index 71113cd7ef..6d9152318f 100644 --- a/include/block/block-hmp-cmds.h +++ b/include/block/block-hmp-cmds.h @@ -48,7 +48,7 @@ void hmp_eject(Monitor *mon, const QDict *qdict); void hmp_qemu_io(Monitor *mon, const QDict *qdict); -void hmp_info_block(Monitor *mon, const QDict *qdict); +void coroutine_fn hmp_info_block(Monitor *mon, const QDict *qdict); void hmp_info_blockstats(Monitor *mon, const QDict *qdict); void hmp_info_block_jobs(Monitor *mon, const QDict *qdict); void hmp_info_snapshots(Monitor *mon, const QDict *qdict); diff --git a/include/block/qapi.h b/include/block/qapi.h index 54c48de26a..b842f19f93 100644 --- a/include/block/qapi.h +++ b/include/block/qapi.h @@ -25,14 +25,14 @@ #ifndef BLOCK_QAPI_H #define BLOCK_QAPI_H +#include "block/block-common.h" #include "block/graph-lock.h" #include "block/snapshot.h" #include "qapi/qapi-types-block-core.h" -BlockDeviceInfo * GRAPH_RDLOCK -bdrv_block_device_info(BlockBackend *blk, BlockDriverState *bs, - bool flat, Error **errp); - +BlockDeviceInfo *coroutine_fn GRAPH_RDLOCK +bdrv_block_device_info(BlockBackend *blk, BlockDriverState *bs, bool flat, + Error **errp); int GRAPH_RDLOCK bdrv_query_snapshot_info_list(BlockDriverState *bs, SnapshotInfoList **p_list, @@ -40,7 +40,10 @@ bdrv_query_snapshot_info_list(BlockDriverState *bs, void GRAPH_RDLOCK bdrv_query_image_info(BlockDriverState *bs, ImageInfo **p_info, bool flat, bool skip_implicit_filters, Error **errp); -void GRAPH_RDLOCK +void coroutine_fn GRAPH_RDLOCK +bdrv_co_query_block_graph_info(BlockDriverState *bs, BlockGraphInfo **p_info, + Error **errp); +void co_wrapper_bdrv_rdlock bdrv_query_block_graph_info(BlockDriverState *bs, BlockGraphInfo **p_info, Error **errp); diff --git a/include/block/raw-aio.h b/include/block/raw-aio.h index 0f63c2800c..1f2c678461 100644 --- a/include/block/raw-aio.h +++ b/include/block/raw-aio.h @@ -31,6 +31,7 @@ #define QEMU_AIO_ZONE_REPORT 0x0100 #define QEMU_AIO_ZONE_MGMT 0x0200 #define QEMU_AIO_ZONE_APPEND 0x0400 +#define QEMU_AIO_FSTAT 0x0800 #define QEMU_AIO_TYPE_MASK \ (QEMU_AIO_READ | \ QEMU_AIO_WRITE | \ @@ -42,7 +43,8 @@ QEMU_AIO_TRUNCATE | \ QEMU_AIO_ZONE_REPORT | \ QEMU_AIO_ZONE_MGMT | \ - QEMU_AIO_ZONE_APPEND) + QEMU_AIO_ZONE_APPEND | \ + QEMU_AIO_FSTAT) /* AIO flags */ #define QEMU_AIO_MISALIGNED 0x1000 diff --git a/include/block/throttle-groups.h b/include/block/throttle-groups.h index 2355e8d9de..e98f71c4db 100644 --- a/include/block/throttle-groups.h +++ b/include/block/throttle-groups.h @@ -27,6 +27,7 @@ #include "qemu/coroutine.h" #include "qemu/throttle.h" +#include "block/block_int.h" #include "qom/object.h" /* The ThrottleGroupMember structure indicates membership in a ThrottleGroup diff --git a/include/hw/elf_ops.h b/include/hw/elf_ops.h index 0a5c258fe6..9c35d1b9da 100644 --- a/include/hw/elf_ops.h +++ b/include/hw/elf_ops.h @@ -500,7 +500,7 @@ static ssize_t glue(load_elf, SZ)(const char *name, int fd, } if (data_swab) { - int j; + elf_word j; for (j = 0; j < file_size; j += (1 << data_swab)) { uint8_t *dp = data + j; switch (data_swab) { diff --git a/include/hw/s390x/s390-pci-bus.h b/include/hw/s390x/s390-pci-bus.h index b1bdbeaeb5..2c43ea123f 100644 --- a/include/hw/s390x/s390-pci-bus.h +++ b/include/hw/s390x/s390-pci-bus.h @@ -361,6 +361,7 @@ struct S390PCIBusDevice { bool unplug_requested; bool interp; bool forwarding_assist; + bool aif; QTAILQ_ENTRY(S390PCIBusDevice) link; }; @@ -400,5 +401,6 @@ S390PCIBusDevice *s390_pci_find_dev_by_target(S390pciState *s, const char *target); S390PCIBusDevice *s390_pci_find_next_avail_dev(S390pciState *s, S390PCIBusDevice *pbdev); +void s390_pci_ism_reset(void); #endif diff --git a/include/ui/rect.h b/include/ui/rect.h index 94898f92d0..68f05d78a8 100644 --- a/include/ui/rect.h +++ b/include/ui/rect.h @@ -19,7 +19,7 @@ static inline void qemu_rect_init(QemuRect *rect, uint16_t width, uint16_t height) { rect->x = x; - rect->y = x; + rect->y = y; rect->width = width; rect->height = height; } diff --git a/linux-user/riscv/vdso-32.so b/linux-user/riscv/vdso-32.so index 1ad1e5cbbb..c2ce2a4757 100755 Binary files a/linux-user/riscv/vdso-32.so and b/linux-user/riscv/vdso-32.so differ diff --git a/linux-user/riscv/vdso-64.so b/linux-user/riscv/vdso-64.so index 83992bebe6..ae49f5b043 100755 Binary files a/linux-user/riscv/vdso-64.so and b/linux-user/riscv/vdso-64.so differ diff --git a/linux-user/riscv/vdso.S b/linux-user/riscv/vdso.S index a86d8fc488..c37275233a 100644 --- a/linux-user/riscv/vdso.S +++ b/linux-user/riscv/vdso.S @@ -101,12 +101,12 @@ endf __vdso_flush_icache .cfi_startproc simple .cfi_signal_frame -#define sizeof_reg (__riscv_xlen / 4) +#define sizeof_reg (__riscv_xlen / 8) #define sizeof_freg 8 -#define B_GR (offsetof_uc_mcontext - sizeof_rt_sigframe) -#define B_FR (offsetof_uc_mcontext - sizeof_rt_sigframe + offsetof_freg0) +#define B_GR 0 +#define B_FR offsetof_freg0 - .cfi_def_cfa 2, sizeof_rt_sigframe + .cfi_def_cfa 2, offsetof_uc_mcontext /* Return address */ .cfi_return_column 64 diff --git a/linux-user/signal.c b/linux-user/signal.c index b35d1e512f..c9527adfa3 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -925,7 +925,7 @@ static void host_sigsegv_handler(CPUState *cpu, siginfo_t *info, cpu_loop_exit_sigsegv(cpu, guest_addr, access_type, maperr, pc); } -static void host_sigbus_handler(CPUState *cpu, siginfo_t *info, +static uintptr_t host_sigbus_handler(CPUState *cpu, siginfo_t *info, host_sigcontext *uc) { uintptr_t pc = host_signal_pc(uc); @@ -947,6 +947,7 @@ static void host_sigbus_handler(CPUState *cpu, siginfo_t *info, sigprocmask(SIG_SETMASK, host_signal_mask(uc), NULL); cpu_loop_exit_sigbus(cpu, guest_addr, access_type, pc); } + return pc; } static void host_signal_handler(int host_sig, siginfo_t *info, void *puc) @@ -974,7 +975,7 @@ static void host_signal_handler(int host_sig, siginfo_t *info, void *puc) host_sigsegv_handler(cpu, info, uc); return; case SIGBUS: - host_sigbus_handler(cpu, info, uc); + pc = host_sigbus_handler(cpu, info, uc); sync_sig = true; break; case SIGILL: diff --git a/linux-user/syscall.c b/linux-user/syscall.c index e384e14248..b3c598a9a4 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6356,8 +6356,8 @@ static abi_long do_prctl_inval1(CPUArchState *env, abi_long arg2) #define do_prctl_sme_set_vl do_prctl_inval1 #endif -static abi_long do_prctl(CPUArchState *env, abi_long option, abi_long arg2, - abi_long arg3, abi_long arg4, abi_long arg5) +static abi_long do_prctl(CPUArchState *env, abi_ulong option, abi_ulong arg2, + abi_ulong arg3, abi_ulong arg4, abi_ulong arg5) { abi_long ret; @@ -8963,10 +8963,10 @@ _syscall5(int, sys_move_mount, int, __from_dfd, const char *, __from_pathname, * of syscall results, can be performed. * All errnos that do_syscall() returns must be -TARGET_. */ -static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, - abi_long arg2, abi_long arg3, abi_long arg4, - abi_long arg5, abi_long arg6, abi_long arg7, - abi_long arg8) +static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_ulong arg1, + abi_ulong arg2, abi_ulong arg3, abi_ulong arg4, + abi_ulong arg5, abi_ulong arg6, abi_ulong arg7, + abi_ulong arg8) { CPUState *cpu = env_cpu(cpu_env); abi_long ret; @@ -9270,8 +9270,13 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, return ret; #endif #ifdef TARGET_NR_lseek - case TARGET_NR_lseek: - return get_errno(lseek(arg1, arg2, arg3)); + case TARGET_NR_lseek: { + off_t off = arg2; + if (arg3 != SEEK_SET) { + off = (abi_long)arg2; + } + return get_errno(lseek(arg1, off, arg3)); + } #endif #if defined(TARGET_NR_getxpid) && defined(TARGET_ALPHA) /* Alpha specific */ @@ -13626,10 +13631,10 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, return ret; } -abi_long do_syscall(CPUArchState *cpu_env, int num, abi_long arg1, - abi_long arg2, abi_long arg3, abi_long arg4, - abi_long arg5, abi_long arg6, abi_long arg7, - abi_long arg8) +abi_long do_syscall(CPUArchState *cpu_env, int num, abi_ulong arg1, + abi_ulong arg2, abi_ulong arg3, abi_ulong arg4, + abi_ulong arg5, abi_ulong arg6, abi_ulong arg7, + abi_ulong arg8) { CPUState *cpu = env_cpu(cpu_env); abi_long ret; diff --git a/linux-user/user-internals.h b/linux-user/user-internals.h index c63ef45fc7..7d43393622 100644 --- a/linux-user/user-internals.h +++ b/linux-user/user-internals.h @@ -60,10 +60,10 @@ int info_is_fdpic(struct image_info *info); void target_set_brk(abi_ulong new_brk); void syscall_init(void); -abi_long do_syscall(CPUArchState *cpu_env, int num, abi_long arg1, - abi_long arg2, abi_long arg3, abi_long arg4, - abi_long arg5, abi_long arg6, abi_long arg7, - abi_long arg8); +abi_long do_syscall(CPUArchState *cpu_env, int num, abi_ulong arg1, + abi_ulong arg2, abi_ulong arg3, abi_ulong arg4, + abi_ulong arg5, abi_ulong arg6, abi_ulong arg7, + abi_ulong arg8); extern __thread CPUState *thread_cpu; G_NORETURN void cpu_loop(CPUArchState *env); abi_long get_errno(abi_long ret); diff --git a/meson.build b/meson.build index 6c77d9687d..4b373b11e1 100644 --- a/meson.build +++ b/meson.build @@ -2077,7 +2077,7 @@ config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_opti if enable_modules config_host_data.set('CONFIG_STAMP', run_command( meson.current_source_dir() / 'scripts/qemu-stamp.py', - meson.project_version(), get_option('pkgversion'), '--', + meson.project_version(), '--', meson.current_source_dir() / 'configure', capture: true, check: true).stdout().strip()) endif diff --git a/migration/rdma.c b/migration/rdma.c index 04debab5d9..4141c0bd25 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -238,6 +238,7 @@ static const char *control_desc(unsigned int rdma_control) return strs[rdma_control]; } +#if !defined(htonll) static uint64_t htonll(uint64_t v) { union { uint32_t lv[2]; uint64_t llv; } u; @@ -245,13 +246,16 @@ static uint64_t htonll(uint64_t v) u.lv[1] = htonl(v & 0xFFFFFFFFULL); return u.llv; } +#endif +#if !defined(ntohll) static uint64_t ntohll(uint64_t v) { union { uint32_t lv[2]; uint64_t llv; } u; u.llv = v; return ((uint64_t)ntohl(u.lv[0]) << 32) | (uint64_t) ntohl(u.lv[1]); } +#endif static void dest_block_to_network(RDMADestBlock *db) { diff --git a/migration/savevm.c b/migration/savevm.c index eec5503a42..4169aa90c8 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -3205,7 +3205,7 @@ void qmp_xen_save_devices_state(const char *filename, bool has_live, bool live, * So call bdrv_inactivate_all (release locks) here to let the other * side of the migration take control of the images. */ - if (live && !saved_vm_running) { + if (!saved_vm_running) { ret = bdrv_inactivate_all(); if (ret) { error_setg(errp, "%s: bdrv_inactivate_all() failed (%d)", diff --git a/monitor/qmp.c b/monitor/qmp.c index 6eee450fe4..a239945e8d 100644 --- a/monitor/qmp.c +++ b/monitor/qmp.c @@ -321,14 +321,6 @@ void coroutine_fn monitor_qmp_dispatcher_co(void *data) qemu_coroutine_yield(); } - /* - * Move the coroutine from iohandler_ctx to qemu_aio_context for - * executing the command handler so that it can make progress if it - * involves an AIO_WAIT_WHILE(). - */ - aio_co_schedule(qemu_get_aio_context(), qmp_dispatcher_co); - qemu_coroutine_yield(); - /* Process request */ if (req_obj->req) { if (trace_event_get_state(TRACE_MONITOR_QMP_CMD_IN_BAND)) { @@ -355,15 +347,6 @@ void coroutine_fn monitor_qmp_dispatcher_co(void *data) } qmp_request_free(req_obj); - - /* - * Yield and reschedule so the main loop stays responsive. - * - * Move back to iohandler_ctx so that nested event loops for - * qemu_aio_context don't start new monitor commands. - */ - aio_co_schedule(iohandler_get_aio_context(), qmp_dispatcher_co); - qemu_coroutine_yield(); } qatomic_set(&qmp_dispatcher_co, NULL); } diff --git a/pc-bios/edk2-aarch64-code.fd.bz2 b/pc-bios/edk2-aarch64-code.fd.bz2 index 985e69a66a..fdcf89022a 100644 Binary files a/pc-bios/edk2-aarch64-code.fd.bz2 and b/pc-bios/edk2-aarch64-code.fd.bz2 differ diff --git a/pc-bios/edk2-arm-code.fd.bz2 b/pc-bios/edk2-arm-code.fd.bz2 index ae797a8c8e..9d829f4f08 100644 Binary files a/pc-bios/edk2-arm-code.fd.bz2 and b/pc-bios/edk2-arm-code.fd.bz2 differ diff --git a/pc-bios/edk2-i386-code.fd.bz2 b/pc-bios/edk2-i386-code.fd.bz2 index e703c2f954..1a9d392574 100644 Binary files a/pc-bios/edk2-i386-code.fd.bz2 and b/pc-bios/edk2-i386-code.fd.bz2 differ diff --git a/pc-bios/edk2-i386-secure-code.fd.bz2 b/pc-bios/edk2-i386-secure-code.fd.bz2 index 7230d44615..fab0a77b30 100644 Binary files a/pc-bios/edk2-i386-secure-code.fd.bz2 and b/pc-bios/edk2-i386-secure-code.fd.bz2 differ diff --git a/pc-bios/edk2-riscv-code.fd.bz2 b/pc-bios/edk2-riscv-code.fd.bz2 index c1cc08561d..6394fbfff3 100644 Binary files a/pc-bios/edk2-riscv-code.fd.bz2 and b/pc-bios/edk2-riscv-code.fd.bz2 differ diff --git a/pc-bios/edk2-x86_64-code.fd.bz2 b/pc-bios/edk2-x86_64-code.fd.bz2 index 9b7767a3ac..0d325bd483 100644 Binary files a/pc-bios/edk2-x86_64-code.fd.bz2 and b/pc-bios/edk2-x86_64-code.fd.bz2 differ diff --git a/pc-bios/edk2-x86_64-microvm.fd.bz2 b/pc-bios/edk2-x86_64-microvm.fd.bz2 index 17460dd380..829429082b 100644 Binary files a/pc-bios/edk2-x86_64-microvm.fd.bz2 and b/pc-bios/edk2-x86_64-microvm.fd.bz2 differ diff --git a/pc-bios/edk2-x86_64-secure-code.fd.bz2 b/pc-bios/edk2-x86_64-secure-code.fd.bz2 index fd0efeacbf..c6b039819c 100644 Binary files a/pc-bios/edk2-x86_64-secure-code.fd.bz2 and b/pc-bios/edk2-x86_64-secure-code.fd.bz2 differ diff --git a/pc-bios/hppa-firmware.img b/pc-bios/hppa-firmware.img index ab715f0ecd..1b3a841825 100644 Binary files a/pc-bios/hppa-firmware.img and b/pc-bios/hppa-firmware.img differ diff --git a/qapi/block-core.json b/qapi/block-core.json index ca390c5700..a4e4761f3c 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -839,7 +839,7 @@ # } ## { 'command': 'query-block', 'returns': ['BlockInfo'], - 'allow-preconfig': true } + 'allow-preconfig': true, 'coroutine': true } ## # @BlockDeviceTimedStats: @@ -1985,7 +1985,8 @@ { 'command': 'query-named-block-nodes', 'returns': [ 'BlockDeviceInfo' ], 'data': { '*flat': 'bool' }, - 'allow-preconfig': true } + 'allow-preconfig': true, + 'coroutine': true} ## # @XDbgBlockGraphNodeType: diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 555528b6bb..176b549473 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -206,9 +206,31 @@ QDict *coroutine_mixed_fn qmp_dispatch(const QmpCommandList *cmds, QObject *requ assert(!(oob && qemu_in_coroutine())); assert(monitor_cur() == NULL); if (!!(cmd->options & QCO_COROUTINE) == qemu_in_coroutine()) { + if (qemu_in_coroutine()) { + /* + * Move the coroutine from iohandler_ctx to qemu_aio_context for + * executing the command handler so that it can make progress if it + * involves an AIO_WAIT_WHILE(). + */ + aio_co_schedule(qemu_get_aio_context(), qemu_coroutine_self()); + qemu_coroutine_yield(); + } + monitor_set_cur(qemu_coroutine_self(), cur_mon); cmd->fn(args, &ret, &err); monitor_set_cur(qemu_coroutine_self(), NULL); + + if (qemu_in_coroutine()) { + /* + * Yield and reschedule so the main loop stays responsive. + * + * Move back to iohandler_ctx so that nested event loops for + * qemu_aio_context don't start new monitor commands. + */ + aio_co_schedule(iohandler_get_aio_context(), + qemu_coroutine_self()); + qemu_coroutine_yield(); + } } else { /* * Actual context doesn't match the one the command needs. @@ -232,7 +254,7 @@ QDict *coroutine_mixed_fn qmp_dispatch(const QmpCommandList *cmds, QObject *requ .errp = &err, .co = qemu_coroutine_self(), }; - aio_bh_schedule_oneshot(qemu_get_aio_context(), do_qmp_dispatch_bh, + aio_bh_schedule_oneshot(iohandler_get_aio_context(), do_qmp_dispatch_bh, &data); qemu_coroutine_yield(); } diff --git a/qemu-bridge-helper.c b/qemu-bridge-helper.c index a26e1663f0..f3483b0a34 100644 --- a/qemu-bridge-helper.c +++ b/qemu-bridge-helper.c @@ -124,7 +124,12 @@ static int parse_acl_file(const char *filename, ACLList *acl_list) } if (strcmp(cmd, "deny") == 0) { - acl_rule = g_malloc(sizeof(*acl_rule)); + acl_rule = calloc(1, sizeof(*acl_rule)); + if (!acl_rule) { + fclose(f); + errno = ENOMEM; + return -1; + } if (strcmp(arg, "all") == 0) { acl_rule->type = ACL_DENY_ALL; } else { @@ -133,7 +138,12 @@ static int parse_acl_file(const char *filename, ACLList *acl_list) } QSIMPLEQ_INSERT_TAIL(acl_list, acl_rule, entry); } else if (strcmp(cmd, "allow") == 0) { - acl_rule = g_malloc(sizeof(*acl_rule)); + acl_rule = calloc(1, sizeof(*acl_rule)); + if (!acl_rule) { + fclose(f); + errno = ENOMEM; + return -1; + } if (strcmp(arg, "all") == 0) { acl_rule->type = ACL_ALLOW_ALL; } else { @@ -438,6 +448,18 @@ int main(int argc, char **argv) goto cleanup; } +#ifndef CONFIG_LIBCAP + /* + * avoid sending the fd as root user if running suid to not fool + * peer credentials to daemons that dont expect that + */ + if (setuid(getuid()) < 0) { + fprintf(stderr, "Failed to drop privileges.\n"); + ret = EXIT_FAILURE; + goto cleanup; + } +#endif + /* write fd to the domain socket */ if (send_fd(unixfd, fd) == -1) { fprintf(stderr, "failed to write fd to unix socket: %s\n", @@ -459,7 +481,7 @@ cleanup: } while ((acl_rule = QSIMPLEQ_FIRST(&acl_list)) != NULL) { QSIMPLEQ_REMOVE_HEAD(&acl_list, entry); - g_free(acl_rule); + free(acl_rule); } return ret; diff --git a/qemu-img.c b/qemu-img.c index 5a77f67719..63281a84a1 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -2962,9 +2962,7 @@ static BlockGraphInfoList *collect_image_info_list(bool image_opts, * duplicate the backing chain information that we obtain by walking * the chain manually here. */ - bdrv_graph_rdlock_main_loop(); bdrv_query_block_graph_info(bs, &info, &err); - bdrv_graph_rdunlock_main_loop(); if (err) { error_report_err(err); diff --git a/roms/Makefile b/roms/Makefile index 67f709ba2d..d310185c6c 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -52,6 +52,12 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org" # EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom +# NB: Certain SUSE qemu subpackages use date information, but we want +# reproducible builds, so we use a pre-determined timestamp, rather +# than the current timestamp to acheive consistent results build to +# build. +PACKAGING_TIMESTAMP = $(shell date -r ../VERSION +%s) + default help: @echo "nothing is build by default" @echo "available build targets:" @@ -118,16 +124,20 @@ efi-rom-%: build-pxe-roms build-efi-roms edk2-basetools build-pxe-roms: $(MAKE) -C ipxe/src CONFIG=qemu \ + PACKAGING_TIMESTAMP=$(PACKAGING_TIMESTAMP) \ CROSS_COMPILE=$(x86_64_cross_prefix) \ $(patsubst %,bin/%.rom,$(pxerom_targets)) build-efi-roms: build-pxe-roms $(MAKE) -C ipxe/src CONFIG=qemu \ + PACKAGING_TIMESTAMP=$(PACKAGING_TIMESTAMP) \ CROSS_COMPILE=$(x86_64_cross_prefix) \ $(patsubst %,bin-x86_64-efi/%.efidrv,$(pxerom_targets)) slof: - $(MAKE) -C SLOF CROSS=$(powerpc64_cross_prefix) qemu + $(MAKE) -C SLOF CROSS=$(powerpc64_cross_prefix) \ + PACKAGING_TIMESTAMP=$(PACKAGING_TIMESTAMP) \ + qemu cp SLOF/boot_rom.bin ../pc-bios/slof.bin u-boot.e500: @@ -153,6 +163,9 @@ efi: rm -f ../pc-bios/edk2-*.fd.bz2 bzip2 --verbose ../pc-bios/edk2-*.fd +edk2-basetools: + python3 edk2-build.py --config edk2-build.config -m none + opensbi32-generic: $(MAKE) -C opensbi \ CROSS_COMPILE=$(riscv32_cross_prefix) \ @@ -169,7 +182,7 @@ MESON = meson NINJA = ninja qboot: mkdir -p qboot/build - $(MESON) setup $(if $(wildcard qboot/build/meson-private),--wipe,) qboot qboot/build + $(MESON) setup $(if $(x86_64_cross_prefix),--cross-file qboot/cross.ini,) $(if $(wildcard qboot/build/meson-private),--wipe,) qboot qboot/build $(NINJA) -C qboot/build cp qboot/build/bios.bin ../pc-bios/qboot.rom diff --git a/roms/SLOF b/roms/SLOF index 3a259df244..f818481284 160000 --- a/roms/SLOF +++ b/roms/SLOF @@ -1 +1 @@ -Subproject commit 3a259df2449fc4a4e43ab5f33f0b2c66484b4bc3 +Subproject commit f8184812847bde0e76b6062b32dc0551f6b3700b diff --git a/roms/edk2 b/roms/edk2 index 819cfc6b42..b8a3eec88c 160000 --- a/roms/edk2 +++ b/roms/edk2 @@ -1 +1 @@ -Subproject commit 819cfc6b42a68790a23509e4fcc58ceb70e1965e +Subproject commit b8a3eec88cc74bbfe7fb389d026cc7d1d8a989c8 diff --git a/roms/edk2-build.config b/roms/edk2-build.config index bab6a9caeb..0d367dbdb7 100644 --- a/roms/edk2-build.config +++ b/roms/edk2-build.config @@ -22,9 +22,15 @@ SMM_REQUIRE = TRUE [opts.armvirt.silent] DEBUG_PRINT_ERROR_LEVEL = 0x80000000 -[pcds.nx.broken.grub] +[pcds.nx.strict] +PcdDxeNxMemoryProtectionPolicy = 0xC000000000007FD5 +PcdUninstallMemAttrProtocol = FALSE + +[pcds.nx.broken.shim.grub] # grub.efi uses EfiLoaderData for code PcdDxeNxMemoryProtectionPolicy = 0xC000000000007FD1 +# shim.efi has broken MemAttr code +PcdUninstallMemAttrProtocol = TRUE [pcds.workaround.202308] PcdFirstTimeWakeUpAPsBySipi = FALSE @@ -95,7 +101,7 @@ conf = ArmVirtPkg/ArmVirtQemu.dsc arch = ARM opts = common armvirt.silent -pcds = nx.broken.grub +pcds = nx.broken.shim.grub plat = ArmVirtQemu-ARM dest = ../pc-bios cpy1 = FV/QEMU_EFI.fd edk2-arm-code.fd @@ -112,7 +118,7 @@ conf = ArmVirtPkg/ArmVirtQemu.dsc arch = AARCH64 opts = common armvirt.silent -pcds = nx.broken.grub +pcds = nx.broken.shim.grub plat = ArmVirtQemu-AARCH64 dest = ../pc-bios cpy1 = FV/QEMU_EFI.fd edk2-aarch64-code.fd diff --git a/roms/ipxe b/roms/ipxe index 4bd064de23..f07b8debea 160000 --- a/roms/ipxe +++ b/roms/ipxe @@ -1 +1 @@ -Subproject commit 4bd064de239dab2426b31c9789a1f4d78087dc63 +Subproject commit f07b8debea3310ceb288fb19abcfc4f4f66f3cec diff --git a/roms/qboot b/roms/qboot index 8ca302e86d..a923c8e623 160000 --- a/roms/qboot +++ b/roms/qboot @@ -1 +1 @@ -Subproject commit 8ca302e86d685fa05b16e2b208888243da319941 +Subproject commit a923c8e623e0e8bb7db50cbd2358bb76a5f04a15 diff --git a/roms/seabios b/roms/seabios index a6ed6b701f..c13ff2cd58 160000 --- a/roms/seabios +++ b/roms/seabios @@ -1 +1 @@ -Subproject commit a6ed6b701f0a57db0569ab98b0661c12a6ec3ff8 +Subproject commit c13ff2cd58e48ec239c1250a15947ea91bdf117a diff --git a/roms/seabios-hppa b/roms/seabios-hppa index 4c6ecda618..e4eac85880 160000 --- a/roms/seabios-hppa +++ b/roms/seabios-hppa @@ -1 +1 @@ -Subproject commit 4c6ecda618f2066707f50c53f31419244fd7f77a +Subproject commit e4eac85880e8677f96d8b9e94de9f2eec9c0751f diff --git a/roms/skiboot b/roms/skiboot index 24a7eb3596..cfe312b915 160000 --- a/roms/skiboot +++ b/roms/skiboot @@ -1 +1 @@ -Subproject commit 24a7eb35966d93455520bc2debdd7954314b638b +Subproject commit cfe312b915637ca379b9e3b578250cce4e933ffa diff --git a/rpm/50-seabios-256k.json b/rpm/50-seabios-256k.json new file mode 100644 index 0000000000..3109f131a2 --- /dev/null +++ b/rpm/50-seabios-256k.json @@ -0,0 +1,35 @@ +{ + "description": "SeaBIOS", + "interface-types": [ + "bios" + ], + "mapping": { + "device": "memory", + "filename": "/usr/share/qemu/bios-256k.bin" + }, + "targets": [ + { + "architecture": "i386", + "machines": [ + "pc-i440fx-*", + "pc-q35-*" + ] + }, + { + "architecture": "x86_64", + "machines": [ + "pc-i440fx-*", + "pc-q35-*" + ] + } + ], + "features": [ + "acpi-s3", + "acpi-s4" + ], + "tags": [ + "CONFIG_QEMU=y", + "CONFIG_ROM_SIZE=256", + "CONFIG_ATA_DMA=n" + ] +} diff --git a/rpm/60-seabios-128k.json b/rpm/60-seabios-128k.json new file mode 100644 index 0000000000..6c0ed15bb2 --- /dev/null +++ b/rpm/60-seabios-128k.json @@ -0,0 +1,47 @@ +{ + "description": "SeaBIOS", + "interface-types": [ + "bios" + ], + "mapping": { + "device": "memory", + "filename": "/usr/share/qemu/bios.bin" + }, + "targets": [ + { + "architecture": "i386", + "machines": [ + "pc-i440fx-*", + "pc-q35-*" + ] + }, + { + "architecture": "x86_64", + "machines": [ + "pc-i440fx-*", + "pc-q35-*" + ] + } + ], + "features": [ + "acpi-s3", + "acpi-s4" + ], + "tags": [ + "CONFIG_QEMU=y", + "CONFIG_ROM_SIZE=128", + "CONFIG_ATA_DMA=n", + "CONFIG_BOOTSPLASH=n", + "CONFIG_XEN=n", + "CONFIG_USB_OHCI=n", + "CONFIG_USB_XHCI=n", + "CONFIG_USB_UAS=n", + "CONFIG_SDCARD=n", + "CONFIG_TCGBIOS=n", + "CONFIG_MPT_SCSI=n", + "CONFIG_PVSCSI=n", + "CONFIG_NVME=n", + "CONFIG_USE_SMM=n", + "CONFIG_VGAHOOKS=n" + ] +} diff --git a/rpm/80-kvm.rules b/rpm/80-kvm.rules new file mode 100644 index 0000000000..29ad001729 --- /dev/null +++ b/rpm/80-kvm.rules @@ -0,0 +1 @@ +KERNEL=="kvm", MODE="0666", GROUP="kvm" diff --git a/rpm/80-qemu-ga.rules b/rpm/80-qemu-ga.rules new file mode 100644 index 0000000000..f38ace1b34 --- /dev/null +++ b/rpm/80-qemu-ga.rules @@ -0,0 +1 @@ +SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="qemu-guest-agent.service" diff --git a/rpm/APIC.core-count2 b/rpm/APIC.core-count2 new file mode 100644 index 0000000000..a255082ef5 Binary files /dev/null and b/rpm/APIC.core-count2 differ diff --git a/rpm/DSDT.core-count2 b/rpm/DSDT.core-count2 new file mode 100644 index 0000000000..ca309f6569 Binary files /dev/null and b/rpm/DSDT.core-count2 differ diff --git a/rpm/DSDT.pcie b/rpm/DSDT.pcie new file mode 100644 index 0000000000..b5ead3eae1 Binary files /dev/null and b/rpm/DSDT.pcie differ diff --git a/rpm/FACP.core-count2 b/rpm/FACP.core-count2 new file mode 100644 index 0000000000..31fa5dd19c Binary files /dev/null and b/rpm/FACP.core-count2 differ diff --git a/rpm/README.PACKAGING b/rpm/README.PACKAGING new file mode 100644 index 0000000000..b744ebfa3e --- /dev/null +++ b/rpm/README.PACKAGING @@ -0,0 +1,202 @@ +# PACKAGING WORKFLOW(S) + +The qemu package follows a special maintenance workflow in order to support +git based patching, including of submodules. Please use it in order to have +changes you make be acceptable to the package maintainers. + +All the development happens at https://github.com/openSUSE/qemu. The relevant +branch is `factory`. + +Any change to the package should be submitted in the form of a Pull Request +against such repository and branch. + +The reminder of this document provides more details, explanations and examples +for both contributors and maintainers. + + +# FOR CONTRIBUTORS + +## BACKPORTING AN UPSTREAM PATCH + +For submitting a backport of an upstream patch, proceed as follows (a local +copy of the repository is of course necessary). + +Identify the hash of the commit that needs backporting and do: + + git cherry-pick -esx + +This way, the changelog will already contain the reference to the upstream +commit itself, and the appropriate "Signed-off-by:" tag. + +If the backport is related to Bugzilla (or Jira, and/or CVEs, etc) entry, add a +reference to that, such as: + + Resolves: bsc#123456 + +Or: + + References: jsc#PED-1234 + +Or: + + Resolves: bsc#7891011 (CVE-1234-5678) + +Add it between the "(cherry picked from commit ...)" line and the "Signed-off-by:" +line that follows it. + +An example of the end result, where Dario Faggioli () is +backporting upstream commit abe2c4bdb65e8dd in order to fix bug 1209546 from +bugzilla.opensuse.org is: + + test-vmstate: fix bad GTree usage, use-after-free + + According to g_tree_foreach() documentation: + "The tree may not be modified while iterating over it (you can't + add/remove items)." + + [...] + + Get rid of the node removal within the tree traversal. Also + check the trees have the same number of nodes before the actual + diff. + + Fixes: 9a85e4b8f6 ("migration: Support gtree migration") + Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1518 + Signed-off-by: Marc-Andr303251 Lureau + Signed-off-by: Eric Auger + Reported-by: Richard W.M. Jones + Tested-by: Richard W.M. Jones + Reviewed-by: Richard W.M. Jones + Reviewed-by: Daniel P. Berrang303251 + Reviewed-by: Juan Quintela + Signed-off-by: Juan Quintela + (cherry picked from commit abe2c4bdb65e8dd9cb2f01c355baa394bf49a8af) + Resolves: bsc#1209546 + Signed-off-by: Dario Faggioli + +Of course, all conflicts and issues should be resolved, before committing the +result/completing the cherry-picking. + +At this point, the PR should be opened. As soon as that happens, some checks +will be run automatically and the maintainers of the QEMU package will review +and, eventually, merge or reject it. + +PRs containing multiple commits are allowed. They are actually encouraged, if +the patches being backported are related and/or dependant among each others. It +must, however, always be the case that each upstream commit is cherry-picked +individually. + +Note that there is no need to change any 'qemu.changes' file. That will, in +fact be handled by the package maintainers (and such RPM changelog entries will +be automatically generated out of the git commit messages). + +## ADDING A PATCH NOT COMING FROM UPSTREAM + +Downstream patches, i.e., patches that are not backports of upstream commits, +should be avoided as much as possible. The (largely!) recommended approach is +to submit the patch upstream and then, once it is accepted and committed, +backport it. + +If that is not possible (for whatever reason), a pull request with a downstream +only patch can be opened. The procedure is almost identical to the one described +above for upstream backports. The main differences are: + +1) Downstream only patch cannot be cherry-picked from upstream commits, of + course. Therefore, the PR will consist of the commit(s) that introduces the + patch. + +2) There will be no "(cherry picked from commit ...") line in the changelog + of a downstream only patch. On the other hand, the "Resolves:" or + "Reference:" tag, that link the patch to the issue it's trying to solve, + must be there, and the same is true for the "Signed-off-by:" tag + indicating who is proposing adding it. + +3) It is required that the subject of the commit starts with the [openSUSE] tag. + +An example of a downstream only commit is: + + [openSUSE] pc: q35: Bump max_cpus to 1024 + + And use the new limit for machine version 7.1 too. + Keep the old limit of 288 for machine versions 7.0 and earlier. + + Signed-off-by: Dario Faggioli + References: bsc#1202282, jsc#PED-2592 + Signed-off-by: Dario Faggioli + +## CHANGING THE PACKAGING FILES + +Files that are necessary for building the RPM (like the spec file) or that +are part of the RPM and will be copied in the appropriate places in the +filesystem when it is installed are also part of the git repository. In fact, +they can be found in the `rpm/` directory. + +Any addition, removal or change of and on any of those file should just be done +as a regular commit, and a pull request including such commit(s) should be +opened. + +Commits to packaging files should be prefixed with both the [openSUSE] tag and +an [RPM] tag. An example can be this one: + + [openSUSE][RPM] Add downstream packaging files + + Stash the "packaging files" in the QEMU repository, in the rpm/ + directory. During package build, they will be pulled out from there + and used as appropriate. + + Signed-off-by: Dario Faggioli + +## ADDING A PATCH IN A SUBMODULE + +For including a backport, or in general adding a patch, to a submodule, the +downstream git repository for the submodule must be checkedout at the location +where the submodule resides, in the main QEMU git repository. + +For example, for including a downstream patch in the ipxe submodule, a local +copy of the repository https://github.com/openSUSE/qemu-ipxe.git is necessary. +After checking out the `factory` branch, add the patch there (cherry-picking +it from upstream, if it is a backport, and respecting all the tagging rules +explained in the previous sections). + +At this point: +- the branch must be pushed; +- in the main (qemu) repository, a commit must be added and pushed, for making + sure that the new patch is picked up. + +Basically, the commit in the main repository is how the information that a +submodule as a new head is recorded. + +The changelog of such commit shall include a reference to the subjects of all +the new commits in the various submodules. Unfortinately, there is not yet a +good way of achieving this automatically. + +As last step, a pull request should be opened, as usual. + +## REMOVING PATCHES + +If a patch, or, in general, a commit, that is already part of the repository +must be removed, this must be done without rewriting the git history, i.e., with +a revert (and then a pull request with the revert should be opened). + + +# FOR MAINTAINERS + +## REVIEWING AND ACCEPTING PRs + +TODO + +## COMMITTING CHANGES INTO FACTORY + +TODO + +## UPDATING THE BASE QEMU VERSION + +TODO + + +# MANUAL AND AUTOMATED CHECKS + +TODO + + + diff --git a/rpm/bridge.conf b/rpm/bridge.conf new file mode 100644 index 0000000000..d06c62a338 --- /dev/null +++ b/rpm/bridge.conf @@ -0,0 +1,11 @@ +# Access control file for qemu bridge helper +# Syntax consists of: +# # comment (ignored) +# allow all +# allow +# deny all +# deny +# include /path/to/additional/ACL/file +# Users are blacklisted by default and 'deny' takes precedence over 'allow'. +# Including additional ACL files allows file access permissions to be used as +# a component of the policy to allow access or deny access to specific bridges. diff --git a/rpm/common.inc b/rpm/common.inc new file mode 100644 index 0000000000..c5a3d466ee --- /dev/null +++ b/rpm/common.inc @@ -0,0 +1,102 @@ +%define _buildshell /bin/bash + +%define sbver 1.16.3_3_ga95067eb + +%define srcdir %{_builddir}/%buildsubdir +%define blddir %srcdir/build + +%define build_x86_firmware 0 +%define build_ppc_firmware 0 +%define build_opensbi_firmware 0 +%define kvm_available 0 +%define legacy_qemu_kvm 0 +%define force_fit_virtio_pxe_rom 1 + +%define with_xen 0%{!?_without_xen:1} + +%if "%{?distribution}" == "" +%define distro private-build +%else +%define distro %{distribution} +%endif + +# Items to exclude in ALP-based products +%if 0%{?suse_version} == 1600 +%define with_xen 0 +%endif + +%bcond_with system_membarrier +%bcond_with malloc_trim + +%bcond_with chkqtests + +%if 0%{?suse_version} > 1600 +# canokey is an openSUSE thing, not a SLE one +%ifarch x86_64 +%bcond_without canokey +%else +%bcond_with canokey +%endif +%endif + +%if 0%{?suse_version} > 1600 +# XDP seems not to be there in SLE... +%bcond_without xdp +%else +%bcond_with xdp +%endif + +# Make it possible to build without spice (for SLE/Leap Micro) +%bcond_without spice + +# We do not have the stuff needed to compile rutabaga support. +# If/when we want to do it, we can check how it's done here: +# https://src.fedoraproject.org/rpms/qemu/c/deeb9357cb751df21c566fd8408936cfb034d43b?branch=rawhide +%define has_rutabaga_gfx 0 + +%define has_virtiofsd 1 +# Upstream virtiofsd does not even build on 32 bit systems +%ifarch %ix86 %arm +%define has_virtiofsd 0 +%endif + +# non-x86 archs still seem to have some issues with Link Time Optimization +%ifnarch %ix86 x86_64 +%define _lto_cflags %{nil} +%endif + +%ifarch aarch64 +%define qemu_arch aarch64 +%endif +%ifarch %arm +%define qemu_arch arm +%endif +%ifarch %ix86 +%define qemu_arch i386 +%endif +%ifarch ppc64 +%define qemu_arch ppc64 +%endif +%ifarch ppc +%define qemu_arch ppc +%endif +%ifarch ppc64le +%define qemu_arch ppc64le +%endif +%ifarch riscv64 +%define qemu_arch riscv64 +%endif +%ifarch s390x +%define qemu_arch s390x +%endif +%ifarch x86_64 +%define qemu_arch x86_64 +%endif + +%define generic_qemu_description \ +QEMU provides full machine emulation and cross architecture usage. It closely\ +integrates with KVM and Xen virtualization, allowing for excellent performance.\ +Many options are available for defining the emulated environment, including\ +traditional devices, direct host device access, and interfaces specific to\ +virtualization. + diff --git a/rpm/config.sh b/rpm/config.sh new file mode 100644 index 0000000000..b061b05647 --- /dev/null +++ b/rpm/config.sh @@ -0,0 +1,122 @@ +#!/bin/bash + +# config.sh: + +# The next few VARIABLES are to be edited as required: + +# Package name. (In multibuild, it's the base package). Used to ref spec file. +PKG=qemu + +# Here is the git repo which tracks a separate upstream git based project +# We take this approach so we can have our own tags and branches, and store +# the patches in git for others to access outside of the bundle. +PACKAGE_MAIN_GIT_REPO=https://github.com/openSUSE/qemu.git + +# This is the upstream for the PACKAGE_MAIN_GIT_REPO +UPSTREAM_GIT_REPO=https://gitlab.com/qemu-project/qemu.git + +# The following specifies the upstream tag or commit upon which our patchqueue +# gets rebased. The special value LATEST may be used to "automatically" track +# the upstream development tree in the master branch +#GIT_UPSTREAM_COMMIT_ISH=v7.0.0 +GIT_UPSTREAM_COMMIT_ISH=v7.1.0 +# WARNING: If transitioning from using LATEST to not, MANUALLY re-set the +# tarball present. If transitioning TO LATEST, make sure that +# NEXT_RELEASE_IS_MAJOR is set correctly +# This is used to choose the version number when LATEST processing is active +NEXT_RELEASE_IS_MAJOR=1 + +# Unfortunately, SeaBIOS doesn't always follow an "always increasing" version +# model, so there may be times we should overide the automated version setting. +# We can do so by specifing the value here: +#SEABIOS_VERSION=1.13.0 + +# In following, use 1 or 0 as needed (representing true or false respectively) +NUMBERED_PATCHES=0 + +PATCH_RANGE=1000 + +# For compatibility with old packages, we include this option +OVERRIDE_FIVE_DIGIT_NUMBERING=0 + +# Path to be used for temporary files, directories, repositories, etc. +# Default is /dev/shm. An alternative could be /tmp (e.g., when building +# in containers, or whatever). +#TMPDIR=/dev/shm +TMPDIR=/tmp + +# This array tracks all git submodule paths within the superproject (1st entry) +PATCH_PATH_MAP=( + "" + "roms/seabios/" + "roms/ipxe/" + "roms/sgabios/" + "roms/edk2/" + "roms/skiboot/" + "roms/SLOF/" + "roms/openbios/" + "ui/keycodemapdb/" + "slirp/" + "roms/u-boot/" + "roms/qboot/" + "dtc/" + "roms/opensbi/" + "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/" + "capstone/" + "roms/qemu-palcode/" + "roms/seabios-hppa/" + "roms/u-boot-sam460ex/" + "roms/QemuMacDrivers/" + "meson/" + "tests/fp/berkeley-softfloat-3/" + "tests/fp/berkeley-testfloat-3/" + "tests/lcitool/libvirt-ci" + "roms/edk2/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3/" + "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/boringssl/" + "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/krb5/" + "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/pyca-cryptography/" + "roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/" + "roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/" + "roms/edk2/MdeModulePkg/Universal/RegularExpressionDxe/oniguruma/" + "roms/edk2/UnitTestFrameworkPkg/Library/CmockaLib/cmocka/" + "roms/vbootrom/" + "roms/edk2/RedfishPkg/Library/JsonLib/jansson" +) + +# (order and count must correspond to PATCH_PATH_MAP) +LOCAL_REPO_MAP=( + ~/git/qemu-opensuse + ~/git/qemu-seabios + ~/git/qemu-ipxe + ~/git/qemu-sgabios + ~/git/qemu-edk2 + ~/git/qemu-skiboot + ~/git/qemu-SLOF + ~/git/qemu-openbios + ~/git/qemu-keycodemapdb + ~/git/qemu-slirp + ~/git/qemu-u-boot + ~/git/qemu-qboot + ~/git/qemu-dtc + ~/git/qemu-opensbi + ~/git/qemu-edk2-openssl + ~/git/qemu-capstone + ~/git/qemu-qemu-palcode + ~/git/qemu-seabios-hppa + ~/git/qemu-u-boot-sam460ex + ~/git/qemu-QemuMacDrivers + ~/git/qemu-meson + ~/git/qemu-tests-berkeley-softfloat-3 + ~/git/qemu-tests-berkeley-testfloat-3 + ~/git/qemu-tests-lcitool-libvirt-ci + ~/git/qemu-edk2-berkeley-softfloat-3 + ~/git/qemu-edk2-openssl-boringssl + ~/git/qemu-edk2-openssl-krb5 + ~/git/qemu-edk2-openssl-pyca-cryptography + ~/git/qemu-edk2-BrotliCompress-brotli + ~/git/qemu-edk2-BrotliCustomDecompressLib-brotli + ~/git/qemu-edk2-oniguruma + ~/git/qemu-edk2-cmocka + ~/git/qemu-vbootrom + ~/git/qemu-edk2-jansson +) diff --git a/rpm/ksm.service b/rpm/ksm.service new file mode 100644 index 0000000000..fec1e7eaf0 --- /dev/null +++ b/rpm/ksm.service @@ -0,0 +1,13 @@ +[Unit] +Description=Kernel Samepage Merging +ConditionPathExists=/sys/kernel/mm/ksm +ConditionVirtualization=no + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/bin/bash -c "/bin/echo 1 > /sys/kernel/mm/ksm/run" +ExecStop=/bin/bash -c "/bin/echo 0 > /sys/kernel/mm/ksm/run" + +[Install] +WantedBy=multi-user.target diff --git a/rpm/kvm.conf b/rpm/kvm.conf new file mode 100644 index 0000000000..c1c76e682c --- /dev/null +++ b/rpm/kvm.conf @@ -0,0 +1,3 @@ +# load kvm module at boot time +kvm + diff --git a/rpm/openSUSE-pcbios-stub-out-the-SAN-req-s-i.patch b/rpm/openSUSE-pcbios-stub-out-the-SAN-req-s-i.patch new file mode 100644 index 0000000000..4f88af1ef9 --- /dev/null +++ b/rpm/openSUSE-pcbios-stub-out-the-SAN-req-s-i.patch @@ -0,0 +1,106 @@ +From: Bruce Rogers +Date: Mon, 24 Jul 2017 10:44:24 -0600 +Subject: [openSUSE] [pcbios] stub out the SAN req's in int13 + +Include-If: %if 0%{?patch-possibly-applied-elsewhere} + +We need to find some code or data to change so we can make the rom fit +into the legacy size requirements. Comment out SAN support, and +hopefully nobody will be impacted. + +Signed-off-by: Bruce Rogers +--- + src/arch/x86/interface/pcbios/int13.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/roms/ipxe/src/arch/x86/interface/pcbios/int13.c b/roms/ipxe/src/arch/x86/interface/pcbios/int13.c +index ca789a0d154e1fe3c2508a3aefea..40c61419c0c134120d1ce7c81a1e 100644 +--- a/roms/ipxe/src/arch/x86/interface/pcbios/int13.c ++++ b/roms/ipxe/src/arch/x86/interface/pcbios/int13.c +@@ -23,6 +23,12 @@ + + FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + ++#define INCLUDE_SAN_HOOKS 0 ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wunused-parameter" ++#pragma GCC diagnostic ignored "-Wunused-function" ++#pragma GCC diagnostic ignored "-Wunused-variable" ++ + #include + #include + #include +@@ -1243,6 +1249,7 @@ static void int13_unhook_vector ( void ) { + */ + static int int13_hook ( unsigned int drive, struct uri **uris, + unsigned int count, unsigned int flags ) { ++#if INCLUDE_SAN_HOOKS + struct san_device *sandev; + struct int13_data *int13; + unsigned int natural_drive; +@@ -1315,6 +1322,9 @@ static int int13_hook ( unsigned int drive, struct uri **uris, + sandev_put ( sandev ); + err_alloc: + return rc; ++#else ++ return -1; ++#endif + } + + /** +@@ -1328,6 +1338,7 @@ static int int13_hook ( unsigned int drive, struct uri **uris, + */ + static void int13_unhook ( unsigned int drive ) { + struct san_device *sandev; ++#if INCLUDE_SAN_HOOKS + + /* Find drive */ + sandev = sandev_find ( drive ); +@@ -1353,6 +1364,7 @@ static void int13_unhook ( unsigned int drive ) { + + /* Drop reference to drive */ + sandev_put ( sandev ); ++#endif + } + + /** +@@ -1514,6 +1526,7 @@ static int int13_load_eltorito ( unsigned int drive, struct segoff *address ) { + * Note that this function can never return success, by definition. + */ + static int int13_boot ( unsigned int drive, const char *filename __unused ) { ++#if INCLUDE_SAN_HOOKS + struct memory_map memmap; + struct segoff address; + int rc; +@@ -1539,6 +1552,9 @@ static int int13_boot ( unsigned int drive, const char *filename __unused ) { + } + + return -ECANCELED; /* -EIMPOSSIBLE */ ++#else ++ return -1; ++#endif + } + + /** Maximum size of boot firmware table(s) */ +@@ -1605,6 +1621,7 @@ static int int13_install ( struct acpi_header *acpi ) { + * @ret rc Return status code + */ + static int int13_describe ( void ) { ++#if INCLUDE_SAN_HOOKS + int rc; + + /* Clear tables */ +@@ -1619,9 +1636,13 @@ static int int13_describe ( void ) { + } + + return 0; ++#else ++ return -1; ++#endif + } + + PROVIDE_SANBOOT ( pcbios, san_hook, int13_hook ); + PROVIDE_SANBOOT ( pcbios, san_unhook, int13_unhook ); + PROVIDE_SANBOOT ( pcbios, san_boot, int13_boot ); + PROVIDE_SANBOOT ( pcbios, san_describe, int13_describe ); ++#pragma GCC diagnostic pop diff --git a/rpm/qemu-guest-agent.service b/rpm/qemu-guest-agent.service new file mode 100644 index 0000000000..2d6da4250a --- /dev/null +++ b/rpm/qemu-guest-agent.service @@ -0,0 +1,14 @@ +[Unit] +Description=QEMU Guest Agent +Documentation=http://wiki.qemu.org/Features/GuestAgent +BindsTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device +After=dev-virtio\x2dports-org.qemu.guest_agent.0.device + +[Service] +Type=simple +ExecStart=-/usr/bin/qemu-ga -p /dev/virtio-ports/org.qemu.guest_agent.0 +Restart=always +RestartSec=0 + +[Install] +WantedBy=dev-virtio\x2dports-org.qemu.guest_agent.0.device diff --git a/rpm/qemu-ifup b/rpm/qemu-ifup new file mode 100644 index 0000000000..7716b12446 --- /dev/null +++ b/rpm/qemu-ifup @@ -0,0 +1,23 @@ +#!/bin/sh + +# sample bridge qemu-ifup script + +echo 'configuring qemu network with bridge for' $* + +# If bridge is not specified, try device with default route. +bridge=$2 +if [ -z "$bridge" ]; then + bridge=$(/usr/sbin/ip route list | /usr/bin/awk '/^default / { print $5 }') +fi + +# Exit if $bridge is not a bridge. Exit with 0 status +# so qemu process is not terminated and provide message +# about failure to setup network. +if [ ! -e "/sys/class/net/${bridge}/bridge" ] +then + echo "WARNING! ${bridge} is not a bridge. qemu-ifup exiting. VM may not have a functioning networking stack." + exit 0 +fi + +/usr/sbin/ip link set $1 up +/usr/sbin/ip link set $1 master $bridge || true diff --git a/rpm/qemu-kvm.1.gz b/rpm/qemu-kvm.1.gz new file mode 100644 index 0000000000..48e8ae91e9 Binary files /dev/null and b/rpm/qemu-kvm.1.gz differ diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec new file mode 100644 index 0000000000..7978314de0 --- /dev/null +++ b/rpm/qemu-linux-user.spec @@ -0,0 +1,352 @@ +# +# spec file for package qemu-linux-user +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%include %{_sourcedir}/common.inc + +%ifarch %ix86 x86_64 s390x +%define legacy_qemu_kvm 1 +%endif + +Name: qemu-linux-user +URL: https://www.qemu.org/ +Summary: CPU emulator for user space +License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT +Group: System/Emulators/PC +Version: 8.2.1 +Release: 0 +Source0: qemu-%{version}.tar.xz +Source1: common.inc +Source200: qemu-rpmlintrc +Source303: README.PACKAGING +Source1000: qemu-rpmlintrc +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: bison +BuildRequires: glib2-devel-static >= 2.56 +BuildRequires: glibc-devel-static +BuildRequires: (pcre-devel-static if glib2-devel-static < 2.73 else pcre2-devel-static) +# passing filelist check for /usr/lib/binfmt.d +BuildRequires: systemd +BuildRequires: zlib-devel-static +# we must not install the qemu-linux-user package when under QEMU build +%if 0%{?qemu_user_space_build:1} +#!BuildIgnore: post-build-checks +%endif +BuildRequires: discount +BuildRequires: fdupes +BuildRequires: flex +BuildRequires: gcc-c++ +BuildRequires: meson +BuildRequires: ninja >= 1.7 +%if 0%{?suse_version} >= 1600 +BuildRequires: python3-Sphinx +BuildRequires: python3-base >= 3.8 +%else +BuildRequires: python311-Sphinx +BuildRequires: python311-base +%endif + +%description +QEMU provides CPU emulation along with other related capabilities. This package +provides programs to run user space binaries and libraries meant for another +architecture. The syscall interface is intercepted and execution below the +syscall layer occurs on the native hardware and operating system. + +%files +%doc README.rst VERSION +%license COPYING COPYING.LIB LICENSE +%_bindir/qemu-aarch64 +%_bindir/qemu-aarch64_be +%_bindir/qemu-alpha +%_bindir/qemu-arm +%_bindir/qemu-armeb +%_bindir/qemu-cris +%_bindir/qemu-hexagon +%_bindir/qemu-hppa +%_bindir/qemu-i386 +%_bindir/qemu-loongarch64 +%_bindir/qemu-m68k +%_bindir/qemu-microblaze +%_bindir/qemu-microblazeel +%_bindir/qemu-mips +%_bindir/qemu-mips64 +%_bindir/qemu-mips64el +%_bindir/qemu-mipsel +%_bindir/qemu-mipsn32 +%_bindir/qemu-mipsn32el +%_bindir/qemu-nios2 +%_bindir/qemu-or1k +%_bindir/qemu-ppc +%_bindir/qemu-ppc64 +%_bindir/qemu-ppc64le +%_bindir/qemu-riscv32 +%_bindir/qemu-riscv64 +%_bindir/qemu-s390x +%_bindir/qemu-sh4 +%_bindir/qemu-sh4eb +%_bindir/qemu-sparc +%_bindir/qemu-sparc32plus +%_bindir/qemu-sparc64 +%_bindir/qemu-x86_64 +%_bindir/qemu-xtensa +%_bindir/qemu-xtensaeb +%_sbindir/qemu-binfmt-conf.sh +%_prefix/lib/binfmt.d/qemu-*.conf + +%prep +%autosetup -n qemu-%{version} -p1 + +# We have the meson subprojects there, but as submodules (because OBS +# SCM bridge can handle the latter, but not the former) so we need to +# apply the layering of the packagefiles manually +meson subprojects packagefiles --apply berkeley-testfloat-3 +meson subprojects packagefiles --apply berkeley-softfloat-3 + +%build + +%define rpmfilesdir %{_builddir}/qemu-%{version}/rpm + +%if %{legacy_qemu_kvm} +# FIXME: Why are we copying the s390 specific one? +cp %{rpmfilesdir}/supported.s390.txt docs/supported.rst +sed -i '/^\ \ \ about\/index.*/i \ \ \ supported.rst' docs/index.rst +%endif + +find . -iname ".git" -exec rm -rf {} + + +mkdir -p %blddir +cd %blddir + +# We define a few general and common options and then we disable +# pretty much everything. Afterwards, there is a section for each +# of the flavors where we explicitly enable all the feature we want +# for them. + +# TODO: Check whether we want to enable the followings: +# * avx512f +# * debug-info +# * fuse +# * malloc-trim +# * multiprocess +# * qom-cast-debug +# * trace-backends=dtrace +# +# Fedora has avx2 enabled for ix86, while we can't (I tried). Guess it's +# because, for them, ix86 == i686 (while for us it's i586). + +# Let's try to stick to _FORTIFY_SOURCE=2 for now +EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g') -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-error" + +%srcdir/configure \ +%if 0%{?suse_version} >= 1600 + --python=%_bindir/python3 \ +%else + --python=%_bindir/python3.11 \ +%endif + --docdir=%_docdir \ + --datadir=%_datadir \ + --extra-cflags="${EXTRA_CFLAGS}" \ + --firmwarepath=%_datadir/%name \ + --libdir=%_libdir \ + --libexecdir=%_libexecdir \ + --localstatedir=%_localstatedir \ + --prefix=%_prefix \ + --sysconfdir=%_sysconfdir \ + --with-pkgversion="%(echo '%{distro}' | sed 's/ (.*)//')" \ + --disable-af-xdp \ + --disable-alsa \ + --disable-attr \ + --disable-auth-pam \ + --disable-avx2 \ + --disable-avx512f \ + --disable-block-drv-whitelist-in-tools \ + --disable-bochs \ + --disable-bpf \ + --disable-brlapi \ + --disable-bsd-user \ + --disable-bzip2 \ + --disable-cap-ng \ + --disable-capstone \ + --disable-cfi \ + --disable-cfi-debug \ + --disable-cloop \ + --disable-cocoa \ + --disable-coreaudio \ + --disable-coroutine-pool \ + --disable-crypto-afalg \ + --disable-curl \ + --disable-curses \ + --disable-dbus-display \ + --disable-debug-info \ + --disable-debug-mutex \ + --disable-debug-tcg \ + --disable-dmg \ + --disable-docs \ + --disable-download \ + --disable-dsound \ + --disable-fdt \ + --disable-fuse \ + --disable-fuse-lseek \ + --disable-gcrypt \ + --disable-gettext \ + --disable-gio \ + --disable-glusterfs \ + --disable-gnutls \ + --disable-gtk \ + --disable-guest-agent \ + --disable-guest-agent-msi \ + --disable-hv-balloon \ + --disable-hvf \ + --disable-iconv \ + --disable-jack \ + --disable-kvm \ + --disable-l2tpv3 \ + --disable-libdaxctl \ + --disable-libiscsi \ + --disable-libkeyutils \ + --disable-libnfs \ + --disable-libpmem \ + --disable-libssh \ + --disable-libudev \ + --disable-libusb \ + --disable-linux-aio \ + --disable-linux-io-uring \ + --disable-linux-user \ + --disable-live-block-migration \ + --disable-lto \ + --disable-lzfse \ + --disable-lzo \ + --disable-malloc-trim \ + --disable-membarrier \ + --disable-module-upgrades \ + --disable-modules \ + --disable-mpath \ + --disable-multiprocess \ + --disable-netmap \ + --disable-nettle \ + --disable-numa \ + --disable-nvmm \ + --disable-opengl \ + --disable-oss \ + --disable-pa \ + --disable-parallels \ + --disable-pie \ + --disable-pipewire \ + --disable-pixman \ + --disable-plugins \ + --disable-png \ + --disable-pvrdma \ + --disable-qcow1 \ + --disable-qed \ + --disable-qom-cast-debug \ + --disable-rbd \ + --disable-rdma \ + --disable-relocatable \ + --disable-replication \ + --disable-rng-none \ + --disable-rutabaga-gfx \ + --disable-safe-stack \ + --disable-sanitizers \ + --disable-sdl \ + --disable-sdl-image \ + --disable-seccomp \ + --disable-selinux \ + --disable-slirp \ + --disable-slirp-smbd \ + --disable-smartcard \ + --disable-snappy \ + --disable-sparse \ + --disable-spice \ + --disable-spice-protocol \ + --disable-strip \ + --disable-system \ + --disable-tcg \ + --disable-tcg-interpreter \ + --disable-tools \ + --disable-tpm \ + --disable-u2f \ + --disable-usb-redir \ + --disable-user \ + --disable-vde \ + --disable-vdi \ + --disable-vhost-crypto \ + --disable-vhost-kernel \ + --disable-vhost-net \ + --disable-vhost-user \ + --disable-vhost-user-blk-server \ + --disable-vhost-vdpa \ + --disable-virglrenderer \ + --disable-virtfs \ + --disable-vnc \ + --disable-vnc-jpeg \ + --disable-vnc-sasl \ + --disable-vte \ + --disable-vvfat \ + --disable-werror \ + --disable-whpx \ + --disable-xen \ + --disable-xen-pci-passthrough \ + --disable-xkbcommon \ + --disable-zstd \ + --without-default-devices \ +%if %{with system_membarrier} + --enable-membarrier \ +%endif +%if %{with malloc_trim} + --enable-malloc-trim \ +%endif +%if "%{_lto_cflags}" != "%{nil}" + --enable-lto \ +%endif + --disable-install-blobs \ + --enable-attr \ + --enable-coroutine-pool \ + --enable-linux-user \ + --enable-selinux \ + --enable-tcg \ + --static + +echo "=== Content of config-host.mak: ===" +cat config-host.mak +echo "=== ===" + +%make_build + +%install +cd %blddir + +%make_build install DESTDIR=%{buildroot} + +rm -rf %{buildroot}%_datadir/qemu/keymaps +unlink %{buildroot}%_datadir/qemu/trace-events-all +install -d -m 755 %{buildroot}%_sbindir +install -m 755 scripts/qemu-binfmt-conf.sh %{buildroot}%_sbindir +install -d -m 755 %{buildroot}%{_prefix}/lib/binfmt.d/ +scripts/qemu-binfmt-conf.sh --systemd ALL --persistent yes --preserve-argv0 yes --exportdir %{buildroot}%{_prefix}/lib/binfmt.d/ + +%fdupes -s %{buildroot} + +%check +cd %blddir + +%ifarch aarch64 %ix86 ppc ppc64 ppc64le riscv64 s390x x86_64 +%{qemu_arch}-linux-user/qemu-%{qemu_arch} %_bindir/ls > /dev/null +%endif + +%make_build check-softfloat + +%changelog diff --git a/rpm/qemu-rpmlintrc b/rpm/qemu-rpmlintrc new file mode 100644 index 0000000000..9664dfe394 --- /dev/null +++ b/rpm/qemu-rpmlintrc @@ -0,0 +1,7 @@ +# This line is mandatory to access the configuration functions +from Config import * + +addFilter("arch-dependent-file-in-usr-share") +addFilter("obsolete-not-provided") +addFilter("summary-not-capitalized") +addFilter("executable-stack") diff --git a/rpm/qemu-supportconfig b/rpm/qemu-supportconfig new file mode 100644 index 0000000000..832a0c9e87 --- /dev/null +++ b/rpm/qemu-supportconfig @@ -0,0 +1,53 @@ +#!/bin/bash +############################################################# +# Name: Supportconfig Plugin for QEMU/KVM +# Description: Gathers important troubleshooting information +# about QEMU +############################################################# + +RCFILE="/usr/lib/supportconfig/resources/supportconfig.rc" +OF="output-qemu.txt" + +if [ -s $RCFILE ]; then + if ! source $RCFILE; then + log_write $OF "ERROR: Initializing resource file: $RCFILE" + exit 1 + fi +fi + +rpm_verify $OF qemu || exit 111 + +# skip if the host is xen +log_write $OF "#==[ Checking if booted Xen ]=================================#" +if [ -d /proc/xen ] && [ -e /proc/xen/capabilities ] && [ `cat /proc/xen/capabilities` = "control_d" ]; then + log_write $OF "Yes" + log_write $OF "Skipped" + exit 0 +else + log_write $OF "No" +fi + +# basic system information +log_cmd $OF "uname -r" +log_cmd $OF "lscpu" +log_cmd $OF "lspci -v" +log_cmd $OF "lsscsi" +log_cmd $OF "kvm_stat -1" +log_cmd $OF "lsmod | grep ^kvm" +for MODULE in `lsmod | grep ^kvm | cut -d ' ' -f 1`; do + log_cmd $OF "modinfo $MODULE" +done +log_cmd $OF "ps -ef | grep qemu" + +# list contents of common config and image directories +log_cmd $OF "ls -alR /var/lib/libvirt/images/" + +# network-related info often useful for debugging +nm_enabled=$(systemctl is-enabled NetworkManager.service > /dev/null 2>&1; echo $?) +if [ $nm_enabled -eq 0 ]; then + log_write $OF "NOTE: NetworkManager should not be enabled on a KVM host" +fi +log_cmd $OF "ip route list" +log_cmd $OF "ip neigh list" +log_cmd $OF "ip link show type bridge" +log_cmd $OF "bridge link show" diff --git a/rpm/qemu.keyring b/rpm/qemu.keyring new file mode 100644 index 0000000000..cce2e0110f --- /dev/null +++ b/rpm/qemu.keyring @@ -0,0 +1,493 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQENBFJhQQ8BCAChk4A3y0VfqeGfuhBZK4nvpZP/cSIQntWDheF3Tx7m9CxEGbc+ +5aHxfrvm45LSjwPCK020WjeqYX2UFQfcvcjoW6iMbth1BLydu11vx6Gk/CJuB7Ss +8AbyvEXBcOfHbginUdqr4nwLD9e8qlVxRFbSHfbFRbuybZghke4y1pZzekkqbseT +kahkWHxr6o1EGAjyIdjAq1IQxewW6yJ4rkHWsRvfv3sUQTqBU+wT180kdwC8AAv6 +q6TX4um0HGR46uJ+5SG8DYb00kRMckQtYpTuwuUmlAvNh/qLg2fVVMEiHBpcuIiV +h7x8INuq94vc+tgxmr0bomIWIZljMQ7vp8ixABEBAAG0IE1pY2hhZWwgUm90aCA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Ba4XQGaVuFz7XZtcIbFFhEHjMrvTJpBWhuZ091Gp0AjV2ACNi2z+dSpXi1 +6QxdFb1/4us6mFEm86UIu4tcNN1V3WPiODpWfFkEys/vmqQImLjfSsdxzhMdX7Ye +n1B3fxiKzwzsTlFbnNiBr2Mv7flDiUvMdbHmb/n0/B6a69SRYfVkJ3MZdl0gptJl +XhJVdwjwVVl3bjvlQd0aZoLwJ7ntrWeMxOkbf8950vPVxemQ1frblB0zR98fuUNh +X4cjrFTI9iJck7xLUwNZfgOz9PodfqUv4riMLczMmw3nwGZO/aJg0m6uWSWk +=YraJ +-----END PGP PUBLIC KEY BLOCK----- diff --git a/rpm/qemu.spec b/rpm/qemu.spec new file mode 100644 index 0000000000..ca689ee30b --- /dev/null +++ b/rpm/qemu.spec @@ -0,0 +1,2050 @@ +# +# spec file for package qemu +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%include %{_sourcedir}/common.inc + +# So, we have openSUSE:Factory, and we have "ports". In openSUSE:Factory, we +# have i586 and x86_64. In the :ARM port, we have aarch64, armv6l and armv7l. +# In the :PowerPC port, we have ppc64, ppc and ppc64le. In the :zSystems port +# we have s390x. And in the :RISCV we have riscv. +# +# Ideally, we'd want to build the firmwares at least once per port, and then +# share the resulting packages among the arch-es within each port (check the +# `ExportFilter` directives in the project config). +# +# Of course, we always build the "native fimrwares" (e.g., x86 firmwares on +# x86_64, PPC firmwares on ppc64le, etc). But we also cross compile as much +# firmwares as we can (e.g., both x86 and PPC firmwares on aarch64) so they'll +# be available in as many ports as possible (as noarch packages). + +%ifarch x86_64 aarch64 +%define build_ppc_firmware 1 +# Currently, opensbi does not cross build cleanly on 15.3 and 15.4 +%if ! 0%{?sle_version} +%define build_opensbi_firmware 1 +%endif +%define build_x86_firmware 1 +%endif +%ifarch ppc64 ppc64le +%define build_ppc_firmware 1 +%if ! 0%{?sle_version} +%define build_opensbi_firmware 1 +%endif +# FIXME: Try to enable cross building of x86 firmwares here on PPC +%endif +%ifarch riscv64 +%define build_opensbi_firmware 1 +%endif + +%ifarch %ix86 x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64 riscv64 +%define kvm_available 1 +%define with_uring 1 +%define liburing_min_version 1.0 +%endif + +%ifarch %ix86 x86_64 s390x +%define legacy_qemu_kvm 1 +%endif + +%ifarch x86_64 aarch64 ppc64le s390x +%define with_rbd 1 +%endif + +%ifarch x86_64 ppc64le +%define with_daxctl 1 +%endif + +# enforce pxe rom sizes for migration compatability from SLE 11 SP3 forward +# the following need to be > 64K +%define supported_nics_large {e1000 rtl8139} +# the following need to be <= 64K +%define supported_nics_small {virtio} +# Though not required, make unsupported pxe roms migration compatable as well +%define unsupported_nics {eepro100 ne2k_pci pcnet} + +Name: qemu +URL: https://www.qemu.org/ +Summary: Machine emulator and virtualizer +License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT +Group: System/Emulators/PC +Version: 8.2.1 +Release: 0 +Source0: qemu-%{version}.tar.xz +Source1: common.inc +Source303: README.PACKAGING +Source1000: qemu-rpmlintrc +BuildRoot: %{_tmppath}/%{name}-%{version}-build +## Packages we REQUIRE during build +%if %{build_x86_firmware} +%ifnarch %ix86 x86_64 +# We must cross-compile on non-x86* +BuildRequires: cross-x86_64-binutils +BuildRequires: cross-x86_64-gcc%gcc_version +%endif +BuildRequires: acpica +BuildRequires: binutils-devel +BuildRequires: dos2unix +BuildRequires: glibc-devel-32bit +BuildRequires: pkgconfig(liblzma) +%endif +%if %{build_opensbi_firmware} +%ifnarch riscv64 +BuildRequires: cross-riscv64-binutils +BuildRequires: cross-riscv64-gcc%gcc_version +%endif +%endif +%if %{build_ppc_firmware} +%ifnarch ppc64 ppc64le +BuildRequires: cross-ppc64-binutils +BuildRequires: cross-ppc64-gcc%gcc_version +%endif +%endif +%ifarch x86_64 +BuildRequires: gcc-32bit +%if %{with_xen} +BuildRequires: xen-devel >= 4.2 +%endif +BuildRequires: pkgconfig(libpmem) +%endif +%ifnarch %arm s390x +BuildRequires: libnuma-devel +%endif +%if 0%{with canokey} +BuildRequires: canokey-qemu-devel +%endif +%if 0%{?with_daxctl} +BuildRequires: pkgconfig(libndctl) +%endif +%if %{kvm_available} +BuildRequires: pkgconfig(udev) +%endif +%if 0%{?with_rbd} +BuildRequires: librbd-devel +%endif +%if 0%{with spice} +BuildRequires: pkgconfig(spice-protocol) >= 0.12.3 +BuildRequires: pkgconfig(spice-server) >= 0.12.5 +%endif +%if 0%{?with_uring} +BuildRequires: pkgconfig(liburing) >= %liburing_min_version +%endif +%if 0%{with xdp} +BuildRequires: libxdp-devel +%endif +%if 0%{?suse_version} >= 1600 +BuildRequires: python3-Sphinx +BuildRequires: python3-base >= 3.8 +%else +BuildRequires: python311-Sphinx +BuildRequires: python311-base +%endif +BuildRequires: Mesa-devel +BuildRequires: bison +BuildRequires: brlapi-devel +BuildRequires: discount +BuildRequires: fdupes +BuildRequires: flex +BuildRequires: gcc-c++ +BuildRequires: keyutils-devel +BuildRequires: libaio-devel +BuildRequires: libattr-devel +BuildRequires: libbpf-devel +BuildRequires: libbz2-devel +BuildRequires: libcapstone-devel +BuildRequires: libfdt-devel >= 1.4.2 +BuildRequires: libgcrypt-devel >= 1.8.0 +BuildRequires: lzfse-devel +BuildRequires: meson +BuildRequires: multipath-tools-devel +BuildRequires: ninja >= 1.7 +BuildRequires: pam-devel +BuildRequires: pkgconfig +BuildRequires: pkgconfig(alsa) +BuildRequires: pkgconfig(epoxy) +BuildRequires: pkgconfig(gbm) +BuildRequires: pkgconfig(glib-2.0) >= 2.56 +BuildRequires: pkgconfig(glusterfs-api) >= 3 +BuildRequires: pkgconfig(gnutls) >= 3.5.18 +BuildRequires: pkgconfig(gtk+-3.0) >= 3.22 +BuildRequires: pkgconfig(jack) +BuildRequires: pkgconfig(libcacard) >= 2.5.1 +BuildRequires: pkgconfig(libcap-ng) +BuildRequires: pkgconfig(libcurl) >= 7.29 +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(libiscsi) >= 1.9.0 +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(libnfs) >= 1.9.3 +BuildRequires: pkgconfig(libpipewire-0.3) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libpulse) +BuildRequires: pkgconfig(libsasl2) +BuildRequires: pkgconfig(libseccomp) >= 2.3.0 +BuildRequires: pkgconfig(libssh) >= 0.8.7 +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(libusb-1.0) >= 1.0.13 +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(lzo2) +BuildRequires: pkgconfig(ncurses) +BuildRequires: pkgconfig(openssl) >= 1.0.0 +BuildRequires: pkgconfig(pixman-1) >= 0.21.8 +BuildRequires: pkgconfig(slirp) >= 4.2.0 +BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(vdeplug) +BuildRequires: pkgconfig(virglrenderer) >= 0.4.1 +BuildRequires: pkgconfig(vte-2.91) +BuildRequires: pkgconfig(xkbcommon) +BuildRequires: pkgconfig(zlib) +BuildRequires: rdma-core-devel +BuildRequires: snappy-devel +BuildRequires: update-desktop-files +BuildRequires: usbredir-devel >= 0.6 +BuildRequires: xfsprogs-devel +%{?systemd_ordering} +## Packages we will REQUIRE +%if %{kvm_available} +Requires(post): acl +Requires(post): udev +%endif +Requires(post): coreutils +Requires: group(kvm) +Requires: group(qemu) +Requires: user(qemu) +# Due to change in where some documentation files are, if qemu-guest-agent +# is installed, we need to make sure we update it to our version. +Requires: (qemu-guest-agent = %{version} if qemu-guest-agent) +## Packages we will RECOMMEND +%ifarch s390x +Recommends: qemu-hw-s390x-virtio-gpu-ccw +%else +Recommends: qemu-hw-display-qxl +Recommends: qemu-hw-display-virtio-gpu +Recommends: qemu-hw-display-virtio-gpu-pci +Recommends: qemu-hw-display-virtio-vga +Recommends: qemu-hw-usb-host +Recommends: qemu-hw-usb-redirect +Recommends: qemu-hw-usb-smartcard +%if 0%{with spice} +Recommends: qemu-ui-spice-app +%endif +# End of "ifarch s390x" +%endif +%if %{kvm_available} +Recommends: kvm_stat +%endif +Recommends: qemu-block-curl +Recommends: qemu-block-nfs +Recommends: qemu-ksm = %{version} +Recommends: qemu-tools +Recommends: qemu-ui-curses +## Packages we will SUGGEST +%if 0%{?with_rbd} +Suggests: qemu-block-rbd +%endif +Suggests: qemu-accel-qtest +Suggests: qemu-block-dmg +Suggests: qemu-block-gluster +Suggests: qemu-block-iscsi +Suggests: qemu-block-ssh +Suggests: qemu-chardev-baum +Suggests: qemu-extra +Suggests: qemu-lang +Suggests: qemu-microvm +Suggests: qemu-skiboot +Suggests: qemu-vhost-user-gpu +Suggests: qemu-ui-gtk +Suggests: qemu-doc +## Packages we PROVIDE +Provides: kvm = %{version} +Provides: qemu-kvm = %{version} +## Pacakges we OBSOLETE (and CONFLICT) +Obsoletes: kvm <= %{version} +Obsoletes: qemu-audio-oss < %{version} +Obsoletes: qemu-audio-sdl < %{version} +Obsoletes: qemu-kvm <= %{version} +Obsoletes: qemu-sgabios <= 8 +Obsoletes: qemu-ui-sdl < %{version} +## What we do with the main emulator depends on the architecture we're on +%if %{kvm_available} +%ifarch %ix86 x86_64 +Requires: qemu-x86 +%else +Suggests: qemu-x86 +%endif +%ifarch ppc ppc64 ppc64le +Requires: qemu-ppc +%else +Suggests: qemu-ppc +%endif +%ifarch s390x +Requires: qemu-s390x +Requires(post): procps +%else +Suggests: qemu-s390x +%endif +%ifarch %arm aarch64 +Requires: qemu-arm +%else +Suggests: qemu-arm +%endif +%ifarch riscv64 +Requires: qemu-extra +%else +Suggests: qemu-extra +%endif +# End of "if kvm_available" +%endif + +%description +%{generic_qemu_description} + +This package acts as an umbrella package to the other QEMU sub-packages. + +%files +%if %{kvm_available} +%ifarch s390x +%{_prefix}/lib/modules-load.d/kvm.conf +%endif +/usr/lib/udev/rules.d/80-kvm.rules +# End of "if kvm_available" +%endif +%if %{legacy_qemu_kvm} +%doc %_docdir/qemu-kvm +%_mandir/man1/qemu-kvm.1.gz +%endif +%_bindir/qemu-kvm +%dir %_datadir/icons/hicolor +%dir %_datadir/icons/hicolor/*/ +%dir %_datadir/icons/hicolor/*/apps +%dir %_datadir/%name +%dir %_datadir/%name/firmware +%dir %_datadir/%name/vhost-user +%dir %_sysconfdir/%name +%dir %_sysconfdir/%name/firmware +%dir /usr/lib/supportconfig +%dir /usr/lib/supportconfig/plugins +%_datadir/applications/qemu.desktop +%_datadir/icons/hicolor/16x16/apps/qemu.png +%_datadir/icons/hicolor/24x24/apps/qemu.png +%_datadir/icons/hicolor/32x32/apps/qemu.bmp +%_datadir/icons/hicolor/32x32/apps/qemu.png +%_datadir/icons/hicolor/48x48/apps/qemu.png +%_datadir/icons/hicolor/64x64/apps/qemu.png +%_datadir/icons/hicolor/128x128/apps/qemu.png +%_datadir/icons/hicolor/256x256/apps/qemu.png +%_datadir/icons/hicolor/512x512/apps/qemu.png +%_datadir/icons/hicolor/scalable/apps/qemu.svg +%_datadir/%name/keymaps +%_datadir/%name/qemu-ifup +%_datadir/%name/qemu-nsis.bmp +%_datadir/%name/trace-events-all +%_mandir/man1/%name.1.gz +%_mandir/man7/qemu-block-drivers.7.gz +%_mandir/man7/qemu-cpu-models.7.gz +%_mandir/man7/qemu-qmp-ref.7.gz +%_mandir/man7/qemu-ga-ref.7.gz +/usr/lib/supportconfig/plugins/%name +%license COPYING COPYING.LIB LICENSE + +%if %{kvm_available} +%post +# Do not execute operations affecting host devices while running in a chroot +if [ $(stat -L -c "%i" /proc/1/root/) = $(stat -L -c "%i" /) ]; then + setfacl --remove-all /dev/kvm &> /dev/null || : +%ifarch s390x + if [ -c /dev/kvm ]; then + %_bindir/chmod 0666 /dev/kvm + %_bindir/chgrp kvm /dev/kvm + fi +%endif + %udev_rules_update + %_bindir/udevadm trigger -y kvm || : +%ifarch s390x + sysctl vm.allocate_pgste=1 || : +%endif +fi +# End of "if {kvm_available}" +%endif + +# Modules need to match {qemu-system-*,qemu-img} version. +# We cannot have qemu and qemu-tools require them in the right version, +# as that would drag in the dependencies the modules are supposed to avoid. +# Nor can we have modules require the right version of qemu and qemu-tools +# as Xen reuses our qemu-tools but does not want our qemu and qemu-x86. +%define qemu_module_conflicts \ +Conflicts: %name < %{version}-%{release} \ +Conflicts: %name > %{version}-%{release} \ +Conflicts: qemu-tools < %{version}-%{release} \ +Conflicts: qemu-tools > %{version}-%{release} + +%prep +%autosetup -n qemu-%{version} -p1 + +# We have the meson subprojects there, but as submodules (because OBS +# SCM bridge can handle the latter, but not the former) so we need to +# apply the layering of the packagefiles manually +meson subprojects packagefiles --apply berkeley-testfloat-3 +meson subprojects packagefiles --apply berkeley-softfloat-3 + +# for the record, this set of firmware files is installed, but we don't +# build (yet): bamboo.dtb canyonlands.dtb hppa-firmware.img openbios-ppc +# openbios-sparc32 openbios-sparc64 palcode-clipper petalogix-ml605.dtb +# petalogix-s3adsp1800.dtb QEMU,cgthree.bin QEMU,tcx.bin qemu_vga.ndrv +# u-boot.e500 u-boot-sam460-20100605.bin opensbi-riscv32-generic-fw_dynamic.bin +# opensbi-riscv32-generic-fw_dynamic.elfnpcm7xx_bootrom.bin vof.bin +# vof-nvram.bin + +# Note that: +# - default firmwares are built "by default", i.e., they're built automatically +# during the process of building QEMU (on each specific arch) +# - extra firmwares are built "manually" (see below) from their own sources +# (which, typically, are submodules checked out in the {srcdi}r/roms directory) +%define ppc_default_firmware %{nil} +#{vof.bin vof-nvram.bin} +%define ppc_extra_firmware {skiboot.lid slof.bin} +%define riscv64_default_firmware %{nil} +%define riscv64_extra_firmware {opensbi-riscv64-generic-fw_dynamic.bin} +%define s390x_default_firmware {s390-ccw.img s390-netboot.img} +%define s390x_extra_firmware %{nil} +%define x86_default_firmware {linuxboot.bin linuxboot_dma.bin multiboot.bin \ +multiboot_dma.bin kvmvapic.bin pvh.bin} +%define x86_extra_firmware {bios.bin bios-256k.bin bios-microvm.bin qboot.rom \ +pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom \ +pxe-virtio.rom vgabios-ati.bin vgabios-bochs-display.bin \ +vgabios.bin vgabios-cirrus.bin vgabios-qxl.bin vgabios-ramfb.bin \ +vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin \ +efi-e1000.rom efi-e1000e.rom efi-eepro100.rom efi-ne2k_pci.rom efi-pcnet.rom \ +efi-rtl8139.rom efi-virtio.rom efi-vmxnet3.rom} + +# Complete list of all the firmwares that we build, if we consider +# all the builds, on all the arches. +%define firmware { \ +%{ppc_default_firmware} %{ppc_extra_firmware} \ +%{riscv64_default_firmware} %{riscv64_extra_firmware} \ +%{s390x_default_firmware} %{s390x_extra_firmware} \ +%{x86_default_firmware} %{x86_extra_firmware} } + +# Note that: +# - {arch}_default_built_firmware are the firmwares that we will be built by +# default in this particular build, on the arch where we currently are on +# - {arch}_extra_built_fimrware, likewise, but for extra firmwares, built manually +%ifarch ppc64 ppc64le +%define ppc_default_built_firmware %{ppc_default_firmware} +%endif +%ifarch riscv64 +%define riscv64_default_built_firmware %{riscv64_default_firmware} +%endif +%ifarch s390x +%define s390x_default_built_firmware %{s390x_default_firmware} +%endif +%ifarch %ix86 x86_64 +%define x86_default_built_firmware %{x86_default_firmware} +%endif + +%if %{build_opensbi_firmware} +%define riscv64_extra_built_firmware %{riscv64_extra_firmware} +%endif +%if %{build_ppc_firmware} +%define ppc_extra_built_firmware %{ppc_extra_firmware} +%endif +%if %{build_x86_firmware} +%define x86_extra_built_firmware %{x86_extra_firmware} +%endif + +# List of only firmwares that will actually be built, in this instance +%define built_firmware { \ +%{?ppc_default_built_firmware} %{?ppc_extra_built_firmware} \ +%{?riscv64_default_built_firmware} %{?riscv64_extra_built_firmware} \ +%{?s390x_default_built_firmware} %{?s390x_extra_built_firmware} \ +%{?x86_default_built_firmware} %{?x86_extra_built_firmware} } + +%build + +%define rpmfilesdir %{_builddir}/qemu-%{version}/rpm + +%if %{legacy_qemu_kvm} +# FIXME: Why are we copying the s390 specific one? +cp %{rpmfilesdir}/supported.s390.txt docs/supported.rst +sed -i '/^\ \ \ about\/index.*/i \ \ \ supported.rst' docs/index.rst +%endif + +# When generating an upstream release tarball, the following commands +# are run (see scripts/make-release): +# (cd roms/seabios && git describe --tags --long --dirty > .version) +# (cd roms/skiboot && ./make_version.sh > .version) +# This has not happened for the archive we're using, since it's cloned +# from a git branch. We, therefore, assumed that the following commands +# have been run, and the result committed to the repository (with seabios +# and skiboot at the proper commit/tag/...): +# git -C roms/seabios describe --tags --long --dirty > rpm/seabios_version +# (cd roms/skiboot && ./make_version.sh > ../../rpm/skiboot_version) +cp %{rpmfilesdir}/seabios_version roms/seabios/.version +cp %{rpmfilesdir}/skiboot_version roms/skiboot/.version +find . -iname ".git" -exec rm -rf {} + + +mkdir -p %blddir +cd %blddir + +# We define a few general and common options and then we disable +# pretty much everything. Afterwards, there is a section for each +# of the flavors where we explicitly enable all the feature we want +# for them. + +# TODO: Check whether we want to enable the followings: +# * avx512f +# * debug-info +# * fuse +# * malloc-trim +# * multiprocess +# * qom-cast-debug +# * trace-backends=dtrace +# +# Fedora has avx2 enabled for ix86, while we can't (I tried). Guess it's +# because, for them, ix86 == i686 (while for us it's i586). + +# Let's try to stick to _FORTIFY_SOURCE=2 for now +EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g') -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-error" + +%srcdir/configure \ +%if 0%{?suse_version} >= 1600 + --python=%_bindir/python3 \ +%else + --python=%_bindir/python3.11 \ +%endif + --docdir=%_docdir \ + --datadir=%_datadir \ + --extra-cflags="${EXTRA_CFLAGS}" \ + --firmwarepath=%_datadir/%name \ + --libdir=%_libdir \ + --libexecdir=%_libexecdir \ + --localstatedir=%_localstatedir \ + --prefix=%_prefix \ + --sysconfdir=%_sysconfdir \ + --with-pkgversion="%(echo '%{distro}' | sed 's/ (.*)//')" \ + --disable-af-xdp \ + --disable-alsa \ + --disable-attr \ + --disable-auth-pam \ + --disable-avx2 \ + --disable-avx512f \ + --disable-block-drv-whitelist-in-tools \ + --disable-bochs \ + --disable-bpf \ + --disable-brlapi \ + --disable-bsd-user \ + --disable-bzip2 \ + --disable-cap-ng \ + --disable-capstone \ + --disable-cfi \ + --disable-cfi-debug \ + --disable-cloop \ + --disable-cocoa \ + --disable-coreaudio \ + --disable-coroutine-pool \ + --disable-crypto-afalg \ + --disable-curl \ + --disable-curses \ + --disable-dbus-display \ + --disable-debug-info \ + --disable-debug-mutex \ + --disable-debug-tcg \ + --disable-dmg \ + --disable-docs \ + --disable-download \ + --disable-dsound \ + --disable-fdt \ + --disable-fuse \ + --disable-fuse-lseek \ + --disable-gcrypt \ + --disable-gettext \ + --disable-gio \ + --disable-glusterfs \ + --disable-gnutls \ + --disable-gtk \ + --disable-guest-agent \ + --disable-guest-agent-msi \ + --disable-hv-balloon \ + --disable-hvf \ + --disable-iconv \ + --disable-jack \ + --disable-kvm \ + --disable-l2tpv3 \ + --disable-libdaxctl \ + --disable-libiscsi \ + --disable-libkeyutils \ + --disable-libnfs \ + --disable-libpmem \ + --disable-libssh \ + --disable-libudev \ + --disable-libusb \ + --disable-linux-aio \ + --disable-linux-io-uring \ + --disable-linux-user \ + --disable-live-block-migration \ + --disable-lto \ + --disable-lzfse \ + --disable-lzo \ + --disable-malloc-trim \ + --disable-membarrier \ + --disable-module-upgrades \ + --disable-modules \ + --disable-mpath \ + --disable-multiprocess \ + --disable-netmap \ + --disable-nettle \ + --disable-numa \ + --disable-nvmm \ + --disable-opengl \ + --disable-oss \ + --disable-pa \ + --disable-parallels \ + --disable-pie \ + --disable-pipewire \ + --disable-pixman \ + --disable-plugins \ + --disable-png \ + --disable-pvrdma \ + --disable-qcow1 \ + --disable-qed \ + --disable-qom-cast-debug \ + --disable-rbd \ + --disable-rdma \ + --disable-relocatable \ + --disable-replication \ + --disable-rng-none \ + --disable-rutabaga-gfx \ + --disable-safe-stack \ + --disable-sanitizers \ + --disable-sdl \ + --disable-sdl-image \ + --disable-seccomp \ + --disable-selinux \ + --disable-slirp \ + --disable-slirp-smbd \ + --disable-smartcard \ + --disable-snappy \ + --disable-sparse \ + --disable-spice \ + --disable-spice-protocol \ + --disable-strip \ + --disable-system \ + --disable-tcg \ + --disable-tcg-interpreter \ + --disable-tools \ + --disable-tpm \ + --disable-u2f \ + --disable-usb-redir \ + --disable-user \ + --disable-vde \ + --disable-vdi \ + --disable-vhost-crypto \ + --disable-vhost-kernel \ + --disable-vhost-net \ + --disable-vhost-user \ + --disable-vhost-user-blk-server \ + --disable-vhost-vdpa \ + --disable-virglrenderer \ + --disable-virtfs \ + --disable-vnc \ + --disable-vnc-jpeg \ + --disable-vnc-sasl \ + --disable-vte \ + --disable-vvfat \ + --disable-werror \ + --disable-whpx \ + --disable-xen \ + --disable-xen-pci-passthrough \ + --disable-xkbcommon \ + --disable-zstd \ + --without-default-devices \ + --audio-drv-list=pipewire,pa,alsa,jack,oss \ +%ifarch x86_64 + --enable-avx2 \ + --enable-libpmem \ +%if %{with_xen} + --enable-xen \ + --enable-xen-pci-passthrough \ +%endif +%endif +%if 0%{with xdp} + --enable-af-xdp \ +%endif +%if 0%{with canokey} + --enable-canokey \ +%endif +%if %{kvm_available} + --enable-kvm \ +%endif +%if 0%{?with_daxctl} + --enable-libdaxctl \ +%endif +%if 0%{?with_uring} + --enable-linux-io-uring \ +%endif +%if "%{_lto_cflags}" != "%{nil}" + --enable-lto \ +%endif +%if %{with malloc_trim} + --enable-malloc-trim \ +%endif +%if %{with system_membarrier} + --enable-membarrier \ +%endif +%ifnarch %arm s390x + --enable-numa \ +%endif +%if 0%{?with_rbd} + --enable-rbd \ +%endif +%if %{has_rutabaga_gfx} + --enable-rutabaga-gfx \ +%endif + --enable-alsa \ + --enable-attr \ + --enable-auth-pam \ + --enable-bochs \ + --enable-bpf \ + --enable-brlapi \ + --enable-bzip2 \ + --enable-cap-ng \ + --enable-capstone \ + --enable-cloop \ + --enable-coroutine-pool \ + --enable-curl \ + --enable-curses \ + --enable-dbus-display \ + --enable-dmg \ + --enable-docs \ + --enable-fdt=system \ + --enable-gcrypt \ + --enable-gettext \ + --enable-gio \ + --enable-glusterfs \ + --enable-gnutls \ + --enable-gtk \ + --enable-guest-agent \ + --enable-hv-balloon \ + --enable-iconv \ + --enable-jack \ + --enable-l2tpv3 \ + --enable-libiscsi \ + --enable-libkeyutils \ + --enable-libnfs \ + --enable-libssh \ + --enable-libudev \ + --enable-libusb \ + --enable-linux-aio \ + --enable-live-block-migration \ + --enable-lzfse \ + --enable-lzo \ + --enable-modules \ + --enable-mpath \ + --enable-opengl \ + --enable-oss \ + --enable-pa \ + --enable-parallels \ + --enable-pie \ + --enable-pipewire \ + --enable-pixman \ + --enable-png \ + --enable-pvrdma \ + --enable-qcow1 \ + --enable-qed \ + --enable-rdma \ + --enable-relocatable \ + --enable-replication \ + --enable-seccomp \ + --enable-selinux \ + --enable-slirp \ + --enable-slirp-smbd \ + --enable-smartcard \ + --enable-snappy \ +%if 0%{with spice} + --enable-spice \ + --enable-spice-protocol \ +%endif + --enable-system \ + --enable-tcg \ + --enable-tools \ + --enable-tpm \ + --enable-usb-redir \ + --enable-vde \ + --enable-vdi \ + --enable-vhost-crypto \ + --enable-vhost-kernel \ + --enable-vhost-net \ + --enable-vhost-user \ + --enable-vhost-user-blk-server \ + --enable-vhost-vdpa \ + --enable-virglrenderer \ + --enable-virtfs \ + --enable-vnc \ + --enable-vnc-jpeg \ + --enable-vnc-sasl \ + --enable-vte \ + --enable-vvfat \ + --enable-werror \ + --enable-xkbcommon \ + --enable-zstd \ + --with-coroutine=ucontext \ + --with-default-devices + +echo "=== Content of config-host.mak: ===" +cat config-host.mak +echo "=== ===" + +# For building QEMU and all the "default" firmwares, for each arch, +# for the package qemu, we first need to delete the firmware files that +# we intend to build... +# +# TODO: check if this can be common to qemu and qemu-linux-user +for i in %built_firmware +do + unlink %srcdir/pc-bios/$i +done + +%make_build + +# ... Then, we need to reinstate the firmwares that have been built already +for i in %{?s390x_default_built_firmware} +do + cp pc-bios/s390-ccw/$i %srcdir/pc-bios/ +done + +for i in %{?x86_default_built_firmware} +do + cp pc-bios/optionrom/$i %srcdir/pc-bios/ +done + +# Build the "extra" firmwares. Note that the QEMU Makefile in {srcdir}/roms +# does some cross-compiler auto detection. So we often don't need to define +# or pass CROSS= and CROSS_COMPILE ourselves. + +%if %{build_ppc_firmware} +# FIXME: check if we can upstream: Makefile-define-endianess-for-cross-buil.patch +%make_build -C %srcdir/roms skiboot + +%make_build -C %srcdir/roms slof +%endif + +%if %{build_opensbi_firmware} +%make_build -C %srcdir/roms opensbi64-generic +# End of "if build_ppc_firmware" +%endif + +%if %{build_x86_firmware} +%make_build %{?_smp_mflags} -C %srcdir/roms bios \ + SEABIOS_EXTRAVERSION="-rebuilt.opensuse.org" \ + +pushd %srcdir/roms/seabios/docs +for f in *.md +do + b="${f%.md}" + # Ensure the correct media type + markdown "${f}" >"${b}.html" + # Links to b.md will be rendered as to b + ln -Ts "${b}.html" "${b}" +done +popd + +# FIXME: check if we can upstream: roms-Makefile-add-cross-file-to-qboot-me.patch +# and qboot-add-cross.ini-file-to-handle-aarch.patch +%make_build -C %srcdir/roms qboot + +%make_build -C %srcdir/roms seavgabios \ + +%make_build -C %srcdir/roms seavgabios-ati \ + +%make_build -C %srcdir/roms pxerom + +%make_build -C %srcdir/roms edk2-basetools EXTRA_OPTFLAGS='-fPIE' +%make_build -C %srcdir/roms efirom + +%if %{force_fit_virtio_pxe_rom} +pushd %srcdir +patch -p1 < %{rpmfilesdir}/openSUSE-pcbios-stub-out-the-SAN-req-s-i.patch +popd +%make_build -C %srcdir/roms pxerom_variants=virtio pxerom_targets=1af41000 pxerom +%endif + +for i in %supported_nics_large %unsupported_nics + do + if test "`stat -c '%s' %srcdir/pc-bios/pxe-$i.rom`" -gt "131072" ; then + echo "pxe rom is too large" + exit 1 + fi + if test "`stat -c '%s' %srcdir/pc-bios/pxe-$i.rom`" -le "65536" ; then + %srcdir/roms/ipxe/src/util/padimg.pl %srcdir/pc-bios/pxe-$i.rom -s 65536 -b 255 + echo -ne "SEGMENT OVERAGE\0" >> %srcdir/pc-bios/pxe-$i.rom + fi +done +for i in %supported_nics_small + do + if test "`stat -c '%s' %srcdir/pc-bios/pxe-$i.rom`" -gt "65536" ; then + echo "pxe rom is too large" + exit 1 + fi +done +# End of "if build_x86_firmware" +%endif + +%install +cd %blddir +export USER=abuild +export HOSTNAME=OBS # is used in roms/SLOF/Makefile.gen (boo#1084909) + +%make_build install DESTDIR=%{buildroot} + +%find_lang %name +install -d -m 0755 %{buildroot}%_datadir/%name/firmware +install -d -m 0755 %{buildroot}/usr/lib/supportconfig/plugins +install -d -m 0755 %{buildroot}%_sysconfdir/%name/firmware +install -D -m 0644 %{rpmfilesdir}/bridge.conf %{buildroot}%_sysconfdir/%name/bridge.conf +install -D -m 0755 %{rpmfilesdir}/qemu-ifup %{buildroot}%_datadir/%name/qemu-ifup +install -D -p -m 0644 %{rpmfilesdir}/80-qemu-ga.rules %{buildroot}/usr/lib/udev/rules.d/80-qemu-ga.rules +install -D -m 0755 scripts/analyze-migration.py %{buildroot}%_bindir/analyze-migration.py +install -D -m 0755 scripts/vmstate-static-checker.py %{buildroot}%_bindir/vmstate-static-checker.py +install -D -m 0755 scripts/kvm/vmxcap %{buildroot}%_bindir/vmxcap +install -D -m 0755 %{rpmfilesdir}/qemu-supportconfig %{buildroot}/usr/lib/supportconfig/plugins/%name +install -D -m 0644 %{rpmfilesdir}/supported.arm.txt %{buildroot}%_docdir/qemu-arm/supported.txt +install -D -m 0644 %{rpmfilesdir}/supported.ppc.txt %{buildroot}%_docdir/qemu-ppc/supported.txt +install -D -m 0644 %{rpmfilesdir}/supported.x86.txt %{buildroot}%_docdir/qemu-x86/supported.txt +install -D -m 0644 %{rpmfilesdir}/supported.s390.txt %{buildroot}%_docdir/qemu-s390x/supported.txt + +%if %{legacy_qemu_kvm} +install -D -m 0644 %{rpmfilesdir}/qemu-kvm.1.gz %{buildroot}%_mandir/man1/qemu-kvm.1.gz +install -d %{buildroot}%_docdir/qemu-kvm +# FIXME: Why do we onlly generate the HTML for the legacy package documentation? +%ifarch s390x +ln -s ../qemu-s390x/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.txt +rst2html --exit-status=2 %{buildroot}%_docdir/qemu-s390x/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.html +%else +ln -s ../qemu-x86/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.txt +rst2html --exit-status=2 %{buildroot}%_docdir/qemu-x86/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.html +# End of "ifarch s390x" +%endif +# End of "if legacy_qemu_kvm" +%endif + +%ifarch aarch64 %arm %ix86 ppc ppc64 ppc64le riscv64 s390x x86_64 +%ifarch ppc64le +%define qemu_arch ppc64 +%endif +ln -s qemu-system-%{qemu_arch} %{buildroot}%_bindir/qemu-kvm +%endif + +%if %{kvm_available} +install -D -m 0644 %{rpmfilesdir}/80-kvm.rules %{buildroot}/usr/lib/udev/rules.d/80-kvm.rules +%endif +install -D -p -m 0644 %{rpmfilesdir}/qemu-guest-agent.service %{buildroot}%{_unitdir}/qemu-guest-agent.service +install -D -p -m 0644 %{rpmfilesdir}/ksm.service %{buildroot}%{_unitdir}/ksm.service +%ifarch s390x +install -D -m 0644 %{rpmfilesdir}/kvm.conf %{buildroot}%{_prefix}/lib/modules-load.d/kvm.conf +# End of "if kvm_available" +%endif + +# We rely on a separate project / package to provide edk2 firmware +unlink %{buildroot}%_datadir/%name/edk2-licenses.txt +unlink %{buildroot}%_datadir/%name/firmware/50-edk2-i386-secure.json +unlink %{buildroot}%_datadir/%name/firmware/50-edk2-x86_64-secure.json +unlink %{buildroot}%_datadir/%name/firmware/60-edk2-aarch64.json +unlink %{buildroot}%_datadir/%name/firmware/60-edk2-arm.json +unlink %{buildroot}%_datadir/%name/firmware/60-edk2-i386.json +unlink %{buildroot}%_datadir/%name/firmware/60-edk2-x86_64.json +unlink %{buildroot}%_datadir/%name/edk2-aarch64-code.fd +unlink %{buildroot}%_datadir/%name/edk2-arm-code.fd +unlink %{buildroot}%_datadir/%name/edk2-arm-vars.fd +unlink %{buildroot}%_datadir/%name/edk2-i386-code.fd +unlink %{buildroot}%_datadir/%name/edk2-i386-secure-code.fd +unlink %{buildroot}%_datadir/%name/edk2-i386-vars.fd +unlink %{buildroot}%_datadir/%name/edk2-x86_64-code.fd +unlink %{buildroot}%_datadir/%name/edk2-x86_64-secure-code.fd + +# this was never meant for customer consumption - delete even though installed +unlink %{buildroot}%_bindir/elf2dmp + +# For PPC and x86 firmwares, there are a few extra install steps necessary. +# In general, if we know that we have not built a firmware, remove it from the +# install base, as the one that we have there is the upstream binary, that got +# copied there during `make install`. + +%if %{build_ppc_firmware} +# In support of update-alternatives +# +# The reason why we do this, is because we have (only for PPC) an skiboot +# package, shipping an alternative version of skiboot.lid. That is, in fact, +# what's "on the other end" of us supporting update-alternatives for this +# particular firmware. +mv %{buildroot}%_datadir/%name/skiboot.lid %{buildroot}%_datadir/%name/skiboot.lid.qemu +# create a dummy target for /etc/alternatives/skiboot.lid +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +ln -s -f %{_sysconfdir}/alternatives/skiboot.lid %{buildroot}%{_datadir}/%name/skiboot.lid +%else +for f in %{ppc_extra_firmware} ; do + unlink %{buildroot}%_datadir/%name/$f +done +# End of "if build_ppc_fimrware" +%endif + +# For riscv64 firmwares (currently, only opensbi), we leave them there in +# any case, because they're part of the qemu-extra package, and riscv is +# a bit special in many ways already. + +%if %{build_x86_firmware} +install -D -m 0644 %{rpmfilesdir}/50-seabios-256k.json %{buildroot}%_datadir/%name/firmware/50-seabios-256k.json +install -D -m 0644 %{rpmfilesdir}/60-seabios-128k.json %{buildroot}%_datadir/%name/firmware/60-seabios-128k.json +install -d -m 0755 %{buildroot}%_docdir/qemu-seabios +%else +for f in %{x86_extra_firmware} ; do + unlink %{buildroot}%_datadir/%name/$f +done +# End of "if build_x86_firmware" +%endif + +%suse_update_desktop_file qemu + +# Common install steps for qemu and qemu-linux-user +%fdupes -s %{buildroot} + +%check +cd %blddir + +# Patch 'increase x86_64 physical bits to 42' requires that the DSDT used for +# acpi [q]tests is modified too. But it's binary, and that means we cannot +# do that in the patch itself. Instead, we keep a copy of the binary in the +# package sources, and put it in place now, before the tests themselves. +# If that patch is removed, the following line needs to go as well. +cp %{rpmfilesdir}/DSDT.pcie %{srcdir}/tests/data/acpi/microvm/ + +# Patch 'tests/acpi: update tables for new core count test' requires some new +# binaries to be introcuded too. Let's copy them in place as well +cp %{rpmfilesdir}/APIC.core-count2 %{rpmfilesdir}/DSDT.core-count2 %{rpmfilesdir}/FACP.core-count2 %{srcdir}/tests/data/acpi/q35/ + +%if 0%{?qemu_user_space_build} +# Seccomp is not supported by linux-user emulation +echo 'int main (void) { return 0; }' > %{srcdir}/tests/unit/test-seccomp.c +# keyctl is not yet supported by linux-user emulation +echo 'int main (void) { return 0; }' > %{srcdir}/tests/unit/test-crypto-secret.c +%endif + +# Compile the QOM test binary first, so that ... +%make_build tests/qtest/qom-test +# ... make comes in fresh and has lots of address space (needed for 32bit, bsc#957379) +# FIXME: is this still a problem? + +# Let's build everything first +%make_build check-build +# Let's now run the 'make check' component individually, so we have +# more control on the options (like -j, etc) +%make_build check-unit +%make_build check-qapi-schema +%make_build check-softfloat +# This would be `make_build check-block`. But iotests are not reliable +# if ran in parallel in OBS, so let's be slow for now. +make -O V=1 VERBOSE=1 -j1 check-block +%if %{with chkqtests} && !0%{?qemu_user_space_build} +# Run qtests sequentially, as it's too unreliable, when run in OBS, if parallelized +make -O V=1 VERBOSE=1 -j1 check-qtest +%endif +# Last step will be to run a full check-report, but we will +# enable this at a later point +#make -O V=1 VERBOSE=1 -j1 check-report.junit.xml + +%if 0%{with spice} +%package spice +Summary: Modules and packages for SPICE +Group: System/Emulators/PC +Requires: qemu-audio-spice +Requires: qemu-chardev-spice +Requires: qemu-headless +Requires: qemu-hw-display-qxl +Requires: qemu-hw-usb-redirect +Requires: qemu-ui-spice-core + +%description spice +%{generic_qemu_description} + +This meta-package brings in, as dependencies, the modules and packages +necessary for having SPICE working for your VMs. + +%files spice + +%package audio-spice +Summary: Spice based audio support for QEMU +Group: System/Emulators/PC +Requires: qemu-ui-spice-core = %{version}-%{release} +%{qemu_module_conflicts} + +%description audio-spice +This package contains a module for Spice based audio support for QEMU. + +%files audio-spice +%dir %_libdir/%name +%_libdir/%name/audio-spice.so + +%package chardev-spice +Summary: Spice vmc and port chardev support for QEMU +Group: System/Emulators/PC +Requires: qemu-ui-spice-core = %{version}-%{release} +%{qemu_module_conflicts} + +%description chardev-spice +This package contains a module for Spice chardev support for QEMU. + +%files chardev-spice +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/chardev-spice.so + +%package ui-spice-app +Summary: Spice UI support for QEMU +Group: System/Emulators/PC +Requires: qemu-chardev-spice = %{version}-%{release} +Requires: qemu-ui-spice-core = %{version}-%{release} +%{qemu_module_conflicts} + +%description ui-spice-app +This package contains a module for doing Spice based UI for QEMU. + +%files ui-spice-app +%dir %_libdir/%name +%_libdir/%name/ui-spice-app.so + +%package ui-spice-core +Summary: Core Spice support for QEMU +Group: System/Emulators/PC +Requires: qemu-ui-opengl +# This next Requires is only since virt-manager expects audio support +Requires: qemu-audio-spice = %{version}-%{release} +%{qemu_module_conflicts} + +%description ui-spice-core +This package contains a module with core Spice support for QEMU. + +%files ui-spice-core +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/ui-spice-core.so + +%package hw-display-qxl +Summary: QXL display support for QEMU +Group: System/Emulators/PC +Requires: qemu-ui-spice-core = %{version}-%{release} +%{qemu_module_conflicts} + +%description hw-display-qxl +This package contains a module for QXL display support for QEMU. + +%files hw-display-qxl +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-display-qxl.so + +# End of "with spice" +%endif + +%package headless +Summary: Minimum set of packages for having a functional QEMU +Group: System/Emulators/PC +Requires: qemu +Requires: qemu-block-curl +Requires: qemu-block-nfs +Requires: qemu-img +%if %{has_virtiofsd} +Requires: virtiofsd +%endif +Recommends: qemu-tools + +%description headless +%{generic_qemu_description} + +This meta-package brings in, as dependencies, the minimum set of packages +currently necessary for having a functional (headless) QEMU/KVM stack. + +%files headless + +%package x86 +Summary: Machine emulator and virtualizer for x86 architectures +Group: System/Emulators/PC +Requires: %name = %{version} +Requires: qemu-accel-tcg-x86 +Requires: qemu-ipxe +Requires: qemu-seabios +Requires: qemu-vgabios +%ifarch x86_64 +Requires: qemu-ovmf-x86_64 +%else +Recommends: qemu-ovmf-ia32 +Recommends: qemu-ovmf-x86_64 +%endif +Recommends: ovmf +Recommends: qemu-microvm + +%description x86 +%{generic_qemu_description} + +This package provides i386 and x86_64 emulation. + +%files x86 +%_bindir/qemu-system-i386 +%_bindir/qemu-system-x86_64 +%_datadir/%name/kvmvapic.bin +%_datadir/%name/linuxboot.bin +%_datadir/%name/linuxboot_dma.bin +%_datadir/%name/multiboot.bin +%_datadir/%name/multiboot_dma.bin +%_datadir/%name/pvh.bin +%doc %_docdir/qemu-x86 + +%package ppc +Summary: Machine emulator and virtualizer for Power architectures +Group: System/Emulators/PC +Requires: %name = %{version} +Requires: qemu-SLOF +Recommends: qemu-ipxe +Recommends: qemu-vgabios + +%description ppc +%{generic_qemu_description} + +This package provides ppc and ppc64 emulation. + +%files ppc +%_bindir/qemu-system-ppc +%_bindir/qemu-system-ppc64 +%_datadir/%name/bamboo.dtb +%_datadir/%name/canyonlands.dtb +%_datadir/%name/openbios-ppc +%_datadir/%name/qemu_vga.ndrv +%_datadir/%name/u-boot.e500 +%_datadir/%name/u-boot-sam460-20100605.bin +%_datadir/%name/vof*.bin +%doc %_docdir/qemu-ppc + +%package s390x +Summary: Machine emulator and virtualizer for S/390 architectures +Group: System/Emulators/PC +Requires: %name = %{version} +Provides: qemu-s390 = %{version} +Obsoletes: qemu-s390 < %{version} + +%description s390x +%{generic_qemu_description} + +This package provides s390x emulation. + +%files s390x +%_bindir/qemu-system-s390x +%_datadir/%name/s390-ccw.img +%_datadir/%name/s390-netboot.img +%doc %_docdir/qemu-s390x + +%package arm +Summary: Machine emulator and virtualizer for ARM architectures +Group: System/Emulators/PC +Requires: %name = %{version} +Recommends: ovmf +Recommends: qemu-ipxe +Recommends: qemu-uefi-aarch64 +Recommends: qemu-vgabios + +%description arm +%{generic_qemu_description} + +This package provides arm emulation. + +%files arm +%_bindir/qemu-system-arm +%_bindir/qemu-system-aarch64 +%_datadir/%name/npcm7xx_bootrom.bin +%doc %_docdir/qemu-arm + +%package extra +Summary: Machine emulator and virtualizer for "extra" architectures +Group: System/Emulators/PC +Requires: %name = %{version} +Recommends: qemu-ipxe +Recommends: qemu-skiboot +Recommends: qemu-vgabios + +%description extra +%{generic_qemu_description} + +This package provides some lesser used emulations, including alpha, m68k, +mips, sparc, and xtensa. (The term "extra" is juxtapositioned against more +popular QEMU packages which are dedicated to a single architecture.) + +%files extra +%_bindir/qemu-system-alpha +%_bindir/qemu-system-avr +%_bindir/qemu-system-cris +%_bindir/qemu-system-hppa +%_bindir/qemu-system-loongarch64 +%_bindir/qemu-system-m68k +%_bindir/qemu-system-microblaze +%_bindir/qemu-system-microblazeel +%_bindir/qemu-system-mips +%_bindir/qemu-system-mipsel +%_bindir/qemu-system-mips64 +%_bindir/qemu-system-mips64el +%_bindir/qemu-system-nios2 +%_bindir/qemu-system-or1k +%_bindir/qemu-system-riscv32 +%_bindir/qemu-system-riscv64 +%_bindir/qemu-system-rx +%_bindir/qemu-system-sh4 +%_bindir/qemu-system-sh4eb +%_bindir/qemu-system-sparc +%_bindir/qemu-system-sparc64 +%_bindir/qemu-system-tricore +%_bindir/qemu-system-xtensa +%_bindir/qemu-system-xtensaeb +%_datadir/%name/hppa-firmware.img +%_datadir/%name/openbios-sparc32 +%_datadir/%name/openbios-sparc64 +%_datadir/%name/opensbi-riscv32-generic-fw_dynamic.bin +%_datadir/%name/opensbi-riscv64-generic-fw_dynamic.bin +%_datadir/%name/palcode-clipper +%_datadir/%name/petalogix-ml605.dtb +%_datadir/%name/petalogix-s3adsp1800.dtb +%_datadir/%name/QEMU,cgthree.bin +%_datadir/%name/QEMU,tcx.bin + +%package lang +Summary: Translations for QEMU +Group: System/Emulators/PC + +%description lang +This package contains a few language translations, particularly for the +graphical user interface components that come with QEMU. The bulk of strings +in QEMU are not localized. + +%files lang -f %blddir/%name.lang + +%package audio-alsa +Summary: ALSA based audio support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description audio-alsa +This package contains a module for ALSA based audio support for QEMU. + +%files audio-alsa +%dir %_libdir/%name +%_libdir/%name/audio-alsa.so + +%package audio-dbus +Summary: D-Bus based audio support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description audio-dbus +This package provides a module for D-Bus based audio support for QEMU. + +%files audio-dbus +%dir %_libdir/%name +%_libdir/%name/audio-dbus.so + +%package audio-pa +Summary: Pulse Audio based audio support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description audio-pa +This package contains a module for Pulse Audio based audio support for QEMU. + +%files audio-pa +%dir %_libdir/%name +%_libdir/%name/audio-pa.so + +%package audio-jack +Summary: JACK based audio support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description audio-jack +This package contains a module for JACK based audio support for QEMU. + +%files audio-jack +%dir %_libdir/%name +%_libdir/%name/audio-jack.so + +%package audio-oss +Summary: OSS based audio support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description audio-oss +This package contains a module for OSS based audio support for QEMU. + +%files audio-oss +%dir %_libdir/%name +%_libdir/%name/audio-oss.so + +%package audio-pipewire +Summary: Pipewire based audio support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description audio-pipewire +This package contains a module for Pipewire based audio support for QEMU. + +%files audio-pipewire +%dir %_libdir/%name +%_libdir/%name/audio-pipewire.so + +%package block-curl +Summary: cURL block support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-curl +This package contains a module for accessing network-based image files over +a network connection from qemu-img tool and QEMU system emulation. + +%files block-curl +%dir %_libdir/%name +%_libdir/%name/block-curl.so + +%package block-dmg +Summary: DMG block support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-dmg +This package contains a module for accessing Mac OS X image files from +qemu-img tool and QEMU system emulation. + +%files block-dmg +%dir %_libdir/%name +%_libdir/%name/block-dmg-bz2.so +%_libdir/%name/block-dmg-lzfse.so + +%package block-gluster +Summary: GlusterFS block support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-gluster +This package contains a module for accessing network-based image files over a +GlusterFS network connection from qemu-img tool and QEMU system emulation. + +%files block-gluster +%dir %_libdir/%name +%_libdir/%name/block-gluster.so + +%package block-iscsi +Summary: iSCSI block support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-iscsi +This package contains a module for accessing network-based image files over an +iSCSI network connection from qemu-img tool and QEMU system emulation. + +%files block-iscsi +%dir %_libdir/%name +%_libdir/%name/block-iscsi.so + +%package block-nfs +Summary: direct Network File System support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-nfs +This package contains a module for directly accessing nfs based image files +for QEMU. + +%files block-nfs +%dir %_libdir/%name +%_libdir/%name/block-nfs.so + +%package block-ssh +Summary: SSH (SFTP) block support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-ssh +This package contains a module for accessing network-based image files over an +SSH network connection from qemu-img tool and QEMU system emulation. + +%files block-ssh +%dir %_libdir/%name +%_libdir/%name/block-ssh.so + +%package chardev-baum +Summary: Baum braille chardev support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description chardev-baum +This package contains a module for baum braille chardev support for QEMU. + +%files chardev-baum +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/chardev-baum.so + +%package hw-display-virtio-gpu +Summary: Virtio GPU display support for QEMU +Group: System/Emulators/PC +# Make sure that VGA is pretty much always there. Technically, this isn't +# really necessary (and/or, should be dealt with in other places) but it +# makes it easier to deal with strange situation where, e.g., GRUB is +# configured to work only with a graphical terminal (see bsc#1219164), +# and the hw-display-virtio-vga package is small enough, anyway. +Requires: qemu-hw-display-virtio-vga = %{version}-%{release} +%{qemu_module_conflicts} + +%description hw-display-virtio-gpu +This package contains a module for Virtio GPU display support for QEMU. + +%files hw-display-virtio-gpu +%dir %_datadir/%name +%_libdir/%name/hw-display-virtio-gpu.so +%_libdir/%name/hw-display-virtio-gpu-gl.so + +%package hw-display-virtio-gpu-pci +Summary: Virtio-gpu pci device for QEMU +Group: System/Emulators/PC +Requires: qemu-hw-display-virtio-gpu = %{version}-%{release} +%{qemu_module_conflicts} + +%description hw-display-virtio-gpu-pci +This package contains a module providing the virtio gpu pci device for QEMU. + +%files hw-display-virtio-gpu-pci +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-display-virtio-gpu-pci.so +%_libdir/%name/hw-display-virtio-gpu-pci-gl.so + +%package hw-display-virtio-vga +Summary: Virtio vga device for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description hw-display-virtio-vga +This package contains a module providing the virtio vga device for QEMU. + +%files hw-display-virtio-vga +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-display-virtio-vga.so +%_libdir/%name/hw-display-virtio-vga-gl.so + +%package hw-s390x-virtio-gpu-ccw +Summary: S390x virtio-gpu ccw device for QEMU +Group: System/Emulators/PC +Requires: qemu-hw-display-virtio-gpu = %{version}-%{release} +%{qemu_module_conflicts} + +%description hw-s390x-virtio-gpu-ccw +This package contains a module providing the s390x virtio gpu ccw device for +QEMU. + +%files hw-s390x-virtio-gpu-ccw +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-s390x-virtio-gpu-ccw.so + +%package hw-usb-redirect +Summary: USB redirection support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description hw-usb-redirect +This package contains a module for USB redirection support for QEMU. + +%files hw-usb-redirect +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-usb-redirect.so + +%package hw-usb-smartcard +Summary: USB smartcard support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description hw-usb-smartcard +This package contains a modules for USB smartcard support for QEMU. + +%files hw-usb-smartcard +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-usb-smartcard.so + +%package hw-usb-host +Summary: USB passthrough driver support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description hw-usb-host +This package contains a modules for USB passthrough driver for QEMU. + +%files hw-usb-host +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-usb-host.so + +%package ui-dbus +Summary: D-Bus based UI support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description ui-dbus +This package contains a module for doing D-Bus based UI for QEMU. + +%files ui-dbus +%dir %_libdir/%name +%_libdir/%name/ui-dbus.so + +%package ui-curses +Summary: Curses based UI support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description ui-curses +This package contains a module for doing curses based UI for QEMU. + +%files ui-curses +%dir %_libdir/%name +%_libdir/%name/ui-curses.so + +%package ui-gtk +Summary: GTK based UI support for QEMU +Group: System/Emulators/PC +Requires: qemu-ui-opengl +Supplements: (qemu and libgtk-3-0) +%{qemu_module_conflicts} + +%description ui-gtk +This package contains a module for doing GTK based UI for QEMU. + +%files ui-gtk +%dir %_libdir/%name +%_libdir/%name/ui-gtk.so + +%package ui-opengl +Summary: OpenGL based UI support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description ui-opengl +This package contains a module for doing OpenGL based UI for QEMU. + +%files ui-opengl +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/ui-egl-headless.so +%_libdir/%name/ui-opengl.so + +%package vhost-user-gpu +Summary: Vhost user mode virtio-gpu 2D/3D rendering backend for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description vhost-user-gpu +This package contains a vhost user mode virtio-gpu 2D/3D rendering backend for +QEMU. + +%files vhost-user-gpu +%dir %_datadir/%name/vhost-user +%_datadir/%name/vhost-user/50-qemu-gpu.json +%_libexecdir/vhost-user-gpu + +%package img +Summary: QEMU disk image utility +Group: System/Emulators/PC + +%description img +This package provides command line tools for manipulating disk images. + +%files img +%_bindir/qemu-img +%_bindir/qemu-io +%_bindir/qemu-nbd +%_bindir/qemu-storage-daemon +%_mandir/man1/qemu-img.1.gz +%_mandir/man8/qemu-nbd.8.gz +%_mandir/man1/qemu-storage-daemon.1.gz +%_mandir/man7/qemu-storage-daemon-qmp-ref.7.gz + +%package pr-helper +Summary: QEMU persistent reservation helper +Group: System/Emulators/PC + +%description pr-helper +This package provides a helper utility for SCSI persistent reservations. + +%files pr-helper +%_bindir/qemu-pr-helper +%_mandir/man8/qemu-pr-helper.8.gz + +%package tools +Summary: Tools for QEMU +Group: System/Emulators/PC +Requires(pre): permissions +Requires: qemu-img +Requires: qemu-pr-helper +Requires: group(kvm) +%if %{has_virtiofsd} +Requires: virtiofsd +%endif +Recommends: multipath-tools +Recommends: qemu-block-curl +%if 0%{?with_rbd} +Recommends: qemu-block-rbd +%endif + +%description tools +This package contains various QEMU related tools, including a bridge helper, +a virtfs helper, ivshmem, disk utilities and scripts for various purposes. + +%files tools +%_bindir/analyze-migration.py +%_bindir/qemu-edid +%_bindir/qemu-keymap +%_bindir/vmstate-static-checker.py +%_bindir/vmxcap +%verify(not mode) %attr(4750,root,kvm) %_libexecdir/qemu-bridge-helper +%_libexecdir/virtfs-proxy-helper +%_mandir/man1/virtfs-proxy-helper.1.gz +%dir %_sysconfdir/%name +%config(noreplace) %_sysconfdir/%name/bridge.conf + +%post tools +%set_permissions %_libexecdir/qemu-bridge-helper + +%verifyscript tools +%verify_permissions %_libexecdir/qemu-bridge-helper + +%package ivshmem-tools +Summary: Inter-VM Shared Memory Tools for QEMU +Group: System/Emulators/PC + +%description ivshmem-tools +This package contains a sample shared memory client and server which utilize +QEMU's Inter-VM shared memory device as specified by the ivshmem client-server +protocol specification documented in docs/specs/ivshmem-spec.txt in QEMU source +code. + +%files ivshmem-tools +%dir %_datadir/%name +%_bindir/ivshmem-client +%_bindir/ivshmem-server + +%package guest-agent +Summary: Guest agent for QEMU +Group: System/Emulators/PC +Requires: group(kvm) +Requires(post): udev +Supplements: modalias(acpi*:QEMU0002%3A*) +Supplements: modalias(pci:v00005853d00000001sv*sd*bc*sc*i*) +Supplements: modalias(pci:v0000FFFDd00000101sv*sd*bc*sc*i*) +%{?systemd_ordering} + +%description guest-agent +This package contains the QEMU guest agent. It is installed in the linux guest +to provide information and control at the guest OS level. + +%files guest-agent +%attr(0755,root,kvm) %_bindir/qemu-ga +%_mandir/man8/qemu-ga.8.gz +%{_unitdir}/qemu-guest-agent.service +/usr/lib/udev/rules.d/80-qemu-ga.rules + +%pre guest-agent +%service_add_pre qemu-guest-agent.service + +%post guest-agent +%service_add_post qemu-guest-agent.service +if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then + /usr/bin/systemctl start qemu-guest-agent.service || : +fi + +%preun guest-agent +if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then + /usr/bin/systemctl stop qemu-guest-agent.service || : +fi + +%postun guest-agent +%service_del_postun_without_restart qemu-guest-agent.service +if [ "$1" = "1" ] ; then + if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then + /usr/bin/systemctl restart qemu-guest-agent.service || : + fi +fi + +%package ksm +Summary: Kernel Samepage Merging services +Group: System/Emulators/PC +Requires(pre): coreutils +Requires(post): coreutils + +%description ksm +Kernel Samepage Merging (KSM) is a memory-saving de-duplication feature, that +merges anonymous (private) pages (not pagecache ones). + +This package provides a service file for starting and stopping KSM. + +%files ksm +%{_unitdir}/ksm.service + +%pre ksm +%service_add_pre ksm.service + +%post ksm +%service_add_post ksm.service + +%preun ksm +%service_del_preun ksm.service + +%postun ksm +%service_del_postun ksm.service + +%package accel-tcg-x86 +Summary: TCG accelerator for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description accel-tcg-x86 +TCG is the QEMU binary translator, responsible for converting from target to +host instruction set. + +This package provides the TCG accelerator for QEMU. + +%files accel-tcg-x86 +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/accel-tcg-i386.so +%_libdir/%name/accel-tcg-x86_64.so + +%package accel-qtest +Summary: QTest accelerator for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description accel-qtest +QTest is a device emulation testing framework. It is useful to test device +models. + +This package provides QTest accelerator for testing QEMU. + +%files accel-qtest +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/accel-qtest-aarch64.so +%_libdir/%name/accel-qtest-alpha.so +%_libdir/%name/accel-qtest-arm.so +%_libdir/%name/accel-qtest-avr.so +%_libdir/%name/accel-qtest-cris.so +%_libdir/%name/accel-qtest-hppa.so +%_libdir/%name/accel-qtest-i386.so +%_libdir/%name/accel-qtest-loongarch64.so +%_libdir/%name/accel-qtest-m68k.so +%_libdir/%name/accel-qtest-microblaze.so +%_libdir/%name/accel-qtest-microblazeel.so +%_libdir/%name/accel-qtest-mips.so +%_libdir/%name/accel-qtest-mips64.so +%_libdir/%name/accel-qtest-mips64el.so +%_libdir/%name/accel-qtest-mipsel.so +%_libdir/%name/accel-qtest-nios2.so +%_libdir/%name/accel-qtest-or1k.so +%_libdir/%name/accel-qtest-ppc.so +%_libdir/%name/accel-qtest-ppc64.so +%_libdir/%name/accel-qtest-riscv32.so +%_libdir/%name/accel-qtest-riscv64.so +%_libdir/%name/accel-qtest-rx.so +%_libdir/%name/accel-qtest-s390x.so +%_libdir/%name/accel-qtest-sh4.so +%_libdir/%name/accel-qtest-sh4eb.so +%_libdir/%name/accel-qtest-sparc.so +%_libdir/%name/accel-qtest-sparc64.so +%_libdir/%name/accel-qtest-tricore.so +%_libdir/%name/accel-qtest-x86_64.so +%_libdir/%name/accel-qtest-xtensa.so +%_libdir/%name/accel-qtest-xtensaeb.so + +%if 0%{?with_rbd} +%package block-rbd +Summary: Rados Block Device (Ceph) support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-rbd +This package contains a module for accessing ceph (rbd,rados) image files +for QEMU. + +%files block-rbd +%dir %_libdir/%name +%_libdir/%name/block-rbd.so +# End of "if with_rbd" +%endif + +%if %{build_ppc_firmware} +%package SLOF +Summary: Slimline Open Firmware - SLOF +Group: System/Emulators/PC +BuildArch: noarch + +%description SLOF +Slimline Open Firmware (SLOF) is an implementation of the IEEE 1275 standard. +It can be used as partition firmware for pSeries machines running on QEMU or KVM. + +%files SLOF +%dir %_datadir/%name +%_datadir/%name/slof.bin + +%package skiboot +Summary: OPAL firmware (aka skiboot), used in booting OpenPOWER systems +Group: System/Emulators/PC +BuildArch: noarch +Requires(post): update-alternatives +Requires(postun): update-alternatives + +%description skiboot +Provides OPAL (OpenPower Abstraction Layer) firmware, aka skiboot, as +traditionally packaged with QEMU. + +%files skiboot +%dir %_datadir/%name +%_datadir/%name/skiboot.lid +%_datadir/%name/skiboot.lid.qemu +%ghost %_sysconfdir/alternatives/skiboot.lid + +%post skiboot +update-alternatives --install \ + %{_datadir}/%name/skiboot.lid skiboot.lid %{_datadir}/%name/skiboot.lid.qemu 15 + +%preun skiboot +if [ ! -f %{_datadir}/%name/skiboot.lid.qemu ] ; then + update-alternatives --remove skiboot.lid %{_datadir}/%name/skiboot.lid.qemu +fi +# End of "if build_ppc_firmware" +%endif + +%if %{build_x86_firmware} +%package microvm +Summary: x86 MicroVM firmware for QEMU +Group: System/Emulators/PC +BuildArch: noarch + +%description microvm +This package provides minimal x86 firmware for booting certain guests under +QEMU. qboot provides the minimum resources needed to boot PVH and bzImages. +bios-microvm, created from a minimal seabios configuration, provides slightly +wider support than qboot, but still focuses on quick boot up. + +%files microvm +%dir %_datadir/%name +%_datadir/%name/bios-microvm.bin +%_datadir/%name/qboot.rom + +%package seabios +Summary: x86 Legacy BIOS for QEMU +Group: System/Emulators/PC +Version: %{sbver} +Release: 0 +BuildArch: noarch +Conflicts: %name < 1.6.0 + +%description seabios +SeaBIOS is an open source implementation of a 16bit x86 BIOS. SeaBIOS +is the default and legacy BIOS for QEMU. + +%files seabios +%dir %_datadir/%name +%_datadir/%name/bios.bin +%_datadir/%name/bios-256k.bin +%_datadir/%name/firmware/50-seabios-256k.json +%_datadir/%name/firmware/60-seabios-128k.json +%license roms/seabios/COPYING +%doc %_docdir/qemu-seabios + +%package vgabios +Summary: VGA BIOSes for QEMU +Group: System/Emulators/PC +Version: %{sbver} +Release: 0 +BuildArch: noarch +Conflicts: %name < 1.6.0 + +%description vgabios +VGABIOS provides the video ROM BIOSes for the following variants of VGA +emulated devices: Std VGA, QXL, Cirrus CLGD 5446 and VMware emulated +video card. For use with QEMU. + +%files vgabios +%dir %_datadir/%name +%_datadir/%name/vgabios.bin +%_datadir/%name/vgabios-ati.bin +%_datadir/%name/vgabios-bochs-display.bin +%_datadir/%name/vgabios-cirrus.bin +%_datadir/%name/vgabios-qxl.bin +%_datadir/%name/vgabios-ramfb.bin +%_datadir/%name/vgabios-stdvga.bin +%_datadir/%name/vgabios-virtio.bin +%_datadir/%name/vgabios-vmware.bin +%license roms/seabios/COPYING + +%package ipxe +Summary: PXE ROMs for QEMU NICs +Group: System/Emulators/PC +Version: 1.0.0+ +Release: 0 +BuildArch: noarch +Conflicts: %name < 1.6.0 + +%description ipxe +Provides Preboot Execution Environment (PXE) ROM support for various emulated +network adapters available with QEMU. + +%files ipxe +%dir %_datadir/%name +%_datadir/%name/efi-e1000.rom +%_datadir/%name/efi-e1000e.rom +%_datadir/%name/efi-eepro100.rom +%_datadir/%name/efi-ne2k_pci.rom +%_datadir/%name/efi-pcnet.rom +%_datadir/%name/efi-rtl8139.rom +%_datadir/%name/efi-virtio.rom +%_datadir/%name/efi-vmxnet3.rom +%_datadir/%name/pxe-e1000.rom +%_datadir/%name/pxe-eepro100.rom +%_datadir/%name/pxe-ne2k_pci.rom +%_datadir/%name/pxe-pcnet.rom +%_datadir/%name/pxe-rtl8139.rom +%_datadir/%name/pxe-virtio.rom +# End of "if build_x86_firmware" +%endif + +%package doc +Summary: Documentation for QEMU +Group: System/Emulators/PC +BuildArch: noarch +Suggests: qemu + +%files doc +%doc %_docdir/%name + +%description doc +%{generic_qemu_description} + +This package contains user and developer documentation for QEMU. + +%changelog diff --git a/rpm/seabios_version b/rpm/seabios_version new file mode 100644 index 0000000000..0ce512e75a --- /dev/null +++ b/rpm/seabios_version @@ -0,0 +1 @@ +rel-1.16.2-3-gd478f380 diff --git a/rpm/skiboot_version b/rpm/skiboot_version new file mode 100644 index 0000000000..5f205eb160 --- /dev/null +++ b/rpm/skiboot_version @@ -0,0 +1 @@ +v7.0 diff --git a/rpm/supported.arm.txt b/rpm/supported.arm.txt new file mode 100644 index 0000000000..d55ef9b157 --- /dev/null +++ b/rpm/supported.arm.txt @@ -0,0 +1,926 @@ +[qemu-arm package document] + +SLES 15 SP4 QEMU/KVM RELATED SUPPORT STATEMENTS +=============================================== + +Overview +-------- + + The QEMU based packages included with SLES 15 SP4 provide a large variety of + features, from the very latest customer requests to features of questionable + quality or value. The linux kernel includes components which contribute KVM + virtualization features as well. This document was created to assist the user + in deciding which features can be relied upon to build enterprise class + virtualization solutions. KVM based virtualization for x86 (Intel 64/AMD64), + for IBM System z (s390x), and for the ARM64 architecture (AArch64) are offered + at the L3 (full support) level. The bulk of this document deals with L3 + supported features and is primarily ARM64 centric. This document should be + considered a companion to the standard virtualization documentation delivered + with the product. + + KVM is implemented in linux kernel modules which enable the linux kernel to + function as an integral part of the KVM hypervisor. The hypervisor-guest + interaction is managed by QEMU through the /dev/kvm ioctl interface. The linux + host assists in the virtualization of storage, networking and display + resources as well as allowing direct hardware passthrough of PCI and USB + devices. Linux memory and cpu management features are used by QEMU/KVM to + enable guests to share those host resources as efficiently as possible. + + QEMU is a primary component of KVM based virtualization. The QEMU emulator + binary qemu-system-aarch64 is the program to use to access KVM virtualization. + When using this program, the -machine option accel=kvm (or its alias + -enable-kvm) or --accel kvm option must be specified for KVM acceleration to + be used by the guest. + + Libvirt is the preferred means of accessing QEMU/KVM functionality and is + documented elsewhere. This document focuses on the features and direct usage + of QEMU/KVM as provided by the QEMU based packages. + +Major QEMU/KVM Supported Features +--------------------------------- + +- KVM virtualization is accomplished by using the QEMU program in KVM + acceleration mode. KVM acceleration requires that both guest and host have + the same fundamental architecture. + +- Guest images created under previous QEMU versions are supported by machine + version compatibilities built into more recent QEMU versions. + +- For ease of use, the QEMU program has defaults which represent traditional + usage patterns. + +- Guest virtual machine characteristics are specified by a combination of + internal defaults, options provided on the QEMU program command-line, runtime + configurations set via the monitor interfaces and optional config files. The + runtime control of a VM is effected either through the Human Monitor + "Protocol" (HMP), or the JSON based programmatical QEMU Monitor Protocol (QMP) + interface. For QMP details, see qemu-qmp-ref man page. + Since a KVM guest runs in the context of a normal linux process, some types + of execution controls are managed with linux tools. + +- QEMU is compatible with EDK II based UEFI firmware available with SLES 15 SP4, + which allow boot options common to physical systems, along with other features + tailored to virtualization. Various VGABIOS ROMs, from the SEABIOS project, + are also available. + +- Some QEMU messages have been localized to various languages. This is provided + by the optional qemu-lang package. Keyboard mappings for various nationalities + is also provided. + +- Virtual machine lifecycle controls include startup through the UEFI BIOS or + kernel boot, ACPI based shutdown, execution pausing, the saving and restoring + of machine state or disk state, VM migration to another host, and + miscellaneous controls available through the "monitors" mentioned above. + +- Guest execution state may be "moved" in both time (save/restore) and space + (static and live migration). These migrations or save/restore operations can + take place either from certain prior SLES versioned hosts to a SLES 15 SP4 + host or between hosts of the same version. Certain other restrictions also + apply. + +- Security considerations include privileged helpers and a security model which + allows running guests as a non-root user. + +- QEMU provides best effort reuse of existing disk images, including those with + systems installed, through geometry probing. Also disk images produced by + other popular virtualization technologies may be imported into QEMU supported + storage formats. These QEMU formats include features which exploit the + benefits of virtualization. + +- Memory, cpu and disk space overcommit are possible and can be beneficial when + done responsibly. Additional management of these resources comes in the form + of memory ballooning or hotplug, host KSM, vcpu hot-add, online disk resizing, + trim, discard and hole punching. + +- Guest performance is enhanced through the use of virtio devices, various disk + caching modes, network acceleration via the vhost-net kernel module, multi- + queue network transmit capabilities, host transparent huge pages (THP) and + direct hugetlb usage. Physical PCI and USB devices may also be passed through + to the guest, including SR-IOV VF's. + +- The guest UI is accessable via GTK, VNC, Spice, and serial (including curses + TUI) interfaces. + +- Guest timekeeping is supported in a variety of ways, including a paravirtual + clocksource, and options for the various guest clocks for how to handle the + timeslicing of the guest's execution on the host. + +- In addition to the para-virtualized devices already mentioned, other devices + and infrastructure designed to avoid virtualization "problem areas" are + available such as SPICE graphics, vmmouse emulation, tablet style pointer + interfaces and virtio based UI interfaces. + +- A built-in user-mode network (SLIRP) stack is available. + +- Portions of the host file system may be shared with a guest by using virtFS. + +- A guest "agent" is available for SLES 15 SP4 KVM guests via the + qemu-guest-agent package. This allows some introspection and control of the + guest OS environment from the host. + +QEMU/KVM Technology Previews +---------------------------- + +- All features indicated as not being supported in this document fall under the + Technology Preview definition contained in the main product's release notes. + +Noteworthy QEMU/KVM Unsupported Features +---------------------------------------- + +- Note that some features are unsupported simply due to lack of validation. If + an existing feature is desired, but not marked supported, let SUSE know about + your requirements. + +- The TCG "acceleration" mode may be helpful for problem isolation, but + otherwise presents insufficient benefit and stability. + +- GlusterFS integration is not enabled. + +- 32 bit ARM KVM has never been supported by SUSE, but it's worth noting that + this capability will cease to even be possible in a near-future QEMU/KVM + (kernel) combination. + +Deprecated, Superseded, Modified and Dropped Features +----------------------------------------------------- + +- https://qemu-project.gitlab.io/qemu/about/deprecated.html and + https://qemu-project.gitlab.io/qemu/about/removed-features.html + These websites track features deprecation and removal at the upstream + development level. Our qemu package inherits this community direction, but be + aware that we can and will deviate as needed. Those deviations and additional + information can be found in this section. Feature deprecation as well as + removed features are also tracked in the "System Emulation" section of the + documentation installed with the qemu package. + +- qemu-img: Deprecate use of -b without -F. Creating an image that requires + format probing of the backing image is potentially unsafe and is now + deprecated. + +- Aspeed swift-bmc machine is deprecated. It can be easily replaced by the + witherspoon-bmc or the romulus-bmc machines. + +- The previously non-persistent backing file with pmem=on is deprecated. Modify + VM configuration to set pmem=off to continue using fake NVDIMM with backing + file or move backing file to NVDIMM storage and keep pmem=on. + +- The use of "?" as a parameter to "-cpu", "-soundhw", "-device", "-M", + "-machine" and "-d" is now considered deprecated. Use "help" + instead. + +- The use of "if=scsi" as a parameter to "-drive" does not work anymore with PC + machine types, as it created an obsolete SCSI controller model. + +- Use of aio=native without direct cache mode also being specified (cache=none, + cache=directsync, or cache.direct=on) is no longer allowed. + +- The use of image encryption in qcow and qcow2 formats is now considered + deprecated. + Analysis has shown it to be weak encryption, in addition to suffering from + poor design. Images can easily be converted to a non-encrypted format. + +- Use of acpi, boot-opts, and smp-opts in a -readconfig config file are now + considered deprecated. In the future those names will be standardized to + acpitable, boot, and smp respectively. + +- These previously supported command line options are now considered deprecated: + -display sdl,window_close= (use -display sdl,window-close) + -no-quit (use -display ...,window-close=off) + -chardev tty (use serial name instead) + -chardev paraport (use parallel name instead) + -device virtio-blk,scsi= (use virtio-scsi instead) + -device virtio-blk-pci,scsi= (use virtio-scsi instead) + -enable-fips (not really helpful - see https://git.qemu.org/?p=qemu.git;a=commit;h=166310299a1e7824bbff17e1f016659d18b4a559 for details) + -realtime mlock= (use -overcommit mem-lock= instead) + -spice password=string (use password-string option instead) + -writeconfig (no replacement - never really worked right) + -share and noshare must be replaced by share=on/share=off + -nodelay must be replaced by nodelay=on rather than delay=off + -object-add options opened=on and loaded=on (both had no effect) + +- These previously supported command line options are no longer supported: + -device ide-drive (use ide-hd or ide-cd instead) + -device scsi-disk (use scsi-hd or scsi-cd instead) + +- These previously supported command line options are no longer recognized: + -balloon (use -device virtio-balloon instead) + -clock + -device ivshmem (use ivshmem-doorbell or ivshmem-plain instead) + -device pc-sysfw (no longer needed) + -device pci-assign, -device kvm-pci-assign (use -device vfio-pci instead) + -display sdl + -no-frame + -nodefconfig (use -no-user-config instead) + -realtime ... + -sdl + -show-cursor + -virtioconsole (use -device virtconsole instead) + +- The previously unsupported machine type xlnx-ep108 is no longer recognized + (used xlnx-zcu102 unstead) + +- Specifying a cpu feature with both "+feature/-feature" and "feature=on/off" + will now cause a warning. The current behavior for this combination where + "+feature/-feature" wins over "feature=on/off", will be changed going forward + so that "+feature" and "-feature" will be synonyms for "feature=on" and + "feature=off" respectively. + +- The previously supported blkdev-add QMP command has been flagged as lacking + and could possibly change syntax in the future. + +- This previously unsupported command line option is now deprecated: + -soundhw (use -device ... instead) + +- These previously unsupported command line options are no longer recognized: + -bt + -device at24c-eeprom + -device mmio_interface + -device ssi-sd + -device tpm-tis-device + -device u2f-passthru + -device vhost-user-vsock-pci-transitional + -device vhost-vsock-pci-transitional + -device virtio-iommu-pci-transitional + -enable-hax + -tb-size + -tdf + -xen-create + +- These previously supported QMP commands are now deprecated: + + +- These previously supported QMP commands are no longer recognized: + info cpustats + block_passwd + change (use blockdev-change-medium or change-vnc-password instead) + cpu-add (use device_add instead) + migrate-set-cache-size (use migrate-set-parameters instead) + migrate_set_downtime (use migrate-set-parameters instead) + migrate_set_speed (use migrate-set-parameters instead) + query-cpus (use query-cpus-fast instead) + query-events + query-migrate-cache-size (use query-migrate-parameters instead) + +- These previously supported monitor commands are now deprecated: + change + +- These previously supported monitor commands are no longer recognized: + info cpustats + block_passwd ... + cpu-add (use device_add instead) + migrate_set_cache_size + migrate_set_downtime + migrate_set_speed + pci_add (use device_add instead) + pci_del (use device_del instead) + usb_add (use device_add instead) + usb_del (use device_del instead) + +- These previously unsupported monitor command are now deprecated: + + +- These previously unsupported monitor commands are no longer recognized: + acl_add ... + acl_policy ... + acl_remove ... + acl_reset ... + acl_show ... + host_net_add + host_net_remove + +- These previously unsupported QMP commands are now supported under a new name: + x-block-dirty-bitmap-disable (use block-dirty-bitmap-disable instead) + x-block-dirty-bitmap-enable (use block-dirty-bitmap-enable instead) + x-block-dirty-bitmap-merge (use block-dirty-bitmap-merge instead) + x-block-latency-histogram-set (use block-latency-histogram-set instead) + x-blockdev-create (use blockdev-create instead) + +- This previously unsupported QMP commands is no longer recognized: + x-nbd-server-add-bitmap + +- Due to upstream's decision to no longer fully support the qed storage format + going forward (since it really provides no benefit over qcow2 and is now no + longer actively maintained upstream), creating qed storage images is no longer + supported and it is highly discouraged to continue using existing qed images. + They should instead be converted to another supported format. + +QEMU Command-Line and Monitor Syntax and Support +------------------------------------------------ + +- The QEMU program command-line syntax is as follows: + qemu-system-aarch64 [options] + + Where 'options' are taken from the options listed below. + The images used with -drive or -cdrom, may be in the raw (no format) or qcow2 + storage formats, and may be located in files within the host filesystem, + logical volumes, host physical disks, or network based storage. Read only + media may also be accessed via URL style protocol specifiers. + + Note that as a general rule, as new command line options are added which serve + to replace an older option or interface, you are strongly encouraged to adapt + your usage to the new option. The new option is being introduced to provide + better functionality and usability going forward. In some cases existing + problems or even bugs in older interfaces cannot be fixed due to functional + expectations, but are resolved in the newer interface or option. + This advice includes moving to the most recent machine type (eg virt-6.1 + instead of virt-6.0) if possible. + +- The following command line options are supported: + -accel ... + -action ... + -add-fd ... + -alt-grab + -append ... + -audio-help + -audiodev + -bios ... + -blockdev ... + -boot ... + -cdrom ... + -chardev ... + -compat ... + -cpu host + -ctrl-grab + -d ... + -daemonize + -debugcon ... + -device + + [VGA|rtl8139|virtio-net-pci|virtio-blk-pci|virtio-balloon-pci| + virtio-9p-pci|usb-hub|usb-ehci|usb-tablet|usb-storage|usb-mouse| + usb-kbd|virtserialport|virtconsole|virtio-serial-pci|i82559er| + virtio-scsi-pci|scsi-cd|scsi-hd|scsi-generic|scsi-disk|scsi-block| + pci-serial|pci-serial-2x|pci-serial-4x|ich9-ahci|usb-host|usb-serial| + usb-wacom-tablet|usb-braille|usb-net|pci-ohci|virtio-rng-pci|i6300esb| + qxl|qxl-vga|pvpanic|vfio-pci|ivshmem-doorbell|ivshmem-plain| + pci-bridge|megasas-gen2|e1000e|e1000|vmcoreinfo|pcie-pci-bridge| + vhost-user-blk|vhost-user-blk-pci|vhost-user-scsi|vhost-user-scsi-pci| + vhost-vsock-pci|virtio-crypto-pci|virtio-vga| + vhost-scsi-pci-non-transitional|vhost-scsi-pci-transitional| + vhost-user-blk-pci-non-transitional|vhost-user-blk-pci-transitional| + vhost-user-scsi-pci-non-transitional|vhost-user-scsi-pci-transitional| + vhost-vsock-pci-non-transitional|virtio-9p-pci-non-transitional| + virtio-9p-pci-transitional|virtio-balloon-pci-non-transitional| + virtio-balloon-pci-transitional|virtio-blk-pci-non-transitional| + virtio-blk-pci-transitional|virtio-input-host-pci-non-transitional| + virtio-input-host-pci-transitional|virtio-net-pci-non-transitional| + virtio-net-pci-transitional|virtio-rng-pci-non-transitional| + virtio-rng-pci-transitional|virtio-scsi-pci-non-transitional| + virtio-scsi-pci-transitional|virtio-serial-pci-non-transitional| + virtio-serial-pci-transitional|vhost-user-fs-pci|vhost-user-gpu| + vhost-user-pci-pci|vhost-user-input|vhost-user-input-pci| + vhost-user-vga|virtio-mmio|guest-loader|nvme-subsys|pvpanic-pci] + (the following are aliases of these supported devices: ahci| + virtio-blk|virtio-net|virtio-serial|virtio-balloon| virtio-9p| + virtio-input-host|virtio-keyboard|virtio-mouse|virtio-tablet| + virtio-gpu|virtio-scsi|virtio-rng|e1000-82540em) + + -dfilter range, ... + -display ... + -drive + + ... (if specified if=[virtio] and format=[qcow2|raw] and + snapshot=off only) + + -echr ... + -enable-fips + -enable-kvm + -fsdev ... + -full-screen + -fw_cfg ... + -gdb ... + -global ... + -h + -help + -incoming ... + -initrd ... + -iscsi ... + -k ... + -kernel ... + -loadvm ... + -m ... + -M [help|none|virt-2.6|virt-2.11|virtio-3.1|virt-4.2|virt-5.2|virt-6.0|virt-6.1] + -machine [help|none|virt-2.6|virt-2.11|virt-3.1|virt-4.2|virt-5.2|virt-6.0|virt-6.1] + -mem-path ... + -mem-prealloc + -mon ... + -monitor ... + -msg ... + -name ... + -net + + [bridge|l2tpv3|nic|none|tap|user] ... (for model= only e1000, rtl8139, + and virtio are supported) + + -netdev [bridge|tap|user] ... + -nic ... + -no-acpi + -nodefaults + -nographic + -no-quit + -no-reboot + -no-shutdown + -no-user-config + -object ... + -only-migratable + -parallel ... + -pidfile ... + -plugin ... + -qmp ... + -qmp-pretty ... + -readconfig ... + -rtc ... + -runas ... + -s + -S + -sandbox ... + -seed ... + -serial ... + -smbios ... + -smp ... + -spice + -tpmdev passthrough ... + -trace ... + -usb + -usbdevice [braile|disk|host|mouse|net|serial|tablet] + -uuid ... + -version + -vga [none|qxl|std|virtio] + -virtfs ... + -vnc ... + -watchdog ... + -watchdog-action ... + -writeconfig ... + +- The following monitor commands are supported: + ? + announce_self ... + balloon ... + block_resize ... + boot_set ... + c + change ... + chardev-add ... + chardev-change ... + chardev-remove ... + chardev-send-break ... + client_migrate_info ... + closefd ... + cont + cpu ... + delvm ... + device_add ... + device_del ... + drive_add ... + drive_backup ... + drive_del ... + dump_guest_memory ... + eject ... + gdbserver ... + gpa2hpa ... + gpa2hva ... + gva2gpa ... + help + i ... + info ... + loadvm ... + logfile ... + logitem ... + mce ... + memsave ... + migrate ... + migrate_cancel + migrate_continue ... + migrate_incoming + migrate_pause + migrate_recover ... + migrate_set_capability ... + migrate_set_parameter ... + migrate_start_post_copy + mouse_button ... + mouse_move ... + mouse_set ... + nmi ... + o ... + object_add ... + object_del ... + p ... + pmemsave ... + print ... + q + qemu-io ... + qom-list + qom-set + ringbuf_read ... + ringbuf_write ... + savevm ... + screendump ... + sendkey ... + snapshot_blkdev_internal ... + snapshot_delete_blkdev_internal ... + stop + sum ... + system_powerdown + system_reset + system_wakeup + trace-event ... + watchdog_action ... + x ... + xp ... + +- The following QMP commands are supported: + add_client + add-fd + announce-self + balloon + blockdev-add + blockdev-backup + blockdev-change-medium + blockdev-close-tray + blockdev-create + blockdev-del + blockdev-mirror + blockdev-open-tray + blockdev-snapshot + blockdev-snapshot-delete-internal-sync + blockdev-snapshot-internal-sync + blockdev-snapshot-sync + block-commit + block-dirty-bitmap-add + block-dirty-bitmap-clear + block-dirty-bitmap-disable + block-dirty-bitmap-enable + block-dirty-bitmap-merge + block-dirty-bitmap-remove + block-export-add + block-export-del + block-latency-histogram-set + block_resize + block_set_io_throttle + block-set-write-threshold + block_stream + calc-dirty-rate + change-vnc-password + chardev-add + chardev-change + chardev-remove + chardev-send-break + client_migrate_info + closefd + cont + cpu + device_add + device_del + device-list-properties + display-reload + dump-guest-memory + eject + expire_password + getfd + human-monitor-command + inject-nmi + input-send-event + job-cancel + job-complete + job-dismiss + job-finalize + job-pause + job-resume + memsave + migrate + migrate_cancel + migrate-continue + migrate-incoming + migrate-pause + migrate-resume + migrate-set-capabilities + migrate-set-parameters + migrate-start-postcopy + object-add + object-del + pmemsave + qmp_capabilities + qom-get + qom-list + qom-list-types + qom-set + query-acpi-ospm-status + query-balloon + query-block + query-block-exports + query-block-jobs + query-blockstats + query-chardev + query-chardev-backends + query-command-line-options + query-commands + query-cpu-definitions + query-cpu-model-expansion + query-cpus-fast + query-current-machine + query-display-options + query-dirty-rate + query-dump + query-dump-guest-memory-capability + query-fdsets + query-gic-capabilities + query-hotpluggable-cpus + query-iothreads + query-jobs + query-kvm + query-machines + query-memdev + query-memory-devices + query-memory-size-summary + query-mice + query-migrate + query-migrate-capabilities + query-migrate-parameters + query-name + query-named-block-nodes + query-pci + query-pr-managers + query-qmp-schema + query-rocker + query-rocker-of-dpa-flows + query-rocker-of-dpa-groups + query-rocker-ports + query-rx-filter + query-spice + query-status + query-target + query-tpm + query-tpm-models + query-tpm-types + query-uuid + query-version + query-vnc + query-vnc-servers + query-yank + query-xen-replication-status + quit + remove-fd + ringbuf-read + ringbuf-write + screendump + send-key + set-action + set_link + set_password + snapshot-delete + snapshot-load + snapshot-save + stop + system_powerdown + system_reset + system_wakeup + trace-event-get-state + trace-event-set-state + transaction + watchdog-set-action + yank + +- The following command line options are unsupported: + + -acpitable ... + -chroot ... + -cpu ... (all except host) + -curses + -device + + [160s33b|320s33b|640s33b|a15mpcore_priv|a9mpcore_priv|a9-scu|adlib| + ads7846|allwinner-a10|allwinner-a10-pic|allwinner-A10-timer| + allwinner-emac|amd-iommu|AMDVI-PCI|arm1026-arm-cpu|arm1136-arm-cpu| + arm1136-r2-arm-cpu|arm1176-arm-cpu|arm11mpcore-arm-cpu| + arm11mpcore_priv|arm11-scu|arm926-arm-cpu|arm946-arm-cpu| + arm.cortex-a9-global-timer|arm_gic|arm-gicv2m| + arm_mptimer|armv7m_nvic|aspeed.timer|aspeed.vic|ast2400| + at25128a-nonjedec|at25256a-nonjedec|at25df041a|at25df321a|at25df641| + at25fs010|at25fs040|at26df081a|at26df161a|at26df321|at26f004| + at45db081d|bcm2835-aux|bcm2835-dma|bcm2835-fb|bcm2835-ic|bcm2835-mbox| + bcm2835-peripherals|bcm2835-property|bcm2836|bcm2836-control| + bochs-display|cadence_gem|cadence_ttc|cadence_uart|ccid-card-emulated| + ccid-card-passthru|cfi.pflash02|cirrus-vga|cmsdk-apb-dualtimer| + cmsdk-apb-watchdog|corgi-ssp|cortex-a15-arm-cpu|cortex-a53-arm-cpu| + cortex-a57-arm-cpu|cortex-a72-arm-cpu|cortex-a8-arm-cpu| + cortex-a9-arm-cpu|cortex-m0-arm-cpu|cortex-m3-arm-cpu| + cortex-m4-arm-cpu|cortex-r5-arm-cpu|cs4231a|digic|digic-timer| + digic-uart|ds1338|dscm1xxxx|e1000|en25f32|en25p32|en25p64|en25q32b| + en25q64|exynos4210.combiner|exynos4210-ehci-usb|exynos4210.fimd| + exynos4210.gic|exynos4210.i2c|exynos4210.irq_gate|exynos4210.mct| + exynos4210.pmu|exynos4210.pwm|exynos4210.rtc|exynos4210.uart|floppy| + fslimx25|fslimx31|fusbh200-ehci-usb|fw_cfg|gd25q32|gd25q64| + gpex-pcihost|gpex-root|gpio_i2c|gpio-key|gus|hyperv-testdev| + highbank-regs|host-arm-cpu|*-i386-cpu|i8042|ib700|icp-ctrl-regs| + igd-passthrough-isa-bridge|imx25.ccm|imx31.ccm|imx6.ccm|imx.avic| + imx.epit|imx.fec|imx.gpio|imx.gpt|imx.i2c|imx.serial|imx6ul.ccm| + integrator_core|integrator_debug|integrator_pic|integrator_pit| + intel_iommu|iotkit-sysctl|iotkit-sysinfo|ipmi-bmc-extern|ipmi-bmc-sim| + isa-applesmc|isa-cirrus-vga|isa-debugcon|isa-debug-exit|isa-fdc| + isa-ide|isa-ipmi-bt|isa-ipmi-kcs|isa-parallel|isa-vga|kvaser_pci| + kvm-arm-gic|kvm-arm-gicv3|l2x0|lan9118|lm8323|loader|lsi53c810a| + lsi53c895a|m25p05|m25p10|m25p128|m25p16|m25p20|m25p32|m25p40|m25p64| + m25p80|m25pe16|m25pe20|m25pe80|m25px32|m25px32-s0|m25px32-s1|m25px64| + m45pe10|m45pe16|m45pe80|mainstone-fpga|max1110|max1111|max7310| + mioe3680_pci|msf2-soc|msf2-sysreg|mss-sp1|mss-timer|musicpal_gpio| + musicpal_key|musicpal_lcd|musicpal-misc|mv88w8618_audio|mv88w8618_eth| + mv88w8618_flashcfg|mv88w8618_pic|mv88w8618_pit|mv88w8618_wlan| + mx25l12805d|mx25l12855e|mx25l1606e|mx25l2005a|mx25l25635e|mx25l25655e| + mx25l3205d|mx25l4005a|mx25l6405d|mx25l8005|n25q032|n25q032a11| + n25q032a13|n25q064|n25q064a11|n25q064a13|n25q128|n25q128a11| + n25q128a13|n25q256a|n25q256a11|n25q256a13|n25q512a|n25q512a11| + n25q512a13|nand|ne2k_isa|nrf51-soc|nrf51_soc.uart|nvdimm|omap2-gpio| + omap2-intc|omap-gpio|omap_i2c|omap-intc|onenand|pc-dimm|pc-testdev| + piix3-ide|piix3-ide|piix3-ide-xen|piix3-usb-uhci|pl011|pl011_luminary| + pl022|pl031|pl041|pl050_keyboard|pl050_mouse|pl061|pl061_luminary| + pl080|pl081|pl110|pl110_versatile|pl111|pl181|pl190|pl330| + platform-bus-device|pvrdma|pxa250-arm-cpu|pxa255-arm-cpu|pxa25x-timer| + pxa260-arm-cpu|pxa261-arm-cpu|pxa262-arm-cpu|pxa270-a0-arm-cpu| + pxa270-a1-arm-cpu|pxa270-arm-cpu|pxa270-b0-arm-cpu|pxa270-b1-arm-cpu| + pxa270-c0-arm-cpu|pxa270-c5-arm-cpu|pxa27x-timer|pxa2xx-dma| + pxa2xx-fir|pxa2xx-gpio|pxa2xx_i2c|pxa2xx-i2c-slave|pxa2xx-mmci| + pxa2xx-pcmcia|pxa2xx_pic|pxa2xx_rtc|pxa2xx-ssp|ramfb|realview_gic| + realview_mpcore|realview_pci|realview_sysctl|s25fl016k|s25fl064k| + s25fl129p0|s25fl129p1|s25fl256s0|s25fl256s1|s25fl512s|s25sl004a| + s25sl008a|s25sl016a|s25sl032a|s25sl032p|s25sl064a|s25sl064p| + s25sl12800|s25sl12801|s70fl01gs|sa1100-arm-cpu|sa1110-arm-cpu|sb16| + scoop|sdhci-pci|sga|sii9022|sl-nand|smbus-eeprom|smc91c111|sp804| + spitz-keyboard|spitz-lcdtg|ssd0303|ssd0323|sst25vf016b|sst25vf032b| + sst25vf040b|sst25vf080b|sst25wf010|sst25wf020|sst25wf040| sst25wf080| + sst25wf512|stellaris-adc|stellaris_enet|stellaris-gptm|stellaris-i2c| + stm32f205-soc|stm32f2xx-syscfg|stm32f2xx-timer|stm32f2xx-usart| + strongarm-gpio|strongarm_pic|strongarm-ppc|strongarm-rtc| + strongarm-ssp|strongarm-uart|tegra2-ehci-usb|ti925t-arm-cpu|tmp105| + tosa_dac|tosa-ssp|tusb6010|twl92230|tz-msc|usb-redir|versatile_i2c| + versatilepb_sic|versatile_pci|versatile_pci_host|vfio-pci-nohotplug| + vfio-platform|vhost-vsock-device|virtconsole|virtio-crypto-device| + vmgenid|vmware-svga|w25q256|w25q32|w25q32dw|w25q64|w25q80|w25q80bl| + w25x10|w25x16|w25x20|w25x32|w25x40|w25x64|w25x80|wm8750|*-x86_64-cpu| + xen-backend|xen-pci-passthrough|xen-platform|xen-pvdevice|xgmac| + xilinxzynq_slcr|xlnx-versal|xlnx.ps7-qspi|xlnx.ps7-spi|xlnxzynqmp| + xlnxzynq-xadc|armsse-cpuid|armsse-mhu|cpu-cluster|luminary-watchdog| + microbit.i2c|nrf51_soc.gpio|nrf51_soc.nvm|nrf51_soc.rng| + nrf51_soc.timer|platform-ehci-usb|sse-200|vmware-svga|vmxnet3|ati-vga| + cirrus-vga|vhost-user-fs-device|tulip|ati-vga|aw-hc-ehci-usb| + virtio-iommu-device|virtio-iommu-pci| + virtio-iommu-pci-non-transitional|cortex-m7-arm-cpu|allwinner-cpucfg| + allwinner-h3|allwinner-h3-ccu|allwinner-h3-dramc|allwinner-h3-sysctrl| + allwinner-rtc-sun4i|allwinner-rtc-sun6i|allwinner-rtc-sun7i| + allwinner-sdhost-sun4i|allwinner-sdhost-sun5i|allwinner-sid| + allwinner-sun8i-emac|imx.rngc|imx.usbphy|serial|serial-io| + stm32f405-soc|stm32f4xx-exti|stm32f4xx-syscfg|nvdimm| + vhost-user-vsock-device|vhost-user-vsock-pci| + vhost-user-vsock-pci-non-transitional|nvme-ns|ads7846|led|ssd0323| + vhost-user-vga|ctucan_pci|bcm2835-cprman-clock-mux| + bcm2835-cprman-cprman-dsi0hsck-mux|bcm2835-cprman-cprman-pll| + bcm2835-cprman-cprman-pll-channel|mt25ql512ab|mx66l5123f|n25q512ax3| + ssd0323|at24c-eeprom|emc1413|emc1414|is25lp016d|is25lp032|is25lp064| + is25lp080d|is25lp128|is25lp256|is25lq040b|is25wp032|is25wp064| + is25wp128|is25wp256|npcm7xx-clock-divider|npcm7xx-clock-pll| + npcm7xx-clock-sel] + (the following are aliases of these unsupported devices: lsi| + piix3-usb-uhci) + (note that some of these device names represent supported devices and + are used internally, but are not specifyable via -device even though + they appear in the list of devices) + + -drive + + ,if=[scsi|mtd|pflash], snapshot=on, format=[anything besides qcow2 or + raw] + + -dtb file + -enable-sync-profile + -fda/-fdb ... + -g ... + -hda/-hdb/-hdc/-hdd ... + -icount ... + -L ... + -M + + [akita|ast2500-evb|ast2600-evb|borzoi|canon-a1100|cheetah|collie|connex| + cubieboard|emcraft-sf2|g220a-bmc|highbank|imx25-pdk|integratorcp|kzm| + lm3s6965evb|lm3s811evb|mainstone|mcimx6ul-evk|mcimx7d-sabre|microbit| + midway|mps2-an385|mps2-an386|mps2-an500|mps2-an505|mps2-an511|mps2-an521| + mps3-an524|mps3-an547|musca-a|musca-b1|musicpal|n800|n810|netduino2| + netduinoplus2|npcm750-evb|nuri|orangepi-pc|palmetto-bmc|quanta-gsj|raspi0| + raspi1ap|raspi2|raspi2b|raspi3ap|raspi3|raspi3b|realview-eb| + realview-eb-mpcore|realview-pb-a8|realview-pbx-a9|romulus-bmc|sabrelite| + sbsa-ref|smdkc210|sonorapass-bmc|spitz|supermicrox11-bmc|swift-bmc|sx1| + sx1-v1|tacoma-bmc|terrier|tosa|verdex|versatileab|versatilepb| + vexpress-a15|vexpress-a9|virt-2.12|virt-2.7|virt-2.8|virt-3.0|virt-4.0| + virt-4.1|virt-5.0|virt-5.1|virt-6.0|virt|virt-6.1|witherspoon-bmc| + xilinx-zynq-a9|xlnx-versal-virt|xlnx-zcu102|z2] + + -machine + + [akita|ast2500-evb|ast2600-evb|borzoi|canon-a1100|cheetah|collie| + connex|cubieboard|emcraft-sf2|g220a-bmc|highbank|imx25-pdk| + integratorcp|kzm|lm3s6965evb|lm3s811evb|mainstone|mcimx6ul-evk| + mcimx7d-sabre|microbit|midway|mps2-an385|mps2-an386|mps2-an500| + mps2-an505|mps2-an511|mps2-an521|mps3-an524|mps3-an547|musca-a| + musca-b1|musicpal|n800|n810|netduino2|netduinoplus2|npcm750-evb| + nuri|orangepi-pc|palmetto-bmc|quanta-gsj|raspi0|raspi1ap|raspi2| + raspi2b|raspi3ap|raspi3|raspi3b|realview-eb|realview-eb-mpcore| + realview-pb-a8|realview-pbx-a9|romulus-bmc|sabrelite|sbsa-ref| + smdkc210|sonorapass-bmc|spitz|supermicrox11-bmc|swift-bmc|sx1| + sx1-v1|tacoma-bmc|terrier|tosa|verdex|versatileab|versatilepb| + vexpress-a15|vexpress-a9|virt-2.12|virt-2.7|virt-2.8|virt-3.0| + virt-4.0|virt-4.1|virt-5.0|virt-5.1|virt-6.0|virt|virt-6.1| + witherspoon-bmc|xilinx-zynq-a9|xlnx-versal-virt|xlnx-zcu102|z2] + + -mtdblock file + -net [socket|vde] ... + -netdev [hubport|l2tpv3|socket|vde] ... + -no-fd-bootchk + -no-hpet + -no-kvm + -no-kvm-irqchip + -no-kvm-pit + -no-kvm-pit-reinjection + -numa cpu ... + -numa dist ... + -numa node ... + -option-rom ... + -overcommit ... + -pflash file + -portrait + -preconfig + -prom-env ... + -qtest ... + -qtest-log ... + -rotate + -sd file + -sdl + -set ... + -singlestep + -snapshot + -soundhw ... + -tpmdev emulator ... + -vga [cg3|tcx|virtio|cirrus|xenfb] + -win2k-hack + -xen-attach ... + -xen-domid ... + -xen-domid-restrict ... + +- The following monitor commands are unsupported: + block_job_cancel ... + block_job_complete ... + block_job_pause ... + block_job_resume ... + block_job_set_speed ... + commit ... + drive_mirror ... + exit_preconfig + expire_password ... + hostfwd_add ... + hostfwd_remove ... + nbd_server_add ... + nbd server_start ... + nbd_server_stop ... + netdev_add + netdev_del ... + pcie_aer_inject_error ... + replay_break ... + replay_delete_break + replay_seek ... + set_link ... + set_password ... + singlestep ... + snapshot_blkdev ... + stopcapture ... + sync-profile ... + wavcapture ... + x_colo_lost_heartbeat + +- The following QMP commands are unsupported: + block-job-cancel + block-job-complete + block-job-pause + block-job-resume + block-job-set-speed + change-backing-file + drive-backup + drive-mirror + netdev_add + netdev_del + nbd-server-add + nbd-server-start + nbd-server-stop + query-colo-status + replay_break + replay_delete_break + replay_seek + x-blockdev-amend + x-blockdev-change + x-blockdev-insert-medium + x-blockdev-remove-medium + x-blockdev-reopen + x-colo-lost-heartbeat + x-debug-block-dirty-bitmap-sha256 + x-debug-query-block-graph + x-exit-preconfig + xen-colo-do-checkpoint + xen-load-devices-state + xen-save-devices-state + xen-set-global-dirty-log + xen-set-replication diff --git a/rpm/supported.ppc.txt b/rpm/supported.ppc.txt new file mode 100644 index 0000000000..ceb67674cf --- /dev/null +++ b/rpm/supported.ppc.txt @@ -0,0 +1,6 @@ +[qemu-ppc package document] + +SLES 15 SP4 QEMU/KVM RELATED SUPPORT STATEMENTS +=============================================== + +QEMU/KVM on ppc is not supported. diff --git a/rpm/supported.s390.txt b/rpm/supported.s390.txt new file mode 100644 index 0000000000..1441d5e428 --- /dev/null +++ b/rpm/supported.s390.txt @@ -0,0 +1,868 @@ +[qemu-s390 package document] + +SLES 15 SP4 QEMU/KVM RELATED SUPPORT STATEMENTS +=============================================== + +Overview +-------- + + The QEMU based packages included with SLES 15 SP4 provide a large variety of + features, from the very latest customer requests to features of questionable + quality or value. The linux kernel includes components which contribute KVM + virtualization features as well. This document was created to assist the user + in deciding which features can be relied upon to build enterprise class + virtualization solutions. KVM based virtualization for x86 (Intel 64/AMD64), + for IBM System z (s390x), and for the ARM64 architecture (AArch64) are offered + at the L3 (full support) level. The bulk of this document deals with L3 + supported features and is primarily s390x centric. This document should be + considered a companion to the standard virtualization documentation delivered + with the product. + + KVM is implemented in linux kernel modules which enable the linux kernel to + function as an integral part of the KVM hypervisor. The hypervisor-guest + interaction is managed by QEMU through the /dev/kvm ioctl interface. The linux + host assists in the virtualization of storage, networking and display + resources as well as allowing direct hardware passthrough of PCI devices. + Linux memory and cpu management features are used by QEMU/KVM to enable guests + to share those host resources as efficiently as possible. + + QEMU is a primary component of KVM based virtualization. The legacy qemu-kvm + program is available for continuity with pre SLES 12 usage, including in + libvirt domain xml references. The QEMU emulator binary qemu-system-s390x is + now the primary program to use to access KVM virtualization. When using this + program, the -machine option accel=kvm (or its alias -enable-kvm) or --accel + kvm option must be specified for KVM acceleration to be used by the guest. + + Libvirt is the preferred means of accessing QEMU/KVM functionality and is + documented elsewhere. This document focuses on the features and direct usage + of QEMU/KVM as provided by the QEMU based packages. + +Major QEMU/KVM Supported Features +--------------------------------- + +- KVM virtualization is accomplished by using the QEMU program in KVM + acceleration mode. KVM acceleration requires that both guest and host have + the same fundamental architecture. + +- Guest images created under previous QEMU versions are supported by machine + version compatibilities built into more recent QEMU versions. + +- For ease of use, the QEMU program has defaults which represent traditional + usage patterns. + +- Guest virtual machine characteristics are specified by a combination of + internal defaults, options provided on the QEMU program command-line, runtime + configurations set via the monitor interfaces and optional config files. The + runtime control of a VM is effected either through the Human Monitor + "Protocol" (HMP), or the JSON based programmatical QEMU Monitor Protocol (QMP) + interface. For QMP details, see qemu-qmp-ref man page. + Since a KVM guest runs in the context of a normal linux process, some types + of execution controls are managed with linux tools. + +- QEMU incorporates virtualized, s390 specific, ccw bus based firmware for + booting s390 guests. This firmware is automatically incorporated and + doesn't need to be explicitly referenced. + +- Some QEMU messages have been localized to various languages. This is provided + by the optional qemu-lang package. Keyboard mappings for various nationalities + is also provided. + +- Virtual machine lifecycle controls include startup through the ccw firmware or + kernel boot, firmware based shutdown, execution pausing, the saving and + restoring of machine state or disk state, VM migration to another host, and + miscellaneous controls available through the "monitors" mentioned above. + +- Guest execution state may be "moved" in both time (save/restore) and space + (static and live migration). These migrations or save/restore operations can + take place either from certain prior SLES versioned hosts to a SLES 15 SP4 + host or between hosts of the same version. Certain other restrictions also + apply. + +- Security considerations include privileged helpers and a security model which + allows running guests as a non-root user. + +- QEMU provides best effort reuse of existing disk images, including those with + systems installed, through geometry probing. Also disk images produced by + other popular virtualization technologies may be imported into QEMU supported + storage formats. These QEMU formats include features which exploit the + benefits of virtualization. + +- Memory, cpu and disk space overcommit are possible and can be beneficial when + done responsibly. Additional management of these resources comes in the form + of memory ballooning or hotplug, host KSM, vcpu hot-add, online disk resizing, + trim, discard and hole punching. + +- Guest performance is enhanced through the use of virtio devices, various disk + caching modes, network acceleration via the vhost-net kernel module, multi- + queue network transmit capabilities, host transparent huge pages (THP) and + direct hugetlb usage. Physical PCI devices may also be passed through to the + guest, including SR-IOV VF's. + +- The guest UI is accessable via GTK, VNC, and serial (including curses TUI) + interfaces. + +- Guest timekeeping is supported in a variety of ways, including a paravirtual + clocksource, and options for the various guest clocks for how to handle the + timeslicing of the guest's execution on the host. + +- In addition to the para-virtualized devices already mentioned, other devices + and infrastructure designed to avoid virtualization "problem areas" are + available such as SPICE graphics, vmmouse emulation, tablet style pointer + interfaces and virtio based UI interfaces. + +- A built-in user-mode network (SLIRP) stack is available. + +- Portions of the host file system may be shared with a guest by using virtFS. + +- A guest "agent" is available for SLES 15 SP4 KVM guests via the + qemu-guest-agent package. This allows some introspection and control of the + guest OS environment from the host. + +QEMU/KVM Technology Previews +---------------------------- + +- All features indicated as not being supported in this document fall under the + Technology Preview definition contained in the main product's release notes. + +Noteworthy QEMU/KVM Unsupported Features +---------------------------------------- + +- Note that some features are unsupported simply due to lack of validation. If + an existing feature is desired, but not marked supported, let SUSE know about + your requirements. + +- The TCG "acceleration" mode may be helpful for problem isolation, but + otherwise presents insufficient benefit and stability. + +- GlusterFS integration is not enabled. + +Deprecated, Superseded, Modified and Dropped Features +----------------------------------------------------- + +- https://qemu-project.gitlab.io/qemu/about/deprecated.html and + https://qemu-project.gitlab.io/qemu/about/removed-features.html + These websites track features deprecation and removal at the upstream + development level. Our qemu package inherits this community direction, but be + aware that we can and will deviate as needed. Those deviations and additional + information can be found in this section. Feature deprecation as well as + removed features are also tracked in the "System Emulation" section of the + documentation installed with the qemu package. + +- qemu-img: Deprecate use of -b without -F. Creating an image that requires + format probing of the backing image is potentially unsafe and is now + deprecated. + +- The previously non-persistent backing file with pmem=on is deprecated. Modify + VM configuration to set pmem=off to continue using fake NVDIMM with backing + file or move backing file to NVDIMM storage and keep pmem=on. + +- The use of "?" as a parameter to "-cpu", "-soundhw", "-device", "-M", + "-machine" and "-d" is now considered deprecated. Use "help" + instead. + +- The use of "if=scsi" as a parameter to "-drive" does not work anymore with PC + machine types, as it created an obsolete SCSI controller model. + +- Use of aio=native without direct cache mode also being specified (cache=none, + cache=directsync, or cache.direct=on) is no longer allowed. + +- The use of image encryption in qcow and qcow2 formats is now considered + deprecated. + Analysis has shown it to be weak encryption, in addition to suffering from + poor design. Images can easily be converted to a non-encrypted format. + +- Use of acpi, boot-opts, and smp-opts in a -readconfig config file are now + considered deprecated. In the future those names will be standardized to + acpitable, boot, and smp respectively. + +- These previously supported command line options are now considered deprecated: + -display sdl,window_close= (use -display sdl,window-close) + -no-quit (use -display ...,window-close=off) + -chardev tty (use serial name instead) + -chardev paraport (use parallel name instead) + -device virtio-blk,scsi= (use virtio-scsi instead) + -device virtio-blk-pci,scsi= (use virtio-scsi instead) + -enable-fips (not really helpful - see https://git.qemu.org/?p=qemu.git;a=commit;h=166310299a1e7824bbff17e1f016659d18b4a559 for details) + -realtime mlock= (use -overcommit mem-lock= instead) + -spice password=string (use password-string option instead) + -writeconfig (no replacement - never really worked right) + -share and noshare must be replaced by share=on/share=off + -nodelay must be replaced by nodelay=on rather than delay=off + -object-add options opened=on and loaded=on (both had no effect) + +- These previously supported command line options are no longer supported: + + +- These previously supported command line options are no longer recognized: + -balloon (use -device virtio-balloon instead) + -clock + -device ivshmem (use ivshmem-doorbell or ivshmem-plain instead) + -device pc-sysfw (no longer needed) + -device pci-assign, -device kvm-pci-assign (use -device vfio-pci instead) + -display sdl + -no-frame + -nodefconfig (use -no-user-config instead) + -realtime ... + -sdl + -show-cursor + -virtioconsole (use -device virtconsole instead) + +- Specifying a cpu feature with both "+feature/-feature" and "feature=on/off" + will now cause a warning. The current behavior for this combination where + "+feature/-feature" wins over "feature=on/off", will be changed going forward + so that "+feature" and "-feature" will be synonyms for "feature=on" and + "feature=off" respectively. + +- The previously supported blkdev-add QMP command has been flagged as lacking + and could possibly change syntax in the future. + +- These previously unsupported command line options are now deprecated: + -bt + -soundhw (use -device ... instead) + +- These previously unsupported command line options are no longer recognized: + -device ide-drive (use ide-hd or ide-cd) + -device mmio_interface + -device ramfb + -device scsi-disk (use scsi-hd or scsi-cd) + -device vhost-user-vsock-pci-transitional + -device vhost-vsock-pci-transitional + -device virtio-iommu-pci-transitional + -enable-hax + -tb-size + -tdf + -xen-create + +- These previously supported QMP commands are now deprecated: + + +- These previously supported QMP commands are no longer recognized: + info cpustats + block_passwd + change (use blockdev-change-medium or change-vnc-password instead) + cpu-add (use device_add instead) + migrate-set-cache-size (use migrate-set-parameters instead) + migrate_set_downtime (use migrate-set-parameters instead) + migrate_set_speed (use migrate-set-parameters instead) + query-cpus (use query-cpus-fast instead) + query-events + query-migrate-cache-size (use query-migrate-parameters instead) + +- These previously supported monitor commands are now deprecated: + change + +- These previously supported monitor commands are no longer recognized: + info cpustats + block_passwd ... + cpu-add (use device_add instead) + migrate_set_cache_size + migrate_set_downtime + migrate_set_speed + pci_add (use device_add instead) + pci_del (use device_del instead) + +- These previously unsupported monitor command are now deprecated: + + +- These previously unsupported monitor commands are no longer recognized: + acl_add ... + acl_policy ... + acl_remove ... + acl_reset ... + acl_show ... + host_net_add + host_net_remove + usb_add + usb_del + +- These previously unsupported QMP commands are now supported under a new name: + x-block-dirty-bitmap-disable (use block-dirty-bitmap-disable instead) + x-block-dirty-bitmap-enable (use block-dirty-bitmap-enable instead) + x-block-dirty-bitmap-merge (use block-dirty-bitmap-merge instead) + x-block-latency-histogram-set (use block-latency-histogram-set instead) + x-blockdev-create (use blockdev-create instead) + +- This previously unsupported QMP commands is no longer recognized: + x-nbd-server-add-bitmap + +- Due to upstream's decision to no longer fully support the qed storage format + going forward (since it really provides no benefit over qcow2 and is now no + longer actively maintained upstream), creating qed storage images is no longer + supported and it is highly discouraged to continue using existing qed images. + They should instead be converted to another supported format. + +QEMU Command-Line and Monitor Syntax and Support +------------------------------------------------ + +- The QEMU program command-line syntax is as follows: + qemu-system-s390x [options] + + Where 'options' are taken from the options listed below. + The images used with -drive or -cdrom, may be in the raw (no format) or qcow2 + storage formats, and may be located in files within the host filesystem, + logical volumes, host physical disks, or network based storage. Read only + media may also be accessed via URL style protocol specifiers. + + Note that as a general rule, as new command line options are added which serve + to replace an older option or interface, you are strongly encouraged to adapt + your usage to the new option. The new option is being introduced to provide + better functionality and usability going forward. In some cases existing + problems or even bugs in older interfaces cannot be fixed due to functional + expectations, but are resolved in the newer interface or option. + This advice includes moving to the most recent machine type (eg + s390-ccw-virtio-6.1 instead of s390-ccw-virtio-6.0) if possible. + +- The following command line options are supported: + -accel ... + -action ... + -add-fd ... + -alt-grab + -append ... + -audio-help + -audiodev + -bios ... + -blockdev ... + -boot ... + -cdrom ... + -chardev ... + -compat ... + -cpu host + -ctrl-grab + -d ... + -daemonize + -debugcon ... + -device + + [virtio-net-pci|virtio-blk-pci|virtio-balloon-pci|virtserialport| + virtconsole|virtio-serial-pci|virtio-scsi-pci|scsi-cd|scsi-hd| + scsi-generic|scsi-block|virtio-rng-pci|pci-bridge|megasas-gen2|e1000e| + e1000|zpci|virtio-gpu-ccw|virtio-keyboard-ccw|vhost-user-blk-pci| + vhost-user-scsi|vhost-user-scsi-pci|vhost-vsock-ccw| + virtio-balloon-ccw|virtio-blk-ccw|vhost-scsi-ccw|vhost-user-blk| + virtio-crypto-ccw|virtio-net-ccw|virtio-rng-ccw|virtio-scsi-ccw| + virtio-serial-ccw|virtio-mouse-ccw|virtio-tablet-ccw|vfio-pci| + virtio-vga|vhost-scsi-pci-non-transitional| + vhost-scsi-pci-transitional|vhost-user-blk-pci-non-transitional| + vhost-user-blk-pci-transitional|vhost-user-scsi-pci-non-transitional| + vhost-user-scsi-pci-transitional|vhost-vsock-pci-non-transitional| + virtio-9p-ccw|virtio-9p-pci-non-transitional| + virtio-9p-pci-transitional|virtio-balloon-pci-non-transitional| + virtio-balloon-pci-transitional|virtio-blk-pci-non-transitional| + virtio-blk-pci-transitional|virtio-input-host-pci-non-transitional| + virtio-input-host-pci-transitional|virtio-net-pci-non-transitional| + virtio-net-pci-transitional|virtio-rng-pci-non-transitional| + virtio-rng-pci-transitional|virtio-scsi-pci-non-transitional| + virtio-scsi-pci-transitional|virtio-serial-pci-non-transitional| + virtio-serial-pci-transitional|vhost-user-fs-pci|vhost-user-gpu| + vhost-user-pci-pci|vhost-user-input|vhost-user-input-pci| + vhost-user-vga] + (the following are aliases of these supported devices: virtio-blk| + virtio-input-host|virtio-keyboard|virtio-mouse|virtio-tablet| + virtio-gpu|virtio-9p|virtio-net|virtio-serial|virtio-balloon| + virtio-scsi|virtio-rng) + + -dfilter range, ... + -display ... + -drive + + ... (if specified if=[virtio] and format=[qcow2|raw] and + snapshot=off only) + + -echr ... + -enable-fips + -enable-kvm + -fsdev ... + -full-screen + -fw_cfg ... + -gdb ... + -global ... + -h + -help + -incoming ... + -initrd ... + -iscsi ... + -k ... + -kernel ... + -loadvm ... + -m ... + -M + + [help|?|none|s390-ccw-virtio-2.6|s390-ccw-virtio-2.9|s390-ccw-virtio-2.11| + s390-ccw-virtio-3.1|s390-ccw-virtio-4.2|s390-ccw-virtio-5.2] + + -machine + + [help|?|none|s390-ccw-virtio-2.6|s390-ccw-virtio-2.9| + s390-ccw-virtio-2.11|s390-ccw-virtio-3.1|s390-ccw-virtio-4.2| + s390-ccw-virtio-5.2] + + -mem-path ... + -mem-prealloc + -mon ... + -monitor ... + -msg ... + -name ... + -net + + [bridge|l2tpv3|nic|none|tap|user] ... (for model= only e1000, rtl8139, + and virtio are supported) + + -netdev [bridge|tap|user] ... + -nic ... + -nodefaults + -nographic + -no-quit + -no-reboot + -no-shutdown + -no-user-config + -object ... + -only-migratable + -parallel ... + -pidfile ... + -plugin ... + -qmp ... + -qmp-pretty ... + -readconfig ... + -rtc ... + -runas ... + -s + -S + -sandbox ... + -seed ... + -serial ... + -smp ... + -trace ... + -uuid ... + -version + -vga [none|qxl|std] + -virtfs ... + -vnc ... + -watchdog ... + -watchdog-action ... + -writeconfig ... + +- The following monitor commands are supported: + ? + announce_self ... + balloon ... + block_resize ... + boot_set ... + c + change ... + chardev-add ... + chardev-change ... + chardev-remove ... + chardev-send-break ... + client_migrate_info ... + closefd ... + cont + cpu ... + delvm ... + device_add ... + device_del ... + drive_add ... + drive_backup ... + drive_del ... + dump_guest_memory ... + eject ... + gdbserver ... + gpa2hpa ... + gpa2hva ... + gva2gpa ... + help + i ... + info ... + loadvm ... + logfile ... + logitem ... + mce ... + memsave ... + migrate ... + migrate_cancel + migrate_continue ... + migrate_incoming + migrate_pause + migrate_recover ... + migrate_set_capability ... + migrate_set_parameter ... + migrate_start_post_copy + mouse_button ... + mouse_move ... + mouse_set ... + nmi ... + o ... + object_add ... + object_del ... + p ... + pmemsave ... + print ... + q + qemu-io ... + qom-list + qom-set + ringbuf_read ... + ringbuf_write ... + savevm ... + screendump ... + sendkey ... + snapshot_blkdev_internal ... + snapshot_delete_blkdev_internal ... + stop + sum ... + system_powerdown + system_reset + system_wakeup + trace-event ... + watchdog_action ... + x ... + xp ... + +- The following QMP commands are supported: + add_client + add-fd + announce-self + balloon + blockdev-add + blockdev-backup + blockdev-change-medium + blockdev-close-tray + blockdev-create + blockdev-del + blockdev-mirror + blockdev-open-tray + blockdev-snapshot + blockdev-snapshot-delete-internal-sync + blockdev-snapshot-internal-sync + blockdev-snapshot-sync + block-commit + block-dirty-bitmap-add + block-dirty-bitmap-clear + block-dirty-bitmap-disable + block-dirty-bitmap-enable + block-dirty-bitmap-merge + block-dirty-bitmap-remove + block-export-add + block-export-del + block-latency-histogram-set + block_resize + block_set_io_throttle + block-set-write-threshold + block_stream + calc-dirty-rate + change-vnc-password + chardev-add + chardev-change + chardev-remove + chardev-send-break + client_migrate_info + closefd + cont + cpu + device_add + device_del + device-list-properties + display-reload + dump-guest-memory + eject + expire_password + getfd + human-monitor-command + inject-nmi + input-send-event + job-cancel + job-complete + job-dismiss + job-finalize + job-pause + job-resume + memsave + migrate + migrate_cancel + migrate-continue + migrate-incoming + migrate-pause + migrate-resume + migrate-set-capabilities + migrate-set-parameters + migrate-start-postcopy + object-add + object-del + pmemsave + qmp_capabilities + qom-get + qom-list + qom-list-types + qom-set + query-acpi-ospm-status + query-balloon + query-block + query-block-exports + query-block-jobs + query-blockstats + query-chardev + query-chardev-backends + query-command-line-options + query-commands + query-cpu-definitions + query-cpu-model-baseline + query-cpu-model-comparison + query-cpu-model-expansion + query-cpus-fast + query-current-machine + query-dirty-rate + query-display-options + query-dump + query-dump-guest-memory-capability + query-fdsets + query-gic-capabilities + query-hotpluggable-cpus + query-iothreads + query-jobs + query-kvm + query-machines + query-memdev + query-memory-devices + query-memory-size-summary + query-mice + query-migrate + query-migrate-capabilities + query-migrate-parameters + query-name + query-named-block-nodes + query-pci + query-pr-managers + query-qmp-schema + query-rocker + query-rocker-of-dpa-flows + query-rocker-of-dpa-groups + query-rocker-ports + query-rx-filter + query-spice + query-status + query-target + query-uuid + query-version + query-vnc + query-vnc-servers + query-yank + query-xen-replication-status + quit + remove-fd + ringbuf-read + ringbuf-write + screendump + send-key + set-action + set_link + set_password + snapshot-delete + snapshot-load + snapshot-save + stop + system_powerdown + system_reset + system_wakeup + trace-event-get-state + trace-event-set-state + transaction + watchdog-set-action + yank + +- The following command line options are unsupported: + + -acpitable ... + -chroot ... + -cpu ... (all except host) + -curses + -device + + [AC97|adlib|am53c974|amd-iommu|AMDVI-PCI|ccid-card-emulated| + ccid-card-passthrough|cirrus-vga|cs4231a|dc390|diag288|e1000-82544gc| + e1000-82545em|edu|ES1370|floppy|generic-sdhci|gus|hda-duplex| + hda-micro|hda-output|hyperv-testdev|*-i386-cpu|i8042|i82550|i82551| + i82557a|i82557b|i82557c|i82558a|i82558b|i82559a|i82559b|i82559c| + i82562|i82801|i82801b11-bridge|ib700|ich9-intel-hda|ich9-usb-ehci1| + ich9-usb-ehci2|ich9-usb-uhci1|ich9-usb-uhci2|ich9-usb-uhci3| + ich9-usb-uhci4|ich9-usb-uhci5|ich9-usb-uhci6|ide-cd|ide-drive|ide-hd| + igd-passthrough-isa-bridge|intel-hda|intel_iommu|ioh3420| + ipmi-bmc-extern|ipmi-bmc-sim|ipoctal232|isa-applesmc|isa-cirrus-vga| + isa-debugcon|isa-debug-exit|isa-fdc|isa-ide|isa-ipmi-bt|isa-ipmi-kcs| + isa-parallel|isa-serial|isa-vga|lsi53c810|lsi53c810a|max-s390x-cpu| + megasas|mptsas1068|ne2k_isa|ne2k_pci|nec-usb-xhci|nvdimm|nvme|pc-dimm| + pci-testdev|pcnet|pc-testdev|piix3-ide|piix3-ide|piix3-ide-xen| + piix4-usb-uhci|pvscsi|pxb|pxb-host|pxb-pcie|qemu-s390-cpu|rocker| + s390-flic|s390-flic-qemu|s390-ipl|s390-pcihost| + s390-sclp-event-facility|s390-skeys-qemu|sb16|sclp|sclpconsole| + sclp-cpu-hotplug|sclplmconsole|sclp-memory-hotplug-dev|sclpquiesce| + sd-card|sdhci-pci|secondary-vga|sga|smbus-eeprom|tpci200|usb-audio| + usb-bot|usb-ccid|usb-mtp|usb-uas|vfio-ap|vfio-pci-nohotplug| + virtio-9p-device|virtual-css-bridge|vmcoreinfo|vmgenid|vmware-svga| + vmxnet3|vt82c686b-usb-uhci|x3130-upstream|*-x86_64-cpu|xen-backend| + xen-pci-passthrough|xen-platform|xen-pvdevice|xio3130-downstream| + z10BC.2-base-s390x-cpu|z10BC.2-s390x-cpu|z10BC-base-s390x-cpu| + z10BC-s390x-cpu|z10EC.2-base-s390x-cpu|z10EC.2-s390x-cpu| + z10EC.3-base-s390x-cpu|z10EC.3-s390x-cpu|z10EC-base-s390x-cpu| + z10EC-s390x-cpu|z114-base-s390x-cpu|z114-s390x-cpu| + z13.2-base-s390x-cpu|z13.2-s390x-cpu|z13-base-s390x-cpu|z13-s390x-cpu| + z13s-base-s390x-cpu|z13s-s390x-cpu|z196.2-base-s390x-cpu| + z196.2-s390x-cpu|z196-base-s390x-cpu|z196-s390x-cpu| + z800-base-s390x-cpu|z800-s390x-cpu|z890.2-base-s390x-cpu| + z890.2-s390x-cpu|z890.3-base-s390x-cpu|z890.3-s390x-cpu| + z890-base-s390x-cpu|z890-s390x-cpu|z900.2-base-s390x-cpu| + z900.2-s390x-cpu|z900.3-base-s390x-cpu|z900.3-s390x-cpu| + z900-base-s390x-cpu|z900-s390x-cpu|z990.2-base-s390x-cpu| + z990.2-s390x-cpu|z990.3-base-s390x-cpu|z990.3-s390x-cpu| + z990.4-base-s390x-cpu|z990.4-s390x-cpu|z990.5-base-s390x-cpu| + z990.5-s390x-cpu|z990-base-s390x-cpu|z990-s390x-cpu| + z9BC.2-base-s390x-cpu|z9BC.2-s390x-cpu|z9BC-base-s390x-cpu| + z9BC-s390x-cpu|z9EC.2-base-s390x-cpu|z9EC.2-s390x-cpu| + z9EC.3-base-s390x-cpu|z9EC.3-s390x-cpu|z9EC-base-s390x-cpu| + z9EC-s390x-cpu|z14ZR1-base-s390x-cpu|z14ZR1-s390x-cpu| + zBC12-base-s390x-cpu|zBC12-s390x-cpu|zEC12.2-base-s390x-cpu| + zEC12.2-s390x-cpu|zEC12-base-s390x-cpu|zEC12-s390x-cpu|cpu-cluster| + z14.2-base-s390x-cpu|z14.2-s390x-cpu|vhost-user-fs-device| + virtio-iommu-device|virtio-iommu-pci| + virtio-iommu-pci-non-transitional|vhost-user-vsock-device| + vhost-user-vsock-pci|vhost-user-vsock-pci-non-transitional| + vhost-user-fs-ccw|guest-loader] + (the following are aliases of these unsupported devices: lsi| + ahci|e1000-82540em|vfio-ccw) + (note that some of these device names represent supported devices and + are used internally, but are not specifyable via -device even though + they appear in the list of devices) + + -drive + + ,if=[scsi|mtd|pflash], snapshot=on, format=[anything besides qcow2 or + raw] + + -dtb file + -enable-sync-profile + -fda/-fdb ... + -g ... + -hda/-hdb/-hdc/-hdd ... + -icount ... + -L ... + -M + + [s390-ccw-virtio|s390-ccw-virtio-2.4|s390-ccw-virtio-2.5| + s390-ccw-virtio-2.7|s390-ccw-virtio-2.8|s390-ccw-virtio-2.10| + s390-ccw-virtio-2.12|s390-ccw-virtio-3.0|s390-ccw-virtio-4.0| + s390-ccw-virtio-4.1|s390-ccw-virtio-5.0|s390-ccw-virtio-5.1| + s390-ccw-virtio-6.0|s390-ccw-virtio-6.1] + + -machine + + [s390-ccw-virtio|s390-ccw-virtio-2.4|s390-ccw-virtio-2.5| + s390-ccw-virtio-2.7|s390-ccw-virtio-2.8|s390-ccw-virtio-2.10| + s390-ccw-virtio-2.12|s390-ccw-virtio-3.0|s390-ccw-virtio-4.0| + s390-ccw-virtio-4.1|s390-ccw-virtio-5.0|s390-ccw-virtio-5.1| + s390-ccw-virtio-6.0|s390-ccw-virtio-6.1] + + -mtdblock file + -net [socket|vde] ... + -netdev [hubport|l2tpv3|socket|vde] ... + -no-acpi + -no-fd-bootchk + -no-hpet + -no-kvm + -no-kvm-irqchip + -no-kvm-pit + -no-kvm-pit-reinjection + -numa cpu ... + -numa dist ... + -numa node ... + -option-rom ... + -overcommit ... + -pflash file + -portrait + -preconfig + -prom-env ... + -qtest ... + -qtest-log ... + -rotate + -sd file + -sdl + -set ... + -singlestep + -smbios ... + -snapshot + -soundhw ... + -spice + -tdf + -tpmdev emulator ... + -tpmdev passthrough ... + -usb + -usbdevice [braile|disk|host|mouse|net|serial|tablet] + -vga [cg3|tcx|virtio|cirrus|xenfb|vmware] + -win2k-hack + -xen-attach ... + -xen-domid ... + -xen-domid-restrict ... + +- The following monitor commands are unsupported: + block_job_cancel ... + block_job_complete ... + block_job_pause ... + block_job_resume ... + block_job_set_speed ... + commit ... + drive_mirror ... + exit_preconfig + expire_password ... + hostfwd_add ... + hostfwd_remove ... + nbd_server_add ... + nbd server_start ... + nbd_server_stop ... + netdev_add + netdev_del ... + pcie_aer_inject_error ... + replay_break ... + replay_delete_break + replay_seek ... + set_link ... + set_password ... + singlestep ... + snapshot_blkdev ... + stopcapture ... + sync-profile ... + wavcapture ... + x_colo_lost_heartbeat + +- The following QMP commands are unsupported: + block-job-cancel + block-job-complete + block-job-pause + block-job-resume + block-job-set-speed + change-backing-file + drive-backup + drive-mirror + dump-skeys + netdev_add + netdev_del + nbd-server-add + nbd-server-start + nbd-server-stop + query-colo-status + query-tpm + query-tpm-models + query-tpm-types + replay_break + replay_delete_break + replay_seek + x-blockdev-amend + x-blockdev-change + x-blockdev-insert-medium + x-blockdev-remove-medium + x-blockdev-reopen + x-colo-lost-heartbeat + x-debug-block-dirty-bitmap-sha256 + x-debug-query-block-graph + x-exit-preconfig + xen-colo-do-checkpoint + xen-load-devices-state + xen-save-devices-state + xen-set-global-dirty-log + xen-set-replication diff --git a/rpm/supported.x86.txt b/rpm/supported.x86.txt new file mode 100644 index 0000000000..bf47bb04a2 --- /dev/null +++ b/rpm/supported.x86.txt @@ -0,0 +1,963 @@ +[qemu-x86 package document] + +SLES 15 SP4 QEMU/KVM RELATED SUPPORT STATEMENTS +=============================================== + +Overview +-------- + + The QEMU based packages included with SLES 15 SP4 provide a large variety of + features, from the very latest customer requests to features of questionable + quality or value. The linux kernel includes components which contribute KVM + virtualization features as well. This document was created to assist the user + in deciding which features can be relied upon to build enterprise class + virtualization solutions. KVM based virtualization for x86 (Intel 64/AMD64), + for IBM System z (s390x), and for the ARM64 architecture (AArch64) are offered + at the L3 (full support) level. The bulk of this document deals with L3 + supported features and is primarily x86 centric. This document should be + considered a companion to the standard virtualization documentation delivered + with the product. + + KVM is implemented in linux kernel modules which enable the linux kernel to + function as an integral part of the KVM hypervisor. The hypervisor-guest + interaction is managed by QEMU through the /dev/kvm ioctl interface. The linux + host assists in the virtualization of storage, networking and display + resources as well as allowing direct hardware passthrough of PCI and USB + devices. Linux memory and cpu management features are used by QEMU/KVM to + enable guests to share those host resources as efficiently as possible. + + QEMU is a primary component of KVM based virtualization. The legacy qemu-kvm + program is available for continuity with pre SLES 12 usage, including in + libvirt domain xml references. The QEMU emulator binaries qemu-system-x86_64 + and qemu-system-i386 (x86 host) are now the primary programs to use to access + KVM virtualization. When using these programs, the -machine option accel=kvm + (or its alias -enable-kvm), or --accel kvm option must be specified for KVM + acceleration to be used by the guest. Although Xen uses QEMU for + virtualization as well, this document does not identify Xen supported + features. + + Libvirt is the preferred means of accessing QEMU/KVM functionality and is + documented elsewhere. This document focuses on the features and direct usage + of QEMU/KVM as provided by the QEMU based packages. + +Major QEMU/KVM Supported Features +--------------------------------- + +- KVM virtualization is accomplished by using the QEMU program in KVM + acceleration mode. KVM acceleration requires that both guest and host have + the same fundamental architecture. + +- Guest images created under previous QEMU versions are supported by machine + version compatibilities built into more recent QEMU versions. + +- For ease of use, the QEMU program has defaults which represent traditional + usage patterns. + +- Guest virtual machine characteristics are specified by a combination of + internal defaults, options provided on the QEMU program command-line, runtime + configurations set via the monitor interfaces and optional config files. The + runtime control of a VM is effected either through the Human Monitor + "Protocol" (HMP), or the JSON based programmatical QEMU Monitor Protocol (QMP) + interface. For QMP details, see qemu-qmp-ref man page. + Since a KVM guest runs in the context of a normal linux process, some types + of execution controls are managed with linux tools. + +- Various standard vCPU types are available, along with the ability to specify + individual CPU features visible to the guest. + +- QEMU incorporates a SEABIOS based system BIOS and iPXE based PXE ROMs, which + allow boot options common to physical systems, along with other features + tailored to virtualization. Various VGABIOS ROMs, also from the SEABIOS + project, are also included. A UEFI based guest boot environment is also + available by using the firmware provided by the qemu-ovmf-x86_64 package. + +- Some QEMU messages have been localized to various languages. This is provided + by the optional qemu-lang package. Keyboard mappings for various nationalities + is also provided. + +- Virtual machine lifecycle controls include startup through the system BIOS or + kernel boot, ACPI or legacy based shutdown, execution pausing, the saving and + restoring of machine state or disk state, VM migration to another host, and + miscellaneous controls available through the "monitors" mentioned above. + +- Guest execution state may be "moved" in both time (save/restore) and space + (static and live migration). These migrations or save/restore operations can + take place either from certain prior SLES versioned hosts to a SLES 15 SP4 + host or between hosts of the same version. Certain other restrictions also + apply. + +- Security considerations include seccomp2 based sandboxing, vTPM, privileged + helpers and a security model which allows running guests as a non-root user. + +- QEMU/KVM supports a wide range of operating systems within the VMs. See the + online SUSE documentation for supported OS's. Windows guests can optionally be + accelerated with QEMU/KVM provided Hyper-V hypercalls, or with paravirtual + drivers from the SUSE Virtual Machine Driver Pack. Linux includes a number of + paravirtual drivers as well. + +- QEMU provides best effort reuse of existing disk images, including those with + systems installed, through geometry probing. Also disk images produced by + other popular virtualization technologies may be imported into QEMU supported + storage formats. These QEMU formats include features which exploit the + benefits of virtualization. + +- Memory, cpu and disk space overcommit are possible and can be beneficial when + done responsibly. Additional management of these resources comes in the form + of memory ballooning or hotplug, host KSM, vcpu hot-add, online disk resizing, + trim, discard and hole punching. + +- Guest performance is enhanced through the use of virtio devices, various disk + caching modes, network acceleration via the vhost-net kernel module, multi- + queue network transmit capabilities, host transparent huge pages (THP) and + direct hugetlb usage. Physical PCI and USB devices may also be passed through + to the guest, including SR-IOV VF's. + +- The guest UI is accessable via GTK, VNC, Spice, and serial (including curses + TUI) interfaces. + +- Guest timekeeping is supported in a variety of ways, including a paravirtual + clocksource, and options for the various guest clocks for how to handle the + timeslicing of the guest's execution on the host. + +- Guest OS's interact with virtualized hardware including a choice of either + older or more recent x86 system chipsets, system devices and buses, and a + variety of common storage and networking emulated devices. SMBIOS and ACPI + table details can be customized. + +- In addition to the para-virtualized devices already mentioned, other devices + and infrastructure designed to avoid virtualization "problem areas" are + available such as SPICE graphics, vmmouse emulation, tablet style pointer + interfaces and virtio based UI interfaces. + +- A built-in user-mode network (SLIRP) stack is available. + +- Portions of the host file system may be shared with a guest by using virtFS. + +- A guest "agent" is available for SLES 15 SP4 KVM guests via the + qemu-guest-agent package. This allows some introspection and control of the + guest OS environment from the host. + +QEMU/KVM Technology Previews +---------------------------- + +- Nested VMX and SVM virtualization is possible. + +- All features indicated as not being supported in this document fall under the + Technology Preview definition contained in the main product's release notes. + +Noteworthy QEMU/KVM Unsupported Features +---------------------------------------- + +- Note that some features are unsupported simply due to lack of validation. If + an existing feature is desired, but not marked supported, let SUSE know about + your requirements. + +- The TCG "acceleration" mode may be helpful for problem isolation, but + otherwise presents insufficient benefit and stability. + +- Use of -cpu host is not supported in all host/guest configurations. + +- GlusterFS integration is not enabled. + +Deprecated, Superseded, Modified and Dropped Features +----------------------------------------------------- + +- https://qemu-project.gitlab.io/qemu/about/deprecated.html and + https://qemu-project.gitlab.io/qemu/about/removed-features.html + These websites track features deprecation and removal at the upstream + development level. Our qemu package inherits this community direction, but be + aware that we can and will deviate as needed. Those deviations and additional + information can be found in this section. Feature deprecation as well as + removed features are also tracked in the "System Emulation" section of the + documentation installed with the qemu package. + +- qemu-img: Deprecate use of -b without -F. Creating an image that requires + format probing of the backing image is potentially unsafe and is now + deprecated. + +- When no video adapter is specified, the default used is stdvga. This differs + from the default of prior releases which was cirrus. The cirrus adapter was + considered too outdated to continue to use as the default. + +- The deprecated windows drivers (win-virtio-drivers.iso) are no longer provided. + The Virtual Machine Driver Pack is the supported way to get virtio drivers for + Windows guests. + +- The use of ",boot=on" for virtio disks is no longer needed since the bios used + supports the virtio block interface directly. In fact, its usage may cause + problems, and is now considered deprecated. + +- The previously non-persistent backing file with pmem=on is deprecated. Modify + VM configuration to set pmem=off to continue using fake NVDIMM with backing + file or move backing file to NVDIMM storage and keep pmem=on. + +- The use of "?" as a parameter to "-cpu", "-soundhw", "-device", "-M", + "-machine" and "-d" is now considered deprecated. Use "help" + instead. + +- The use of "if=scsi" as a parameter to "-drive" does not work anymore with PC + machine types, as it created an obsolete SCSI controller model. + +- Passthrough of a host floppy device is now considered deprecated. + +- Use of aio=native without direct cache mode also being specified (cache=none, + cache=directsync, or cache.direct=on) is no longer allowed. + +- The use of image encryption in qcow and qcow2 formats is now considered + deprecated. + Analysis has shown it to be weak encryption, in addition to suffering from + poor design. Images can easily be converted to a non-encrypted format. + +- Use of acpi, boot-opts, and smp-opts in a -readconfig config file are now + considered deprecated. In the future those names will be standardized to + acpitable, boot, and smp respectively. + +- When only a partial SMP topology is provided (ie only some of sockets, cores, + threads) the derived guest ABI is not guaranteed to be equivalent in future + versions. + +- These previously supported command line options are now considered deprecated: + -display sdl,window_close= (use -display sdl,window-close) + -no-quit (use -display ...,window-close=off) + -M option kernel-irqchip=off + -chardev tty (use serial name instead) + -chardev paraport (use parallel name instead) + -device virtio-blk,scsi= (use virtio-scsi instead) + -device virtio-blk-pci,scsi= (use virtio-scsi instead) + -enable-fips (not really helpful - see https://git.qemu.org/?p=qemu.git;a=commit;h=166310299a1e7824bbff17e1f016659d18b4a559 for details) + -realtime mlock= (use -overcommit mem-lock= instead) + -spice password=string (use password-string option instead) + -writeconfig (no replacement - never really worked right) + -share and noshare must be replaced by share=on/share=off + -nodelay must be replaced by nodelay=on rather than delay=off + -object-add options opened=on and loaded=on (both had no effect) + +- These previously supported command line options are no longer supported: + -device ide-drive (use ide-hd or ide-cd instead) + -device scsi-disk (use scsi-hd or scsi-cd instead) + +- The previously supported machine types pc-0.12, pc-0.14 and pc-0.15 are no + longer recognized. Switch to a newer machine type. + +- These previously supported command line options are no longer recognized: + -balloon (use -device virtio-balloon instead) + -clock + -device ivshmem (use ivshmem-doorbell or ivshmem-plain instead) + -device pc-sysfw (no longer needed) + -device pci-assign, -device kvm-pci-assign (use -device vfio-pci instead) + -display sdl + -no-frame + -nodefconfig (use -no-user-config instead) + -realtime ... + -sdl + -show-cursor + -virtioconsole (use -device virtconsole instead) + +- Specifying a cpu feature with both "+feature/-feature" and "feature=on/off" + will now cause a warning. The current behavior for this combination where + "+feature/-feature" wins over "feature=on/off", will be changed going forward + so that "+feature" and "-feature" will be synonyms for "feature=on" and + "feature=off" respectively. + +- The case of specified sockets, cores, and threads not matching the vcpu count + is no longer silently ignored. QEMU now requires that the topology match the + vcpu count. + +- The previously supported blkdev-add QMP command has been flagged as lacking + and could possibly change syntax in the future. + +- These previously unsupported command line options are now deprecated: + -no-kvm-pit + -soundhw (use -device ... instead) + +- These previously unsupported command line options are no longer recognized: + -bt + -device at24c-eeprom + -device ccid-card-passthru + -device cfi.pflash01 + -device esp + -device exynos4210-ehci-usb + -device fusbh200-ehci-usb + -device icc-bridge + -device q35-pcihost + -device mch + -device mmio_interface + -device smbus-eeprom + -device SUNW,fdtwo + -device sysbus-ahci + -device sysbus-fdc + -device sysbus-ohci + -device tegra2-ehci-usb + -device testdev (use -device pc-testdev instead) + -device vhost-user-vsock-pci-transitional + -device vhost-vsock-pci-transitional + -device virtio-iommu-pci-transitional + -device virtio-mmio + -device xln,ps7-usb + -enable-hax (use -accel hax instead) + -enable-nesting + -kvm-shadow-memory (use -machine kvm_shadow_mem= instead) + -M mac + -machine mac + -no-kvm-irqchip (use -machine kernel_irqchip=off instead) + -no-kvm-pit + -no-kvm-pit-reinjection (use -global kvm-pit.lost_tick_policy=discard instead) + -nvram + -old-param + -osk + -pcidevice (use -device vfio-pci instead) + -qtest + -semihosting + -tb-size + -tdf (note: mistakenly listed previously as supported) + -xen-create + +- The previously unsupported machine types pc-0.10, pc-0.11, pc-0.13, + pc-1.0, pc-1.1, pc-1.2 and pc-1.3 are are no longer recognized. + +- These previously supported QMP commands are now deprecated: + + +- These previously supported QMP commands are no longer recognized: + info cpustats + block_passwd + change (use blockdev-change-medium or change-vnc-password instead) + cpu-add (use device_add instead) + migrate-set-cache-size (use migrate-set-parameters instead) + migrate_set_downtime (use migrate-set-parameters instead) + migrate_set_speed (use migrate-set-parameters instead) + query-cpus (use query-cpus-fast instead) + query-events + query-migrate-cache-size (use query-migrate-parameters instead) + +- These previously supported monitor commands are now deprecated: + change + +- These previously supported monitor commands are no longer recognized: + info cpustats + block_passwd ... + block_passwd + cpu-add + cpu_set + migrate_set_cache_size + migrate_set_downtime + migrate_set_speed + pci_add (use device_add instead) + pci_del (use device_del instead) + usb_add (use device_add instead) + usb_del (use device_del instead) + +- These previously unsupported monitor command are now deprecated: + + +- These previously unsupported monitor commands are no longer recognized: + acl_add ... + acl_policy ... + acl_remove ... + acl_reset ... + acl_show ... + host_net_add + host_net_remove + +- These previously unsupported QMP commands are now supported under a new name: + x-block-dirty-bitmap-disable (use block-dirty-bitmap-disable instead) + x-block-dirty-bitmap-enable (use block-dirty-bitmap-enable instead) + x-block-dirty-bitmap-merge (use block-dirty-bitmap-merge instead) + x-block-latency-histogram-set (use block-latency-histogram-set instead) + x-blockdev-create (use blockdev-create instead) + x-input-send-event (use input-send-event instead) + +- This previously unsupported QMP commands is no longer recognized: + x-nbd-server-add-bitmap + +- Due to the lack of migration support (mainly due to ahci interface issues) + and other unstable interface issues, earlier versions of the q35 machine type + are not supported in this release. The current q35 machine type is however now + fully supported. + +- Due to upstream's decision to no longer fully support the qed storage format + going forward (since it really provides no benefit over qcow2 and is now no + longer actively maintained upstream), creating qed storage images is no longer + supported and it is highly discouraged to continue using existing qed images. + They should instead be converted to another supported format. + +- If KVM Intel nested virtualization is enabled, and the guest is passed the vmx + feature, then live migration or save/restore is prohibited. + +QEMU Command-Line and Monitor Syntax and Support +------------------------------------------------ + +- The QEMU program command-line syntax is as follows: + qemu-system-i386 [options] [disk_image] + qemu-system-x86_64 [options] [disk_image] + + Where 'options' are taken from the options listed below, and 'disk_image' is + the file system reference to the x86 guest's primary IDE based hard disk + image. This image as well as those used with -drive or -cdrom, may be in the + raw (no format) or qcow2 storage formats, and may be located in files within + the host filesystem, logical volumes, host physical disks, or network based + storage. Read only media may also be accessed via URL style protocol + specifiers. + + Note that as a general rule, as new command line options are added which serve + to replace an older option or interface, you are strongly encouraged to adapt + your usage to the new option. The new option is being introduced to provide + better functionality and usability going forward. In some cases existing + problems or even bugs in older interfaces cannot be fixed due to functional + expectations, but are resolved in the newer interface or option. + This advice includes moving to the most recent machine type (eg pc-i440fx-6.1 + instead of pc-i440fx-6.0) if possible. + +- The following command line options are supported: + -accel ... + -action ... + -add-fd ... + -alt-grab + -append ... + -audio-help + -audiodev + -bios ... + -blockdev ... + -boot ... + -cdrom ... + -chardev ... + -compat ... + -cpu ... (all except host) + -ctrl-grab + -d ... + -daemonize + -debugcon ... + -device + + [isa-serial|isa-parallel|isa-fdc|ide-hd|ide-cd|VGA|cirrus-vga|rtl8139| + usb-hub|usb-ehci|usb-tablet|usb-storage|usb-mouse|usb-kbd| + virtserialport|virtconsole|sga|i82559er|scsi-cd|scsi-hd|scsi-generic| + scsi-block|pci-serial|pci-serial-2x|pci-serial-4x|ich9-ahci| + piix3-usb-uhci|usb-host|usb-serial|usb-wacom-tablet|usb-braille| + usb-net|pci-ohci|piix4-usb-uhci|i6300esb|ib700|qxl|qxl-vga|pvpanic| + vfio-pci|ivshmem-doorbell|ivshmem-plain|pci-bridge|megasas-gen2| + pc-dimm|floppy|e1000e|ccid-card-emulated|ccid-card-passthrough| + xen-backend|loader|e1000-82540em|vmgenid|vmcoreinfo|pcie-pci-bridge| + ich9-usb-ehci1|ich9-usb-ehci2|ich9-usb-uhci1|ich9-usb-uhci2| + ich9-usb-uhci3|ich9-usb-uhci4|ich9-usb-uhci5|ich9-usb-uhci6| + usb-redir|vhost-scsi|vhost-scsi-pci|vhost-user-blk| + vhost-user-blk-pci|vhost-user-blk-pci-non-transitional| + vhost-user-blk-pci-transitional|vhost-user-scsi|vhost-user-scsi-pci| + vhost-user-scsi-pci-non-transitional|vhost-user-pci-transitional| + vhost-vsock-pci|vhost-vsock-pci-non-transitional|virtio-balloon-pci| + virtio-balloon-pci-non-transitional|virtio-balloon-pci-transitional| + virtio-blk-pci|virtio-blk-pci-non-transitional| + virtio-blk-pci-transitional|virtio-net-pci| + virtio-net-pci-non-transitional|virtio-net-pci-transitional| + virtio-9p-pci|virtio-9p-pci-non-transitional| + virtio-9p-pci-transitional|virtio-serial-pci| + virtio-serial-pci-non-transitional|virtio-serial-pci-transitional| + virtio-scsi-pci|virtio-scsi-pci-non-transitional| + virtio-scsi-pci-transitional|virtio-rng-pci| + virtio-rng-pci-non-transitional|virtio-rng-pci-transitional| + virtio-input-host-pci|virtio-input-host-pci-non-transitional| + virtio-input-host-pci-transitional|virtio-keyboard-pci| + virtio-mouse-pci|virtio-tablet-pci|virtio-gpu-pci|virtio-crypto-pci| + virtio-vga|vhost-user-fs-pci|vhost-user-gpu|vhost-user-pci-pci| + vhost-user-input|vhost-user-input-pci|vhost-user-vga|virtio-mmio| + virtio-pmem|virtio-pmem-pci|mc146818rtci|nvme-subsys|guest-loader| + pvpanic-pci] + (the following are aliases of these supported devices: ahci| + e1000|virtio-blk|virtio-net|virtio-serial|virtio-balloon|virtio-9p| + virtio-scsi|virtio-rng|virtio-input-host|virtio-keyboard|virtio-mouse|virtio-tablet|virtio-gpu) + + -dfilter range, ... + -display ... + -drive + + ... (if specified if=[floppy|ide|virtio] and format=[qcow2|raw] and + snapshot=off only) + + -echr ... + -enable-fips + -enable-kvm + -fda/-fdb ... + -fsdev ... + -full-screen + -fw_cfg ... + -gdb ... + -global ... + -h + -hda/-hdb/-hdc/-hdd ... + -help + -incoming ... + -initrd ... + -iscsi ... + -k ... + -kernel ... + -loadvm ... + -m ... + -M + + [help|none|pc-i440fx-1.4|pc-i440fx-1.7|pc-i440fx-2.0|pc-i440fx-2.3| + pc-i440fx-2.6|pc-i440fx-2.9|pc-i440fx-2.11|pc-i440fx-3.1|pc-i440fx-4.2| + pc-i440fx-5.2|pc-i440fx-6.0|pc-i440fx-6.1|pc-q35-2.6|pc-q35-2.9| + pc-q35-2.11|pc-q35-3.1|pc-q35-4.2|pc-q35-5.2|pc-q35-6.0|pc-q35-6.1| + xenfv|xenfv-4.2] + + -machine + + [help|none|pc-i440fx-1.4|pc-i440fx-1.7|pc-i440fx-2.0| + pc-i440fx-2.3|pc-440fx-2.6|pc-i440fx-2.9|pc-i440fx-2.11| + pc-i440fx-3.1|pc-i440fx-4.2|pc-i440fx-5.2|pc-i440fx-6.0| + pc-i440fx-6.1|pc-q35-2.6|pc-q35-2.9|pc-q35-2.11|pc-q35-3.1| + pc-q35-4.2|pc-q35-5.2|pc-q35-6.0|pc-q35-6.1|xenfv|xenifv-4.2] + + -mem-path ... + -mem-prealloc + -mon ... + -monitor ... + -msg ... + -name ... + -net + + [bridge|l2tpv3|nic|none|tap|user] ... (for model= only e1000, rtl8139, + and virtio are supported) + + -netdev [bridge|tap|user] ... + -nic ... + -no-acpi + -nodefaults + -no-fd-bootchk + -nographic + -no-hpet + -no-quit + -no-reboot + -no-shutdown + -no-user-config + -numa cpu ... + -numa dist ... + -object ... + -only-migratable + -parallel ... + -pidfile ... + -plugin ... + -qmp ... + -qmp-pretty ... + -readconfig ... + -rtc ... + -runas ... + -s + -S + -sandbox ... + -seed ... + -serial ... + -smbios ... + -smp ... + -spice + -tpmdev passthrough ... + -trace ... + -usb + -usbdevice [braile|disk|host|mouse|net|serial|tablet] + -uuid ... + -version + -vga [cirrus|none|qxl|std|xenfb] + -virtfs ... + -vnc ... + -watchdog ... + -watchdog-action ... + -writeconfig ... + -xen-attach ... + -xen-domid ... + -xen-domid-restrict ... + +- The following monitor commands are supported: + ? + announce_self ... + balloon ... + block_resize ... + boot_set ... + c + change ... + chardev-add ... + chardev-change ... + chardev-remove ... + chardev-send-break ... + client_migrate_info ... + closefd ... + cont + cpu ... + delvm ... + device_add ... + device_del ... + drive_add ... + drive_backup ... + drive_del ... + dump_guest_memory ... + eject ... + gdbserver ... + gpa2hpa ... + gpa2hva ... + gva2gpa ... + help + i ... + info ... + loadvm ... + logfile ... + logitem ... + mce ... + memsave ... + migrate ... + migrate_cancel + migrate_continue ... + migrate_incoming + migrate_pause + migrate_recover ... + migrate_set_capability ... + migrate_set_parameter ... + migrate_start_post_copy + mouse_button ... + mouse_move ... + mouse_set ... + nmi ... + o ... + object_add ... + object_del ... + p ... + pci_add ... + pci_del... + pmemsave ... + print ... + q + qemu-io ... + qom-list + qom-set + ringbuf_read ... + ringbuf_write ... + savevm ... + screendump ... + sendkey ... + snapshot_blkdev_internal ... + snapshot_delete_blkdev_internal ... + stop + sum ... + system_powerdown + system_reset + system_wakeup + trace-event ... + watchdog_action ... + x ... + xp ... + +- The following QMP commands are supported: + add_client + add-fd + announce-self + balloon + blockdev-add + blockdev-backup + blockdev-change-medium + blockdev-close-tray + blockdev-create + blockdev-del + blockdev-mirror + blockdev-open-tray + blockdev-snapshot + blockdev-snapshot-delete-internal-sync + blockdev-snapshot-internal-sync + blockdev-snapshot-sync + block-commit + block-dirty-bitmap-add + block-dirty-bitmap-clear + block-dirty-bitmap-disable + block-dirty-bitmap-enable + block-dirty-bitmap-merge + block-dirty-bitmap-remove + block-export-add + block-export-del + block-latency-histogram-set + block_resize + block_set_io_throttle + block-set-write-threshold + block_stream + calc-dirty-rate + change-vnc-password + chardev-add + chardev-change + chardev-remove + chardev-send-break + client_migrate_info + closefd + cont + cpu + device_add + device_del + device-list-properties + display-reload + dump-guest-memory + eject + expire_password + getfd + human-monitor-command + inject-nmi + input-send-event + job-cancel + job-complete + job-dismiss + job-finalize + job-pause + job-resume + memsave + migrate + migrate_cancel + migrate-continue + migrate-incoming + migrate-pause + migrate-resume + migrate-set-capabilities + migrate-set-parameters + migrate-start-postcopy + object-add + object-del + pmemsave + qmp_capabilities + qom-get + qom-list + qom-list-types + qom-set + query-acpi-ospm-status + query-balloon + query-block + query-block-exports + query-block-jobs + query-blockstats + query-chardev + query-chardev-backends + query-command-line-options + query-commands + query-cpu-definitions + query-cpu-model-expansion + query-cpus-fast + query-current-machine + query-dirty-rate + query-display-options + query-dump + query-dump-guest-memory-capability + query-fdsets + query-gic-capabilities + query-hotpluggable-cpus + query-iothreads + query-jobs + query-kvm + query-machines + query-memdev + query-memory-devices + query-memory-size-summary + query-mice + query-migrate + query-migrate-capabilities + query-migrate-parameters + query-name + query-named-block-nodes + query-pci + query-pr-managers + query-qmp-schema + query-rocker + query-rocker-of-dpa-flows + query-rocker-of-dpa-groups + query-rocker-ports + query-rx-filter + query-sev + query-sev-capabilities + query-sev-launch-measure + query-spice + query-status + query-target + query-tpm + query-tpm-models + query-tpm-types + query-uuid + query-version + query-vnc + query-vnc-servers + query-yank + query-xen-replication-status + quit + remove-fd + ringbuf-read + ringbuf-write + screendump + send-key + set-action + set_link + set_password + set-numa-node + sev-inject-launch-secret + snapshot-delete + snapshot-load + snapshot-save + stop + system_powerdown + system_reset + system_wakeup + trace-event-get-state + trace-event-set-state + transaction + watchdog-set-action + xen-load-devices-state + xen-save-devices-state + xen-set-global-dirty-log + yank + +- The following command line options are unsupported: + + -acpitable ... + -chroot ... + -cpu host + -curses + -device + + [ipoctal232|i82562|nec-usb-xhci|hda-duplex|hda-output|usb-bot| + lsi53c810a|isa-debug-exit|ne2k_pci|usb-uas|ioh3420|isa-ide|usb-ccid| + pcnet|ich9-intel-hda|dc390|hda-micro|x3130-upstream|isa-cirrus-vga| + pc-testdev|ne2k_isa|isa-vga|cs4231a|gus|vmware-svga|i82801b11-bridge| + i82557a|i82557c|i82557b|i82801|AC97|am53c974|intel-hda|i82558a| + i82558b|usb-audio|i82550|isa-debugcon|sb16|megasas|i82551| + xio3130-downstream|vt82c686b-usb-uhci|tpci200|i82559a|i82559b|i82559c| + isa-applesmc|adlib|ES1370|lsi53c810|nvme|pci-testdev|pvscsi| + virtio-9p-device|virtio-balloon-device|virtio-blk-device| + virtio-net-device|virtio-rng-device|virtio-scsi-device| + virtio-serial-device|vmxnet3|xen-pci-passthrough|xen-platform| + xen-pvdevice|piix3-ide|piix3-ide-xen|piix3-ide|i8042|sdhci-pci| + secondary-vga|edu|intel_iommu|usb-mtp|e1000-82544gc|e1000-82545em| + pci-bridge-seat|pxb|pxb-pcie|rocker|virtio-input-host-device| + virtio-keyboard-device|virtio-mouse-device|virtio-tablet-device| + hyperv-testdev|generic-sdhci|igd-passthrough-isa-bridge| + ipmi-bmc-extern|ipmi-bmc-sim|isa-ipmi-bt|isa-ipmi-kcs|mptsas1068| + nvdimm|pxb-host|sd-card|virtio-gpu-device|amd-iommu|AMDVI-PCI| + vhost-vsock-device|virtio-crypto-device|vfio-pci-igd-lpc-bridge| + pcie-root-port|qemu-xhci|*-i386-cpu|*-x86_64-cpu|pvrdma|bochs-display| + ramfb|ccid-card-emulated|ccid-card-passthru|kvaser_pci|tpm-crb| + mioe3680_pci|pcm3680_pci|hyperv-synic|vfio-pci-nohotplug| + vfio-platform|xen-bridge|xen-cdrom|xen-disk|ati-vga|cpu-cluster| + intel-iommu|vhost-user-fs-device|tulip|ati-vga|i2c-ddc|pci-ipmi-bt| + pci-ipmi-kcs|serial|serial-io|serial-mm|virtio-iommu-device| + virtio-iommu-pci|virtio-iommu-pci-nontransitional|xen-sysdev| + imx.usbphy|vmbus-bridge|vhost-user-vsock-device|vhost-user-vsock-pci| + vhost-user-vsock-pci-non-transitional|virtio-mem|virtio-mem-pci| + nvme-ns|ctucan_pci|u2f-passthru] + (the following are aliases of these unsupported devices: lsi) + (note that some of these device names represent supported devices and + are used internally, but are not specifyable via -device even though + they appear in the list of devices) + + -drive + + ,if=[scsi|mtd|pflash], snapshot=on, format=[anything besides qcow2 or + raw] + + -dtb file + -enable-sync-profile + -g ... + -icount ... + -L ... + -M + + [pc|isapc|microvm|x-remote|pc-i440fx-1.5|pc-i440fx-1.6|pc-i440fx-2.1| + pc-i440fx-2.2|pc-i440fx-2.4|pc-i440fx-2.5|pc-i440fx-2.7|pc-i440fx-2.8| + pc-i440fx-2.10|pc-i440fx-2.12|pc-i440fx-3.0|pc-i440fx-4.0|pc-i440fx-4.1| + pc-i440fx-5.0|pc-i440fx-5.1|pc-i440fx-6.0|q35|pc-q35-1.4|pc-q35-1.5| + pc-q35-1.6|pc-q35-1.7|pc-q35-2.0|pc-q35-2.1|pc-q35-2.2|pc-q35-2.3| + pc-q35-2.4|pc-q35-2.5|pc-q35-2.7|pc-q35-2.8|pc-q35-2.10|pc-q35-2.12| + pc-q35-3.0|pc-q35-4.0|pc-q35-4.1|pc-q35-5.0|pc-q35-5.1|pc-q35-6.0] + + -machine + + [pc|isapc|microvm|x-remote|pc-i440fx-1.5|pc-i440fx-1.6|pc-i440fx-2.1| + pc-i440fx-2.2|pc-i440fx-2.4|pc-i440fx-2.5|pc-i440fx-2.7| + pc-i440fx-2.8|pc-i440fx-2.10|pc-i440fx-2.12|pc-i440fx-3.0| + pc-i440fx-4.0|pc-i440fx-4.1|pc-i440fx-5.0|pc-i440fx-5.1| + pc-i440fx-6.0|q35|pc-q35-1.4|pc-q35-1.5|pc-q35-1.6|pc-q35-1.7| + pc-q35-2.0|pc-q35-2.1|pc-q35-2.2|pc-q35-2.3|pc-q35-2.4|pc-q35-2.5| + pc-q35-2.7|pc-q35-2.8|pc-q35-2.10|pc-q35-2.12|pc-q35-3.0|pc-q35-4.0| + pc-q35-4.1|pc-q35-5.0|pc-q35-5.1|pc-q35-6.0] + + -mtdblock file + -net [socket|vde] ... + -netdev [hubport|l2tpv3|socket|vde] ... + -no-kvm + -numa node ... + -option-rom ... + -overcommit ... + -pflash file + -portrait + -preconfig + -prom-env ... + -qtest ... + -qtest-log ... + -rotate + -sd file + -sdl + -set ... + -singlestep + -snapshot + -soundhw ... + -tpmdev emulator ... + -vga [cg3|tcx|virtio|vmware] + -win2k-hack + +- The following monitor commands are unsupported: + block_job_cancel ... + block_job_complete ... + block_job_pause ... + block_job_resume ... + block_job_set_speed ... + commit ... + drive_mirror ... + exit_preconfig + expire_password ... + hostfwd_add ... + hostfwd_remove ... + nbd_server_add ... + nbd server_start ... + nbd_server_stop ... + netdev_add + netdev_del ... + pcie_aer_inject_error ... + replay_break ... + replay_delete_break + replay_seek ... + set_link ... + set_password ... + singlestep ... + snapshot_blkdev ... + stopcapture ... + sync-profile ... + wavcapture ... + x_colo_lost_heartbeat + +- The following QMP commands are unsupported: + block-job-cancel + block-job-complete + block-job-pause + block-job-resume + block-job-set-speed + change-backing-file + drive-backup + drive-mirror + netdev_add + netdev_del + nbd-server-add + nbd-server-start + nbd-server-stop + query-colo-status + query-replay + replay_break + replay_delete_break + replay_seek + x-blockdev-amend + x-blockdev-change + x-blockdev-insert-medium + x-blockdev-remove-medium + x-blockdev-reopen + x-colo-lost-heartbeat + x-debug-block-dirty-bitmap-sha256 + x-debug-query-block-graph + x-exit-preconfig + xen-colo-do-checkpoint + xen-set-replication diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py index de506cb8bf..3a7f9cd539 100755 --- a/scripts/analyze-migration.py +++ b/scripts/analyze-migration.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/python3 # # Migration Stream Analyzer # diff --git a/scripts/block-coroutine-wrapper.py b/scripts/block-coroutine-wrapper.py index a38e5833fb..28685d190d 100644 --- a/scripts/block-coroutine-wrapper.py +++ b/scripts/block-coroutine-wrapper.py @@ -44,6 +44,7 @@ def gen_header(): #include "block/block-gen.h" #include "block/block_int.h" #include "block/dirty-bitmap.h" +#include "block/qapi.h" """ diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 6ef9f118d9..4115eaa121 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh @@ -341,7 +341,7 @@ BINFMT_SET=qemu_register_interpreter SYSTEMDDIR="/etc/binfmt.d" DEBIANDIR="/usr/share/binfmts" -QEMU_PATH=/usr/local/bin +QEMU_PATH=/usr/bin CREDENTIAL=no PERSISTENT=no PRESERVE_ARG0=no diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py index 9c0e6b81f2..3d5d55b975 100755 --- a/scripts/vmstate-static-checker.py +++ b/scripts/vmstate-static-checker.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/python3 # # Compares vmstate information stored in JSON format, obtained from # the -dump-vmstate QEMU command. diff --git a/subprojects/berkeley-softfloat-3 b/subprojects/berkeley-softfloat-3 new file mode 160000 index 0000000000..b64af41c32 --- /dev/null +++ b/subprojects/berkeley-softfloat-3 @@ -0,0 +1 @@ +Subproject commit b64af41c3276f97f0e181920400ee056b9c88037 diff --git a/subprojects/berkeley-testfloat-3 b/subprojects/berkeley-testfloat-3 new file mode 160000 index 0000000000..e7af9751d9 --- /dev/null +++ b/subprojects/berkeley-testfloat-3 @@ -0,0 +1 @@ +Subproject commit e7af9751d9f9fd3b47911f51a5cfd08af256a9ab diff --git a/subprojects/dtc b/subprojects/dtc new file mode 160000 index 0000000000..b6910bec11 --- /dev/null +++ b/subprojects/dtc @@ -0,0 +1 @@ +Subproject commit b6910bec11614980a21e46fbccc35934b671bd81 diff --git a/subprojects/keycodemapdb b/subprojects/keycodemapdb new file mode 160000 index 0000000000..f5772a62ec --- /dev/null +++ b/subprojects/keycodemapdb @@ -0,0 +1 @@ +Subproject commit f5772a62ec52591ff6870b7e8ef32482371f22c6 diff --git a/subprojects/libvfio-user b/subprojects/libvfio-user new file mode 160000 index 0000000000..0b28d20557 --- /dev/null +++ b/subprojects/libvfio-user @@ -0,0 +1 @@ +Subproject commit 0b28d205572c80b568a1003db2c8f37ca333e4d7 diff --git a/system/physmem.c b/system/physmem.c index a63853a7bc..3470dd39a2 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -1910,11 +1910,13 @@ RAMBlock *qemu_ram_alloc_from_fd(ram_addr_t size, MemoryRegion *mr, return NULL; } +#ifndef TARGET_PPC if (kvm_enabled() && !kvm_has_sync_mmu()) { error_setg(errp, "host lacks kvm mmu notifiers, -mem-path unsupported"); return NULL; } +#endif size = HOST_PAGE_ALIGN(size); file_size = get_file_size(fd); diff --git a/system/vl.c b/system/vl.c index 2bcd9efb9a..7c584ef4c8 100644 --- a/system/vl.c +++ b/system/vl.c @@ -42,6 +42,7 @@ #include "sysemu/reset.h" #include "sysemu/runstate.h" #include "sysemu/runstate-action.h" +#include #include "sysemu/seccomp.h" #include "sysemu/tcg.h" #include "sysemu/xen.h" @@ -2426,6 +2427,10 @@ static void qemu_validate_options(const QDict *machine_opts) } } + if (loadvm && incoming) { + error_report("'incoming' and 'loadvm' options are mutually exclusive"); + exit(EXIT_FAILURE); + } if (loadvm && preconfig_requested) { error_report("'preconfig' and 'loadvm' options are " "mutually exclusive"); @@ -2736,6 +2741,17 @@ void qemu_init(int argc, char **argv) MachineClass *machine_class; bool userconfig = true; FILE *vmstate_dump_file = NULL; + struct rlimit rlimit_as; + + /* + * Try to raise the soft address space limit. + * Default on SLES 11 SP2 is 80% of physical+swap memory. + */ + getrlimit(RLIMIT_AS, &rlimit_as); + if (rlimit_as.rlim_cur < rlimit_as.rlim_max) { + rlimit_as.rlim_cur = rlimit_as.rlim_max; + setrlimit(RLIMIT_AS, &rlimit_as); + } qemu_add_opts(&qemu_drive_opts); qemu_add_drive_opts(&qemu_legacy_drive_opts); diff --git a/target/arm/cpu-features.h b/target/arm/cpu-features.h index 954d358268..165a497f7b 100644 --- a/target/arm/cpu-features.h +++ b/target/arm/cpu-features.h @@ -771,7 +771,7 @@ static inline bool isar_feature_aa64_hcx(const ARMISARegisters *id) static inline bool isar_feature_aa64_tidcp1(const ARMISARegisters *id) { - return FIELD_EX64(id->id_aa64mmfr2, ID_AA64MMFR1, TIDCP1) != 0; + return FIELD_EX64(id->id_aa64mmfr1, ID_AA64MMFR1, TIDCP1) != 0; } static inline bool isar_feature_aa64_hafs(const ARMISARegisters *id) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index a2e49c39f9..f2d05c589c 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -8221,7 +8221,7 @@ static void handle_vec_simd_sqshrn(DisasContext *s, bool is_scalar, bool is_q, narrowfn(tcg_rd_narrowed, tcg_env, tcg_rd); tcg_gen_extu_i32_i64(tcg_rd, tcg_rd_narrowed); if (i == 0) { - tcg_gen_mov_i64(tcg_final, tcg_rd); + tcg_gen_extract_i64(tcg_final, tcg_rd, 0, esize); } else { tcg_gen_deposit_i64(tcg_final, tcg_final, tcg_rd, esize * i, esize); } diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 04de1689d7..fda32d7f59 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -110,11 +110,7 @@ void hppa_cpu_do_unaligned_access(CPUState *cs, vaddr addr, CPUHPPAState *env = &cpu->env; cs->exception_index = EXCP_UNALIGN; - if (env->psw & PSW_Q) { - /* ??? Needs tweaking for hppa64. */ - env->cr[CR_IOR] = addr; - env->cr[CR_ISR] = addr >> 32; - } + hppa_set_ior_and_isr(env, addr, MMU_IDX_MMU_DISABLED(mmu_idx)); cpu_loop_exit_restore(cs, retaddr); } diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index 8be45c69c9..9556e95fab 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -385,6 +385,7 @@ void hppa_cpu_dump_state(CPUState *cs, FILE *f, int); #ifndef CONFIG_USER_ONLY void hppa_ptlbe(CPUHPPAState *env); hwaddr hppa_cpu_get_phys_page_debug(CPUState *cs, vaddr addr); +void hppa_set_ior_and_isr(CPUHPPAState *env, vaddr addr, bool mmu_disabled); bool hppa_cpu_tlb_fill(CPUState *cs, vaddr address, int size, MMUAccessType access_type, int mmu_idx, bool probe, uintptr_t retaddr); diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index 08abd1a9f9..4fcc612754 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -55,8 +55,14 @@ hwaddr hppa_abs_to_phys_pa2_w0(vaddr addr) /* I/O address space */ addr = (int32_t)addr; } else { - /* PDC address space */ - addr &= MAKE_64BIT_MASK(0, 24); + /* + * PDC address space: + * Figures H-10 and H-11 of the parisc2.0 spec do not specify + * where to map into the 64-bit PDC address space. + * We map with an offset which equals the 32-bit address, which + * is what can be seen on physical machines too. + */ + addr = (uint32_t)addr; addr |= -1ull << (TARGET_PHYS_ADDR_SPACE_BITS - 4); } return addr; @@ -299,14 +305,8 @@ hwaddr hppa_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) return excp == EXCP_DTLB_MISS ? -1 : phys; } -G_NORETURN static void -raise_exception_with_ior(CPUHPPAState *env, int excp, uintptr_t retaddr, - vaddr addr, bool mmu_disabled) +void hppa_set_ior_and_isr(CPUHPPAState *env, vaddr addr, bool mmu_disabled) { - CPUState *cs = env_cpu(env); - - cs->exception_index = excp; - if (env->psw & PSW_Q) { /* * For pa1.x, the offset and space never overlap, and so we @@ -333,16 +333,23 @@ raise_exception_with_ior(CPUHPPAState *env, int excp, uintptr_t retaddr, */ uint64_t b; - cpu_restore_state(cs, retaddr); - - b = env->gr[env->unwind_breg]; + b = env->unwind_breg ? env->gr[env->unwind_breg] : 0; b >>= (env->psw & PSW_W ? 62 : 30); env->cr[CR_IOR] |= b << 62; - - cpu_loop_exit(cs); } } } +} + +G_NORETURN static void +raise_exception_with_ior(CPUHPPAState *env, int excp, uintptr_t retaddr, + vaddr addr, bool mmu_disabled) +{ + CPUState *cs = env_cpu(env); + + cs->exception_index = excp; + hppa_set_ior_and_isr(env, addr, mmu_disabled); + cpu_loop_exit_restore(cs, retaddr); } diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c index 7f607c3afd..ce15469465 100644 --- a/target/hppa/op_helper.c +++ b/target/hppa/op_helper.c @@ -351,11 +351,7 @@ target_ulong HELPER(probe)(CPUHPPAState *env, target_ulong addr, excp = hppa_get_physical_address(env, addr, mmu_idx, 0, &phys, &prot, NULL); if (excp >= 0) { - if (env->psw & PSW_Q) { - /* ??? Needs tweaking for hppa64. */ - env->cr[CR_IOR] = addr; - env->cr[CR_ISR] = addr >> 32; - } + hppa_set_ior_and_isr(env, addr, MMU_IDX_MMU_DISABLED(mmu_idx)); if (excp == EXCP_DTLB_MISS) { excp = EXCP_NA_DTLB_MISS; } diff --git a/target/i386/cpu.c b/target/i386/cpu.c index cd16cb893d..f14dbd87e9 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -7366,7 +7366,15 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp) * In this case, the default is the value used by TCG (40). */ if (cpu->phys_bits == 0) { - cpu->phys_bits = TCG_PHYS_ADDR_BITS; + /* SUSE Downstream patch: TCG_PHYS_ADDR_BITS is 40. We, instead + * need the phys_bits to be 42 (only if the host supports that, of + * course), because we did set it to 42 (unconditionally!) a while + * ago, and now we need to stay compatible with that. However, + * instead of messing with the macro, just use the value here, + * to avoid messing with other places where the macro is used + * (namely, for TCG). + */ + cpu->phys_bits = (MIN(42, host_cpu_phys_bits())); } } else { /* For 32 bit systems don't use the user set value, but keep diff --git a/target/i386/cpu.h b/target/i386/cpu.h index ef987f344c..f5a82be9c8 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2238,6 +2238,41 @@ void cpu_clear_apic_feature(CPUX86State *env); void host_cpuid(uint32_t function, uint32_t count, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx); +/* Note: Only safe for use on x86(-64) hosts */ +#ifdef __x86_64__ +static inline uint32_t host_cpu_phys_bits(void) +{ + uint32_t eax; + uint32_t host_phys_bits; + + host_cpuid(0x80000000, 0, &eax, NULL, NULL, NULL); + if (eax >= 0x80000008) { + host_cpuid(0x80000008, 0, &eax, NULL, NULL, NULL); + /* + * Note: According to AMD doc 25481 rev 2.34 they have a field + * at 23:16 that can specify a maximum physical address bits for + * the guest that can override this value; but I've not seen + * anything with that set. + */ + host_phys_bits = eax & 0xff; + } else { + /* + * It's an odd 64 bit machine that doesn't have the leaf for + * physical address bits; fall back to 36 that's most older + * Intel. + */ + host_phys_bits = 36; + } + + return host_phys_bits; +} +#else +static inline uint32_t host_cpu_phys_bits(void) +{ + return 40; // TCG_PHYS_ADDR_BITS +} +#endif + /* helper.c */ void x86_cpu_set_a20(X86CPU *cpu, int a20_state); void cpu_sync_avx_hflag(CPUX86State *env); diff --git a/target/i386/host-cpu.c b/target/i386/host-cpu.c index 92ecb7254b..5ca037dd59 100644 --- a/target/i386/host-cpu.c +++ b/target/i386/host-cpu.c @@ -14,34 +14,6 @@ #include "qemu/error-report.h" #include "sysemu/sysemu.h" -/* Note: Only safe for use on x86(-64) hosts */ -static uint32_t host_cpu_phys_bits(void) -{ - uint32_t eax; - uint32_t host_phys_bits; - - host_cpuid(0x80000000, 0, &eax, NULL, NULL, NULL); - if (eax >= 0x80000008) { - host_cpuid(0x80000008, 0, &eax, NULL, NULL, NULL); - /* - * Note: According to AMD doc 25481 rev 2.34 they have a field - * at 23:16 that can specify a maximum physical address bits for - * the guest that can override this value; but I've not seen - * anything with that set. - */ - host_phys_bits = eax & 0xff; - } else { - /* - * It's an odd 64 bit machine that doesn't have the leaf for - * physical address bits; fall back to 36 that's most older - * Intel. - */ - host_phys_bits = 36; - } - - return host_phys_bits; -} - static void host_cpu_enable_cpu_pm(X86CPU *cpu) { CPUX86State *env = &cpu->env; diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index 6e881e9e27..1d54164bdf 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -68,14 +68,26 @@ static void x86_restore_state_to_opc(CPUState *cs, X86CPU *cpu = X86_CPU(cs); CPUX86State *env = &cpu->env; int cc_op = data[1]; + uint64_t new_pc; if (tb_cflags(tb) & CF_PCREL) { - env->eip = (env->eip & TARGET_PAGE_MASK) | data[0]; - } else if (tb->flags & HF_CS64_MASK) { - env->eip = data[0]; + /* + * data[0] in PC-relative TBs is also a linear address, i.e. an address with + * the CS base added, because it is not guaranteed that EIP bits 12 and higher + * stay the same across the translation block. Add the CS base back before + * replacing the low bits, and subtract it below just like for !CF_PCREL. + */ + uint64_t pc = env->eip + tb->cs_base; + new_pc = (pc & TARGET_PAGE_MASK) | data[0]; } else { - env->eip = (uint32_t)(data[0] - tb->cs_base); + new_pc = data[0]; } + if (tb->flags & HF_CS64_MASK) { + env->eip = new_pc; + } else { + env->eip = (uint32_t)(new_pc - tb->cs_base); + } + if (cc_op != CC_OP_DYNAMIC) { env->cc_op = cc_op; } diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 037bc47e7c..8fd49ff474 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -566,9 +566,9 @@ static void gen_update_eip_next(DisasContext *s) if (tb_cflags(s->base.tb) & CF_PCREL) { tcg_gen_addi_tl(cpu_eip, cpu_eip, s->pc - s->pc_save); } else if (CODE64(s)) { - tcg_gen_movi_tl(cpu_eip, s->base.pc_next); + tcg_gen_movi_tl(cpu_eip, s->pc); } else { - tcg_gen_movi_tl(cpu_eip, (uint32_t)(s->base.pc_next - s->cs_base)); + tcg_gen_movi_tl(cpu_eip, (uint32_t)(s->pc - s->cs_base)); } s->pc_save = s->pc; } @@ -2845,10 +2845,6 @@ static void gen_jmp_rel(DisasContext *s, MemOp ot, int diff, int tb_num) } } new_eip &= mask; - new_pc = new_eip + s->cs_base; - if (!CODE64(s)) { - new_pc = (uint32_t)new_pc; - } gen_update_cc_op(s); set_cc_op(s, CC_OP_DYNAMIC); @@ -2864,6 +2860,8 @@ static void gen_jmp_rel(DisasContext *s, MemOp ot, int diff, int tb_num) tcg_gen_andi_tl(cpu_eip, cpu_eip, mask); use_goto_tb = false; } + } else if (!CODE64(s)) { + new_pc = (uint32_t)(new_eip + s->cs_base); } if (use_goto_tb && translator_use_goto_tb(&s->base, new_pc)) { @@ -6974,7 +6972,6 @@ static void i386_tr_insn_start(DisasContextBase *dcbase, CPUState *cpu) dc->prev_insn_end = tcg_last_op(); if (tb_cflags(dcbase->tb) & CF_PCREL) { - pc_arg -= dc->cs_base; pc_arg &= ~TARGET_PAGE_MASK; } tcg_gen_insn_start(pc_arg, dc->cc_op); diff --git a/target/riscv/csr.c b/target/riscv/csr.c index fde7ce1a53..c50a33397c 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -907,11 +907,11 @@ static int write_mhpmcounterh(CPURISCVState *env, int csrno, target_ulong val) static RISCVException riscv_pmu_read_ctr(CPURISCVState *env, target_ulong *val, bool upper_half, uint32_t ctr_idx) { - PMUCTRState counter = env->pmu_ctrs[ctr_idx]; - target_ulong ctr_prev = upper_half ? counter.mhpmcounterh_prev : - counter.mhpmcounter_prev; - target_ulong ctr_val = upper_half ? counter.mhpmcounterh_val : - counter.mhpmcounter_val; + PMUCTRState *counter = &env->pmu_ctrs[ctr_idx]; + target_ulong ctr_prev = upper_half ? counter->mhpmcounterh_prev : + counter->mhpmcounter_prev; + target_ulong ctr_val = upper_half ? counter->mhpmcounterh_val : + counter->mhpmcounter_val; if (get_field(env->mcountinhibit, BIT(ctr_idx))) { /* @@ -919,12 +919,12 @@ static RISCVException riscv_pmu_read_ctr(CPURISCVState *env, target_ulong *val, * stop the icount counting. Just return the counter value written by * the supervisor to indicate that counter was not incremented. */ - if (!counter.started) { + if (!counter->started) { *val = ctr_val; return RISCV_EXCP_NONE; } else { /* Mark that the counter has been stopped */ - counter.started = false; + counter->started = false; } } diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c index 45b6cf1cfa..117e33cf90 100644 --- a/target/riscv/kvm/kvm-cpu.c +++ b/target/riscv/kvm/kvm-cpu.c @@ -832,9 +832,8 @@ static void kvm_riscv_read_multiext_legacy(RISCVCPU *cpu, multi_ext_cfg->supported = false; val = false; } else { - error_report("Unable to read ISA_EXT KVM register %s, " - "error code: %s", multi_ext_cfg->name, - strerrorname_np(errno)); + error_report("Unable to read ISA_EXT KVM register %s: %s", + multi_ext_cfg->name, strerror(errno)); exit(EXIT_FAILURE); } } else { @@ -895,8 +894,8 @@ static void kvm_riscv_init_multiext_cfg(RISCVCPU *cpu, KVMScratchCPU *kvmcpu) * * Error out if we get any other errno. */ - error_report("Error when accessing get-reg-list, code: %s", - strerrorname_np(errno)); + error_report("Error when accessing get-reg-list: %s", + strerror(errno)); exit(EXIT_FAILURE); } @@ -905,8 +904,8 @@ static void kvm_riscv_init_multiext_cfg(RISCVCPU *cpu, KVMScratchCPU *kvmcpu) reglist->n = rl_struct.n; ret = ioctl(kvmcpu->cpufd, KVM_GET_REG_LIST, reglist); if (ret) { - error_report("Error when reading KVM_GET_REG_LIST, code %s ", - strerrorname_np(errno)); + error_report("Error when reading KVM_GET_REG_LIST: %s", + strerror(errno)); exit(EXIT_FAILURE); } @@ -927,9 +926,8 @@ static void kvm_riscv_init_multiext_cfg(RISCVCPU *cpu, KVMScratchCPU *kvmcpu) reg.addr = (uint64_t)&val; ret = ioctl(kvmcpu->cpufd, KVM_GET_ONE_REG, ®); if (ret != 0) { - error_report("Unable to read ISA_EXT KVM register %s, " - "error code: %s", multi_ext_cfg->name, - strerrorname_np(errno)); + error_report("Unable to read ISA_EXT KVM register %s: %s", + multi_ext_cfg->name, strerror(errno)); exit(EXIT_FAILURE); } diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index 62ab2be8b1..8df00b7df9 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -3221,6 +3221,7 @@ static DisasJumpType op_mov2e(DisasContext *s, DisasOps *o) { int b2 = get_field(s, b2); TCGv ar1 = tcg_temp_new_i64(); + int r1 = get_field(s, r1); o->out = o->in2; o->in2 = NULL; @@ -3244,7 +3245,7 @@ static DisasJumpType op_mov2e(DisasContext *s, DisasOps *o) break; } - tcg_gen_st32_i64(ar1, tcg_env, offsetof(CPUS390XState, aregs[1])); + tcg_gen_st32_i64(ar1, tcg_env, offsetof(CPUS390XState, aregs[r1])); return DISAS_NEXT; } diff --git a/target/xtensa/mmu_helper.c b/target/xtensa/mmu_helper.c index 12552a3347..2fda4e887c 100644 --- a/target/xtensa/mmu_helper.c +++ b/target/xtensa/mmu_helper.c @@ -224,22 +224,31 @@ static void split_tlb_entry_spec_way(const CPUXtensaState *env, uint32_t v, * Split TLB address into TLB way, entry index and VPN (with index). * See ISA, 4.6.5.5 - 4.6.5.8 for the TLB addressing format */ -static void split_tlb_entry_spec(CPUXtensaState *env, uint32_t v, bool dtlb, - uint32_t *vpn, uint32_t *wi, uint32_t *ei) +static bool split_tlb_entry_spec(CPUXtensaState *env, uint32_t v, bool dtlb, + uint32_t *vpn, uint32_t *wi, uint32_t *ei) { if (xtensa_option_enabled(env->config, XTENSA_OPTION_MMU)) { *wi = v & (dtlb ? 0xf : 0x7); - split_tlb_entry_spec_way(env, v, dtlb, vpn, *wi, ei); + if (*wi < (dtlb ? env->config->dtlb.nways : env->config->itlb.nways)) { + split_tlb_entry_spec_way(env, v, dtlb, vpn, *wi, ei); + return true; + } else { + return false; + } } else { *vpn = v & REGION_PAGE_MASK; *wi = 0; *ei = (v >> 29) & 0x7; + return true; } } static xtensa_tlb_entry *xtensa_tlb_get_entry(CPUXtensaState *env, bool dtlb, unsigned wi, unsigned ei) { + const xtensa_tlb *tlb = dtlb ? &env->config->dtlb : &env->config->itlb; + + assert(wi < tlb->nways && ei < tlb->way_size[wi]); return dtlb ? env->dtlb[wi] + ei : env->itlb[wi] + ei; @@ -252,11 +261,14 @@ static xtensa_tlb_entry *get_tlb_entry(CPUXtensaState *env, uint32_t wi; uint32_t ei; - split_tlb_entry_spec(env, v, dtlb, &vpn, &wi, &ei); - if (pwi) { - *pwi = wi; + if (split_tlb_entry_spec(env, v, dtlb, &vpn, &wi, &ei)) { + if (pwi) { + *pwi = wi; + } + return xtensa_tlb_get_entry(env, dtlb, wi, ei); + } else { + return NULL; } - return xtensa_tlb_get_entry(env, dtlb, wi, ei); } static void xtensa_tlb_set_entry_mmu(const CPUXtensaState *env, @@ -482,7 +494,12 @@ uint32_t HELPER(rtlb0)(CPUXtensaState *env, uint32_t v, uint32_t dtlb) if (xtensa_option_enabled(env->config, XTENSA_OPTION_MMU)) { uint32_t wi; const xtensa_tlb_entry *entry = get_tlb_entry(env, v, dtlb, &wi); - return (entry->vaddr & get_vpn_mask(env, dtlb, wi)) | entry->asid; + + if (entry) { + return (entry->vaddr & get_vpn_mask(env, dtlb, wi)) | entry->asid; + } else { + return 0; + } } else { return v & REGION_PAGE_MASK; } @@ -491,7 +508,12 @@ uint32_t HELPER(rtlb0)(CPUXtensaState *env, uint32_t v, uint32_t dtlb) uint32_t HELPER(rtlb1)(CPUXtensaState *env, uint32_t v, uint32_t dtlb) { const xtensa_tlb_entry *entry = get_tlb_entry(env, v, dtlb, NULL); - return entry->paddr | entry->attr; + + if (entry) { + return entry->paddr | entry->attr; + } else { + return 0; + } } void HELPER(itlb)(CPUXtensaState *env, uint32_t v, uint32_t dtlb) @@ -499,7 +521,7 @@ void HELPER(itlb)(CPUXtensaState *env, uint32_t v, uint32_t dtlb) if (xtensa_option_enabled(env->config, XTENSA_OPTION_MMU)) { uint32_t wi; xtensa_tlb_entry *entry = get_tlb_entry(env, v, dtlb, &wi); - if (entry->variable && entry->asid) { + if (entry && entry->variable && entry->asid) { tlb_flush_page(env_cpu(env), entry->vaddr); entry->asid = 0; } @@ -537,8 +559,9 @@ void HELPER(wtlb)(CPUXtensaState *env, uint32_t p, uint32_t v, uint32_t dtlb) uint32_t vpn; uint32_t wi; uint32_t ei; - split_tlb_entry_spec(env, v, dtlb, &vpn, &wi, &ei); - xtensa_tlb_set_entry(env, dtlb, wi, ei, vpn, p); + if (split_tlb_entry_spec(env, v, dtlb, &vpn, &wi, &ei)) { + xtensa_tlb_set_entry(env, dtlb, wi, ei, vpn, p); + } } /*! diff --git a/tcg/arm/tcg-target.c.inc b/tcg/arm/tcg-target.c.inc index fc78566494..a9aa8aa91c 100644 --- a/tcg/arm/tcg-target.c.inc +++ b/tcg/arm/tcg-target.c.inc @@ -1662,6 +1662,9 @@ static void tcg_out_qemu_st_direct(TCGContext *s, MemOp opc, TCGReg datalo, } else { tcg_out_strd_r(s, h.cond, datalo, h.base, h.index); } + } else if (h.index < 0) { + tcg_out_st32_12(s, h.cond, datalo, h.base, 0); + tcg_out_st32_12(s, h.cond, datahi, h.base, 4); } else if (h.index_scratch) { tcg_out_st32_rwb(s, h.cond, datalo, h.index, h.base); tcg_out_st32_12(s, h.cond, datahi, h.index, 4); diff --git a/tcg/ppc/tcg-target-con-set.h b/tcg/ppc/tcg-target-con-set.h index bbd7b21247..cb47b29452 100644 --- a/tcg/ppc/tcg-target-con-set.h +++ b/tcg/ppc/tcg-target-con-set.h @@ -35,7 +35,7 @@ C_O1_I3(v, v, v, v) C_O1_I4(r, r, ri, rZ, rZ) C_O1_I4(r, r, r, ri, ri) C_O2_I1(r, r, r) -C_O2_I1(o, m, r) +C_N1O1_I1(o, m, r) C_O2_I2(r, r, r, r) C_O2_I4(r, r, rI, rZM, r, r) C_O2_I4(r, r, r, r, rI, rZM) diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 856c3b18f5..54816967bc 100644 --- a/tcg/ppc/tcg-target.c.inc +++ b/tcg/ppc/tcg-target.c.inc @@ -2595,6 +2595,7 @@ static void tcg_out_qemu_ldst_i128(TCGContext *s, TCGReg datalo, TCGReg datahi, tcg_debug_assert(!need_bswap); tcg_debug_assert(datalo & 1); tcg_debug_assert(datahi == datalo - 1); + tcg_debug_assert(!is_ld || datahi != index); insn = is_ld ? LQ : STQ; tcg_out32(s, insn | TAI(datahi, index, 0)); } else { @@ -4071,7 +4072,7 @@ static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode op) case INDEX_op_qemu_ld_a32_i128: case INDEX_op_qemu_ld_a64_i128: - return C_O2_I1(o, m, r); + return C_N1O1_I1(o, m, r); case INDEX_op_qemu_st_a32_i128: case INDEX_op_qemu_st_a64_i128: return C_O0_I3(o, m, r); diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc index fbee43d3b0..7f6b84aa2c 100644 --- a/tcg/s390x/tcg-target.c.inc +++ b/tcg/s390x/tcg-target.c.inc @@ -683,7 +683,7 @@ static void tcg_out_insn_VRIc(TCGContext *s, S390Opcode op, tcg_debug_assert(is_vector_reg(v3)); tcg_out16(s, (op & 0xff00) | ((v1 & 0xf) << 4) | (v3 & 0xf)); tcg_out16(s, i2); - tcg_out16(s, (op & 0x00ff) | RXB(v1, 0, v3, 0) | (m4 << 12)); + tcg_out16(s, (op & 0x00ff) | RXB(v1, v3, 0, 0) | (m4 << 12)); } static void tcg_out_insn_VRRa(TCGContext *s, S390Opcode op, @@ -738,7 +738,7 @@ static void tcg_out_insn_VRSa(TCGContext *s, S390Opcode op, TCGReg v1, tcg_debug_assert(is_vector_reg(v3)); tcg_out16(s, (op & 0xff00) | ((v1 & 0xf) << 4) | (v3 & 0xf)); tcg_out16(s, b2 << 12 | d2); - tcg_out16(s, (op & 0x00ff) | RXB(v1, 0, v3, 0) | (m4 << 12)); + tcg_out16(s, (op & 0x00ff) | RXB(v1, v3, 0, 0) | (m4 << 12)); } static void tcg_out_insn_VRSb(TCGContext *s, S390Opcode op, TCGReg v1, @@ -762,7 +762,7 @@ static void tcg_out_insn_VRSc(TCGContext *s, S390Opcode op, TCGReg r1, tcg_debug_assert(is_vector_reg(v3)); tcg_out16(s, (op & 0xff00) | (r1 << 4) | (v3 & 0xf)); tcg_out16(s, b2 << 12 | d2); - tcg_out16(s, (op & 0x00ff) | RXB(0, 0, v3, 0) | (m4 << 12)); + tcg_out16(s, (op & 0x00ff) | RXB(0, v3, 0, 0) | (m4 << 12)); } static void tcg_out_insn_VRX(TCGContext *s, S390Opcode op, TCGReg v1, diff --git a/tcg/tcg.c b/tcg/tcg.c index 896a36caeb..e2c38f6d11 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -653,6 +653,7 @@ static void tcg_out_movext3(TCGContext *s, const TCGMovExtend *i1, #define C_O1_I4(O1, I1, I2, I3, I4) C_PFX5(c_o1_i4_, O1, I1, I2, I3, I4), #define C_N1_I2(O1, I1, I2) C_PFX3(c_n1_i2_, O1, I1, I2), +#define C_N1O1_I1(O1, O2, I1) C_PFX3(c_n1o1_i1_, O1, O2, I1), #define C_N2_I1(O1, O2, I1) C_PFX3(c_n2_i1_, O1, O2, I1), #define C_O2_I1(O1, O2, I1) C_PFX3(c_o2_i1_, O1, O2, I1), @@ -676,6 +677,7 @@ static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode); #undef C_O1_I3 #undef C_O1_I4 #undef C_N1_I2 +#undef C_N1O1_I1 #undef C_N2_I1 #undef C_O2_I1 #undef C_O2_I2 @@ -696,6 +698,7 @@ static TCGConstraintSetIndex tcg_target_op_def(TCGOpcode); #define C_O1_I4(O1, I1, I2, I3, I4) { .args_ct_str = { #O1, #I1, #I2, #I3, #I4 } }, #define C_N1_I2(O1, I1, I2) { .args_ct_str = { "&" #O1, #I1, #I2 } }, +#define C_N1O1_I1(O1, O2, I1) { .args_ct_str = { "&" #O1, #O2, #I1 } }, #define C_N2_I1(O1, O2, I1) { .args_ct_str = { "&" #O1, "&" #O2, #I1 } }, #define C_O2_I1(O1, O2, I1) { .args_ct_str = { #O1, #O2, #I1 } }, @@ -718,6 +721,7 @@ static const TCGTargetOpDef constraint_sets[] = { #undef C_O1_I3 #undef C_O1_I4 #undef C_N1_I2 +#undef C_N1O1_I1 #undef C_N2_I1 #undef C_O2_I1 #undef C_O2_I2 @@ -738,6 +742,7 @@ static const TCGTargetOpDef constraint_sets[] = { #define C_O1_I4(O1, I1, I2, I3, I4) C_PFX5(c_o1_i4_, O1, I1, I2, I3, I4) #define C_N1_I2(O1, I1, I2) C_PFX3(c_n1_i2_, O1, I1, I2) +#define C_N1O1_I1(O1, O2, I1) C_PFX3(c_n1o1_i1_, O1, O2, I1) #define C_N2_I1(O1, O2, I1) C_PFX3(c_n2_i1_, O1, O2, I1) #define C_O2_I1(O1, O2, I1) C_PFX3(c_o2_i1_, O1, O2, I1) @@ -2988,6 +2993,7 @@ static void process_op_defs(TCGContext *s) .pair = 2, .pair_index = o, .regs = def->args_ct[o].regs << 1, + .newreg = def->args_ct[o].newreg, }; def->args_ct[o].pair = 1; def->args_ct[o].pair_index = i; @@ -3004,6 +3010,7 @@ static void process_op_defs(TCGContext *s) .pair = 1, .pair_index = o, .regs = def->args_ct[o].regs >> 1, + .newreg = def->args_ct[o].newreg, }; def->args_ct[o].pair = 2; def->args_ct[o].pair_index = i; @@ -5036,17 +5043,21 @@ static void tcg_reg_alloc_op(TCGContext *s, const TCGOp *op) break; case 1: /* first of pair */ - tcg_debug_assert(!arg_ct->newreg); if (arg_ct->oalias) { reg = new_args[arg_ct->alias_index]; - break; + } else if (arg_ct->newreg) { + reg = tcg_reg_alloc_pair(s, arg_ct->regs, + i_allocated_regs | o_allocated_regs, + output_pref(op, k), + ts->indirect_base); + } else { + reg = tcg_reg_alloc_pair(s, arg_ct->regs, o_allocated_regs, + output_pref(op, k), + ts->indirect_base); } - reg = tcg_reg_alloc_pair(s, arg_ct->regs, o_allocated_regs, - output_pref(op, k), ts->indirect_base); break; case 2: /* second of pair */ - tcg_debug_assert(!arg_ct->newreg); if (arg_ct->oalias) { reg = new_args[arg_ct->alias_index]; } else { diff --git a/tests/avocado/acpi-bits.py b/tests/avocado/acpi-bits.py index 68b9e98d4e..efe4f52ee0 100644 --- a/tests/avocado/acpi-bits.py +++ b/tests/avocado/acpi-bits.py @@ -54,6 +54,8 @@ from avocado_qemu import QemuBaseTest deps = ["xorriso", "mformat"] # dependent tools needed in the test setup/box. supported_platforms = ['x86_64'] # supported test platforms. +# default timeout of 120 secs is sometimes not enough for bits test. +BITS_TIMEOUT = 200 def which(tool): """ looks up the full path for @tool, returns None if not found @@ -133,7 +135,7 @@ class AcpiBitsTest(QemuBaseTest): #pylint: disable=too-many-instance-attributes """ # in slower systems the test can take as long as 3 minutes to complete. - timeout = 200 + timeout = BITS_TIMEOUT def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) @@ -400,7 +402,8 @@ class AcpiBitsTest(QemuBaseTest): #pylint: disable=too-many-instance-attributes # biosbits has been configured to run all the specified test suites # in batch mode and then automatically initiate a vm shutdown. - # Rely on avocado's unit test timeout. - self._vm.event_wait('SHUTDOWN') + # Set timeout to BITS_TIMEOUT for SHUTDOWN event from bits VM at par + # with the avocado test timeout. + self._vm.event_wait('SHUTDOWN', timeout=BITS_TIMEOUT) self._vm.wait(timeout=None) self.parse_log() diff --git a/tests/data/acpi/virt/SSDT.memhp b/tests/data/acpi/virt/SSDT.memhp index 31ff6ac469..fb3dcde5a1 100644 Binary files a/tests/data/acpi/virt/SSDT.memhp and b/tests/data/acpi/virt/SSDT.memhp differ diff --git a/tests/qemu-iotests/060.out b/tests/qemu-iotests/060.out index 329977d9b9..a37bf446e9 100644 --- a/tests/qemu-iotests/060.out +++ b/tests/qemu-iotests/060.out @@ -421,8 +421,8 @@ QMP_VERSION {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_IMAGE_CORRUPTED", "data": {"device": "none0", "msg": "Preventing invalid write on metadata (overlaps with refcount table)", "offset": 65536, "node-name": "drive", "fatal": true, "size": 65536}} write failed: Input/output error {"return": ""} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} === Testing incoming inactive corrupted image === @@ -432,8 +432,8 @@ QMP_VERSION qcow2: Image is corrupt: L2 table offset 0x2a2a2a00 unaligned (L1 index: 0); further non-fatal corruption events will be suppressed {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_IMAGE_CORRUPTED", "data": {"device": "", "msg": "L2 table offset 0x2a2a2a00 unaligned (L1 index: 0)", "node-name": "drive", "fatal": false}} {"return": ""} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} corrupt: false *** done diff --git a/tests/qemu-iotests/071.out b/tests/qemu-iotests/071.out index bca0c02f5c..a2923b05c2 100644 --- a/tests/qemu-iotests/071.out +++ b/tests/qemu-iotests/071.out @@ -45,8 +45,8 @@ QMP_VERSION {"return": {}} read failed: Input/output error {"return": ""} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} === Testing blkverify on existing block device === @@ -84,9 +84,9 @@ wrote 512/512 bytes at offset 0 {"return": ""} read failed: Input/output error {"return": ""} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} QEMU_PROG: Failed to flush the L2 table cache: Input/output error QEMU_PROG: Failed to flush the refcount block cache: Input/output error +{"return": {}} *** done diff --git a/tests/qemu-iotests/081.out b/tests/qemu-iotests/081.out index 615c083549..aba85ea564 100644 --- a/tests/qemu-iotests/081.out +++ b/tests/qemu-iotests/081.out @@ -35,8 +35,8 @@ QMP_VERSION read 10485760/10485760 bytes at offset 0 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} == using quorum rewrite corrupted mode == @@ -67,8 +67,8 @@ QMP_VERSION read 10485760/10485760 bytes at offset 0 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} -- checking that the image has been corrected -- read 10485760/10485760 bytes at offset 0 @@ -106,8 +106,8 @@ QMP_VERSION {"return": {}} {"return": {}} {"return": {}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} Testing: QMP_VERSION @@ -115,8 +115,8 @@ QMP_VERSION {"return": {}} {"return": {}} {"error": {"class": "GenericError", "desc": "Cannot add a child to a quorum in blkverify mode"}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} == dynamically removing a child from a quorum == @@ -125,31 +125,31 @@ QMP_VERSION {"return": {}} {"return": {}} {"return": {}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} Testing: QMP_VERSION {"return": {}} {"return": {}} {"error": {"class": "GenericError", "desc": "The number of children cannot be lower than the vote threshold 2"}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} Testing: QMP_VERSION {"return": {}} {"error": {"class": "GenericError", "desc": "blkverify=on can only be set if there are exactly two files and vote-threshold is 2"}} {"error": {"class": "GenericError", "desc": "Cannot find device='drive0-quorum' nor node-name='drive0-quorum'"}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} Testing: QMP_VERSION {"return": {}} {"return": {}} {"error": {"class": "GenericError", "desc": "The number of children cannot be lower than the vote threshold 2"}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} *** done diff --git a/tests/qemu-iotests/087.out b/tests/qemu-iotests/087.out index e1c23a6983..97b6d8036d 100644 --- a/tests/qemu-iotests/087.out +++ b/tests/qemu-iotests/087.out @@ -7,8 +7,8 @@ Testing: QMP_VERSION {"return": {}} {"error": {"class": "GenericError", "desc": "'node-name' must be specified for the root node"}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} === Duplicate ID === @@ -18,8 +18,8 @@ QMP_VERSION {"return": {}} {"error": {"class": "GenericError", "desc": "node-name=disk is conflicting with a device id"}} {"error": {"class": "GenericError", "desc": "Duplicate nodes with node-name='test-node'"}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} === aio=native without O_DIRECT === @@ -28,8 +28,8 @@ Testing: QMP_VERSION {"return": {}} {"error": {"class": "GenericError", "desc": "aio=native was specified, but it requires cache.direct=on, which was not specified."}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} === Encrypted image QCow === @@ -40,8 +40,8 @@ QMP_VERSION {"return": {}} {"return": {}} {"error": {"class": "GenericError", "desc": "Use of AES-CBC encrypted IMGFMT images is no longer supported in system emulators"}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} === Encrypted image LUKS === @@ -52,8 +52,8 @@ QMP_VERSION {"return": {}} {"return": {}} {"return": {}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} === Missing driver === @@ -63,7 +63,7 @@ Testing: -S QMP_VERSION {"return": {}} {"error": {"class": "GenericError", "desc": "Parameter 'driver' is missing"}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} *** done diff --git a/tests/qemu-iotests/108.out b/tests/qemu-iotests/108.out index b5401d788d..b9c876b394 100644 --- a/tests/qemu-iotests/108.out +++ b/tests/qemu-iotests/108.out @@ -173,8 +173,8 @@ OK: Reftable is where we expect it {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "create"}} {"return": {}} { "execute": "quit" } -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} wrote 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) diff --git a/tests/qemu-iotests/109 b/tests/qemu-iotests/109 index e207a555f3..0fb580f9a5 100755 --- a/tests/qemu-iotests/109 +++ b/tests/qemu-iotests/109 @@ -57,13 +57,13 @@ run_qemu() _launch_qemu -drive file="${source_img}",format=raw,cache=${CACHEMODE},aio=${AIOMODE},id=src _send_qemu_cmd $QEMU_HANDLE "{ 'execute': 'qmp_capabilities' }" "return" - _send_qemu_cmd $QEMU_HANDLE \ + capture_events="$qmp_event" _send_qemu_cmd $QEMU_HANDLE \ "{'execute':'drive-mirror', 'arguments':{ 'device': 'src', 'target': '$raw_img', $qmp_format 'mode': 'existing', 'sync': 'full'}}" \ "return" - _send_qemu_cmd $QEMU_HANDLE '' "$qmp_event" + capture_events="$qmp_event JOB_STATUS_CHANGE" _wait_event $QEMU_HANDLE "$qmp_event" if test "$qmp_event" = BLOCK_JOB_ERROR; then _send_qemu_cmd $QEMU_HANDLE '' '"status": "null"' fi diff --git a/tests/qemu-iotests/109.out b/tests/qemu-iotests/109.out index 965c9a6a0a..3ae8552ff7 100644 --- a/tests/qemu-iotests/109.out +++ b/tests/qemu-iotests/109.out @@ -7,7 +7,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE { 'execute': 'qmp_capabilities' } {"return": {}} {'execute':'drive-mirror', 'arguments':{ - 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', + 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. @@ -23,8 +23,8 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed {"execute":"query-block-jobs"} {"return": []} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} read 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) { 'execute': 'qmp_capabilities' } @@ -35,12 +35,10 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 1024, "offset": 1024, "speed": 0, "type": "mirror"}} {"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 1024, "offset": 1024, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror", "actively-synced": false}]} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "standby", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} @@ -50,6 +48,7 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "src", "len": 1024, "offset": 1024, "speed": 0, "type": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"return": {}} Images are identical. === Writing a qcow2 header into raw === @@ -59,7 +58,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE { 'execute': 'qmp_capabilities' } {"return": {}} {'execute':'drive-mirror', 'arguments':{ - 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', + 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. @@ -75,8 +74,8 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed {"execute":"query-block-jobs"} {"return": []} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} read 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) { 'execute': 'qmp_capabilities' } @@ -87,12 +86,10 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 197120, "offset": 197120, "speed": 0, "type": "mirror"}} {"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 197120, "offset": 197120, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror", "actively-synced": false}]} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "standby", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} @@ -102,6 +99,7 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "src", "len": 197120, "offset": 197120, "speed": 0, "type": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"return": {}} Images are identical. === Writing a qed header into raw === @@ -111,7 +109,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE { 'execute': 'qmp_capabilities' } {"return": {}} {'execute':'drive-mirror', 'arguments':{ - 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', + 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. @@ -127,8 +125,8 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed {"execute":"query-block-jobs"} {"return": []} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} read 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) { 'execute': 'qmp_capabilities' } @@ -139,12 +137,10 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 327680, "offset": 327680, "speed": 0, "type": "mirror"}} {"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 327680, "offset": 327680, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror", "actively-synced": false}]} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "standby", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} @@ -154,6 +150,7 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "src", "len": 327680, "offset": 327680, "speed": 0, "type": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"return": {}} Images are identical. === Writing a vdi header into raw === @@ -163,7 +160,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE { 'execute': 'qmp_capabilities' } {"return": {}} {'execute':'drive-mirror', 'arguments':{ - 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', + 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. @@ -179,8 +176,8 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed {"execute":"query-block-jobs"} {"return": []} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} read 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) { 'execute': 'qmp_capabilities' } @@ -191,12 +188,10 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 1024, "offset": 1024, "speed": 0, "type": "mirror"}} {"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 1024, "offset": 1024, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror", "actively-synced": false}]} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "standby", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} @@ -206,6 +201,7 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "src", "len": 1024, "offset": 1024, "speed": 0, "type": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"return": {}} Images are identical. === Writing a vmdk header into raw === @@ -215,7 +211,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE { 'execute': 'qmp_capabilities' } {"return": {}} {'execute':'drive-mirror', 'arguments':{ - 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', + 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. @@ -231,8 +227,8 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed {"execute":"query-block-jobs"} {"return": []} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} read 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) { 'execute': 'qmp_capabilities' } @@ -243,12 +239,10 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 65536, "offset": 65536, "speed": 0, "type": "mirror"}} {"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 65536, "offset": 65536, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror", "actively-synced": false}]} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "standby", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} @@ -258,6 +252,7 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "src", "len": 65536, "offset": 65536, "speed": 0, "type": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"return": {}} Images are identical. === Writing a vpc header into raw === @@ -267,7 +262,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE { 'execute': 'qmp_capabilities' } {"return": {}} {'execute':'drive-mirror', 'arguments':{ - 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', + 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. @@ -283,8 +278,8 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed {"execute":"query-block-jobs"} {"return": []} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} read 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) { 'execute': 'qmp_capabilities' } @@ -295,12 +290,10 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 2560, "offset": 2560, "speed": 0, "type": "mirror"}} {"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 2560, "offset": 2560, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror", "actively-synced": false}]} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "standby", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} @@ -310,6 +303,7 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "src", "len": 2560, "offset": 2560, "speed": 0, "type": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"return": {}} Images are identical. === Copying sample image empty.bochs into raw === @@ -318,7 +312,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE { 'execute': 'qmp_capabilities' } {"return": {}} {'execute':'drive-mirror', 'arguments':{ - 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', + 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. @@ -334,8 +328,8 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed {"execute":"query-block-jobs"} {"return": []} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} read 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) { 'execute': 'qmp_capabilities' } @@ -346,12 +340,10 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 2560, "offset": 2560, "speed": 0, "type": "mirror"}} {"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 2560, "offset": 2560, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror", "actively-synced": false}]} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "standby", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} @@ -361,6 +353,7 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "src", "len": 2560, "offset": 2560, "speed": 0, "type": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"return": {}} Images are identical. === Copying sample image iotest-dirtylog-10G-4M.vhdx into raw === @@ -369,7 +362,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE { 'execute': 'qmp_capabilities' } {"return": {}} {'execute':'drive-mirror', 'arguments':{ - 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', + 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. @@ -385,8 +378,8 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed {"execute":"query-block-jobs"} {"return": []} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} read 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) { 'execute': 'qmp_capabilities' } @@ -397,12 +390,10 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 31457280, "offset": 31457280, "speed": 0, "type": "mirror"}} {"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 31457280, "offset": 31457280, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror", "actively-synced": false}]} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "standby", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} @@ -412,6 +403,7 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "src", "len": 31457280, "offset": 31457280, "speed": 0, "type": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"return": {}} Images are identical. === Copying sample image parallels-v1 into raw === @@ -420,7 +412,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE { 'execute': 'qmp_capabilities' } {"return": {}} {'execute':'drive-mirror', 'arguments':{ - 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', + 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. @@ -436,8 +428,8 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed {"execute":"query-block-jobs"} {"return": []} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} read 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) { 'execute': 'qmp_capabilities' } @@ -448,12 +440,10 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 327680, "offset": 327680, "speed": 0, "type": "mirror"}} {"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 327680, "offset": 327680, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror", "actively-synced": false}]} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "standby", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} @@ -463,6 +453,7 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "src", "len": 327680, "offset": 327680, "speed": 0, "type": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"return": {}} Images are identical. === Copying sample image simple-pattern.cloop into raw === @@ -471,7 +462,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE { 'execute': 'qmp_capabilities' } {"return": {}} {'execute':'drive-mirror', 'arguments':{ - 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', + 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. @@ -487,8 +478,8 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed {"execute":"query-block-jobs"} {"return": []} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} read 512/512 bytes at offset 0 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) { 'execute': 'qmp_capabilities' } @@ -499,12 +490,10 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 2048, "offset": 2048, "speed": 0, "type": "mirror"}} {"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 2048, "offset": 2048, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror", "actively-synced": false}]} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "standby", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} @@ -514,6 +503,7 @@ read 512/512 bytes at offset 0 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "src", "len": 2048, "offset": 2048, "speed": 0, "type": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"return": {}} Images are identical. === Write legitimate MBR into raw === @@ -522,7 +512,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=SIZE { 'execute': 'qmp_capabilities' } {"return": {}} {'execute':'drive-mirror', 'arguments':{ - 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', + 'device': 'src', 'target': 'TEST_DIR/t.IMGFMT', 'mode': 'existing', 'sync': 'full'}} WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. @@ -530,12 +520,10 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 512, "offset": 512, "speed": 0, "type": "mirror"}} {"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 512, "offset": 512, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror", "actively-synced": false}]} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "standby", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} @@ -545,6 +533,7 @@ WARNING: Image format was not specified for 'TEST_DIR/t.raw' and probing guessed {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "src", "len": 512, "offset": 512, "speed": 0, "type": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"return": {}} Images are identical. { 'execute': 'qmp_capabilities' } {"return": {}} @@ -554,12 +543,10 @@ Images are identical. {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "src"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "src", "len": 512, "offset": 512, "speed": 0, "type": "mirror"}} {"execute":"query-block-jobs"} {"return": [{"auto-finalize": true, "io-status": "ok", "device": "src", "auto-dismiss": true, "busy": false, "len": 512, "offset": 512, "status": "ready", "paused": false, "speed": 0, "ready": true, "type": "mirror", "actively-synced": false}]} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "standby", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "src"}} @@ -569,5 +556,6 @@ Images are identical. {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "src", "len": 512, "offset": 512, "speed": 0, "type": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "src"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "src"}} +{"return": {}} Images are identical. *** done diff --git a/tests/qemu-iotests/117.out b/tests/qemu-iotests/117.out index 735ffd25c6..1cea9e0217 100644 --- a/tests/qemu-iotests/117.out +++ b/tests/qemu-iotests/117.out @@ -18,8 +18,8 @@ wrote 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} { 'execute': 'quit' } -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} No errors were found on the image. read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) diff --git a/tests/qemu-iotests/120.out b/tests/qemu-iotests/120.out index 0744c1f136..35d84a5bc5 100644 --- a/tests/qemu-iotests/120.out +++ b/tests/qemu-iotests/120.out @@ -5,8 +5,8 @@ QMP_VERSION wrote 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {"return": ""} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) read 65536/65536 bytes at offset 0 diff --git a/tests/qemu-iotests/127.out b/tests/qemu-iotests/127.out index 1685c4850a..dd8c4a8aa9 100644 --- a/tests/qemu-iotests/127.out +++ b/tests/qemu-iotests/127.out @@ -28,6 +28,6 @@ wrote 42/42 bytes at offset 0 { 'execute': 'quit' } {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "mirror"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "mirror"}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} *** done diff --git a/tests/qemu-iotests/140.out b/tests/qemu-iotests/140.out index 312f76d5da..32866440ae 100644 --- a/tests/qemu-iotests/140.out +++ b/tests/qemu-iotests/140.out @@ -19,6 +19,6 @@ read 65536/65536 bytes at offset 0 qemu-io: can't open device nbd+unix:///drv?socket=SOCK_DIR/nbd: Requested export not available server reported: export 'drv' not present { 'execute': 'quit' } -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} *** done diff --git a/tests/qemu-iotests/141 b/tests/qemu-iotests/141 index a37030ee17..a7d3985a02 100755 --- a/tests/qemu-iotests/141 +++ b/tests/qemu-iotests/141 @@ -1,9 +1,12 @@ -#!/usr/bin/env bash +#!/usr/bin/env python3 # group: rw auto quick # # Test case for ejecting BDSs with block jobs still running on them # -# Copyright (C) 2016 Red Hat, Inc. +# Originally written in bash by Hanna Czenczek, ported to Python by Stefan +# Hajnoczi. +# +# Copyright Red Hat # # 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 @@ -19,177 +22,129 @@ # along with this program. If not, see . # -# creator -owner=hreitz@redhat.com +import iotests -seq="$(basename $0)" -echo "QA output created by $seq" - -status=1 # failure is the default! - -_cleanup() -{ - _cleanup_qemu - _cleanup_test_img - for img in "$TEST_DIR"/{b,m,o}.$IMGFMT; do - _rm_test_img "$img" - done -} -trap "_cleanup; exit \$status" 0 1 2 3 15 - -# get standard environment, filters and checks -. ./common.rc -. ./common.filter -. ./common.qemu - -# Needs backing file and backing format support -_supported_fmt qcow2 qed -_supported_proto file -_supported_os Linux +# Common filters to mask values that vary in the test output +QMP_FILTERS = [iotests.filter_qmp_testfiles, \ + iotests.filter_qmp_imgfmt] -test_blockjob() -{ - _send_qemu_cmd $QEMU_HANDLE \ - "{'execute': 'blockdev-add', - 'arguments': { - 'node-name': 'drv0', - 'driver': '$IMGFMT', - 'file': { - 'driver': 'file', - 'filename': '$TEST_IMG' - }}}" \ - 'return' +class TestCase: + def __init__(self, name, vm, image_path, cancel_event): + self.name = name + self.vm = vm + self.image_path = image_path + self.cancel_event = cancel_event - # If "$2" is an event, we may or may not see it before the - # {"return": {}}. Therefore, filter the {"return": {}} out both - # here and in the next command. (Naturally, if we do not see it - # here, we will see it before the next command can be executed, - # so it will appear in the next _send_qemu_cmd's output.) - _send_qemu_cmd $QEMU_HANDLE \ - "$1" \ - "$2" \ - | _filter_img_create | _filter_qmp_empty_return + def __enter__(self): + iotests.log(f'=== Testing {self.name} ===') + self.vm.qmp_log('blockdev-add', \ + node_name='drv0', \ + driver=iotests.imgfmt, \ + file={'driver': 'file', 'filename': self.image_path}, \ + filters=QMP_FILTERS) - # We want this to return an error because the block job is still running - _send_qemu_cmd $QEMU_HANDLE \ - "{'execute': 'blockdev-del', - 'arguments': {'node-name': 'drv0'}}" \ - 'error' | _filter_generated_node_ids | _filter_qmp_empty_return + def __exit__(self, *exc_details): + # This is expected to fail because the job still exists + self.vm.qmp_log('blockdev-del', node_name='drv0', \ + filters=[iotests.filter_qmp_generated_node_ids]) - _send_qemu_cmd $QEMU_HANDLE \ - "{'execute': 'block-job-cancel', - 'arguments': {'device': 'job0'}}" \ - "$3" + self.vm.qmp_log('block-job-cancel', device='job0') + event = self.vm.event_wait(self.cancel_event) + iotests.log(event, filters=[iotests.filter_qmp_event]) - _send_qemu_cmd $QEMU_HANDLE \ - "{'execute': 'blockdev-del', - 'arguments': {'node-name': 'drv0'}}" \ - 'return' -} + # This time it succeeds + self.vm.qmp_log('blockdev-del', node_name='drv0') + + # Separate test cases in output + iotests.log('') -TEST_IMG="$TEST_DIR/b.$IMGFMT" _make_test_img 1M -TEST_IMG="$TEST_DIR/m.$IMGFMT" _make_test_img -b "$TEST_DIR/b.$IMGFMT" -F $IMGFMT 1M -_make_test_img -b "$TEST_DIR/m.$IMGFMT" 1M -F $IMGFMT +def main() -> None: + with iotests.FilePath('bottom', 'middle', 'top', 'target') as \ + (bottom_path, middle_path, top_path, target_path), \ + iotests.VM() as vm: -_launch_qemu -nodefaults + iotests.log('Creating bottom <- middle <- top backing file chain...') + IMAGE_SIZE='1M' + iotests.qemu_img_create('-f', iotests.imgfmt, bottom_path, IMAGE_SIZE) + iotests.qemu_img_create('-f', iotests.imgfmt, \ + '-F', iotests.imgfmt, \ + '-b', bottom_path, \ + middle_path, \ + IMAGE_SIZE) + iotests.qemu_img_create('-f', iotests.imgfmt, \ + '-F', iotests.imgfmt, \ + '-b', middle_path, \ + top_path, \ + IMAGE_SIZE) -_send_qemu_cmd $QEMU_HANDLE \ - "{'execute': 'qmp_capabilities'}" \ - 'return' + iotests.log('Starting VM...') + vm.add_args('-nodefaults') + vm.launch() -echo -echo '=== Testing drive-backup ===' -echo + # drive-backup will not send BLOCK_JOB_READY by itself, and cancelling + # the job will consequently result in BLOCK_JOB_CANCELLED being + # emitted. + with TestCase('drive-backup', vm, top_path, 'BLOCK_JOB_CANCELLED'): + vm.qmp_log('drive-backup', \ + job_id='job0', \ + device='drv0', \ + target=target_path, \ + format=iotests.imgfmt, \ + sync='none', \ + filters=QMP_FILTERS) -# drive-backup will not send BLOCK_JOB_READY by itself, and cancelling the job -# will consequently result in BLOCK_JOB_CANCELLED being emitted. + # drive-mirror will send BLOCK_JOB_READY basically immediately, and + # cancelling the job will consequently result in BLOCK_JOB_COMPLETED + # being emitted. + with TestCase('drive-mirror', vm, top_path, 'BLOCK_JOB_COMPLETED'): + vm.qmp_log('drive-mirror', \ + job_id='job0', \ + device='drv0', \ + target=target_path, \ + format=iotests.imgfmt, \ + sync='none', \ + filters=QMP_FILTERS) + event = vm.event_wait('BLOCK_JOB_READY') + assert event is not None # silence mypy + iotests.log(event, filters=[iotests.filter_qmp_event]) -test_blockjob \ - "{'execute': 'drive-backup', - 'arguments': {'job-id': 'job0', - 'device': 'drv0', - 'target': '$TEST_DIR/o.$IMGFMT', - 'format': '$IMGFMT', - 'sync': 'none'}}" \ - 'return' \ - '"status": "null"' + # An active block-commit will send BLOCK_JOB_READY basically + # immediately, and cancelling the job will consequently result in + # BLOCK_JOB_COMPLETED being emitted. + with TestCase('active block-commit', vm, top_path, \ + 'BLOCK_JOB_COMPLETED'): + vm.qmp_log('block-commit', \ + job_id='job0', \ + device='drv0') + event = vm.event_wait('BLOCK_JOB_READY') + assert event is not None # silence mypy + iotests.log(event, filters=[iotests.filter_qmp_event]) -echo -echo '=== Testing drive-mirror ===' -echo + # Give block-commit something to work on, otherwise it would be done + # immediately, send a BLOCK_JOB_COMPLETED and ejecting the BDS would + # work just fine without the block job still running. + iotests.qemu_io(middle_path, '-c', f'write 0 {IMAGE_SIZE}') + with TestCase('non-active block-commit', vm, top_path, \ + 'BLOCK_JOB_CANCELLED'): + vm.qmp_log('block-commit', \ + job_id='job0', \ + device='drv0', \ + top=middle_path, \ + speed=1, \ + filters=[iotests.filter_qmp_testfiles]) -# drive-mirror will send BLOCK_JOB_READY basically immediately, and cancelling -# the job will consequently result in BLOCK_JOB_COMPLETED being emitted. + # Give block-stream something to work on, otherwise it would be done + # immediately, send a BLOCK_JOB_COMPLETED and ejecting the BDS would + # work just fine without the block job still running. + iotests.qemu_io(bottom_path, '-c', f'write 0 {IMAGE_SIZE}') + with TestCase('block-stream', vm, top_path, 'BLOCK_JOB_CANCELLED'): + vm.qmp_log('block-stream', \ + job_id='job0', \ + device='drv0', \ + speed=1) -test_blockjob \ - "{'execute': 'drive-mirror', - 'arguments': {'job-id': 'job0', - 'device': 'drv0', - 'target': '$TEST_DIR/o.$IMGFMT', - 'format': '$IMGFMT', - 'sync': 'none'}}" \ - 'BLOCK_JOB_READY' \ - '"status": "null"' - -echo -echo '=== Testing active block-commit ===' -echo - -# An active block-commit will send BLOCK_JOB_READY basically immediately, and -# cancelling the job will consequently result in BLOCK_JOB_COMPLETED being -# emitted. - -test_blockjob \ - "{'execute': 'block-commit', - 'arguments': {'job-id': 'job0', 'device': 'drv0'}}" \ - 'BLOCK_JOB_READY' \ - '"status": "null"' - -echo -echo '=== Testing non-active block-commit ===' -echo - -# Give block-commit something to work on, otherwise it would be done -# immediately, send a BLOCK_JOB_COMPLETED and ejecting the BDS would work just -# fine without the block job still running. - -$QEMU_IO -c 'write 0 1M' "$TEST_DIR/m.$IMGFMT" | _filter_qemu_io - -test_blockjob \ - "{'execute': 'block-commit', - 'arguments': {'job-id': 'job0', - 'device': 'drv0', - 'top': '$TEST_DIR/m.$IMGFMT', - 'speed': 1}}" \ - 'return' \ - '"status": "null"' - -echo -echo '=== Testing block-stream ===' -echo - -# Give block-stream something to work on, otherwise it would be done -# immediately, send a BLOCK_JOB_COMPLETED and ejecting the BDS would work just -# fine without the block job still running. - -$QEMU_IO -c 'write 0 1M' "$TEST_DIR/b.$IMGFMT" | _filter_qemu_io - -# With some data to stream (and @speed set to 1), block-stream will not complete -# until we send the block-job-cancel command. - -test_blockjob \ - "{'execute': 'block-stream', - 'arguments': {'job-id': 'job0', - 'device': 'drv0', - 'speed': 1}}" \ - 'return' \ - '"status": "null"' - -_cleanup_qemu - -# success, all done -echo "*** done" -rm -f $seq.full -status=0 +if __name__ == '__main__': + iotests.script_main(main, supported_fmts=['qcow2', 'qed'], + supported_protocols=['file']) diff --git a/tests/qemu-iotests/141.out b/tests/qemu-iotests/141.out index 63203d9944..91b7ba50af 100644 --- a/tests/qemu-iotests/141.out +++ b/tests/qemu-iotests/141.out @@ -1,179 +1,69 @@ -QA output created by 141 -Formatting 'TEST_DIR/b.IMGFMT', fmt=IMGFMT size=1048576 -Formatting 'TEST_DIR/m.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/b.IMGFMT backing_fmt=IMGFMT -Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/m.IMGFMT backing_fmt=IMGFMT -{'execute': 'qmp_capabilities'} -{"return": {}} - +Creating bottom <- middle <- top backing file chain... +Starting VM... === Testing drive-backup === - -{'execute': 'blockdev-add', - 'arguments': { - 'node-name': 'drv0', - 'driver': 'IMGFMT', - 'file': { - 'driver': 'file', - 'filename': 'TEST_DIR/t.IMGFMT' - }}} +{"execute": "blockdev-add", "arguments": {"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top"}, "node-name": "drv0"}} {"return": {}} -{'execute': 'drive-backup', -'arguments': {'job-id': 'job0', -'device': 'drv0', -'target': 'TEST_DIR/o.IMGFMT', -'format': 'IMGFMT', -'sync': 'none'}} -Formatting 'TEST_DIR/o.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/t.IMGFMT backing_fmt=IMGFMT -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "paused", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}} -{'execute': 'blockdev-del', - 'arguments': {'node-name': 'drv0'}} +{"execute": "drive-backup", "arguments": {"device": "drv0", "format": "IMGFMT", "job-id": "job0", "sync": "none", "target": "TEST_DIR/PID-target"}} +{"return": {}} +{"execute": "blockdev-del", "arguments": {"node-name": "drv0"}} {"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: node is used as backing hd of 'NODE_NAME'"}} -{'execute': 'block-job-cancel', - 'arguments': {'device': 'job0'}} +{"execute": "block-job-cancel", "arguments": {"device": "job0"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "job0", "len": 1048576, "offset": 0, "speed": 0, "type": "backup"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}} -{'execute': 'blockdev-del', - 'arguments': {'node-name': 'drv0'}} +{"data": {"device": "job0", "len": 1048576, "offset": 0, "speed": 0, "type": "backup"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "blockdev-del", "arguments": {"node-name": "drv0"}} {"return": {}} === Testing drive-mirror === - -{'execute': 'blockdev-add', - 'arguments': { - 'node-name': 'drv0', - 'driver': 'IMGFMT', - 'file': { - 'driver': 'file', - 'filename': 'TEST_DIR/t.IMGFMT' - }}} +{"execute": "blockdev-add", "arguments": {"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top"}, "node-name": "drv0"}} {"return": {}} -{'execute': 'drive-mirror', -'arguments': {'job-id': 'job0', -'device': 'drv0', -'target': 'TEST_DIR/o.IMGFMT', -'format': 'IMGFMT', -'sync': 'none'}} -Formatting 'TEST_DIR/o.IMGFMT', fmt=IMGFMT size=1048576 backing_file=TEST_DIR/t.IMGFMT backing_fmt=IMGFMT -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "mirror"}} -{'execute': 'blockdev-del', - 'arguments': {'node-name': 'drv0'}} +{"execute": "drive-mirror", "arguments": {"device": "drv0", "format": "IMGFMT", "job-id": "job0", "sync": "none", "target": "TEST_DIR/PID-target"}} +{"return": {}} +{"data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "mirror"}, "event": "BLOCK_JOB_READY", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "blockdev-del", "arguments": {"node-name": "drv0"}} {"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: block device is in use by block job: mirror"}} -{'execute': 'block-job-cancel', - 'arguments': {'device': 'job0'}} +{"execute": "block-job-cancel", "arguments": {"device": "job0"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "mirror"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}} -{'execute': 'blockdev-del', - 'arguments': {'node-name': 'drv0'}} +{"data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "mirror"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "blockdev-del", "arguments": {"node-name": "drv0"}} {"return": {}} === Testing active block-commit === - -{'execute': 'blockdev-add', - 'arguments': { - 'node-name': 'drv0', - 'driver': 'IMGFMT', - 'file': { - 'driver': 'file', - 'filename': 'TEST_DIR/t.IMGFMT' - }}} +{"execute": "blockdev-add", "arguments": {"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top"}, "node-name": "drv0"}} {"return": {}} -{'execute': 'block-commit', -'arguments': {'job-id': 'job0', 'device': 'drv0'}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "ready", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_READY", "data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}} -{'execute': 'blockdev-del', - 'arguments': {'node-name': 'drv0'}} +{"execute": "block-commit", "arguments": {"device": "drv0", "job-id": "job0"}} +{"return": {}} +{"data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_READY", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "blockdev-del", "arguments": {"node-name": "drv0"}} {"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: block device is in use by block job: commit"}} -{'execute': 'block-job-cancel', - 'arguments': {'device': 'job0'}} +{"execute": "block-job-cancel", "arguments": {"device": "job0"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}} -{'execute': 'blockdev-del', - 'arguments': {'node-name': 'drv0'}} +{"data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "blockdev-del", "arguments": {"node-name": "drv0"}} {"return": {}} === Testing non-active block-commit === - -wrote 1048576/1048576 bytes at offset 0 -1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -{'execute': 'blockdev-add', - 'arguments': { - 'node-name': 'drv0', - 'driver': 'IMGFMT', - 'file': { - 'driver': 'file', - 'filename': 'TEST_DIR/t.IMGFMT' - }}} +{"execute": "blockdev-add", "arguments": {"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top"}, "node-name": "drv0"}} {"return": {}} -{'execute': 'block-commit', -'arguments': {'job-id': 'job0', -'device': 'drv0', -'top': 'TEST_DIR/m.IMGFMT', -'speed': 1}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}} -{'execute': 'blockdev-del', - 'arguments': {'node-name': 'drv0'}} +{"execute": "block-commit", "arguments": {"device": "drv0", "job-id": "job0", "speed": 1, "top": "TEST_DIR/PID-middle"}} +{"return": {}} +{"execute": "blockdev-del", "arguments": {"node-name": "drv0"}} {"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: block device is in use by block job: commit"}} -{'execute': 'block-job-cancel', - 'arguments': {'device': 'job0'}} +{"execute": "block-job-cancel", "arguments": {"device": "job0"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "job0", "len": 1048576, "offset": 524288, "speed": 1, "type": "commit"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}} -{'execute': 'blockdev-del', - 'arguments': {'node-name': 'drv0'}} +{"data": {"device": "job0", "len": 1048576, "offset": 524288, "speed": 1, "type": "commit"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "blockdev-del", "arguments": {"node-name": "drv0"}} {"return": {}} === Testing block-stream === - -wrote 1048576/1048576 bytes at offset 0 -1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -{'execute': 'blockdev-add', - 'arguments': { - 'node-name': 'drv0', - 'driver': 'IMGFMT', - 'file': { - 'driver': 'file', - 'filename': 'TEST_DIR/t.IMGFMT' - }}} +{"execute": "blockdev-add", "arguments": {"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top"}, "node-name": "drv0"}} {"return": {}} -{'execute': 'block-stream', -'arguments': {'job-id': 'job0', -'device': 'drv0', -'speed': 1}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "job0"}} -{'execute': 'blockdev-del', - 'arguments': {'node-name': 'drv0'}} +{"execute": "block-stream", "arguments": {"device": "drv0", "job-id": "job0", "speed": 1}} +{"return": {}} +{"execute": "blockdev-del", "arguments": {"node-name": "drv0"}} {"error": {"class": "GenericError", "desc": "Node 'drv0' is busy: block device is in use by block job: stream"}} -{'execute': 'block-job-cancel', - 'arguments': {'device': 'job0'}} +{"execute": "block-job-cancel", "arguments": {"device": "job0"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "job0", "len": 1048576, "offset": 524288, "speed": 1, "type": "stream"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}} -{'execute': 'blockdev-del', - 'arguments': {'node-name': 'drv0'}} +{"data": {"device": "job0", "len": 1048576, "offset": 524288, "speed": 1, "type": "stream"}, "event": "BLOCK_JOB_CANCELLED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} +{"execute": "blockdev-del", "arguments": {"node-name": "drv0"}} {"return": {}} -*** done + diff --git a/tests/qemu-iotests/143.out b/tests/qemu-iotests/143.out index 9ec5888e0e..d6afa32abc 100644 --- a/tests/qemu-iotests/143.out +++ b/tests/qemu-iotests/143.out @@ -10,6 +10,6 @@ server reported: export 'no_such_export' not present qemu-io: can't open device nbd+unix:///aa--aa1?socket=SOCK_DIR/nbd: Requested export not available server reported: export 'aa--aa...' not present { 'execute': 'quit' } -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} *** done diff --git a/tests/qemu-iotests/156.out b/tests/qemu-iotests/156.out index 4a22f0c41a..07e5e83f5d 100644 --- a/tests/qemu-iotests/156.out +++ b/tests/qemu-iotests/156.out @@ -72,8 +72,8 @@ read 65536/65536 bytes at offset 196608 {"return": ""} { 'execute': 'quit' } -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} read 65536/65536 bytes at offset 0 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) diff --git a/tests/qemu-iotests/162.out b/tests/qemu-iotests/162.out index f8714cb0d2..2793aed277 100644 --- a/tests/qemu-iotests/162.out +++ b/tests/qemu-iotests/162.out @@ -1,7 +1,7 @@ QA output created by 162 === NBD === -qemu-img: Could not open 'json:{"driver": "nbd", "host": -1}': address resolution failed for -1:10809: Name or service not known +qemu-img: Could not open 'json:{"driver": "nbd", "host": 42}': Failed to connect socket: Network is unreachable image: nbd://localhost:PORT image: nbd+unix://?socket=42 diff --git a/tests/qemu-iotests/176.out b/tests/qemu-iotests/176.out index 9d09b60452..45e9153ef3 100644 --- a/tests/qemu-iotests/176.out +++ b/tests/qemu-iotests/176.out @@ -169,8 +169,8 @@ QMP_VERSION {"return": {}} {"return": {}} {"return": {}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} wrote 196608/196608 bytes at offset 2147287040 192 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 131072/131072 bytes at offset 2147352576 @@ -206,8 +206,8 @@ QMP_VERSION {"return": {}} {"return": {}} {"return": {"sha256": HASH}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} === Test pass bitmap.1 === @@ -218,8 +218,8 @@ QMP_VERSION {"return": {}} {"return": {}} {"return": {}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} wrote 196608/196608 bytes at offset 2147287040 192 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 131072/131072 bytes at offset 2147352576 @@ -256,8 +256,8 @@ QMP_VERSION {"return": {}} {"return": {}} {"return": {"sha256": HASH}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} === Test pass bitmap.2 === @@ -268,8 +268,8 @@ QMP_VERSION {"return": {}} {"return": {}} {"return": {}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} wrote 196608/196608 bytes at offset 2147287040 192 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 131072/131072 bytes at offset 2147352576 @@ -306,8 +306,8 @@ QMP_VERSION {"return": {}} {"return": {}} {"return": {"sha256": HASH}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} === Test pass bitmap.3 === @@ -318,8 +318,8 @@ QMP_VERSION {"return": {}} {"return": {}} {"return": {}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} wrote 196608/196608 bytes at offset 2147287040 192 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) wrote 131072/131072 bytes at offset 2147352576 @@ -353,6 +353,6 @@ QMP_VERSION {"return": {}} {"return": {}} {"return": {"sha256": HASH}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} *** done diff --git a/tests/qemu-iotests/182.out b/tests/qemu-iotests/182.out index 57f7265458..83fc1a4797 100644 --- a/tests/qemu-iotests/182.out +++ b/tests/qemu-iotests/182.out @@ -53,6 +53,6 @@ Formatting 'TEST_DIR/t.qcow2.overlay', fmt=qcow2 cluster_size=65536 extended_l2= {'execute': 'qmp_capabilities'} {"return": {}} {'execute': 'quit'} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} *** done diff --git a/tests/qemu-iotests/183.out b/tests/qemu-iotests/183.out index fd9c2e52a5..51aa41c888 100644 --- a/tests/qemu-iotests/183.out +++ b/tests/qemu-iotests/183.out @@ -53,11 +53,11 @@ wrote 65536/65536 bytes at offset 1048576 === Shut down and check image === {"execute":"quit"} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"return": {}} {"execute":"quit"} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"return": {}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} No errors were found on the image. No errors were found on the image. wrote 65536/65536 bytes at offset 1048576 diff --git a/tests/qemu-iotests/184.out b/tests/qemu-iotests/184.out index 77e5489d65..e8f631f853 100644 --- a/tests/qemu-iotests/184.out +++ b/tests/qemu-iotests/184.out @@ -89,10 +89,6 @@ Testing: "return": [ ] } -{ - "return": { - } -} { "timestamp": { "seconds": TIMESTAMP, @@ -104,6 +100,10 @@ Testing: "reason": "host-qmp-quit" } } +{ + "return": { + } +} == property changes in ThrottleGroup == @@ -169,10 +169,6 @@ Testing: "iops-total-max": 0 } } -{ - "return": { - } -} { "timestamp": { "seconds": TIMESTAMP, @@ -184,6 +180,10 @@ Testing: "reason": "host-qmp-quit" } } +{ + "return": { + } +} == object creation/set errors == @@ -211,10 +211,6 @@ Testing: "desc": "bps/iops/max total values and read/write values cannot be used at the same time" } } -{ - "return": { - } -} { "timestamp": { "seconds": TIMESTAMP, @@ -226,6 +222,10 @@ Testing: "reason": "host-qmp-quit" } } +{ + "return": { + } +} == don't specify group == @@ -247,10 +247,6 @@ Testing: "desc": "Parameter 'throttle-group' is missing" } } -{ - "return": { - } -} { "timestamp": { "seconds": TIMESTAMP, @@ -262,6 +258,10 @@ Testing: "reason": "host-qmp-quit" } } +{ + "return": { + } +} *** done diff --git a/tests/qemu-iotests/185 b/tests/qemu-iotests/185 index 2ae0a85bbf..17489fb91c 100755 --- a/tests/qemu-iotests/185 +++ b/tests/qemu-iotests/185 @@ -344,14 +344,14 @@ wait_for_job_and_quit() { sleep 1 + # List of expected events + capture_events='BLOCK_JOB_CANCELLED JOB_STATUS_CHANGE SHUTDOWN' + _send_qemu_cmd $h \ '{"execute": "quit"}' \ 'return' - # List of expected events - capture_events='BLOCK_JOB_CANCELLED JOB_STATUS_CHANGE SHUTDOWN' _wait_event $h 'SHUTDOWN' - QEMU_EVENTS= # Ignore all JOB_STATUS_CHANGE events that came before SHUTDOWN _wait_event $h 'JOB_STATUS_CHANGE' # standby _wait_event $h 'JOB_STATUS_CHANGE' # ready _wait_event $h 'JOB_STATUS_CHANGE' # standby diff --git a/tests/qemu-iotests/185.out b/tests/qemu-iotests/185.out index 7292c26bae..6af0953c4d 100644 --- a/tests/qemu-iotests/185.out +++ b/tests/qemu-iotests/185.out @@ -40,9 +40,16 @@ Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off comp {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} {"return": {}} { 'execute': 'quit' } -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "paused", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "paused", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "disk"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offset": 524288, "speed": 65536, "type": "commit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "disk"}} +{"return": {}} === Start active commit job and exit qemu === @@ -56,9 +63,16 @@ Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off comp {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} {"return": {}} { 'execute': 'quit' } -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "paused", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "paused", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "disk"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 4194304, "offset": 4194304, "speed": 65536, "type": "commit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "disk"}} +{"return": {}} === Start mirror job and exit qemu === @@ -75,9 +89,16 @@ Formatting 'TEST_DIR/t.qcow2.copy', fmt=qcow2 cluster_size=65536 extended_l2=off {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} {"return": {}} { 'execute': 'quit' } -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "paused", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "paused", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "disk"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 4194304, "offset": 4194304, "speed": 65536, "type": "mirror"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "disk"}} +{"return": {}} === Start backup job and exit qemu === @@ -97,9 +118,16 @@ Formatting 'TEST_DIR/t.qcow2.copy', fmt=qcow2 cluster_size=65536 extended_l2=off {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} {"return": {}} { 'execute': 'quit' } -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "paused", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "paused", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "disk"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offset": 65536, "speed": 65536, "type": "backup"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "disk"}} +{"return": {}} === Start streaming job and exit qemu === @@ -112,9 +140,16 @@ Formatting 'TEST_DIR/t.qcow2.copy', fmt=qcow2 cluster_size=65536 extended_l2=off {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} {"return": {}} { 'execute': 'quit' } -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "paused", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "paused", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "aborting", "id": "disk"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", "len": 67108864, "offset": 524288, "speed": 65536, "type": "stream"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "disk"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "disk"}} +{"return": {}} No errors were found on the image. === Start mirror to throttled QSD and exit qemu === diff --git a/tests/qemu-iotests/191.out b/tests/qemu-iotests/191.out index ea88777374..c3309e4bc6 100644 --- a/tests/qemu-iotests/191.out +++ b/tests/qemu-iotests/191.out @@ -378,10 +378,6 @@ wrote 65536/65536 bytes at offset 1048576 ] } { 'execute': 'quit' } -{ - "return": { - } -} { "timestamp": { "seconds": TIMESTAMP, @@ -393,6 +389,10 @@ wrote 65536/65536 bytes at offset 1048576 "reason": "host-qmp-quit" } } +{ + "return": { + } +} image: TEST_DIR/t.IMGFMT file format: IMGFMT virtual size: 64 MiB (67108864 bytes) @@ -796,10 +796,6 @@ wrote 65536/65536 bytes at offset 1048576 ] } { 'execute': 'quit' } -{ - "return": { - } -} { "timestamp": { "seconds": TIMESTAMP, @@ -811,6 +807,10 @@ wrote 65536/65536 bytes at offset 1048576 "reason": "host-qmp-quit" } } +{ + "return": { + } +} image: TEST_DIR/t.IMGFMT file format: IMGFMT virtual size: 64 MiB (67108864 bytes) diff --git a/tests/qemu-iotests/195.out b/tests/qemu-iotests/195.out index ec84df5012..91717d302e 100644 --- a/tests/qemu-iotests/195.out +++ b/tests/qemu-iotests/195.out @@ -17,10 +17,6 @@ Testing: -drive if=none,file=TEST_DIR/t.IMGFMT,backing.node-name=mid "return": { } } -{ - "return": { - } -} { "timestamp": { "seconds": TIMESTAMP, @@ -32,6 +28,10 @@ Testing: -drive if=none,file=TEST_DIR/t.IMGFMT,backing.node-name=mid "reason": "host-qmp-quit" } } +{ + "return": { + } +} image: TEST_DIR/t.IMGFMT.mid file format: IMGFMT @@ -55,10 +55,6 @@ Testing: -drive if=none,file=TEST_DIR/t.IMGFMT,node-name=top "return": { } } -{ - "return": { - } -} { "timestamp": { "seconds": TIMESTAMP, @@ -70,6 +66,10 @@ Testing: -drive if=none,file=TEST_DIR/t.IMGFMT,node-name=top "reason": "host-qmp-quit" } } +{ + "return": { + } +} image: TEST_DIR/t.IMGFMT file format: IMGFMT diff --git a/tests/qemu-iotests/223.out b/tests/qemu-iotests/223.out index e5e7f42caa..5f5b42e2dc 100644 --- a/tests/qemu-iotests/223.out +++ b/tests/qemu-iotests/223.out @@ -11,8 +11,8 @@ QMP_VERSION {"return": {}} {"return": {}} {"return": {}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} === Write part of the file under active bitmap === @@ -145,14 +145,14 @@ read 2097152/2097152 bytes at offset 2097152 {"execute":"nbd-server-remove", "arguments":{"name":"n"}} -{"return": {}} -{"execute":"nbd-server-remove", - "arguments":{"name":"n2"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n"}} {"return": {}} {"execute":"nbd-server-remove", "arguments":{"name":"n2"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n2"}} +{"return": {}} +{"execute":"nbd-server-remove", + "arguments":{"name":"n2"}} {"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}} {"execute":"nbd-server-stop"} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n3"}} @@ -267,14 +267,14 @@ read 2097152/2097152 bytes at offset 2097152 {"execute":"nbd-server-remove", "arguments":{"name":"n"}} -{"return": {}} -{"execute":"nbd-server-remove", - "arguments":{"name":"n2"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n"}} {"return": {}} {"execute":"nbd-server-remove", "arguments":{"name":"n2"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n2"}} +{"return": {}} +{"execute":"nbd-server-remove", + "arguments":{"name":"n2"}} {"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}} {"execute":"nbd-server-stop"} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n3"}} @@ -282,8 +282,8 @@ read 2097152/2097152 bytes at offset 2097152 {"execute":"nbd-server-stop"} {"error": {"class": "GenericError", "desc": "NBD server not running"}} {"execute":"quit"} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} === Use qemu-nbd as server === diff --git a/tests/qemu-iotests/227.out b/tests/qemu-iotests/227.out index a947b1a87d..d6a1d4ecb6 100644 --- a/tests/qemu-iotests/227.out +++ b/tests/qemu-iotests/227.out @@ -54,10 +54,6 @@ Testing: -drive driver=null-co,read-zeroes=on,if=virtio } ] } -{ - "return": { - } -} { "timestamp": { "seconds": TIMESTAMP, @@ -69,6 +65,10 @@ Testing: -drive driver=null-co,read-zeroes=on,if=virtio "reason": "host-qmp-quit" } } +{ + "return": { + } +} === blockstats with -drive if=none === @@ -124,10 +124,6 @@ Testing: -drive driver=null-co,if=none } ] } -{ - "return": { - } -} { "timestamp": { "seconds": TIMESTAMP, @@ -139,6 +135,10 @@ Testing: -drive driver=null-co,if=none "reason": "host-qmp-quit" } } +{ + "return": { + } +} === blockstats with -blockdev === @@ -155,10 +155,6 @@ Testing: -blockdev driver=null-co,node-name=null "return": [ ] } -{ - "return": { - } -} { "timestamp": { "seconds": TIMESTAMP, @@ -170,6 +166,10 @@ Testing: -blockdev driver=null-co,node-name=null "reason": "host-qmp-quit" } } +{ + "return": { + } +} === blockstats with -blockdev and -device === @@ -226,10 +226,6 @@ Testing: -blockdev driver=null-co,read-zeroes=on,node-name=null -device virtio-b } ] } -{ - "return": { - } -} { "timestamp": { "seconds": TIMESTAMP, @@ -241,5 +237,9 @@ Testing: -blockdev driver=null-co,read-zeroes=on,node-name=null -device virtio-b "reason": "host-qmp-quit" } } +{ + "return": { + } +} *** done diff --git a/tests/qemu-iotests/247.out b/tests/qemu-iotests/247.out index e909e83994..7d252e7fe4 100644 --- a/tests/qemu-iotests/247.out +++ b/tests/qemu-iotests/247.out @@ -17,6 +17,6 @@ QMP_VERSION {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "job0", "len": 134217728, "offset": 134217728, "speed": 0, "type": "commit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} *** done diff --git a/tests/qemu-iotests/273.out b/tests/qemu-iotests/273.out index 6a74a8138b..71843f02de 100644 --- a/tests/qemu-iotests/273.out +++ b/tests/qemu-iotests/273.out @@ -282,10 +282,6 @@ Testing: -blockdev file,node-name=base,filename=TEST_DIR/t.IMGFMT.base -blockdev ] } } -{ - "return": { - } -} { "timestamp": { "seconds": TIMESTAMP, @@ -297,5 +293,9 @@ Testing: -blockdev file,node-name=base,filename=TEST_DIR/t.IMGFMT.base -blockdev "reason": "host-qmp-quit" } } +{ + "return": { + } +} *** done diff --git a/tests/qemu-iotests/308 b/tests/qemu-iotests/308 index de12b2b1b9..ea81dc496a 100755 --- a/tests/qemu-iotests/308 +++ b/tests/qemu-iotests/308 @@ -77,6 +77,7 @@ fuse_export_add() # $1: Export ID fuse_export_del() { + capture_events="BLOCK_EXPORT_DELETED" \ _send_qemu_cmd $QEMU_HANDLE \ "{'execute': 'block-export-del', 'arguments': { @@ -84,8 +85,7 @@ fuse_export_del() } }" \ 'return' - _send_qemu_cmd $QEMU_HANDLE \ - '' \ + _wait_event $QEMU_HANDLE \ 'BLOCK_EXPORT_DELETED' } diff --git a/tests/qemu-iotests/308.out b/tests/qemu-iotests/308.out index d5767133b1..e5e233691d 100644 --- a/tests/qemu-iotests/308.out +++ b/tests/qemu-iotests/308.out @@ -165,9 +165,9 @@ OK: Post-truncate image size is as expected === Tear down === {'execute': 'quit'} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "export-mp"}} +{"return": {}} === Compare copy with original === Images are identical. @@ -201,9 +201,9 @@ wrote 67108864/67108864 bytes at offset 0 read 67108864/67108864 bytes at offset 0 64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) {'execute': 'quit'} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "export"}} +{"return": {}} read 67108864/67108864 bytes at offset 0 64 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) *** done diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu index 0f1fecc68e..b23c4798aa 100644 --- a/tests/qemu-iotests/common.qemu +++ b/tests/qemu-iotests/common.qemu @@ -85,7 +85,7 @@ _timed_wait_for() timeout=yes QEMU_STATUS[$h]=0 - read_timeout="-t ${QEMU_COMM_TIMEOUT}" + read_timeout="-t $((${QEMU_COMM_TIMEOUT}*3))" if [ -n "${GDB_OPTIONS}" ]; then read_timeout= fi diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index e5c5798c71..ea48af4a7b 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -651,6 +651,13 @@ def filter_qmp_virtio_scsi(qmsg): def filter_generated_node_ids(msg): return re.sub("#block[0-9]+", "NODE_NAME", msg) +def filter_qmp_generated_node_ids(qmsg): + def _filter(_key, value): + if is_str(value): + return filter_generated_node_ids(value) + return value + return filter_qmp(qmsg, _filter) + def filter_img_info(output: str, filename: str, drop_child_info: bool = True) -> str: lines = [] diff --git a/tests/qemu-iotests/tests/file-io-error b/tests/qemu-iotests/tests/file-io-error index 88ee5f670c..fb8db73b31 100755 --- a/tests/qemu-iotests/tests/file-io-error +++ b/tests/qemu-iotests/tests/file-io-error @@ -99,13 +99,12 @@ echo $QEMU_IO -f file -c 'write 0 64M' "$TEST_DIR/fuse-export" | _filter_qemu_io echo -_send_qemu_cmd $QEMU_HANDLE \ +capture_events=BLOCK_EXPORT_DELETED _send_qemu_cmd $QEMU_HANDLE \ "{'execute': 'block-export-del', 'arguments': {'id': 'exp0'}}" \ 'return' -_send_qemu_cmd $QEMU_HANDLE \ - '' \ +_wait_event $QEMU_HANDLE \ 'BLOCK_EXPORT_DELETED' _send_qemu_cmd $QEMU_HANDLE \ diff --git a/tests/qemu-iotests/tests/iothreads-resize.out b/tests/qemu-iotests/tests/iothreads-resize.out index 2ca5a9d964..2967ac8f0d 100644 --- a/tests/qemu-iotests/tests/iothreads-resize.out +++ b/tests/qemu-iotests/tests/iothreads-resize.out @@ -3,8 +3,8 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 QMP_VERSION {"return": {}} {"return": {}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} image: TEST_DIR/t.IMGFMT file format: IMGFMT virtual size: 128 MiB (134217728 bytes) diff --git a/tests/qemu-iotests/tests/qcow2-internal-snapshots b/tests/qemu-iotests/tests/qcow2-internal-snapshots new file mode 100755 index 0000000000..36523aba06 --- /dev/null +++ b/tests/qemu-iotests/tests/qcow2-internal-snapshots @@ -0,0 +1,170 @@ +#!/usr/bin/env bash +# group: rw quick +# +# Test case for internal snapshots in qcow2 +# +# Copyright (C) 2023 Red Hat, Inc. +# +# 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. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# creator +owner=kwolf@redhat.com + +seq="$(basename $0)" +echo "QA output created by $seq" + +status=1 # failure is the default! + +_cleanup() +{ + _cleanup_test_img +} +trap "_cleanup; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ../common.rc +. ../common.filter + +# This tests qcow2-specific low-level functionality +_supported_fmt qcow2 +_supported_proto generic +# Internal snapshots are (currently) impossible with refcount_bits=1, +# and generally impossible with external data files +_unsupported_imgopts 'compat=0.10' 'refcount_bits=1[^0-9]' data_file + +IMG_SIZE=64M + +_qemu() +{ + $QEMU -no-shutdown -nographic -monitor stdio -serial none \ + -blockdev file,filename="$TEST_IMG",node-name=disk0-file \ + -blockdev "$IMGFMT",file=disk0-file,node-name=disk0 \ + -object iothread,id=iothread0 \ + -device virtio-scsi,iothread=iothread0 \ + -device scsi-hd,drive=disk0,share-rw=on \ + "$@" 2>&1 |\ + _filter_qemu | _filter_hmp | _filter_qemu_io +} + +_make_test_img $IMG_SIZE + +echo +echo "=== Write some data, take a snapshot and overwrite part of it ===" +echo + +{ + echo 'qemu-io disk0 "write -P0x11 0 1M"' + # Give qemu some time to boot before saving the VM state + sleep 0.5 + echo "savevm snap0" + echo 'qemu-io disk0 "write -P0x22 0 512k"' + echo "quit" +} | _qemu + +echo +$QEMU_IMG snapshot -l "$TEST_IMG" | _filter_date | _filter_vmstate_size +_check_test_img + +echo +echo "=== Verify that loading the snapshot reverts to the old content ===" +echo + +{ + # -loadvm reverted the write from the previous QEMU instance + echo 'qemu-io disk0 "read -P0x11 0 1M"' + + # Verify that it works without restarting QEMU, too + echo 'qemu-io disk0 "write -P0x33 512k 512k"' + echo "loadvm snap0" + echo 'qemu-io disk0 "read -P0x11 0 1M"' + + # Verify COW by writing a partial cluster + echo 'qemu-io disk0 "write -P0x33 63k 2k"' + echo 'qemu-io disk0 "read -P0x11 0 63k"' + echo 'qemu-io disk0 "read -P0x33 63k 2k"' + echo 'qemu-io disk0 "read -P0x11 65k 63k"' + + # Take a second snapshot + echo "savevm snap1" + + echo "quit" +} | _qemu -loadvm snap0 + +echo +$QEMU_IMG snapshot -l "$TEST_IMG" | _filter_date | _filter_vmstate_size +_check_test_img + +echo +echo "=== qemu-img snapshot can revert to snapshots ===" +echo + +$QEMU_IMG snapshot -a snap0 "$TEST_IMG" +$QEMU_IO -c "read -P0x11 0 1M" "$TEST_IMG" | _filter_qemu_io +$QEMU_IMG snapshot -a snap1 "$TEST_IMG" +$QEMU_IO \ + -c "read -P0x11 0 63k" \ + -c "read -P0x33 63k 2k" \ + -c "read -P0x11 65k 63k" \ + "$TEST_IMG" | _filter_qemu_io + +echo +echo "=== Deleting snapshots ===" +echo +{ + # The active layer stays unaffected by deleting the snapshot + echo "delvm snap1" + echo 'qemu-io disk0 "read -P0x11 0 63k"' + echo 'qemu-io disk0 "read -P0x33 63k 2k"' + echo 'qemu-io disk0 "read -P0x11 65k 63k"' + + echo "quit" +} | _qemu + + +echo +$QEMU_IMG snapshot -l "$TEST_IMG" | _filter_date | _filter_vmstate_size +_check_test_img + +echo +echo "=== Error cases ===" +echo + +# snap1 should not exist any more +_qemu -loadvm snap1 + +echo +{ + echo "loadvm snap1" + echo "quit" +} | _qemu + +# Snapshot operations and inactive images are incompatible +echo +_qemu -loadvm snap0 -incoming defer +{ + echo "loadvm snap0" + echo "delvm snap0" + echo "savevm snap1" + echo "quit" +} | _qemu -incoming defer + +# -loadvm and -preconfig are incompatible +echo +_qemu -loadvm snap0 -preconfig + +# success, all done +echo "*** done" +rm -f $seq.full +status=0 diff --git a/tests/qemu-iotests/tests/qcow2-internal-snapshots.out b/tests/qemu-iotests/tests/qcow2-internal-snapshots.out new file mode 100644 index 0000000000..438f535e6a --- /dev/null +++ b/tests/qemu-iotests/tests/qcow2-internal-snapshots.out @@ -0,0 +1,107 @@ +QA output created by qcow2-internal-snapshots +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 + +=== Write some data, take a snapshot and overwrite part of it === + +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) qemu-io disk0 "write -P0x11 0 1M" +wrote 1048576/1048576 bytes at offset 0 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +(qemu) savevm snap0 +(qemu) qemu-io disk0 "write -P0x22 0 512k" +wrote 524288/524288 bytes at offset 0 +512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +(qemu) quit + +Snapshot list: +ID TAG VM SIZE DATE VM CLOCK ICOUNT +1 snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000 +No errors were found on the image. + +=== Verify that loading the snapshot reverts to the old content === + +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) qemu-io disk0 "read -P0x11 0 1M" +read 1048576/1048576 bytes at offset 0 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +(qemu) qemu-io disk0 "write -P0x33 512k 512k" +wrote 524288/524288 bytes at offset 524288 +512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +(qemu) loadvm snap0 +(qemu) qemu-io disk0 "read -P0x11 0 1M" +read 1048576/1048576 bytes at offset 0 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +(qemu) qemu-io disk0 "write -P0x33 63k 2k" +wrote 2048/2048 bytes at offset 64512 +2 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +(qemu) qemu-io disk0 "read -P0x11 0 63k" +read 64512/64512 bytes at offset 0 +63 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +(qemu) qemu-io disk0 "read -P0x33 63k 2k" +read 2048/2048 bytes at offset 64512 +2 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +(qemu) qemu-io disk0 "read -P0x11 65k 63k" +read 64512/64512 bytes at offset 66560 +63 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +(qemu) savevm snap1 +(qemu) quit + +Snapshot list: +ID TAG VM SIZE DATE VM CLOCK ICOUNT +1 snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000 +2 snap1 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000 +No errors were found on the image. + +=== qemu-img snapshot can revert to snapshots === + +read 1048576/1048576 bytes at offset 0 +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +read 64512/64512 bytes at offset 0 +63 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +read 2048/2048 bytes at offset 64512 +2 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +read 64512/64512 bytes at offset 66560 +63 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) + +=== Deleting snapshots === + +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) delvm snap1 +(qemu) qemu-io disk0 "read -P0x11 0 63k" +read 64512/64512 bytes at offset 0 +63 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +(qemu) qemu-io disk0 "read -P0x33 63k 2k" +read 2048/2048 bytes at offset 64512 +2 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +(qemu) qemu-io disk0 "read -P0x11 65k 63k" +read 64512/64512 bytes at offset 66560 +63 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +(qemu) quit + +Snapshot list: +ID TAG VM SIZE DATE VM CLOCK ICOUNT +1 snap0 SIZE yyyy-mm-dd hh:mm:ss 00:00:00.000 +No errors were found on the image. + +=== Error cases === + +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) QEMU_PROG: Snapshot 'snap1' does not exist in one or more devices + +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) loadvm snap1 +Error: Snapshot 'snap1' does not exist in one or more devices +(qemu) quit + +QEMU_PROG: 'incoming' and 'loadvm' options are mutually exclusive +QEMU X.Y.Z monitor - type 'help' for more information +(qemu) loadvm snap0 +Error: Device 'disk0' is writable but does not support snapshots +(qemu) delvm snap0 +Error: Device 'disk0' is writable but does not support snapshots +(qemu) savevm snap1 +Error: Device 'disk0' is writable but does not support snapshots +(qemu) quit + +QEMU_PROG: 'preconfig' and 'loadvm' options are mutually exclusive +*** done diff --git a/tests/qemu-iotests/tests/qsd-jobs.out b/tests/qemu-iotests/tests/qsd-jobs.out index c1bc9b8356..aa6b6d1aef 100644 --- a/tests/qemu-iotests/tests/qsd-jobs.out +++ b/tests/qemu-iotests/tests/qsd-jobs.out @@ -7,8 +7,8 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/ QMP_VERSION {"return": {}} {"return": {}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_JOB_CANCELLED", "data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}} +{"return": {}} === Streaming can't get permission on base node === @@ -17,6 +17,6 @@ QMP_VERSION {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "job0"}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "job0"}} {"error": {"class": "GenericError", "desc": "Permission conflict on node 'fmt_base': permissions 'write' are both required by an unnamed block device (uses node 'fmt_base' as 'root' child) and unshared by stream job 'job0' (uses node 'fmt_base' as 'intermediate node' child)."}} -{"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "export1"}} +{"return": {}} *** done diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 47dabf91d0..35689afd1a 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -1,5 +1,6 @@ slow_qtests = { 'ahci-test' : 60, + 'aspeed_smc-test': 360, 'bios-tables-test' : 120, 'boot-serial-test' : 60, 'migration-test' : 150, @@ -31,6 +32,10 @@ qtests_pci = \ (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) + \ (config_all_devices.has_key('CONFIG_IVSHMEM_DEVICE') ? ['ivshmem-test'] : []) +# FIXME [openSUSE]: display-vga-test currently fails in OBS (and only in OBS!?!), for ppc64 +qtests_pci_novga = \ + (config_all_devices.has_key('CONFIG_IVSHMEM_DEVICE') ? ['ivshmem-test'] : []) + qtests_cxl = \ (config_all_devices.has_key('CONFIG_CXL') ? ['cxl-test'] : []) @@ -167,7 +172,7 @@ qtests_ppc64 = \ (slirp.found() ? ['pxe-test'] : []) + \ (config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] : []) + \ (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) + \ - qtests_pci + ['migration-test', 'numa-test', 'cpu-plug-test', 'drive_del-test'] + qtests_pci_novga + ['migration-test', 'numa-test', 'cpu-plug-test', 'drive_del-test'] qtests_sh4 = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) qtests_sh4eb = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c index d4e437265f..7f98c1bad8 100644 --- a/tests/qtest/vhost-user-test.c +++ b/tests/qtest/vhost-user-test.c @@ -1092,17 +1092,20 @@ static void register_vhost_user_test(void) "virtio-net", test_migrate, &opts); - opts.before = vhost_user_test_setup_reconnect; - qos_add_test("vhost-user/reconnect", "virtio-net", - test_reconnect, &opts); + /* keeps failing on build-system since Aug 15 2017 */ + if (getenv("QTEST_VHOST_USER_FIXME")) { + opts.before = vhost_user_test_setup_reconnect; + qos_add_test("vhost-user/reconnect", "virtio-net", + test_reconnect, &opts); - opts.before = vhost_user_test_setup_connect_fail; - qos_add_test("vhost-user/connect-fail", "virtio-net", - test_vhost_user_started, &opts); + opts.before = vhost_user_test_setup_connect_fail; + qos_add_test("vhost-user/connect-fail", "virtio-net", + test_vhost_user_started, &opts); - opts.before = vhost_user_test_setup_flags_mismatch; - qos_add_test("vhost-user/flags-mismatch", "virtio-net", - test_vhost_user_started, &opts); + opts.before = vhost_user_test_setup_flags_mismatch; + qos_add_test("vhost-user/flags-mismatch", "virtio-net", + test_vhost_user_started, &opts); + } opts.before = vhost_user_test_setup_multiqueue; opts.edge.extra_device_opts = "mq=on"; diff --git a/tests/qtest/virtio-ccw-test.c b/tests/qtest/virtio-ccw-test.c index f4f5858b84..7a5357c212 100644 --- a/tests/qtest/virtio-ccw-test.c +++ b/tests/qtest/virtio-ccw-test.c @@ -85,7 +85,7 @@ int main(int argc, char **argv) if (qtest_has_device("virtio-rng-ccw")) { qtest_add_func("/virtio/rng/nop", virtio_rng_nop); } - if (qtest_has_device("virtio-rng-ccw")) { + if (qtest_has_device("virtio-scsi-ccw")) { qtest_add_func("/virtio/scsi/nop", virtio_scsi_nop); qtest_add_func("/virtio/scsi/hotplug", virtio_scsi_hotplug); } diff --git a/tests/unit/test-char.c b/tests/unit/test-char.c index 649fdf64e1..4dcf32093d 100644 --- a/tests/unit/test-char.c +++ b/tests/unit/test-char.c @@ -1,3 +1,4 @@ +#define HW_POISON_H /* avoid poison since we patch against rules it "enforces" */ #include "qemu/osdep.h" #include diff --git a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c index 7b304c79d9..8ef603d081 100644 --- a/util/coroutine-ucontext.c +++ b/util/coroutine-ucontext.c @@ -119,13 +119,11 @@ void finish_switch_fiber(void *fake_stack_save) /* always_inline is required to avoid TSan runtime fatal errors. */ static inline __attribute__((always_inline)) -void start_switch_fiber_asan(CoroutineAction action, void **fake_stack_save, +void start_switch_fiber_asan(void **fake_stack_save, const void *bottom, size_t size) { #ifdef CONFIG_ASAN - __sanitizer_start_switch_fiber( - action == COROUTINE_TERMINATE ? NULL : fake_stack_save, - bottom, size); + __sanitizer_start_switch_fiber(fake_stack_save, bottom, size); #endif } @@ -165,7 +163,7 @@ static void coroutine_trampoline(int i0, int i1) if (!sigsetjmp(self->env, 0)) { CoroutineUContext *leaderp = get_ptr_leader(); - start_switch_fiber_asan(COROUTINE_YIELD, &fake_stack_save, + start_switch_fiber_asan(&fake_stack_save, leaderp->stack, leaderp->stack_size); start_switch_fiber_tsan(&fake_stack_save, self, true); /* true=caller */ siglongjmp(*(sigjmp_buf *)co->entry_arg, 1); @@ -226,8 +224,7 @@ Coroutine *qemu_coroutine_new(void) /* swapcontext() in, siglongjmp() back out */ if (!sigsetjmp(old_env, 0)) { - start_switch_fiber_asan(COROUTINE_YIELD, &fake_stack_save, co->stack, - co->stack_size); + start_switch_fiber_asan(&fake_stack_save, co->stack, co->stack_size); start_switch_fiber_tsan(&fake_stack_save, co, false); /* false=not caller */ @@ -269,10 +266,28 @@ static inline void valgrind_stack_deregister(CoroutineUContext *co) #endif #endif +#if defined(CONFIG_ASAN) && defined(CONFIG_COROUTINE_POOL) +static void coroutine_fn terminate_asan(void *opaque) +{ + CoroutineUContext *to = DO_UPCAST(CoroutineUContext, base, opaque); + + set_current(opaque); + start_switch_fiber_asan(NULL, to->stack, to->stack_size); + G_STATIC_ASSERT(!IS_ENABLED(CONFIG_TSAN)); + siglongjmp(to->env, COROUTINE_ENTER); +} +#endif + void qemu_coroutine_delete(Coroutine *co_) { CoroutineUContext *co = DO_UPCAST(CoroutineUContext, base, co_); +#if defined(CONFIG_ASAN) && defined(CONFIG_COROUTINE_POOL) + co_->entry_arg = qemu_coroutine_self(); + co_->entry = terminate_asan; + qemu_coroutine_switch(co_->entry_arg, co_, COROUTINE_ENTER); +#endif + #ifdef CONFIG_VALGRIND_H valgrind_stack_deregister(co); #endif @@ -305,8 +320,10 @@ qemu_coroutine_switch(Coroutine *from_, Coroutine *to_, ret = sigsetjmp(from->env, 0); if (ret == 0) { - start_switch_fiber_asan(action, &fake_stack_save, to->stack, - to->stack_size); + start_switch_fiber_asan(IS_ENABLED(CONFIG_COROUTINE_POOL) || + action != COROUTINE_TERMINATE ? + &fake_stack_save : NULL, + to->stack, to->stack_size); start_switch_fiber_tsan(&fake_stack_save, to, false); /* false=not caller */ siglongjmp(to->env, action); diff --git a/util/cpuinfo-ppc.c b/util/cpuinfo-ppc.c index 1ea3db0ac8..b2d8893a06 100644 --- a/util/cpuinfo-ppc.c +++ b/util/cpuinfo-ppc.c @@ -6,10 +6,10 @@ #include "qemu/osdep.h" #include "host/cpuinfo.h" +#include #ifdef CONFIG_GETAUXVAL # include #else -# include # include "elf.h" #endif @@ -40,7 +40,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) info |= CPUINFO_V2_06; } - if (hwcap2 & PPC_FEATURE2_HAS_ISEL) { + if (hwcap2 & PPC_FEATURE2_ISEL) { info |= CPUINFO_ISEL; } if (hwcap & PPC_FEATURE_HAS_ALTIVEC) { @@ -53,7 +53,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(void) * always have both anyway, since VSX came with Power7 * and crypto came with Power8. */ - if (hwcap2 & PPC_FEATURE2_HAS_VEC_CRYPTO) { + if (hwcap2 & PPC_FEATURE2_VEC_CRYPTO) { info |= CPUINFO_CRYPTO; } }