From 39c9d79630e9ad39006167dff6030ecc15249d63ee7bdb70d7426d6d64458c2a Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Fri, 15 Nov 2019 19:53:22 +0000 Subject: [PATCH 1/4] Accepting request 748963 from home:bfrogers:branches:Virtualization Update to v4.1.1, a stable, bug-fix-only release. I won't forward on to Factory yet, since I'm expecting some other important patches to appear in upstream master soon, which we'll also want. OBS-URL: https://build.opensuse.org/request/show/748963 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=511 --- block-Add-bdrv_co_get_self_request.patch | 57 --- ...k-Make-wait-mark-serialising-request.patch | 126 ----- ...k-create-Do-not-abort-if-a-block-dri.patch | 93 ---- ...k-file-posix-Let-post-EOF-fallocate-.patch | 67 --- block-file-posix-Reduce-xfsctl-use.patch | 163 ------ block-io-refactor-padding.patch | 478 ------------------ ...k-nfs-tear-down-aio-before-nfs_close.patch | 39 -- ...kjob-update-nodes-head-while-removin.patch | 59 --- bundles.tar.xz | 4 +- config.sh | 2 +- ...utine-Add-qemu_co_mutex_assert_locke.patch | 48 -- curl-Check-completion-in-curl_multi_do.patch | 71 --- ...-Handle-success-in-multi_check_compl.patch | 146 ------ ...-Keep-pointer-to-the-CURLState-in-CU.patch | 49 -- ...-Keep-socket-until-the-end-of-curl_s.patch | 56 -- curl-Pass-CURLSocket-to-curl_multi_do.patch | 77 --- curl-Report-only-ready-sockets.patch | 61 --- ...rm-boot.c-Set-NSACR.-CP11-CP10-for-N.patch | 45 -- ...ore-loader-Fix-possible-crash-in-rom.patch | 43 -- ...-release-pull-in-edk2-submodules-so-.patch | 58 --- ...ry-Provide-an-equality-function-for-.patch | 44 -- ...or-Keep-mirror_top_bs-drained-after-.patch | 50 -- pr-manager-Fix-invalid-g_free-crash-bug.patch | 37 -- qcow2-Fix-QCOW2_COMPRESSED_SECTOR_MASK.patch | 33 -- ...2-Fix-corruption-bug-in-qcow2_detect.patch | 68 --- ...2-Fix-the-calculation-of-the-maximum.patch | 56 -- ...2-bitmap-Fix-uint64_t-left-shift-ove.patch | 66 --- qemu-4.1.0.tar.xz | 3 - qemu-4.1.0.tar.xz.sig | Bin 310 -> 0 bytes qemu-4.1.1.tar.xz | 3 + qemu-4.1.1.tar.xz.sig | Bin 0 -> 310 bytes qemu.changes | 44 ++ qemu.spec | 156 ++---- qemu.spec.in | 4 +- ...-Makefile.edk2-don-t-pull-in-submodu.patch | 52 -- s390-PCI-fix-IOMMU-region-init.patch | 48 -- ...x-tcg-Fix-VERIM-with-32-64-bit-eleme.patch | 34 -- ...et-alpha-fix-tlb_fill-trap_arg2-valu.patch | 41 -- ...et-arm-Don-t-abort-on-M-profile-exce.patch | 101 ---- ...et-arm-Free-TCG-temps-in-trans_VMOV_.patch | 38 -- tests-Disable-some-block-tests-for-now.patch | 2 +- ...-iov-introduce-qemu_iovec_init_exten.patch | 174 ------- ...t-Fix-memory-region-section-comparis.patch | 42 -- ...Return-0-from-vpc_co_create-on-succe.patch | 47 -- 44 files changed, 97 insertions(+), 2788 deletions(-) delete mode 100644 block-Add-bdrv_co_get_self_request.patch delete mode 100644 block-Make-wait-mark-serialising-request.patch delete mode 100644 block-create-Do-not-abort-if-a-block-dri.patch delete mode 100644 block-file-posix-Let-post-EOF-fallocate-.patch delete mode 100644 block-file-posix-Reduce-xfsctl-use.patch delete mode 100644 block-io-refactor-padding.patch delete mode 100644 block-nfs-tear-down-aio-before-nfs_close.patch delete mode 100644 blockjob-update-nodes-head-while-removin.patch delete mode 100644 coroutine-Add-qemu_co_mutex_assert_locke.patch delete mode 100644 curl-Check-completion-in-curl_multi_do.patch delete mode 100644 curl-Handle-success-in-multi_check_compl.patch delete mode 100644 curl-Keep-pointer-to-the-CURLState-in-CU.patch delete mode 100644 curl-Keep-socket-until-the-end-of-curl_s.patch delete mode 100644 curl-Pass-CURLSocket-to-curl_multi_do.patch delete mode 100644 curl-Report-only-ready-sockets.patch delete mode 100644 hw-arm-boot.c-Set-NSACR.-CP11-CP10-for-N.patch delete mode 100644 hw-core-loader-Fix-possible-crash-in-rom.patch delete mode 100644 make-release-pull-in-edk2-submodules-so-.patch delete mode 100644 memory-Provide-an-equality-function-for-.patch delete mode 100644 mirror-Keep-mirror_top_bs-drained-after-.patch delete mode 100644 pr-manager-Fix-invalid-g_free-crash-bug.patch delete mode 100644 qcow2-Fix-QCOW2_COMPRESSED_SECTOR_MASK.patch delete mode 100644 qcow2-Fix-corruption-bug-in-qcow2_detect.patch delete mode 100644 qcow2-Fix-the-calculation-of-the-maximum.patch delete mode 100644 qcow2-bitmap-Fix-uint64_t-left-shift-ove.patch delete mode 100644 qemu-4.1.0.tar.xz delete mode 100644 qemu-4.1.0.tar.xz.sig create mode 100644 qemu-4.1.1.tar.xz create mode 100644 qemu-4.1.1.tar.xz.sig delete mode 100644 roms-Makefile.edk2-don-t-pull-in-submodu.patch delete mode 100644 s390-PCI-fix-IOMMU-region-init.patch delete mode 100644 s390x-tcg-Fix-VERIM-with-32-64-bit-eleme.patch delete mode 100644 target-alpha-fix-tlb_fill-trap_arg2-valu.patch delete mode 100644 target-arm-Don-t-abort-on-M-profile-exce.patch delete mode 100644 target-arm-Free-TCG-temps-in-trans_VMOV_.patch delete mode 100644 util-iov-introduce-qemu_iovec_init_exten.patch delete mode 100644 vhost-Fix-memory-region-section-comparis.patch delete mode 100644 vpc-Return-0-from-vpc_co_create-on-succe.patch diff --git a/block-Add-bdrv_co_get_self_request.patch b/block-Add-bdrv_co_get_self_request.patch deleted file mode 100644 index a547488..0000000 --- a/block-Add-bdrv_co_get_self_request.patch +++ /dev/null @@ -1,57 +0,0 @@ -From: Max Reitz -Date: Fri, 1 Nov 2019 16:25:09 +0100 -Subject: block: Add bdrv_co_get_self_request() - -Git-commit: c28107e9e55b11cd35cf3dc2505e3e69d10dcf13 - -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Message-id: 20191101152510.11719-3-mreitz@redhat.com -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/io.c | 18 ++++++++++++++++++ - include/block/block_int.h | 1 + - 2 files changed, 19 insertions(+) - -diff --git a/block/io.c b/block/io.c -index d9f632f450b744515d3f91d2aa26..0366daf27f4a2133148716135d63 100644 ---- a/block/io.c -+++ b/block/io.c -@@ -721,6 +721,24 @@ static bool is_request_serialising_and_aligned(BdrvTrackedRequest *req) - (req->bytes == req->overlap_bytes); - } - -+/** -+ * Return the tracked request on @bs for the current coroutine, or -+ * NULL if there is none. -+ */ -+BdrvTrackedRequest *coroutine_fn bdrv_co_get_self_request(BlockDriverState *bs) -+{ -+ BdrvTrackedRequest *req; -+ Coroutine *self = qemu_coroutine_self(); -+ -+ QLIST_FOREACH(req, &bs->tracked_requests, list) { -+ if (req->co == self) { -+ return req; -+ } -+ } -+ -+ return NULL; -+} -+ - /** - * Round a region to cluster boundaries - */ -diff --git a/include/block/block_int.h b/include/block/block_int.h -index 4465b022424c23aea82942547cc3..05ee6b4866f84a9ab9ba0dcda5da 100644 ---- a/include/block/block_int.h -+++ b/include/block/block_int.h -@@ -964,6 +964,7 @@ void bdrv_unapply_subtree_drain(BdrvChild *child, BlockDriverState *old_parent); - - bool coroutine_fn bdrv_wait_serialising_requests(BdrvTrackedRequest *self); - void bdrv_mark_request_serialising(BdrvTrackedRequest *req, uint64_t align); -+BdrvTrackedRequest *coroutine_fn bdrv_co_get_self_request(BlockDriverState *bs); - - int get_tmp_filename(char *filename, int size); - BlockDriver *bdrv_probe_all(const uint8_t *buf, int buf_size, diff --git a/block-Make-wait-mark-serialising-request.patch b/block-Make-wait-mark-serialising-request.patch deleted file mode 100644 index 56b8f68..0000000 --- a/block-Make-wait-mark-serialising-request.patch +++ /dev/null @@ -1,126 +0,0 @@ -From: Max Reitz -Date: Fri, 1 Nov 2019 16:25:08 +0100 -Subject: block: Make wait/mark serialising requests public - -Git-commit: 304d9d7f034ff7f5e1e66a65b7f720f63a72c57e - -Make both bdrv_mark_request_serialising() and -bdrv_wait_serialising_requests() public so they can be used from block -drivers. - -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Message-id: 20191101152510.11719-2-mreitz@redhat.com -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/io.c | 24 ++++++++++++------------ - include/block/block_int.h | 3 +++ - 2 files changed, 15 insertions(+), 12 deletions(-) - -diff --git a/block/io.c b/block/io.c -index bfb2653d8ee853e99bd4d55a1a87..d9f632f450b744515d3f91d2aa26 100644 ---- a/block/io.c -+++ b/block/io.c -@@ -694,7 +694,7 @@ static void tracked_request_begin(BdrvTrackedRequest *req, - qemu_co_mutex_unlock(&bs->reqs_lock); - } - --static void mark_request_serialising(BdrvTrackedRequest *req, uint64_t align) -+void bdrv_mark_request_serialising(BdrvTrackedRequest *req, uint64_t align) - { - int64_t overlap_offset = req->offset & ~(align - 1); - uint64_t overlap_bytes = ROUND_UP(req->offset + req->bytes, align) -@@ -784,7 +784,7 @@ void bdrv_dec_in_flight(BlockDriverState *bs) - bdrv_wakeup(bs); - } - --static bool coroutine_fn wait_serialising_requests(BdrvTrackedRequest *self) -+bool coroutine_fn bdrv_wait_serialising_requests(BdrvTrackedRequest *self) - { - BlockDriverState *bs = self->bs; - BdrvTrackedRequest *req; -@@ -1340,14 +1340,14 @@ static int coroutine_fn bdrv_aligned_preadv(BdrvChild *child, - * with each other for the same cluster. For example, in copy-on-read - * it ensures that the CoR read and write operations are atomic and - * guest writes cannot interleave between them. */ -- mark_request_serialising(req, bdrv_get_cluster_size(bs)); -+ bdrv_mark_request_serialising(req, bdrv_get_cluster_size(bs)); - } - - /* BDRV_REQ_SERIALISING is only for write operation */ - assert(!(flags & BDRV_REQ_SERIALISING)); - - if (!(flags & BDRV_REQ_NO_SERIALISING)) { -- wait_serialising_requests(req); -+ bdrv_wait_serialising_requests(req); - } - - if (flags & BDRV_REQ_COPY_ON_READ) { -@@ -1736,10 +1736,10 @@ bdrv_co_write_req_prepare(BdrvChild *child, int64_t offset, uint64_t bytes, - assert(!(flags & ~BDRV_REQ_MASK)); - - if (flags & BDRV_REQ_SERIALISING) { -- mark_request_serialising(req, bdrv_get_cluster_size(bs)); -+ bdrv_mark_request_serialising(req, bdrv_get_cluster_size(bs)); - } - -- waited = wait_serialising_requests(req); -+ waited = bdrv_wait_serialising_requests(req); - - assert(!waited || !req->serialising || - is_request_serialising_and_aligned(req)); -@@ -1905,8 +1905,8 @@ static int coroutine_fn bdrv_co_do_zero_pwritev(BdrvChild *child, - - padding = bdrv_init_padding(bs, offset, bytes, &pad); - if (padding) { -- mark_request_serialising(req, align); -- wait_serialising_requests(req); -+ bdrv_mark_request_serialising(req, align); -+ bdrv_wait_serialising_requests(req); - - bdrv_padding_rmw_read(child, req, &pad, true); - -@@ -1993,8 +1993,8 @@ int coroutine_fn bdrv_co_pwritev(BdrvChild *child, - } - - if (bdrv_pad_request(bs, &qiov, &offset, &bytes, &pad)) { -- mark_request_serialising(&req, align); -- wait_serialising_requests(&req); -+ bdrv_mark_request_serialising(&req, align); -+ bdrv_wait_serialising_requests(&req); - bdrv_padding_rmw_read(child, &req, &pad, false); - } - -@@ -3078,7 +3078,7 @@ static int coroutine_fn bdrv_co_copy_range_internal( - /* BDRV_REQ_SERIALISING is only for write operation */ - assert(!(read_flags & BDRV_REQ_SERIALISING)); - if (!(read_flags & BDRV_REQ_NO_SERIALISING)) { -- wait_serialising_requests(&req); -+ bdrv_wait_serialising_requests(&req); - } - - ret = src->bs->drv->bdrv_co_copy_range_from(src->bs, -@@ -3205,7 +3205,7 @@ int coroutine_fn bdrv_co_truncate(BdrvChild *child, int64_t offset, - * new area, we need to make sure that no write requests are made to it - * concurrently or they might be overwritten by preallocation. */ - if (new_bytes) { -- mark_request_serialising(&req, 1); -+ bdrv_mark_request_serialising(&req, 1); - } - if (bs->read_only) { - error_setg(errp, "Image is read-only"); -diff --git a/include/block/block_int.h b/include/block/block_int.h -index 3aa1e832a8fdf32bf3f33d1e1508..4465b022424c23aea82942547cc3 100644 ---- a/include/block/block_int.h -+++ b/include/block/block_int.h -@@ -962,6 +962,9 @@ extern unsigned int bdrv_drain_all_count; - void bdrv_apply_subtree_drain(BdrvChild *child, BlockDriverState *new_parent); - void bdrv_unapply_subtree_drain(BdrvChild *child, BlockDriverState *old_parent); - -+bool coroutine_fn bdrv_wait_serialising_requests(BdrvTrackedRequest *self); -+void bdrv_mark_request_serialising(BdrvTrackedRequest *req, uint64_t align); -+ - int get_tmp_filename(char *filename, int size); - BlockDriver *bdrv_probe_all(const uint8_t *buf, int buf_size, - const char *filename); diff --git a/block-create-Do-not-abort-if-a-block-dri.patch b/block-create-Do-not-abort-if-a-block-dri.patch deleted file mode 100644 index cfb676a..0000000 --- a/block-create-Do-not-abort-if-a-block-dri.patch +++ /dev/null @@ -1,93 +0,0 @@ -From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= -Date: Thu, 12 Sep 2019 00:08:49 +0200 -Subject: block/create: Do not abort if a block driver is not available -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: d90d5cae2b10efc0e8d0b3cc91ff16201853d3ba - -The 'blockdev-create' QMP command was introduced as experimental -feature in commit b0292b851b8, using the assert() debug call. -It got promoted to 'stable' command in 3fb588a0f2c, but the -assert call was not removed. - -Some block drivers are optional, and bdrv_find_format() might -return a NULL value, triggering the assertion. - -Stable code is not expected to abort, so return an error instead. - -This is easily reproducible when libnfs is not installed: - - ./configure - [...] - module support no - Block whitelist (rw) - Block whitelist (ro) - libiscsi support yes - libnfs support no - [...] - -Start QEMU: - - $ qemu-system-x86_64 -S -qmp unix:/tmp/qemu.qmp,server,nowait - -Send the 'blockdev-create' with the 'nfs' driver: - - $ ( cat << 'EOF' - {'execute': 'qmp_capabilities'} - {'execute': 'blockdev-create', 'arguments': {'job-id': 'x', 'options': {'size': 0, 'driver': 'nfs', 'location': {'path': '/', 'server': {'host': '::1', 'type': 'inet'}}}}, 'id': 'x'} - EOF - ) | socat STDIO UNIX:/tmp/qemu.qmp - {"QMP": {"version": {"qemu": {"micro": 50, "minor": 1, "major": 4}, "package": "v4.1.0-733-g89ea03a7dc"}, "capabilities": ["oob"]}} - {"return": {}} - -QEMU crashes: - - $ gdb qemu-system-x86_64 core - Program received signal SIGSEGV, Segmentation fault. - (gdb) bt - #0 0x00007ffff510957f in raise () at /lib64/libc.so.6 - #1 0x00007ffff50f3895 in abort () at /lib64/libc.so.6 - #2 0x00007ffff50f3769 in _nl_load_domain.cold.0 () at /lib64/libc.so.6 - #3 0x00007ffff5101a26 in .annobin_assert.c_end () at /lib64/libc.so.6 - #4 0x0000555555d7e1f1 in qmp_blockdev_create (job_id=0x555556baee40 "x", options=0x555557666610, errp=0x7fffffffc770) at block/create.c:69 - #5 0x0000555555c96b52 in qmp_marshal_blockdev_create (args=0x7fffdc003830, ret=0x7fffffffc7f8, errp=0x7fffffffc7f0) at qapi/qapi-commands-block-core.c:1314 - #6 0x0000555555deb0a0 in do_qmp_dispatch (cmds=0x55555645de70 , request=0x7fffdc005c70, allow_oob=false, errp=0x7fffffffc898) at qapi/qmp-dispatch.c:131 - #7 0x0000555555deb2a1 in qmp_dispatch (cmds=0x55555645de70 , request=0x7fffdc005c70, allow_oob=false) at qapi/qmp-dispatch.c:174 - -With this patch applied, QEMU returns a QMP error: - - {'execute': 'blockdev-create', 'arguments': {'job-id': 'x', 'options': {'size': 0, 'driver': 'nfs', 'location': {'path': '/', 'server': {'host': '::1', 'type': 'inet'}}}}, 'id': 'x'} - {"id": "x", "error": {"class": "GenericError", "desc": "Block driver 'nfs' not found or not supported"}} - -Cc: qemu-stable@nongnu.org -Reported-by: Xu Tian -Signed-off-by: Philippe Mathieu-Daudé -Reviewed-by: Eric Blake -Reviewed-by: John Snow -Signed-off-by: Kevin Wolf -Signed-off-by: Bruce Rogers ---- - block/create.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/block/create.c b/block/create.c -index 95341219efcd670a5151d0d3f4f5..de5e97bb186ffdf039fb39980874 100644 ---- a/block/create.c -+++ b/block/create.c -@@ -63,9 +63,13 @@ void qmp_blockdev_create(const char *job_id, BlockdevCreateOptions *options, - const char *fmt = BlockdevDriver_str(options->driver); - BlockDriver *drv = bdrv_find_format(fmt); - -+ if (!drv) { -+ error_setg(errp, "Block driver '%s' not found or not supported", fmt); -+ return; -+ } -+ - /* If the driver is in the schema, we know that it exists. But it may not - * be whitelisted. */ -- assert(drv); - if (bdrv_uses_whitelist() && !bdrv_is_whitelisted(drv, false)) { - error_setg(errp, "Driver is not whitelisted"); - return; diff --git a/block-file-posix-Let-post-EOF-fallocate-.patch b/block-file-posix-Let-post-EOF-fallocate-.patch deleted file mode 100644 index 34509db..0000000 --- a/block-file-posix-Let-post-EOF-fallocate-.patch +++ /dev/null @@ -1,67 +0,0 @@ -From: Max Reitz -Date: Fri, 1 Nov 2019 16:25:10 +0100 -Subject: block/file-posix: Let post-EOF fallocate serialize - -Git-commit: 292d06b925b2787ee6f2430996b95651cae42fce - -The XFS kernel driver has a bug that may cause data corruption for qcow2 -images as of qemu commit c8bb23cbdbe32f. We can work around it by -treating post-EOF fallocates as serializing up until infinity (INT64_MAX -in practice). - -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Message-id: 20191101152510.11719-4-mreitz@redhat.com -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/file-posix.c | 36 ++++++++++++++++++++++++++++++++++++ - 1 file changed, 36 insertions(+) - -diff --git a/block/file-posix.c b/block/file-posix.c -index 992eb4a798b99fe02e93103028c6..c5df61b47735ee7e5201cebec46c 100644 ---- a/block/file-posix.c -+++ b/block/file-posix.c -@@ -2623,6 +2623,42 @@ raw_do_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int bytes, - RawPosixAIOData acb; - ThreadPoolFunc *handler; - -+#ifdef CONFIG_FALLOCATE -+ if (offset + bytes > bs->total_sectors * BDRV_SECTOR_SIZE) { -+ BdrvTrackedRequest *req; -+ uint64_t end; -+ -+ /* -+ * This is a workaround for a bug in the Linux XFS driver, -+ * where writes submitted through the AIO interface will be -+ * discarded if they happen beyond a concurrently running -+ * fallocate() that increases the file length (i.e., both the -+ * write and the fallocate() happen beyond the EOF). -+ * -+ * To work around it, we extend the tracked request for this -+ * zero write until INT64_MAX (effectively infinity), and mark -+ * it as serializing. -+ * -+ * We have to enable this workaround for all filesystems and -+ * AIO modes (not just XFS with aio=native), because for -+ * remote filesystems we do not know the host configuration. -+ */ -+ -+ req = bdrv_co_get_self_request(bs); -+ assert(req); -+ assert(req->type == BDRV_TRACKED_WRITE); -+ assert(req->offset <= offset); -+ assert(req->offset + req->bytes >= offset + bytes); -+ -+ end = INT64_MAX & -(uint64_t)bs->bl.request_alignment; -+ req->bytes = end - req->offset; -+ req->overlap_bytes = req->bytes; -+ -+ bdrv_mark_request_serialising(req, bs->bl.request_alignment); -+ bdrv_wait_serialising_requests(req); -+ } -+#endif -+ - acb = (RawPosixAIOData) { - .bs = bs, - .aio_fildes = s->fd, diff --git a/block-file-posix-Reduce-xfsctl-use.patch b/block-file-posix-Reduce-xfsctl-use.patch deleted file mode 100644 index 2959b9d..0000000 --- a/block-file-posix-Reduce-xfsctl-use.patch +++ /dev/null @@ -1,163 +0,0 @@ -From: Max Reitz -Date: Fri, 23 Aug 2019 15:03:40 +0200 -Subject: block/file-posix: Reduce xfsctl() use -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: b2c6f23f4a9f6d8f1b648705cd46d3713b78d6a2 - -This patch removes xfs_write_zeroes() and xfs_discard(). Both functions -have been added just before the same feature was present through -fallocate(): - -- fallocate() has supported PUNCH_HOLE for XFS since Linux 2.6.38 (March - 2011); xfs_discard() was added in December 2010. - -- fallocate() has supported ZERO_RANGE for XFS since Linux 3.15 (June - 2014); xfs_write_zeroes() was added in November 2013. - -Nowadays, all systems that qemu runs on should support both fallocate() -features (RHEL 7's kernel does). - -xfsctl() is still useful for getting the request alignment for O_DIRECT, -so this patch does not remove our dependency on it completely. - -Note that xfs_write_zeroes() had a bug: It calls ftruncate() when the -file is shorter than the specified range (because ZERO_RANGE does not -increase the file length). ftruncate() may yield and then discard data -that parallel write requests have written past the EOF in the meantime. -Dropping the function altogether fixes the bug. - -Suggested-by: Paolo Bonzini -Fixes: 50ba5b2d994853b38fed10e0841b119da0f8b8e5 -Reported-by: Lukáš Doktor -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Reviewed-by: Stefano Garzarella -Reviewed-by: John Snow -Tested-by: Stefano Garzarella -Tested-by: John Snow -Signed-off-by: Kevin Wolf -Signed-off-by: Bruce Rogers ---- - block/file-posix.c | 77 +--------------------------------------------- - 1 file changed, 1 insertion(+), 76 deletions(-) - -diff --git a/block/file-posix.c b/block/file-posix.c -index 4479cc7ab467f217cff8b3efbd1f..992eb4a798b99fe02e93103028c6 100644 ---- a/block/file-posix.c -+++ b/block/file-posix.c -@@ -1445,59 +1445,6 @@ out: - } - } - --#ifdef CONFIG_XFS --static int xfs_write_zeroes(BDRVRawState *s, int64_t offset, uint64_t bytes) --{ -- int64_t len; -- struct xfs_flock64 fl; -- int err; -- -- len = lseek(s->fd, 0, SEEK_END); -- if (len < 0) { -- return -errno; -- } -- -- if (offset + bytes > len) { -- /* XFS_IOC_ZERO_RANGE does not increase the file length */ -- if (ftruncate(s->fd, offset + bytes) < 0) { -- return -errno; -- } -- } -- -- memset(&fl, 0, sizeof(fl)); -- fl.l_whence = SEEK_SET; -- fl.l_start = offset; -- fl.l_len = bytes; -- -- if (xfsctl(NULL, s->fd, XFS_IOC_ZERO_RANGE, &fl) < 0) { -- err = errno; -- trace_file_xfs_write_zeroes(strerror(errno)); -- return -err; -- } -- -- return 0; --} -- --static int xfs_discard(BDRVRawState *s, int64_t offset, uint64_t bytes) --{ -- struct xfs_flock64 fl; -- int err; -- -- memset(&fl, 0, sizeof(fl)); -- fl.l_whence = SEEK_SET; -- fl.l_start = offset; -- fl.l_len = bytes; -- -- if (xfsctl(NULL, s->fd, XFS_IOC_UNRESVSP64, &fl) < 0) { -- err = errno; -- trace_file_xfs_discard(strerror(errno)); -- return -err; -- } -- -- return 0; --} --#endif -- - static int translate_err(int err) - { - if (err == -ENODEV || err == -ENOSYS || err == -EOPNOTSUPP || -@@ -1553,10 +1500,8 @@ static ssize_t handle_aiocb_write_zeroes_block(RawPosixAIOData *aiocb) - static int handle_aiocb_write_zeroes(void *opaque) - { - RawPosixAIOData *aiocb = opaque; --#if defined(CONFIG_FALLOCATE) || defined(CONFIG_XFS) -- BDRVRawState *s = aiocb->bs->opaque; --#endif - #ifdef CONFIG_FALLOCATE -+ BDRVRawState *s = aiocb->bs->opaque; - int64_t len; - #endif - -@@ -1564,12 +1509,6 @@ static int handle_aiocb_write_zeroes(void *opaque) - return handle_aiocb_write_zeroes_block(aiocb); - } - --#ifdef CONFIG_XFS -- if (s->is_xfs) { -- return xfs_write_zeroes(s, aiocb->aio_offset, aiocb->aio_nbytes); -- } --#endif -- - #ifdef CONFIG_FALLOCATE_ZERO_RANGE - if (s->has_write_zeroes) { - int ret = do_fallocate(s->fd, FALLOC_FL_ZERO_RANGE, -@@ -1632,14 +1571,6 @@ static int handle_aiocb_write_zeroes_unmap(void *opaque) - } - #endif - --#ifdef CONFIG_XFS -- if (s->is_xfs) { -- /* xfs_discard() guarantees that the discarded area reads as all-zero -- * afterwards, so we can use it here. */ -- return xfs_discard(s, aiocb->aio_offset, aiocb->aio_nbytes); -- } --#endif -- - /* If we couldn't manage to unmap while guaranteed that the area reads as - * all-zero afterwards, just write zeroes without unmapping */ - ret = handle_aiocb_write_zeroes(aiocb); -@@ -1716,12 +1647,6 @@ static int handle_aiocb_discard(void *opaque) - ret = -errno; - #endif - } else { --#ifdef CONFIG_XFS -- if (s->is_xfs) { -- return xfs_discard(s, aiocb->aio_offset, aiocb->aio_nbytes); -- } --#endif -- - #ifdef CONFIG_FALLOCATE_PUNCH_HOLE - ret = do_fallocate(s->fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, - aiocb->aio_offset, aiocb->aio_nbytes); diff --git a/block-io-refactor-padding.patch b/block-io-refactor-padding.patch deleted file mode 100644 index 288b387..0000000 --- a/block-io-refactor-padding.patch +++ /dev/null @@ -1,478 +0,0 @@ -From: Vladimir Sementsov-Ogievskiy -Date: Tue, 4 Jun 2019 19:15:05 +0300 -Subject: block/io: refactor padding - -Git-commit: 7a3f542fbdfd799be4fa6f8b96dc8c1e6933fce4 - -We have similar padding code in bdrv_co_pwritev, -bdrv_co_do_pwrite_zeroes and bdrv_co_preadv. Let's combine and unify -it. - -[Squashed in Vladimir's qemu-iotests 077 fix ---Stefan] - -Signed-off-by: Vladimir Sementsov-Ogievskiy -Acked-by: Stefan Hajnoczi -Message-id: 20190604161514.262241-4-vsementsov@virtuozzo.com -Message-Id: <20190604161514.262241-4-vsementsov@virtuozzo.com> -Signed-off-by: Stefan Hajnoczi -Signed-off-by: Bruce Rogers ---- - block/io.c | 365 +++++++++++++++++++++++++++++------------------------ - 1 file changed, 200 insertions(+), 165 deletions(-) - -diff --git a/block/io.c b/block/io.c -index 06305c6ea62efabf1efb43933bf6..bfb2653d8ee853e99bd4d55a1a87 100644 ---- a/block/io.c -+++ b/block/io.c -@@ -1408,28 +1408,177 @@ out: - } - - /* -- * Handle a read request in coroutine context -+ * Request padding -+ * -+ * |<---- align ----->| |<----- align ---->| -+ * |<- head ->|<------------- bytes ------------->|<-- tail -->| -+ * | | | | | | -+ * -*----------$-------*-------- ... --------*-----$------------*--- -+ * | | | | | | -+ * | offset | | end | -+ * ALIGN_DOWN(offset) ALIGN_UP(offset) ALIGN_DOWN(end) ALIGN_UP(end) -+ * [buf ... ) [tail_buf ) -+ * -+ * @buf is an aligned allocation needed to store @head and @tail paddings. @head -+ * is placed at the beginning of @buf and @tail at the @end. -+ * -+ * @tail_buf is a pointer to sub-buffer, corresponding to align-sized chunk -+ * around tail, if tail exists. -+ * -+ * @merge_reads is true for small requests, -+ * if @buf_len == @head + bytes + @tail. In this case it is possible that both -+ * head and tail exist but @buf_len == align and @tail_buf == @buf. -+ */ -+typedef struct BdrvRequestPadding { -+ uint8_t *buf; -+ size_t buf_len; -+ uint8_t *tail_buf; -+ size_t head; -+ size_t tail; -+ bool merge_reads; -+ QEMUIOVector local_qiov; -+} BdrvRequestPadding; -+ -+static bool bdrv_init_padding(BlockDriverState *bs, -+ int64_t offset, int64_t bytes, -+ BdrvRequestPadding *pad) -+{ -+ uint64_t align = bs->bl.request_alignment; -+ size_t sum; -+ -+ memset(pad, 0, sizeof(*pad)); -+ -+ pad->head = offset & (align - 1); -+ pad->tail = ((offset + bytes) & (align - 1)); -+ if (pad->tail) { -+ pad->tail = align - pad->tail; -+ } -+ -+ if ((!pad->head && !pad->tail) || !bytes) { -+ return false; -+ } -+ -+ sum = pad->head + bytes + pad->tail; -+ pad->buf_len = (sum > align && pad->head && pad->tail) ? 2 * align : align; -+ pad->buf = qemu_blockalign(bs, pad->buf_len); -+ pad->merge_reads = sum == pad->buf_len; -+ if (pad->tail) { -+ pad->tail_buf = pad->buf + pad->buf_len - align; -+ } -+ -+ return true; -+} -+ -+static int bdrv_padding_rmw_read(BdrvChild *child, -+ BdrvTrackedRequest *req, -+ BdrvRequestPadding *pad, -+ bool zero_middle) -+{ -+ QEMUIOVector local_qiov; -+ BlockDriverState *bs = child->bs; -+ uint64_t align = bs->bl.request_alignment; -+ int ret; -+ -+ assert(req->serialising && pad->buf); -+ -+ if (pad->head || pad->merge_reads) { -+ uint64_t bytes = pad->merge_reads ? pad->buf_len : align; -+ -+ qemu_iovec_init_buf(&local_qiov, pad->buf, bytes); -+ -+ if (pad->head) { -+ bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_HEAD); -+ } -+ if (pad->merge_reads && pad->tail) { -+ bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_TAIL); -+ } -+ ret = bdrv_aligned_preadv(child, req, req->overlap_offset, bytes, -+ align, &local_qiov, 0); -+ if (ret < 0) { -+ return ret; -+ } -+ if (pad->head) { -+ bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_AFTER_HEAD); -+ } -+ if (pad->merge_reads && pad->tail) { -+ bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_AFTER_TAIL); -+ } -+ -+ if (pad->merge_reads) { -+ goto zero_mem; -+ } -+ } -+ -+ if (pad->tail) { -+ qemu_iovec_init_buf(&local_qiov, pad->tail_buf, align); -+ -+ bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_TAIL); -+ ret = bdrv_aligned_preadv( -+ child, req, -+ req->overlap_offset + req->overlap_bytes - align, -+ align, align, &local_qiov, 0); -+ if (ret < 0) { -+ return ret; -+ } -+ bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_AFTER_TAIL); -+ } -+ -+zero_mem: -+ if (zero_middle) { -+ memset(pad->buf + pad->head, 0, pad->buf_len - pad->head - pad->tail); -+ } -+ -+ return 0; -+} -+ -+static void bdrv_padding_destroy(BdrvRequestPadding *pad) -+{ -+ if (pad->buf) { -+ qemu_vfree(pad->buf); -+ qemu_iovec_destroy(&pad->local_qiov); -+ } -+} -+ -+/* -+ * bdrv_pad_request -+ * -+ * Exchange request parameters with padded request if needed. Don't include RMW -+ * read of padding, bdrv_padding_rmw_read() should be called separately if -+ * needed. -+ * -+ * All parameters except @bs are in-out: they represent original request at -+ * function call and padded (if padding needed) at function finish. -+ * -+ * Function always succeeds. - */ -+static bool bdrv_pad_request(BlockDriverState *bs, QEMUIOVector **qiov, -+ int64_t *offset, unsigned int *bytes, -+ BdrvRequestPadding *pad) -+{ -+ if (!bdrv_init_padding(bs, *offset, *bytes, pad)) { -+ return false; -+ } -+ -+ qemu_iovec_init_extended(&pad->local_qiov, pad->buf, pad->head, -+ *qiov, 0, *bytes, -+ pad->buf + pad->buf_len - pad->tail, pad->tail); -+ *bytes += pad->head + pad->tail; -+ *offset -= pad->head; -+ *qiov = &pad->local_qiov; -+ -+ return true; -+} -+ - int coroutine_fn bdrv_co_preadv(BdrvChild *child, - int64_t offset, unsigned int bytes, QEMUIOVector *qiov, - BdrvRequestFlags flags) - { - BlockDriverState *bs = child->bs; -- BlockDriver *drv = bs->drv; - BdrvTrackedRequest req; -- -- uint64_t align = bs->bl.request_alignment; -- uint8_t *head_buf = NULL; -- uint8_t *tail_buf = NULL; -- QEMUIOVector local_qiov; -- bool use_local_qiov = false; -+ BdrvRequestPadding pad; - int ret; - -- trace_bdrv_co_preadv(child->bs, offset, bytes, flags); -- -- if (!drv) { -- return -ENOMEDIUM; -- } -+ trace_bdrv_co_preadv(bs, offset, bytes, flags); - - ret = bdrv_check_byte_request(bs, offset, bytes); - if (ret < 0) { -@@ -1443,43 +1592,16 @@ int coroutine_fn bdrv_co_preadv(BdrvChild *child, - flags |= BDRV_REQ_COPY_ON_READ; - } - -- /* Align read if necessary by padding qiov */ -- if (offset & (align - 1)) { -- head_buf = qemu_blockalign(bs, align); -- qemu_iovec_init(&local_qiov, qiov->niov + 2); -- qemu_iovec_add(&local_qiov, head_buf, offset & (align - 1)); -- qemu_iovec_concat(&local_qiov, qiov, 0, qiov->size); -- use_local_qiov = true; -- -- bytes += offset & (align - 1); -- offset = offset & ~(align - 1); -- } -- -- if ((offset + bytes) & (align - 1)) { -- if (!use_local_qiov) { -- qemu_iovec_init(&local_qiov, qiov->niov + 1); -- qemu_iovec_concat(&local_qiov, qiov, 0, qiov->size); -- use_local_qiov = true; -- } -- tail_buf = qemu_blockalign(bs, align); -- qemu_iovec_add(&local_qiov, tail_buf, -- align - ((offset + bytes) & (align - 1))); -- -- bytes = ROUND_UP(bytes, align); -- } -+ bdrv_pad_request(bs, &qiov, &offset, &bytes, &pad); - - tracked_request_begin(&req, bs, offset, bytes, BDRV_TRACKED_READ); -- ret = bdrv_aligned_preadv(child, &req, offset, bytes, align, -- use_local_qiov ? &local_qiov : qiov, -- flags); -+ ret = bdrv_aligned_preadv(child, &req, offset, bytes, -+ bs->bl.request_alignment, -+ qiov, flags); - tracked_request_end(&req); - bdrv_dec_in_flight(bs); - -- if (use_local_qiov) { -- qemu_iovec_destroy(&local_qiov); -- qemu_vfree(head_buf); -- qemu_vfree(tail_buf); -- } -+ bdrv_padding_destroy(&pad); - - return ret; - } -@@ -1775,44 +1897,34 @@ static int coroutine_fn bdrv_co_do_zero_pwritev(BdrvChild *child, - BdrvTrackedRequest *req) - { - BlockDriverState *bs = child->bs; -- uint8_t *buf = NULL; - QEMUIOVector local_qiov; - uint64_t align = bs->bl.request_alignment; -- unsigned int head_padding_bytes, tail_padding_bytes; - int ret = 0; -+ bool padding; -+ BdrvRequestPadding pad; - -- head_padding_bytes = offset & (align - 1); -- tail_padding_bytes = (align - (offset + bytes)) & (align - 1); -- -- -- assert(flags & BDRV_REQ_ZERO_WRITE); -- if (head_padding_bytes || tail_padding_bytes) { -- buf = qemu_blockalign(bs, align); -- qemu_iovec_init_buf(&local_qiov, buf, align); -- } -- if (head_padding_bytes) { -- uint64_t zero_bytes = MIN(bytes, align - head_padding_bytes); -- -- /* RMW the unaligned part before head. */ -+ padding = bdrv_init_padding(bs, offset, bytes, &pad); -+ if (padding) { - mark_request_serialising(req, align); - wait_serialising_requests(req); -- bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_HEAD); -- ret = bdrv_aligned_preadv(child, req, offset & ~(align - 1), align, -- align, &local_qiov, 0); -- if (ret < 0) { -- goto fail; -- } -- bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_AFTER_HEAD); - -- memset(buf + head_padding_bytes, 0, zero_bytes); -- ret = bdrv_aligned_pwritev(child, req, offset & ~(align - 1), align, -- align, &local_qiov, -- flags & ~BDRV_REQ_ZERO_WRITE); -- if (ret < 0) { -- goto fail; -+ bdrv_padding_rmw_read(child, req, &pad, true); -+ -+ if (pad.head || pad.merge_reads) { -+ int64_t aligned_offset = offset & ~(align - 1); -+ int64_t write_bytes = pad.merge_reads ? pad.buf_len : align; -+ -+ qemu_iovec_init_buf(&local_qiov, pad.buf, write_bytes); -+ ret = bdrv_aligned_pwritev(child, req, aligned_offset, write_bytes, -+ align, &local_qiov, -+ flags & ~BDRV_REQ_ZERO_WRITE); -+ if (ret < 0 || pad.merge_reads) { -+ /* Error or all work is done */ -+ goto out; -+ } -+ offset += write_bytes - pad.head; -+ bytes -= write_bytes - pad.head; - } -- offset += zero_bytes; -- bytes -= zero_bytes; - } - - assert(!bytes || (offset & (align - 1)) == 0); -@@ -1822,7 +1934,7 @@ static int coroutine_fn bdrv_co_do_zero_pwritev(BdrvChild *child, - ret = bdrv_aligned_pwritev(child, req, offset, aligned_bytes, align, - NULL, flags); - if (ret < 0) { -- goto fail; -+ goto out; - } - bytes -= aligned_bytes; - offset += aligned_bytes; -@@ -1830,26 +1942,17 @@ static int coroutine_fn bdrv_co_do_zero_pwritev(BdrvChild *child, - - assert(!bytes || (offset & (align - 1)) == 0); - if (bytes) { -- assert(align == tail_padding_bytes + bytes); -- /* RMW the unaligned part after tail. */ -- mark_request_serialising(req, align); -- wait_serialising_requests(req); -- bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_TAIL); -- ret = bdrv_aligned_preadv(child, req, offset, align, -- align, &local_qiov, 0); -- if (ret < 0) { -- goto fail; -- } -- bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_AFTER_TAIL); -+ assert(align == pad.tail + bytes); - -- memset(buf, 0, bytes); -+ qemu_iovec_init_buf(&local_qiov, pad.tail_buf, align); - ret = bdrv_aligned_pwritev(child, req, offset, align, align, - &local_qiov, flags & ~BDRV_REQ_ZERO_WRITE); - } --fail: -- qemu_vfree(buf); -- return ret; - -+out: -+ bdrv_padding_destroy(&pad); -+ -+ return ret; - } - - /* -@@ -1862,10 +1965,7 @@ int coroutine_fn bdrv_co_pwritev(BdrvChild *child, - BlockDriverState *bs = child->bs; - BdrvTrackedRequest req; - uint64_t align = bs->bl.request_alignment; -- uint8_t *head_buf = NULL; -- uint8_t *tail_buf = NULL; -- QEMUIOVector local_qiov; -- bool use_local_qiov = false; -+ BdrvRequestPadding pad; - int ret; - - trace_bdrv_co_pwritev(child->bs, offset, bytes, flags); -@@ -1892,86 +1992,21 @@ int coroutine_fn bdrv_co_pwritev(BdrvChild *child, - goto out; - } - -- if (offset & (align - 1)) { -- QEMUIOVector head_qiov; -- -+ if (bdrv_pad_request(bs, &qiov, &offset, &bytes, &pad)) { - mark_request_serialising(&req, align); - wait_serialising_requests(&req); -- -- head_buf = qemu_blockalign(bs, align); -- qemu_iovec_init_buf(&head_qiov, head_buf, align); -- -- bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_HEAD); -- ret = bdrv_aligned_preadv(child, &req, offset & ~(align - 1), align, -- align, &head_qiov, 0); -- if (ret < 0) { -- goto fail; -- } -- bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_AFTER_HEAD); -- -- qemu_iovec_init(&local_qiov, qiov->niov + 2); -- qemu_iovec_add(&local_qiov, head_buf, offset & (align - 1)); -- qemu_iovec_concat(&local_qiov, qiov, 0, qiov->size); -- use_local_qiov = true; -- -- bytes += offset & (align - 1); -- offset = offset & ~(align - 1); -- -- /* We have read the tail already if the request is smaller -- * than one aligned block. -- */ -- if (bytes < align) { -- qemu_iovec_add(&local_qiov, head_buf + bytes, align - bytes); -- bytes = align; -- } -- } -- -- if ((offset + bytes) & (align - 1)) { -- QEMUIOVector tail_qiov; -- size_t tail_bytes; -- bool waited; -- -- mark_request_serialising(&req, align); -- waited = wait_serialising_requests(&req); -- assert(!waited || !use_local_qiov); -- -- tail_buf = qemu_blockalign(bs, align); -- qemu_iovec_init_buf(&tail_qiov, tail_buf, align); -- -- bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_TAIL); -- ret = bdrv_aligned_preadv(child, &req, (offset + bytes) & ~(align - 1), -- align, align, &tail_qiov, 0); -- if (ret < 0) { -- goto fail; -- } -- bdrv_debug_event(bs, BLKDBG_PWRITEV_RMW_AFTER_TAIL); -- -- if (!use_local_qiov) { -- qemu_iovec_init(&local_qiov, qiov->niov + 1); -- qemu_iovec_concat(&local_qiov, qiov, 0, qiov->size); -- use_local_qiov = true; -- } -- -- tail_bytes = (offset + bytes) & (align - 1); -- qemu_iovec_add(&local_qiov, tail_buf + tail_bytes, align - tail_bytes); -- -- bytes = ROUND_UP(bytes, align); -+ bdrv_padding_rmw_read(child, &req, &pad, false); - } - - ret = bdrv_aligned_pwritev(child, &req, offset, bytes, align, -- use_local_qiov ? &local_qiov : qiov, -- flags); -+ qiov, flags); - --fail: -+ bdrv_padding_destroy(&pad); - -- if (use_local_qiov) { -- qemu_iovec_destroy(&local_qiov); -- } -- qemu_vfree(head_buf); -- qemu_vfree(tail_buf); - out: - tracked_request_end(&req); - bdrv_dec_in_flight(bs); -+ - return ret; - } - diff --git a/block-nfs-tear-down-aio-before-nfs_close.patch b/block-nfs-tear-down-aio-before-nfs_close.patch deleted file mode 100644 index dd87a98..0000000 --- a/block-nfs-tear-down-aio-before-nfs_close.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Peter Lieven -Date: Tue, 10 Sep 2019 17:41:09 +0200 -Subject: block/nfs: tear down aio before nfs_close - -Git-commit: 601dc6559725f7a614b6f893611e17ff0908e914 - -nfs_close is a sync call from libnfs and has its own event -handler polling on the nfs FD. Avoid that both QEMU and libnfs -are intefering here. - -CC: qemu-stable@nongnu.org -Signed-off-by: Peter Lieven -Signed-off-by: Kevin Wolf -Signed-off-by: Bruce Rogers ---- - block/nfs.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/block/nfs.c b/block/nfs.c -index d93241b3bb84cf0a662f0ddec582..2b7a0782419af82aea80dd76e474 100644 ---- a/block/nfs.c -+++ b/block/nfs.c -@@ -390,12 +390,14 @@ static void nfs_attach_aio_context(BlockDriverState *bs, - static void nfs_client_close(NFSClient *client) - { - if (client->context) { -+ qemu_mutex_lock(&client->mutex); -+ aio_set_fd_handler(client->aio_context, nfs_get_fd(client->context), -+ false, NULL, NULL, NULL, NULL); -+ qemu_mutex_unlock(&client->mutex); - if (client->fh) { - nfs_close(client->context, client->fh); - client->fh = NULL; - } -- aio_set_fd_handler(client->aio_context, nfs_get_fd(client->context), -- false, NULL, NULL, NULL, NULL); - nfs_destroy_context(client->context); - client->context = NULL; - } diff --git a/blockjob-update-nodes-head-while-removin.patch b/blockjob-update-nodes-head-while-removin.patch deleted file mode 100644 index 016a35a..0000000 --- a/blockjob-update-nodes-head-while-removin.patch +++ /dev/null @@ -1,59 +0,0 @@ -From: Sergio Lopez -Date: Wed, 11 Sep 2019 12:03:16 +0200 -Subject: blockjob: update nodes head while removing all bdrv - -Git-commit: d876bf676f5e7c6aa9ac64555e48cba8734ecb2f - -block_job_remove_all_bdrv() iterates through job->nodes, calling -bdrv_root_unref_child() for each entry. The call to the latter may -reach child_job_[can_]set_aio_ctx(), which will also attempt to -traverse job->nodes, potentially finding entries that where freed -on previous iterations. - -To avoid this situation, update job->nodes head on each iteration to -ensure that already freed entries are no longer linked to the list. - -RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1746631 -Signed-off-by: Sergio Lopez -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Message-id: 20190911100316.32282-1-mreitz@redhat.com -Reviewed-by: Sergio Lopez -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - blockjob.c | 17 +++++++++++++---- - 1 file changed, 13 insertions(+), 4 deletions(-) - -diff --git a/blockjob.c b/blockjob.c -index 20b7f557da3e491927b99b113b73..74abb97bfdf27b5a9f4f82cd55b4 100644 ---- a/blockjob.c -+++ b/blockjob.c -@@ -186,14 +186,23 @@ static const BdrvChildRole child_job = { - - void block_job_remove_all_bdrv(BlockJob *job) - { -- GSList *l; -- for (l = job->nodes; l; l = l->next) { -+ /* -+ * bdrv_root_unref_child() may reach child_job_[can_]set_aio_ctx(), -+ * which will also traverse job->nodes, so consume the list one by -+ * one to make sure that such a concurrent access does not attempt -+ * to process an already freed BdrvChild. -+ */ -+ while (job->nodes) { -+ GSList *l = job->nodes; - BdrvChild *c = l->data; -+ -+ job->nodes = l->next; -+ - bdrv_op_unblock_all(c->bs, job->blocker); - bdrv_root_unref_child(c); -+ -+ g_slist_free_1(l); - } -- g_slist_free(job->nodes); -- job->nodes = NULL; - } - - bool block_job_has_bdrv(BlockJob *job, BlockDriverState *bs) diff --git a/bundles.tar.xz b/bundles.tar.xz index 575cbd3..fe211ab 100644 --- a/bundles.tar.xz +++ b/bundles.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c674d3cdda7189a79c9f7babf6858dddc3bf621d19f43e80cacf8fb6c85cc12 -size 60840 +oid sha256:e298b3bf15adb6636508ea8533f64bf155f5afd6da75078522d133bddb6e21f6 +size 37264 diff --git a/config.sh b/config.sh index 6cbf299..fc40e0f 100644 --- a/config.sh +++ b/config.sh @@ -7,7 +7,7 @@ # 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=v4.1.0 +GIT_UPSTREAM_COMMIT_ISH=v4.1.1 # 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 diff --git a/coroutine-Add-qemu_co_mutex_assert_locke.patch b/coroutine-Add-qemu_co_mutex_assert_locke.patch deleted file mode 100644 index 6b9b25c..0000000 --- a/coroutine-Add-qemu_co_mutex_assert_locke.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Kevin Wolf -Date: Thu, 24 Oct 2019 16:26:57 +0200 -Subject: coroutine: Add qemu_co_mutex_assert_locked() - -Git-commit: 944f3d5dd216fcd8cb007eddd4f82dced0a15b3d - -Some functions require that the caller holds a certain CoMutex for them -to operate correctly. Add a function so that they can assert the lock is -really held. - -Cc: qemu-stable@nongnu.org -Signed-off-by: Kevin Wolf -Tested-by: Michael Weiser -Reviewed-by: Michael Weiser -Reviewed-by: Vladimir Sementsov-Ogievskiy -Reviewed-by: Denis V. Lunev -Reviewed-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - include/qemu/coroutine.h | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h -index 9801e7f5a4978bf4a5a74d33aeb6..f4843b5f595eb0beb1ce2f3e4e39 100644 ---- a/include/qemu/coroutine.h -+++ b/include/qemu/coroutine.h -@@ -167,6 +167,21 @@ void coroutine_fn qemu_co_mutex_lock(CoMutex *mutex); - */ - void coroutine_fn qemu_co_mutex_unlock(CoMutex *mutex); - -+/** -+ * Assert that the current coroutine holds @mutex. -+ */ -+static inline coroutine_fn void qemu_co_mutex_assert_locked(CoMutex *mutex) -+{ -+ /* -+ * mutex->holder doesn't need any synchronisation if the assertion holds -+ * true because the mutex protects it. If it doesn't hold true, we still -+ * don't mind if another thread takes or releases mutex behind our back, -+ * because the condition will be false no matter whether we read NULL or -+ * the pointer for any other coroutine. -+ */ -+ assert(atomic_read(&mutex->locked) && -+ mutex->holder == qemu_coroutine_self()); -+} - - /** - * CoQueues are a mechanism to queue coroutines in order to continue executing diff --git a/curl-Check-completion-in-curl_multi_do.patch b/curl-Check-completion-in-curl_multi_do.patch deleted file mode 100644 index 3fef074..0000000 --- a/curl-Check-completion-in-curl_multi_do.patch +++ /dev/null @@ -1,71 +0,0 @@ -From: Max Reitz -Date: Tue, 10 Sep 2019 14:41:32 +0200 -Subject: curl: Check completion in curl_multi_do() - -Git-commit: 948403bcb1c7e71dcbe8ab8479cf3934a0efcbb5 - -While it is more likely that transfers complete after some file -descriptor has data ready to read, we probably should not rely on it. -Better be safe than sorry and call curl_multi_check_completion() in -curl_multi_do(), too, just like it is done in curl_multi_read(). - -With this change, curl_multi_do() and curl_multi_read() are actually the -same, so drop curl_multi_read() and use curl_multi_do() as the sole FD -handler. - -Signed-off-by: Max Reitz -Message-id: 20190910124136.10565-4-mreitz@redhat.com -Reviewed-by: Maxim Levitsky -Reviewed-by: John Snow -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/curl.c | 14 ++------------ - 1 file changed, 2 insertions(+), 12 deletions(-) - -diff --git a/block/curl.c b/block/curl.c -index 95d7b77dc0b1cf25443effdb9eb3..5838afef99e070d8e7b704fa55e7 100644 ---- a/block/curl.c -+++ b/block/curl.c -@@ -139,7 +139,6 @@ typedef struct BDRVCURLState { - - static void curl_clean_state(CURLState *s); - static void curl_multi_do(void *arg); --static void curl_multi_read(void *arg); - - #ifdef NEED_CURL_TIMER_CALLBACK - /* Called from curl_multi_do_locked, with s->mutex held. */ -@@ -186,7 +185,7 @@ static int curl_sock_cb(CURL *curl, curl_socket_t fd, int action, - switch (action) { - case CURL_POLL_IN: - aio_set_fd_handler(s->aio_context, fd, false, -- curl_multi_read, NULL, NULL, state); -+ curl_multi_do, NULL, NULL, state); - break; - case CURL_POLL_OUT: - aio_set_fd_handler(s->aio_context, fd, false, -@@ -194,7 +193,7 @@ static int curl_sock_cb(CURL *curl, curl_socket_t fd, int action, - break; - case CURL_POLL_INOUT: - aio_set_fd_handler(s->aio_context, fd, false, -- curl_multi_read, curl_multi_do, NULL, state); -+ curl_multi_do, curl_multi_do, NULL, state); - break; - case CURL_POLL_REMOVE: - aio_set_fd_handler(s->aio_context, fd, false, -@@ -416,15 +415,6 @@ static void curl_multi_do(void *arg) - { - CURLState *s = (CURLState *)arg; - -- qemu_mutex_lock(&s->s->mutex); -- curl_multi_do_locked(s); -- qemu_mutex_unlock(&s->s->mutex); --} -- --static void curl_multi_read(void *arg) --{ -- CURLState *s = (CURLState *)arg; -- - qemu_mutex_lock(&s->s->mutex); - curl_multi_do_locked(s); - curl_multi_check_completion(s->s); diff --git a/curl-Handle-success-in-multi_check_compl.patch b/curl-Handle-success-in-multi_check_compl.patch deleted file mode 100644 index d49daff..0000000 --- a/curl-Handle-success-in-multi_check_compl.patch +++ /dev/null @@ -1,146 +0,0 @@ -From: Max Reitz -Date: Tue, 10 Sep 2019 14:41:35 +0200 -Subject: curl: Handle success in multi_check_completion - -Git-commit: bfb23b480a49114315877aacf700b49453e0f9d9 - -Background: As of cURL 7.59.0, it verifies that several functions are -not called from within a callback. Among these functions is -curl_multi_add_handle(). - -curl_read_cb() is a callback from cURL and not a coroutine. Waking up -acb->co will lead to entering it then and there, which means the current -request will settle and the caller (if it runs in the same coroutine) -may then issue the next request. In such a case, we will enter -curl_setup_preadv() effectively from within curl_read_cb(). - -Calling curl_multi_add_handle() will then fail and the new request will -not be processed. - -Fix this by not letting curl_read_cb() wake up acb->co. Instead, leave -the whole business of settling the AIOCB objects to -curl_multi_check_completion() (which is called from our timer callback -and our FD handler, so not from any cURL callbacks). - -Reported-by: Natalie Gavrielov -Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1740193 -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Message-id: 20190910124136.10565-7-mreitz@redhat.com -Reviewed-by: John Snow -Reviewed-by: Maxim Levitsky -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/curl.c | 69 ++++++++++++++++++++++------------------------------ - 1 file changed, 29 insertions(+), 40 deletions(-) - -diff --git a/block/curl.c b/block/curl.c -index fd70f1ebc458f22f6d1a4bc01e1e..c343c7ed3ddad205051d7e3b0196 100644 ---- a/block/curl.c -+++ b/block/curl.c -@@ -229,7 +229,6 @@ static size_t curl_read_cb(void *ptr, size_t size, size_t nmemb, void *opaque) - { - CURLState *s = ((CURLState*)opaque); - size_t realsize = size * nmemb; -- int i; - - trace_curl_read_cb(realsize); - -@@ -245,32 +244,6 @@ static size_t curl_read_cb(void *ptr, size_t size, size_t nmemb, void *opaque) - memcpy(s->orig_buf + s->buf_off, ptr, realsize); - s->buf_off += realsize; - -- for(i=0; iacb[i]; -- -- if (!acb) -- continue; -- -- if ((s->buf_off >= acb->end)) { -- size_t request_length = acb->bytes; -- -- qemu_iovec_from_buf(acb->qiov, 0, s->orig_buf + acb->start, -- acb->end - acb->start); -- -- if (acb->end - acb->start < request_length) { -- size_t offset = acb->end - acb->start; -- qemu_iovec_memset(acb->qiov, offset, 0, -- request_length - offset); -- } -- -- acb->ret = 0; -- s->acb[i] = NULL; -- qemu_mutex_unlock(&s->s->mutex); -- aio_co_wake(acb->co); -- qemu_mutex_lock(&s->s->mutex); -- } -- } -- - read_end: - /* curl will error out if we do not return this value */ - return size * nmemb; -@@ -351,13 +324,14 @@ static void curl_multi_check_completion(BDRVCURLState *s) - break; - - if (msg->msg == CURLMSG_DONE) { -+ int i; - CURLState *state = NULL; -+ bool error = msg->data.result != CURLE_OK; -+ - curl_easy_getinfo(msg->easy_handle, CURLINFO_PRIVATE, - (char **)&state); - -- /* ACBs for successful messages get completed in curl_read_cb */ -- if (msg->data.result != CURLE_OK) { -- int i; -+ if (error) { - static int errcount = 100; - - /* Don't lose the original error message from curl, since -@@ -369,20 +343,35 @@ static void curl_multi_check_completion(BDRVCURLState *s) - error_report("curl: further errors suppressed"); - } - } -+ } - -- for (i = 0; i < CURL_NUM_ACB; i++) { -- CURLAIOCB *acb = state->acb[i]; -+ for (i = 0; i < CURL_NUM_ACB; i++) { -+ CURLAIOCB *acb = state->acb[i]; - -- if (acb == NULL) { -- continue; -- } -+ if (acb == NULL) { -+ continue; -+ } -+ -+ if (!error) { -+ /* Assert that we have read all data */ -+ assert(state->buf_off >= acb->end); -+ -+ qemu_iovec_from_buf(acb->qiov, 0, -+ state->orig_buf + acb->start, -+ acb->end - acb->start); - -- acb->ret = -EIO; -- state->acb[i] = NULL; -- qemu_mutex_unlock(&s->mutex); -- aio_co_wake(acb->co); -- qemu_mutex_lock(&s->mutex); -+ if (acb->end - acb->start < acb->bytes) { -+ size_t offset = acb->end - acb->start; -+ qemu_iovec_memset(acb->qiov, offset, 0, -+ acb->bytes - offset); -+ } - } -+ -+ acb->ret = error ? -EIO : 0; -+ state->acb[i] = NULL; -+ qemu_mutex_unlock(&s->mutex); -+ aio_co_wake(acb->co); -+ qemu_mutex_lock(&s->mutex); - } - - curl_clean_state(state); diff --git a/curl-Keep-pointer-to-the-CURLState-in-CU.patch b/curl-Keep-pointer-to-the-CURLState-in-CU.patch deleted file mode 100644 index abcec66..0000000 --- a/curl-Keep-pointer-to-the-CURLState-in-CU.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Max Reitz -Date: Tue, 10 Sep 2019 14:41:30 +0200 -Subject: curl: Keep pointer to the CURLState in CURLSocket - -Git-commit: 0487861685294660b23bc146e1ebd5304aa8bbe0 - -A follow-up patch will make curl_multi_do() and curl_multi_read() take a -CURLSocket instead of the CURLState. They still need the latter, -though, so add a pointer to it to the former. - -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Reviewed-by: John Snow -Message-id: 20190910124136.10565-2-mreitz@redhat.com -Reviewed-by: Maxim Levitsky -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/curl.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/block/curl.c b/block/curl.c -index d4c8e94f3e0fe26ee221e763356e..92dc2f630e20f4a6b138c9c82b8b 100644 ---- a/block/curl.c -+++ b/block/curl.c -@@ -80,6 +80,7 @@ static CURLMcode __curl_multi_socket_action(CURLM *multi_handle, - #define CURL_BLOCK_OPT_TIMEOUT_DEFAULT 5 - - struct BDRVCURLState; -+struct CURLState; - - static bool libcurl_initialized; - -@@ -97,6 +98,7 @@ typedef struct CURLAIOCB { - - typedef struct CURLSocket { - int fd; -+ struct CURLState *state; - QLIST_ENTRY(CURLSocket) next; - } CURLSocket; - -@@ -180,6 +182,7 @@ static int curl_sock_cb(CURL *curl, curl_socket_t fd, int action, - if (!socket) { - socket = g_new0(CURLSocket, 1); - socket->fd = fd; -+ socket->state = state; - QLIST_INSERT_HEAD(&state->sockets, socket, next); - } - socket = NULL; diff --git a/curl-Keep-socket-until-the-end-of-curl_s.patch b/curl-Keep-socket-until-the-end-of-curl_s.patch deleted file mode 100644 index 0aaf5b4..0000000 --- a/curl-Keep-socket-until-the-end-of-curl_s.patch +++ /dev/null @@ -1,56 +0,0 @@ -From: Max Reitz -Date: Tue, 10 Sep 2019 14:41:31 +0200 -Subject: curl: Keep *socket until the end of curl_sock_cb() - -Git-commit: 007f339b1099af46a008dac438ca0943e31dba72 - -This does not really change anything, but it makes the code a bit easier -to follow once we use @socket as the opaque pointer for -aio_set_fd_handler(). - -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Message-id: 20190910124136.10565-3-mreitz@redhat.com -Reviewed-by: Maxim Levitsky -Reviewed-by: John Snow -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/curl.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/block/curl.c b/block/curl.c -index 92dc2f630e20f4a6b138c9c82b8b..95d7b77dc0b1cf25443effdb9eb3 100644 ---- a/block/curl.c -+++ b/block/curl.c -@@ -172,10 +172,6 @@ static int curl_sock_cb(CURL *curl, curl_socket_t fd, int action, - - QLIST_FOREACH(socket, &state->sockets, next) { - if (socket->fd == fd) { -- if (action == CURL_POLL_REMOVE) { -- QLIST_REMOVE(socket, next); -- g_free(socket); -- } - break; - } - } -@@ -185,7 +181,6 @@ static int curl_sock_cb(CURL *curl, curl_socket_t fd, int action, - socket->state = state; - QLIST_INSERT_HEAD(&state->sockets, socket, next); - } -- socket = NULL; - - trace_curl_sock_cb(action, (int)fd); - switch (action) { -@@ -207,6 +202,11 @@ static int curl_sock_cb(CURL *curl, curl_socket_t fd, int action, - break; - } - -+ if (action == CURL_POLL_REMOVE) { -+ QLIST_REMOVE(socket, next); -+ g_free(socket); -+ } -+ - return 0; - } - diff --git a/curl-Pass-CURLSocket-to-curl_multi_do.patch b/curl-Pass-CURLSocket-to-curl_multi_do.patch deleted file mode 100644 index 4364b44..0000000 --- a/curl-Pass-CURLSocket-to-curl_multi_do.patch +++ /dev/null @@ -1,77 +0,0 @@ -From: Max Reitz -Date: Tue, 10 Sep 2019 14:41:33 +0200 -Subject: curl: Pass CURLSocket to curl_multi_do() - -Git-commit: 9dbad87d25587ff640ef878f7b6159fc368ff541 - -curl_multi_do_locked() currently marks all sockets as ready. That is -not only inefficient, but in fact unsafe (the loop is). A follow-up -patch will change that, but to do so, curl_multi_do_locked() needs to -know exactly which socket is ready; and that is accomplished by this -patch here. - -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Message-id: 20190910124136.10565-5-mreitz@redhat.com -Reviewed-by: Maxim Levitsky -Reviewed-by: John Snow -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/curl.c | 20 +++++++++++--------- - 1 file changed, 11 insertions(+), 9 deletions(-) - -diff --git a/block/curl.c b/block/curl.c -index 5838afef99e070d8e7b704fa55e7..cf2686218dcf4bc7d2db1a7026f9 100644 ---- a/block/curl.c -+++ b/block/curl.c -@@ -185,15 +185,15 @@ static int curl_sock_cb(CURL *curl, curl_socket_t fd, int action, - switch (action) { - case CURL_POLL_IN: - aio_set_fd_handler(s->aio_context, fd, false, -- curl_multi_do, NULL, NULL, state); -+ curl_multi_do, NULL, NULL, socket); - break; - case CURL_POLL_OUT: - aio_set_fd_handler(s->aio_context, fd, false, -- NULL, curl_multi_do, NULL, state); -+ NULL, curl_multi_do, NULL, socket); - break; - case CURL_POLL_INOUT: - aio_set_fd_handler(s->aio_context, fd, false, -- curl_multi_do, curl_multi_do, NULL, state); -+ curl_multi_do, curl_multi_do, NULL, socket); - break; - case CURL_POLL_REMOVE: - aio_set_fd_handler(s->aio_context, fd, false, -@@ -392,9 +392,10 @@ static void curl_multi_check_completion(BDRVCURLState *s) - } - - /* Called with s->mutex held. */ --static void curl_multi_do_locked(CURLState *s) -+static void curl_multi_do_locked(CURLSocket *ready_socket) - { - CURLSocket *socket, *next_socket; -+ CURLState *s = ready_socket->state; - int running; - int r; - -@@ -413,12 +414,13 @@ static void curl_multi_do_locked(CURLState *s) - - static void curl_multi_do(void *arg) - { -- CURLState *s = (CURLState *)arg; -+ CURLSocket *socket = arg; -+ BDRVCURLState *s = socket->state->s; - -- qemu_mutex_lock(&s->s->mutex); -- curl_multi_do_locked(s); -- curl_multi_check_completion(s->s); -- qemu_mutex_unlock(&s->s->mutex); -+ qemu_mutex_lock(&s->mutex); -+ curl_multi_do_locked(socket); -+ curl_multi_check_completion(s); -+ qemu_mutex_unlock(&s->mutex); - } - - static void curl_multi_timeout_do(void *arg) diff --git a/curl-Report-only-ready-sockets.patch b/curl-Report-only-ready-sockets.patch deleted file mode 100644 index ba06e77..0000000 --- a/curl-Report-only-ready-sockets.patch +++ /dev/null @@ -1,61 +0,0 @@ -From: Max Reitz -Date: Tue, 10 Sep 2019 14:41:34 +0200 -Subject: curl: Report only ready sockets - -Git-commit: 9abaf9fc474c3dd53e8e119326abc774c977c331 - -Instead of reporting all sockets to cURL, only report the one that has -caused curl_multi_do_locked() to be called. This lets us get rid of the -QLIST_FOREACH_SAFE() list, which was actually wrong: SAFE foreaches are -only safe when the current element is removed in each iteration. If it -possible for the list to be concurrently modified, we cannot guarantee -that only the current element will be removed. Therefore, we must not -use QLIST_FOREACH_SAFE() here. - -Fixes: ff5ca1664af85b24a4180d595ea6873fd3deac57 -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Message-id: 20190910124136.10565-6-mreitz@redhat.com -Reviewed-by: Maxim Levitsky -Reviewed-by: John Snow -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/curl.c | 17 ++++++----------- - 1 file changed, 6 insertions(+), 11 deletions(-) - -diff --git a/block/curl.c b/block/curl.c -index cf2686218dcf4bc7d2db1a7026f9..fd70f1ebc458f22f6d1a4bc01e1e 100644 ---- a/block/curl.c -+++ b/block/curl.c -@@ -392,24 +392,19 @@ static void curl_multi_check_completion(BDRVCURLState *s) - } - - /* Called with s->mutex held. */ --static void curl_multi_do_locked(CURLSocket *ready_socket) -+static void curl_multi_do_locked(CURLSocket *socket) - { -- CURLSocket *socket, *next_socket; -- CURLState *s = ready_socket->state; -+ BDRVCURLState *s = socket->state->s; - int running; - int r; - -- if (!s->s->multi) { -+ if (!s->multi) { - return; - } - -- /* Need to use _SAFE because curl_multi_socket_action() may trigger -- * curl_sock_cb() which might modify this list */ -- QLIST_FOREACH_SAFE(socket, &s->sockets, next, next_socket) { -- do { -- r = curl_multi_socket_action(s->s->multi, socket->fd, 0, &running); -- } while (r == CURLM_CALL_MULTI_PERFORM); -- } -+ do { -+ r = curl_multi_socket_action(s->multi, socket->fd, 0, &running); -+ } while (r == CURLM_CALL_MULTI_PERFORM); - } - - static void curl_multi_do(void *arg) diff --git a/hw-arm-boot.c-Set-NSACR.-CP11-CP10-for-N.patch b/hw-arm-boot.c-Set-NSACR.-CP11-CP10-for-N.patch deleted file mode 100644 index c508938..0000000 --- a/hw-arm-boot.c-Set-NSACR.-CP11-CP10-for-N.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Peter Maydell -Date: Fri, 20 Sep 2019 18:40:39 +0100 -Subject: hw/arm/boot.c: Set NSACR.{CP11,CP10} for NS kernel boots - -Git-commit: ece628fcf69cbbd4b3efb6fbd203af07609467a2 - -If we're booting a Linux kernel directly into Non-Secure -state on a CPU which has Secure state, then make sure we -set the NSACR CP11 and CP10 bits, so that Non-Secure is allowed -to access the FPU. Otherwise an AArch32 kernel will UNDEF as -soon as it tries to use the FPU. - -It used to not matter that we didn't do this until commit -fc1120a7f5f2d4b6, where we implemented actually honouring -these NSACR bits. - -The problem only exists for CPUs where EL3 is AArch32; the -equivalent AArch64 trap bits are in CPTR_EL3 and are "0 to -not trap, 1 to trap", so the reset value of the register -permits NS access, unlike NSACR. - -Fixes: fc1120a7f5 -Fixes: https://bugs.launchpad.net/qemu/+bug/1844597 -Cc: qemu-stable@nongnu.org -Signed-off-by: Peter Maydell -Reviewed-by: Richard Henderson -Message-id: 20190920174039.3916-1-peter.maydell@linaro.org -Signed-off-by: Bruce Rogers ---- - hw/arm/boot.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/hw/arm/boot.c b/hw/arm/boot.c -index c2b89b3bb9b6b92b0293d859712e..fc4e021a38a6bc1e5e2aa5b5876c 100644 ---- a/hw/arm/boot.c -+++ b/hw/arm/boot.c -@@ -754,6 +754,8 @@ static void do_cpu_reset(void *opaque) - (cs != first_cpu || !info->secure_board_setup)) { - /* Linux expects non-secure state */ - env->cp15.scr_el3 |= SCR_NS; -+ /* Set NSACR.{CP11,CP10} so NS can access the FPU */ -+ env->cp15.nsacr |= 3 << 10; - } - } - diff --git a/hw-core-loader-Fix-possible-crash-in-rom.patch b/hw-core-loader-Fix-possible-crash-in-rom.patch deleted file mode 100644 index b7d22e1..0000000 --- a/hw-core-loader-Fix-possible-crash-in-rom.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: Thomas Huth -Date: Wed, 25 Sep 2019 14:16:43 +0200 -Subject: hw/core/loader: Fix possible crash in rom_copy() - -Git-commit: e423455c4f23a1a828901c78fe6d03b7dde79319 - -Both, "rom->addr" and "addr" are derived from the binary image -that can be loaded with the "-kernel" paramer. The code in -rom_copy() then calculates: - - d = dest + (rom->addr - addr); - -and uses "d" as destination in a memcpy() some lines later. Now with -bad kernel images, it is possible that rom->addr is smaller than addr, -thus "rom->addr - addr" gets negative and the memcpy() then tries to -copy contents from the image to a bad memory location. This could -maybe be used to inject code from a kernel image into the QEMU binary, -so we better fix it with an additional sanity check here. - -Cc: qemu-stable@nongnu.org -Reported-by: Guangming Liu -Buglink: https://bugs.launchpad.net/qemu/+bug/1844635 -Message-Id: <20190925130331.27825-1-thuth@redhat.com> -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Thomas Huth -Signed-off-by: Bruce Rogers ---- - hw/core/loader.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/hw/core/loader.c b/hw/core/loader.c -index 425bf69a9968765b4604a442eb0a..838a34174ac2039d55f557fa427a 100644 ---- a/hw/core/loader.c -+++ b/hw/core/loader.c -@@ -1242,7 +1242,7 @@ int rom_copy(uint8_t *dest, hwaddr addr, size_t size) - if (rom->addr + rom->romsize < addr) { - continue; - } -- if (rom->addr > end) { -+ if (rom->addr > end || rom->addr < addr) { - break; - } - diff --git a/make-release-pull-in-edk2-submodules-so-.patch b/make-release-pull-in-edk2-submodules-so-.patch deleted file mode 100644 index bf5f2a8..0000000 --- a/make-release-pull-in-edk2-submodules-so-.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Michael Roth -Date: Thu, 12 Sep 2019 18:12:01 -0500 -Subject: make-release: pull in edk2 submodules so we can build it from - tarballs -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 45c61c6c23918e3b05ed9ecac5b2328ebae5f774 - -The `make efi` target added by 536d2173 is built from the roms/edk2 -submodule, which in turn relies on additional submodules nested under -roms/edk2. - -The make-release script currently only pulls in top-level submodules, -so these nested submodules are missing in the resulting tarball. - -We could try to address this situation more generally by recursively -pulling in all submodules, but this doesn't necessarily ensure the -end-result will build properly (this case also required other changes). - -Additionally, due to the nature of submodules, we may not always have -control over how these sorts of things are dealt with, so for now we -continue to handle it on a case-by-case in the make-release script. - -Cc: Laszlo Ersek -Cc: Bruce Rogers -Cc: qemu-stable@nongnu.org # v4.1.0 -Reported-by: Bruce Rogers -Reviewed-by: Philippe Mathieu-Daudé -Tested-by: Philippe Mathieu-Daudé -Signed-off-by: Michael Roth -Message-Id: <20190912231202.12327-2-mdroth@linux.vnet.ibm.com> -Signed-off-by: Philippe Mathieu-Daudé -Signed-off-by: Bruce Rogers ---- - scripts/make-release | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/scripts/make-release b/scripts/make-release -index b4af9c9e5202cb5c4f092d67ea51..a2a8cda33c0e0da3caa1f8641515 100755 ---- a/scripts/make-release -+++ b/scripts/make-release -@@ -20,6 +20,14 @@ git checkout "v${version}" - git submodule update --init - (cd roms/seabios && git describe --tags --long --dirty > .version) - (cd roms/skiboot && ./make_version.sh > .version) -+# Fetch edk2 submodule's submodules, since it won't have access to them via -+# the tarball later. -+# -+# A more uniform way to handle this sort of situation would be nice, but we -+# don't necessarily have much control over how a submodule handles its -+# submodule dependencies, so we continue to handle these on a case-by-case -+# basis for now. -+(cd roms/edk2 && git submodule update --init) - popd - tar --exclude=.git -cjf ${destination}.tar.bz2 ${destination} - rm -rf ${destination} diff --git a/memory-Provide-an-equality-function-for-.patch b/memory-Provide-an-equality-function-for-.patch deleted file mode 100644 index e6a1868..0000000 --- a/memory-Provide-an-equality-function-for-.patch +++ /dev/null @@ -1,44 +0,0 @@ -From: "Dr. David Alan Gilbert" -Date: Wed, 14 Aug 2019 18:55:34 +0100 -Subject: memory: Provide an equality function for MemoryRegionSections -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 9366cf02e4e31c2a8128904d4d8290a0fad5f888 - -Provide a comparison function that checks all the fields are the same. - -Signed-off-by: Dr. David Alan Gilbert -Reviewed-by: Philippe Mathieu-Daudé -Message-Id: <20190814175535.2023-3-dgilbert@redhat.com> -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Signed-off-by: Bruce Rogers ---- - include/exec/memory.h | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/include/exec/memory.h b/include/exec/memory.h -index bb0961ddb96788539e7138d4f5b3..25bc7ef1adc04d6de1ce1a41a38a 100644 ---- a/include/exec/memory.h -+++ b/include/exec/memory.h -@@ -496,6 +496,18 @@ struct MemoryRegionSection { - bool nonvolatile; - }; - -+static inline bool MemoryRegionSection_eq(MemoryRegionSection *a, -+ MemoryRegionSection *b) -+{ -+ return a->mr == b->mr && -+ a->fv == b->fv && -+ a->offset_within_region == b->offset_within_region && -+ a->offset_within_address_space == b->offset_within_address_space && -+ int128_eq(a->size, b->size) && -+ a->readonly == b->readonly && -+ a->nonvolatile == b->nonvolatile; -+} -+ - /** - * memory_region_init: Initialize a memory region - * diff --git a/mirror-Keep-mirror_top_bs-drained-after-.patch b/mirror-Keep-mirror_top_bs-drained-after-.patch deleted file mode 100644 index f0eeefd..0000000 --- a/mirror-Keep-mirror_top_bs-drained-after-.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: Kevin Wolf -Date: Mon, 22 Jul 2019 17:44:27 +0200 -Subject: mirror: Keep mirror_top_bs drained after dropping permissions - -Git-commit: d2da5e288a2e71e82866c8fdefd41b5727300124 - -mirror_top_bs is currently implicitly drained through its connection to -the source or the target node. However, the drain section for target_bs -ends early after moving mirror_top_bs from src to target_bs, so that -requests can already be restarted while mirror_top_bs is still present -in the chain, but has dropped all permissions and therefore runs into an -assertion failure like this: - - qemu-system-x86_64: block/io.c:1634: bdrv_co_write_req_prepare: - Assertion `child->perm & BLK_PERM_WRITE' failed. - -Keep mirror_top_bs drained until all graph changes have completed. - -Cc: qemu-stable@nongnu.org -Signed-off-by: Kevin Wolf -Reviewed-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/mirror.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/block/mirror.c b/block/mirror.c -index 9f5c59ece1df391babc4461f63cb..642d6570cc97e1239b119a46c457 100644 ---- a/block/mirror.c -+++ b/block/mirror.c -@@ -656,7 +656,10 @@ static int mirror_exit_common(Job *job) - s->target = NULL; - - /* We don't access the source any more. Dropping any WRITE/RESIZE is -- * required before it could become a backing file of target_bs. */ -+ * required before it could become a backing file of target_bs. Not having -+ * these permissions any more means that we can't allow any new requests on -+ * mirror_top_bs from now on, so keep it drained. */ -+ bdrv_drained_begin(mirror_top_bs); - bs_opaque->stop = true; - bdrv_child_refresh_perms(mirror_top_bs, mirror_top_bs->backing, - &error_abort); -@@ -724,6 +727,7 @@ static int mirror_exit_common(Job *job) - bs_opaque->job = NULL; - - bdrv_drained_end(src); -+ bdrv_drained_end(mirror_top_bs); - s->in_drain = false; - bdrv_unref(mirror_top_bs); - bdrv_unref(src); diff --git a/pr-manager-Fix-invalid-g_free-crash-bug.patch b/pr-manager-Fix-invalid-g_free-crash-bug.patch deleted file mode 100644 index b57b7af..0000000 --- a/pr-manager-Fix-invalid-g_free-crash-bug.patch +++ /dev/null @@ -1,37 +0,0 @@ -From: Markus Armbruster -Date: Thu, 22 Aug 2019 15:38:46 +0200 -Subject: pr-manager: Fix invalid g_free() crash bug -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 6b9d62c2a9e83bbad73fb61406f0ff69b46ff6f3 - -pr_manager_worker() passes its @opaque argument to g_free(). Wrong; -it points to pr_manager_worker()'s automatic @data. Broken when -commit 2f3a7ab39be converted @data from heap- to stack-allocated. Fix -by deleting the g_free(). - -Fixes: 2f3a7ab39bec4ba8022dc4d42ea641165b004e3e -Cc: qemu-stable@nongnu.org -Signed-off-by: Markus Armbruster -Reviewed-by: Philippe Mathieu-Daudé -Acked-by: Paolo Bonzini -Signed-off-by: Kevin Wolf -Signed-off-by: Bruce Rogers ---- - scsi/pr-manager.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/scsi/pr-manager.c b/scsi/pr-manager.c -index ee43663576ed32c3d27649157e83..0c866e869835930767dacd3a0b21 100644 ---- a/scsi/pr-manager.c -+++ b/scsi/pr-manager.c -@@ -39,7 +39,6 @@ static int pr_manager_worker(void *opaque) - int fd = data->fd; - int r; - -- g_free(data); - trace_pr_manager_run(fd, hdr->cmdp[0], hdr->cmdp[1]); - - /* The reference was taken in pr_manager_execute. */ diff --git a/qcow2-Fix-QCOW2_COMPRESSED_SECTOR_MASK.patch b/qcow2-Fix-QCOW2_COMPRESSED_SECTOR_MASK.patch deleted file mode 100644 index 04e89ec..0000000 --- a/qcow2-Fix-QCOW2_COMPRESSED_SECTOR_MASK.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Max Reitz -Date: Mon, 28 Oct 2019 17:18:40 +0100 -Subject: qcow2: Fix QCOW2_COMPRESSED_SECTOR_MASK - -Git-commit: 24552feb6ae2f615b76c2b95394af43901f75046 - -Masks for L2 table entries should have 64 bit. - -Fixes: b6c246942b14d3e0dec46a6c5868ed84e7dbea19 -Buglink: https://bugs.launchpad.net/qemu/+bug/1850000 -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Message-id: 20191028161841.1198-2-mreitz@redhat.com -Reviewed-by: Alberto Garcia -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/qcow2.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/block/qcow2.h b/block/qcow2.h -index fc1b0d3c1e1e3110e86f36f0dcd9..359197f89fb9547d861d852cbf68 100644 ---- a/block/qcow2.h -+++ b/block/qcow2.h -@@ -77,7 +77,7 @@ - - /* Defined in the qcow2 spec (compressed cluster descriptor) */ - #define QCOW2_COMPRESSED_SECTOR_SIZE 512U --#define QCOW2_COMPRESSED_SECTOR_MASK (~(QCOW2_COMPRESSED_SECTOR_SIZE - 1)) -+#define QCOW2_COMPRESSED_SECTOR_MASK (~(QCOW2_COMPRESSED_SECTOR_SIZE - 1ULL)) - - /* Must be at least 2 to cover COW */ - #define MIN_L2_CACHE_SIZE 2 /* cache entries */ diff --git a/qcow2-Fix-corruption-bug-in-qcow2_detect.patch b/qcow2-Fix-corruption-bug-in-qcow2_detect.patch deleted file mode 100644 index 2d965bb..0000000 --- a/qcow2-Fix-corruption-bug-in-qcow2_detect.patch +++ /dev/null @@ -1,68 +0,0 @@ -From: Kevin Wolf -Date: Thu, 24 Oct 2019 16:26:58 +0200 -Subject: qcow2: Fix corruption bug in qcow2_detect_metadata_preallocation() - -Git-commit: 5e9785505210e2477e590e61b1ab100d0ec22b01 - -qcow2_detect_metadata_preallocation() calls qcow2_get_refcount() which -requires s->lock to be taken to protect its accesses to the refcount -table and refcount blocks. However, nothing in this code path actually -took the lock. This could cause the same cache entry to be used by two -requests at the same time, for different tables at different offsets, -resulting in image corruption. - -As it would be preferable to base the detection on consistent data (even -though it's just heuristics), let's take the lock not only around the -qcow2_get_refcount() calls, but around the whole function. - -This patch takes the lock in qcow2_co_block_status() earlier and asserts -in qcow2_detect_metadata_preallocation() that we hold the lock. - -Fixes: 69f47505ee66afaa513305de0c1895a224e52c45 -Cc: qemu-stable@nongnu.org -Reported-by: Michael Weiser -Signed-off-by: Kevin Wolf -Tested-by: Michael Weiser -Reviewed-by: Michael Weiser -Reviewed-by: Vladimir Sementsov-Ogievskiy -Reviewed-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/qcow2-refcount.c | 2 ++ - block/qcow2.c | 3 ++- - 2 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c -index ef965d78952637ed92d777db4e9a..0d64bf5a5e9c0359e5391185f6c5 100644 ---- a/block/qcow2-refcount.c -+++ b/block/qcow2-refcount.c -@@ -3455,6 +3455,8 @@ int qcow2_detect_metadata_preallocation(BlockDriverState *bs) - int64_t i, end_cluster, cluster_count = 0, threshold; - int64_t file_length, real_allocation, real_clusters; - -+ qemu_co_mutex_assert_locked(&s->lock); -+ - file_length = bdrv_getlength(bs->file->bs); - if (file_length < 0) { - return file_length; -diff --git a/block/qcow2.c b/block/qcow2.c -index 865839682cd639d1b7aba0cc328f..c0f5439dc8f10d7f920d9b4a29b1 100644 ---- a/block/qcow2.c -+++ b/block/qcow2.c -@@ -1899,6 +1899,8 @@ static int coroutine_fn qcow2_co_block_status(BlockDriverState *bs, - unsigned int bytes; - int status = 0; - -+ qemu_co_mutex_lock(&s->lock); -+ - if (!s->metadata_preallocation_checked) { - ret = qcow2_detect_metadata_preallocation(bs); - s->metadata_preallocation = (ret == 1); -@@ -1906,7 +1908,6 @@ static int coroutine_fn qcow2_co_block_status(BlockDriverState *bs, - } - - bytes = MIN(INT_MAX, count); -- qemu_co_mutex_lock(&s->lock); - ret = qcow2_get_cluster_offset(bs, offset, &bytes, &cluster_offset); - qemu_co_mutex_unlock(&s->lock); - if (ret < 0) { diff --git a/qcow2-Fix-the-calculation-of-the-maximum.patch b/qcow2-Fix-the-calculation-of-the-maximum.patch deleted file mode 100644 index 480821e..0000000 --- a/qcow2-Fix-the-calculation-of-the-maximum.patch +++ /dev/null @@ -1,56 +0,0 @@ -From: Alberto Garcia -Date: Fri, 16 Aug 2019 15:17:42 +0300 -Subject: qcow2: Fix the calculation of the maximum L2 cache size - -Git-commit: b70d08205b2e4044c529eefc21df2c8ab61b473b - -The size of the qcow2 L2 cache defaults to 32 MB, which can be easily -larger than the maximum amount of L2 metadata that the image can have. -For example: with 64 KB clusters the user would need a qcow2 image -with a virtual size of 256 GB in order to have 32 MB of L2 metadata. - -Because of that, since commit b749562d9822d14ef69c9eaa5f85903010b86c30 -we forbid the L2 cache to become larger than the maximum amount of L2 -metadata for the image, calculated using this formula: - - uint64_t max_l2_cache = virtual_disk_size / (s->cluster_size / 8); - -The problem with this formula is that the result should be rounded up -to the cluster size because an L2 table on disk always takes one full -cluster. - -For example, a 1280 MB qcow2 image with 64 KB clusters needs exactly -160 KB of L2 metadata, but we need 192 KB on disk (3 clusters) even if -the last 32 KB of those are not going to be used. - -However QEMU rounds the numbers down and only creates 2 cache tables -(128 KB), which is not enough for the image. - -A quick test doing 4KB random writes on a 1280 MB image gives me -around 500 IOPS, while with the correct cache size I get 16K IOPS. - -Cc: qemu-stable@nongnu.org -Signed-off-by: Alberto Garcia -Signed-off-by: Kevin Wolf -Signed-off-by: Bruce Rogers ---- - block/qcow2.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/block/qcow2.c b/block/qcow2.c -index 039bdc2f7e799f935f5364daed5c..865839682cd639d1b7aba0cc328f 100644 ---- a/block/qcow2.c -+++ b/block/qcow2.c -@@ -826,7 +826,11 @@ static void read_cache_sizes(BlockDriverState *bs, QemuOpts *opts, - bool l2_cache_entry_size_set; - int min_refcount_cache = MIN_REFCOUNT_CACHE_SIZE * s->cluster_size; - uint64_t virtual_disk_size = bs->total_sectors * BDRV_SECTOR_SIZE; -- uint64_t max_l2_cache = virtual_disk_size / (s->cluster_size / 8); -+ uint64_t max_l2_entries = DIV_ROUND_UP(virtual_disk_size, s->cluster_size); -+ /* An L2 table is always one cluster in size so the max cache size -+ * should be a multiple of the cluster size. */ -+ uint64_t max_l2_cache = ROUND_UP(max_l2_entries * sizeof(uint64_t), -+ s->cluster_size); - - combined_cache_size_set = qemu_opt_get(opts, QCOW2_OPT_CACHE_SIZE); - l2_cache_size_set = qemu_opt_get(opts, QCOW2_OPT_L2_CACHE_SIZE); diff --git a/qcow2-bitmap-Fix-uint64_t-left-shift-ove.patch b/qcow2-bitmap-Fix-uint64_t-left-shift-ove.patch deleted file mode 100644 index a891a02..0000000 --- a/qcow2-bitmap-Fix-uint64_t-left-shift-ove.patch +++ /dev/null @@ -1,66 +0,0 @@ -From: Tuguoyi -Date: Fri, 1 Nov 2019 07:37:35 +0000 -Subject: qcow2-bitmap: Fix uint64_t left-shift overflow - -Git-commit: 570542ecb11e04b61ef4b3f4d0965a6915232a88 - -There are two issues in In check_constraints_on_bitmap(), -1) The sanity check on the granularity will cause uint64_t -integer left-shift overflow when cluster_size is 2M and the -granularity is BIGGER than 32K. -2) The way to calculate image size that the maximum bitmap -supported can map to is a bit incorrect. -This patch fix it by add a helper function to calculate the -number of bytes needed by a normal bitmap in image and compare -it to the maximum bitmap bytes supported by qemu. - -Fixes: 5f72826e7fc62167cf3a -Signed-off-by: Guoyi Tu -Message-id: 4ba40cd1e7ee4a708b40899952e49f22@h3c.com -Reviewed-by: Vladimir Sementsov-Ogievskiy -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Signed-off-by: Bruce Rogers ---- - block/qcow2-bitmap.c | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - -diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c -index b2487101edec0bdde613c561da89..65034da1c0766603d273c200797d 100644 ---- a/block/qcow2-bitmap.c -+++ b/block/qcow2-bitmap.c -@@ -142,6 +142,13 @@ static int check_table_entry(uint64_t entry, int cluster_size) - return 0; - } - -+static int64_t get_bitmap_bytes_needed(int64_t len, uint32_t granularity) -+{ -+ int64_t num_bits = DIV_ROUND_UP(len, granularity); -+ -+ return DIV_ROUND_UP(num_bits, 8); -+} -+ - static int check_constraints_on_bitmap(BlockDriverState *bs, - const char *name, - uint32_t granularity, -@@ -150,6 +157,7 @@ static int check_constraints_on_bitmap(BlockDriverState *bs, - BDRVQcow2State *s = bs->opaque; - int granularity_bits = ctz32(granularity); - int64_t len = bdrv_getlength(bs); -+ int64_t bitmap_bytes; - - assert(granularity > 0); - assert((granularity & (granularity - 1)) == 0); -@@ -171,9 +179,9 @@ static int check_constraints_on_bitmap(BlockDriverState *bs, - return -EINVAL; - } - -- if ((len > (uint64_t)BME_MAX_PHYS_SIZE << granularity_bits) || -- (len > (uint64_t)BME_MAX_TABLE_SIZE * s->cluster_size << -- granularity_bits)) -+ bitmap_bytes = get_bitmap_bytes_needed(len, granularity); -+ if ((bitmap_bytes > (uint64_t)BME_MAX_PHYS_SIZE) || -+ (bitmap_bytes > (uint64_t)BME_MAX_TABLE_SIZE * s->cluster_size)) - { - error_setg(errp, "Too much space will be occupied by the bitmap. " - "Use larger granularity"); diff --git a/qemu-4.1.0.tar.xz b/qemu-4.1.0.tar.xz deleted file mode 100644 index b06f34b..0000000 --- a/qemu-4.1.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:656e60218689bdeec69903087fd7582d5d3e72238d02f4481d8dc6d79fd909c6 -size 54001708 diff --git a/qemu-4.1.0.tar.xz.sig b/qemu-4.1.0.tar.xz.sig deleted file mode 100644 index 628dc24be47dc8ab38d31ed95e12bfcab44f0ffa1c203975a127b22ac5dd7d8f..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 310 zcmV-60m=S}0W$;u0SW*e79j-AtjXb3H0!IlEkB?$Q_0Tp2(^R-0$o+NH~5HnNB z&hZGfgh7V~`T}^vODvC|p=kaS6^JP9kPHALMWbD`3C#8^Etl=2zSWWVlqmi*!qR+=00B?c7zWVCc8 ze!^0jJjK2(m$DJ+71-&Ez1B%n#kWfh`pTlXU*_1rTA$@)!xyZmXViUBt(d-;T!O0I zl2ZBiv0Z_Ix{(Ng9H><>IelrP(h1q1rcYi2Wm|`MSu+nKl8DzY#GH5L7pvo;ir1{d zmfNWazeh|a*1~E#Ukew!x(?VtP5eI{NbdlP0ItmfYWKn_lWC;DQY?n&6q!9|lEJ!m IiC}5HnNB z&hZGfglg{y0G6!STcs%Ksl_7IBEwfLQZvPmlNgDeNsb6LAO3$DXs+;pf}>%;8hG|N zINy;)f{Pam(aw6v3|PpTrBkQgLk;-U(tn6_Pw2V>>OaY-^UXq^%<+Ou2@mS+mg0m_ zmDkzHK_M+TiITu@immCgU>=Ts(Xu9K=}NrJdFKXx4VNEsM^!M-)r<=-;W!HhV40T? z)N{@hNNi9kZ&fFfEM@;*Tw|}YzBThygM{iOP&`Zn=ED6c$6-@Qe=iPmA!j zxVk9nQ!!F`yhc}u#cQU{@7=L7v;U + +- Update to v4.1.1, a stable, bug-fix-only release +* Besides incorporating the following fixes we already carried, it + includes about the same number of other, similar type fixes + which we hadn't yet incorporated. +* Patches dropped (subsumed by stable update): + block-Add-bdrv_co_get_self_request.patch + block-create-Do-not-abort-if-a-block-dri.patch + block-file-posix-Let-post-EOF-fallocate-.patch + block-file-posix-Reduce-xfsctl-use.patch + block-io-refactor-padding.patch + blockjob-update-nodes-head-while-removin.patch + block-Make-wait-mark-serialising-request.patch + block-nfs-tear-down-aio-before-nfs_close.patch + coroutine-Add-qemu_co_mutex_assert_locke.patch + curl-Check-completion-in-curl_multi_do.patch + curl-Handle-success-in-multi_check_compl.patch + curl-Keep-pointer-to-the-CURLState-in-CU.patch + curl-Keep-socket-until-the-end-of-curl_s.patch + curl-Pass-CURLSocket-to-curl_multi_do.patch + curl-Report-only-ready-sockets.patch + hw-arm-boot.c-Set-NSACR.-CP11-CP10-for-N.patch + hw-core-loader-Fix-possible-crash-in-rom.patch + make-release-pull-in-edk2-submodules-so-.patch + memory-Provide-an-equality-function-for-.patch + mirror-Keep-mirror_top_bs-drained-after-.patch + pr-manager-Fix-invalid-g_free-crash-bug.patch + qcow2-bitmap-Fix-uint64_t-left-shift-ove.patch + qcow2-Fix-corruption-bug-in-qcow2_detect.patch + qcow2-Fix-QCOW2_COMPRESSED_SECTOR_MASK.patch + qcow2-Fix-the-calculation-of-the-maximum.patch + roms-Makefile.edk2-don-t-pull-in-submodu.patch + s390-PCI-fix-IOMMU-region-init.patch + s390x-tcg-Fix-VERIM-with-32-64-bit-eleme.patch + target-alpha-fix-tlb_fill-trap_arg2-valu.patch + target-arm-Don-t-abort-on-M-profile-exce.patch + target-arm-Free-TCG-temps-in-trans_VMOV_.patch + util-iov-introduce-qemu_iovec_init_exten.patch + vhost-Fix-memory-region-section-comparis.patch + vpc-Return-0-from-vpc_co_create-on-succe.patch +Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-4.1 + ------------------------------------------------------------------- Fri Nov 8 15:02:16 UTC 2019 - Guillaume GARDET diff --git a/qemu.spec b/qemu.spec index fdc66a8..5a52a5c 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,7 +1,7 @@ # # spec file for package qemu # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -89,12 +89,12 @@ %define srcname qemu Name: qemu%{name_suffix} -Url: https://www.qemu.org/ +URL: https://www.qemu.org/ Summary: %{summary_string} 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 -%define qemuver 4.1.0 -%define srcver 4.1.0 +%define qemuver 4.1.1 +%define srcver 4.1.1 Version: %qemuver Release: 0 Source: https://wiki.qemu.org/download/%{srcname}-%{srcver}.tar.xz @@ -122,80 +122,46 @@ Source303: README.PACKAGING # This patch queue is auto-generated - see README.PACKAGING for process # Patches applied in base project: -Patch00000: mirror-Keep-mirror_top_bs-drained-after-.patch -Patch00001: s390x-tcg-Fix-VERIM-with-32-64-bit-eleme.patch -Patch00002: target-alpha-fix-tlb_fill-trap_arg2-valu.patch -Patch00003: target-arm-Free-TCG-temps-in-trans_VMOV_.patch -Patch00004: target-arm-Don-t-abort-on-M-profile-exce.patch -Patch00005: qcow2-Fix-the-calculation-of-the-maximum.patch -Patch00006: block-file-posix-Reduce-xfsctl-use.patch -Patch00007: pr-manager-Fix-invalid-g_free-crash-bug.patch -Patch00008: vpc-Return-0-from-vpc_co_create-on-succe.patch -Patch00009: block-nfs-tear-down-aio-before-nfs_close.patch -Patch00010: block-create-Do-not-abort-if-a-block-dri.patch -Patch00011: curl-Keep-pointer-to-the-CURLState-in-CU.patch -Patch00012: curl-Keep-socket-until-the-end-of-curl_s.patch -Patch00013: curl-Check-completion-in-curl_multi_do.patch -Patch00014: curl-Pass-CURLSocket-to-curl_multi_do.patch -Patch00015: curl-Report-only-ready-sockets.patch -Patch00016: curl-Handle-success-in-multi_check_compl.patch -Patch00017: blockjob-update-nodes-head-while-removin.patch -Patch00018: memory-Provide-an-equality-function-for-.patch -Patch00019: vhost-Fix-memory-region-section-comparis.patch -Patch00020: hw-arm-boot.c-Set-NSACR.-CP11-CP10-for-N.patch -Patch00021: s390-PCI-fix-IOMMU-region-init.patch -Patch00022: hw-core-loader-Fix-possible-crash-in-rom.patch -Patch00023: make-release-pull-in-edk2-submodules-so-.patch -Patch00024: roms-Makefile.edk2-don-t-pull-in-submodu.patch -Patch00025: coroutine-Add-qemu_co_mutex_assert_locke.patch -Patch00026: qcow2-Fix-corruption-bug-in-qcow2_detect.patch -Patch00027: block-io-refactor-padding.patch -Patch00028: util-iov-introduce-qemu_iovec_init_exten.patch -Patch00029: block-Make-wait-mark-serialising-request.patch -Patch00030: block-Add-bdrv_co_get_self_request.patch -Patch00031: block-file-posix-Let-post-EOF-fallocate-.patch -Patch00032: qcow2-bitmap-Fix-uint64_t-left-shift-ove.patch -Patch00033: qcow2-Fix-QCOW2_COMPRESSED_SECTOR_MASK.patch -Patch00034: XXX-dont-dump-core-on-sigabort.patch -Patch00035: qemu-binfmt-conf-Modify-default-path.patch -Patch00036: qemu-cvs-gettimeofday.patch -Patch00037: qemu-cvs-ioctl_debug.patch -Patch00038: qemu-cvs-ioctl_nodirection.patch -Patch00039: linux-user-add-binfmt-wrapper-for-argv-0.patch -Patch00040: PPC-KVM-Disable-mmu-notifier-check.patch -Patch00041: linux-user-binfmt-support-host-binaries.patch -Patch00042: linux-user-Fake-proc-cpuinfo.patch -Patch00043: linux-user-use-target_ulong.patch -Patch00044: Make-char-muxer-more-robust-wrt-small-FI.patch -Patch00045: linux-user-lseek-explicitly-cast-non-set.patch -Patch00046: AIO-Reduce-number-of-threads-for-32bit-h.patch -Patch00047: xen_disk-Add-suse-specific-flush-disable.patch -Patch00048: qemu-bridge-helper-reduce-security-profi.patch -Patch00049: qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch -Patch00050: linux-user-properly-test-for-infinite-ti.patch -Patch00051: roms-Makefile-pass-a-packaging-timestamp.patch -Patch00052: Raise-soft-address-space-limit-to-hard-l.patch -Patch00053: increase-x86_64-physical-bits-to-42.patch -Patch00054: vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch -Patch00055: i8254-Fix-migration-from-SLE11-SP2.patch -Patch00056: acpi_piix4-Fix-migration-from-SLE11-SP2.patch -Patch00057: Switch-order-of-libraries-for-mpath-supp.patch -Patch00058: Make-installed-scripts-explicitly-python.patch -Patch00059: hw-smbios-handle-both-file-formats-regar.patch -Patch00060: xen-add-block-resize-support-for-xen-dis.patch -Patch00061: tests-qemu-iotests-Triple-timeout-of-i-o.patch -Patch00062: tests-Fix-block-tests-to-be-compatible-w.patch -Patch00063: xen-ignore-live-parameter-from-xen-save-.patch -Patch00064: Conditionalize-ui-bitmap-installation-be.patch -Patch00065: tests-change-error-message-in-test-162.patch -Patch00066: hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch -Patch00067: hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch -Patch00068: hw-intc-exynos4210_gic-provide-more-room.patch -Patch00069: configure-only-populate-roms-if-softmmu.patch -Patch00070: pc-bios-s390-ccw-net-avoid-warning-about.patch -Patch00071: roms-change-cross-compiler-naming-to-be-.patch -Patch00072: tests-Disable-some-block-tests-for-now.patch -Patch00073: test-add-mapping-from-arch-of-i686-to-qe.patch +Patch00000: XXX-dont-dump-core-on-sigabort.patch +Patch00001: qemu-binfmt-conf-Modify-default-path.patch +Patch00002: qemu-cvs-gettimeofday.patch +Patch00003: qemu-cvs-ioctl_debug.patch +Patch00004: qemu-cvs-ioctl_nodirection.patch +Patch00005: linux-user-add-binfmt-wrapper-for-argv-0.patch +Patch00006: PPC-KVM-Disable-mmu-notifier-check.patch +Patch00007: linux-user-binfmt-support-host-binaries.patch +Patch00008: linux-user-Fake-proc-cpuinfo.patch +Patch00009: linux-user-use-target_ulong.patch +Patch00010: Make-char-muxer-more-robust-wrt-small-FI.patch +Patch00011: linux-user-lseek-explicitly-cast-non-set.patch +Patch00012: AIO-Reduce-number-of-threads-for-32bit-h.patch +Patch00013: xen_disk-Add-suse-specific-flush-disable.patch +Patch00014: qemu-bridge-helper-reduce-security-profi.patch +Patch00015: qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch +Patch00016: linux-user-properly-test-for-infinite-ti.patch +Patch00017: roms-Makefile-pass-a-packaging-timestamp.patch +Patch00018: Raise-soft-address-space-limit-to-hard-l.patch +Patch00019: increase-x86_64-physical-bits-to-42.patch +Patch00020: vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch +Patch00021: i8254-Fix-migration-from-SLE11-SP2.patch +Patch00022: acpi_piix4-Fix-migration-from-SLE11-SP2.patch +Patch00023: Switch-order-of-libraries-for-mpath-supp.patch +Patch00024: Make-installed-scripts-explicitly-python.patch +Patch00025: hw-smbios-handle-both-file-formats-regar.patch +Patch00026: xen-add-block-resize-support-for-xen-dis.patch +Patch00027: tests-qemu-iotests-Triple-timeout-of-i-o.patch +Patch00028: tests-Fix-block-tests-to-be-compatible-w.patch +Patch00029: xen-ignore-live-parameter-from-xen-save-.patch +Patch00030: Conditionalize-ui-bitmap-installation-be.patch +Patch00031: tests-change-error-message-in-test-162.patch +Patch00032: hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch +Patch00033: hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch +Patch00034: hw-intc-exynos4210_gic-provide-more-room.patch +Patch00035: configure-only-populate-roms-if-softmmu.patch +Patch00036: pc-bios-s390-ccw-net-avoid-warning-about.patch +Patch00037: roms-change-cross-compiler-naming-to-be-.patch +Patch00038: tests-Disable-some-block-tests-for-now.patch +Patch00039: test-add-mapping-from-arch-of-i686-to-qe.patch # Patches applied in roms/seabios/: Patch01000: seabios-use-python2-explicitly-as-needed.patch Patch01001: seabios-switch-to-python3-as-needed.patch @@ -925,40 +891,6 @@ This package provides a service file for starting and stopping KSM. %patch00037 -p1 %patch00038 -p1 %patch00039 -p1 -%patch00040 -p1 -%patch00041 -p1 -%patch00042 -p1 -%patch00043 -p1 -%patch00044 -p1 -%patch00045 -p1 -%patch00046 -p1 -%patch00047 -p1 -%patch00048 -p1 -%patch00049 -p1 -%patch00050 -p1 -%patch00051 -p1 -%patch00052 -p1 -%patch00053 -p1 -%patch00054 -p1 -%patch00055 -p1 -%patch00056 -p1 -%patch00057 -p1 -%patch00058 -p1 -%patch00059 -p1 -%patch00060 -p1 -%patch00061 -p1 -%patch00062 -p1 -%patch00063 -p1 -%patch00064 -p1 -%patch00065 -p1 -%patch00066 -p1 -%patch00067 -p1 -%patch00068 -p1 -%patch00069 -p1 -%patch00070 -p1 -%patch00071 -p1 -%patch00072 -p1 -%patch00073 -p1 %patch01000 -p1 %patch01001 -p1 %patch01002 -p1 diff --git a/qemu.spec.in b/qemu.spec.in index 2365f26..5dd373f 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -1,7 +1,7 @@ # # spec file for package qemu # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -89,7 +89,7 @@ %define srcname qemu Name: qemu%{name_suffix} -Url: https://www.qemu.org/ +URL: https://www.qemu.org/ Summary: %{summary_string} 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 diff --git a/roms-Makefile.edk2-don-t-pull-in-submodu.patch b/roms-Makefile.edk2-don-t-pull-in-submodu.patch deleted file mode 100644 index 7fc2568..0000000 --- a/roms-Makefile.edk2-don-t-pull-in-submodu.patch +++ /dev/null @@ -1,52 +0,0 @@ -From: Michael Roth -Date: Thu, 12 Sep 2019 18:12:02 -0500 -Subject: roms/Makefile.edk2: don't pull in submodules when building from - tarball -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: f3e330e3c319160ac04954399b5a10afc965098c - -Currently the `make efi` target pulls submodules nested under the -roms/edk2 submodule as dependencies. However, when we attempt to build -from a tarball this fails since we are no longer in a git tree. - -A preceding patch will pre-populate these submodules in the tarball, -so assume this build dependency is only needed when building from a -git tree. - -Cc: Laszlo Ersek -Cc: Bruce Rogers -Cc: qemu-stable@nongnu.org # v4.1.0 -Reported-by: Bruce Rogers -Reviewed-by: Laszlo Ersek -Reviewed-by: Philippe Mathieu-Daudé -Tested-by: Philippe Mathieu-Daudé -Signed-off-by: Michael Roth -Message-Id: <20190912231202.12327-3-mdroth@linux.vnet.ibm.com> -Signed-off-by: Philippe Mathieu-Daudé -Signed-off-by: Bruce Rogers ---- - roms/Makefile.edk2 | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/roms/Makefile.edk2 b/roms/Makefile.edk2 -index c2f2ff59d5b1d8b3fa394ed42c8d..33a074d3a4c21b5460d98bbc7d4a 100644 ---- a/roms/Makefile.edk2 -+++ b/roms/Makefile.edk2 -@@ -46,8 +46,13 @@ all: $(foreach flashdev,$(flashdevs),../pc-bios/edk2-$(flashdev).fd.bz2) \ - # files. - .INTERMEDIATE: $(foreach flashdev,$(flashdevs),../pc-bios/edk2-$(flashdev).fd) - -+# Fetch edk2 submodule's submodules. If it is not in a git tree, assume -+# we're building from a tarball and that they've already been fetched by -+# make-release/tarball scripts. - submodules: -- cd edk2 && git submodule update --init --force -+ if test -d edk2/.git; then \ -+ cd edk2 && git submodule update --init --force; \ -+ fi - - # See notes on the ".NOTPARALLEL" target and the "+" indicator in - # "tests/uefi-test-tools/Makefile". diff --git a/s390-PCI-fix-IOMMU-region-init.patch b/s390-PCI-fix-IOMMU-region-init.patch deleted file mode 100644 index 34a30ae..0000000 --- a/s390-PCI-fix-IOMMU-region-init.patch +++ /dev/null @@ -1,48 +0,0 @@ -From: Matthew Rosato -Date: Thu, 26 Sep 2019 10:10:36 -0400 -Subject: s390: PCI: fix IOMMU region init - -Git-commit: 7df1dac5f1c85312474df9cb3a8fcae72303da62 - -The fix in dbe9cf606c shrinks the IOMMU memory region to a size -that seems reasonable on the surface, however is actually too -small as it is based against a 0-mapped address space. This -causes breakage with small guests as they can overrun the IOMMU window. - -Let's go back to the prior method of initializing iommu for now. - -Fixes: dbe9cf606c ("s390x/pci: Set the iommu region size mpcifc request") -Cc: qemu-stable@nongnu.org -Reviewed-by: Pierre Morel -Reported-by: Boris Fiuczynski -Tested-by: Boris Fiuczynski -Reported-by: Stefan Zimmerman -Signed-off-by: Matthew Rosato -Message-Id: <1569507036-15314-1-git-send-email-mjrosato@linux.ibm.com> -Signed-off-by: Christian Borntraeger -Signed-off-by: Bruce Rogers ---- - hw/s390x/s390-pci-bus.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c -index 2c6e084e2c2636b55980799b5837..9a935f22b5b06a67c8fbd7b6abb6 100644 ---- a/hw/s390x/s390-pci-bus.c -+++ b/hw/s390x/s390-pci-bus.c -@@ -694,10 +694,15 @@ static const MemoryRegionOps s390_msi_ctrl_ops = { - - void s390_pci_iommu_enable(S390PCIIOMMU *iommu) - { -+ /* -+ * The iommu region is initialized against a 0-mapped address space, -+ * so the smallest IOMMU region we can define runs from 0 to the end -+ * of the PCI address space. -+ */ - char *name = g_strdup_printf("iommu-s390-%04x", iommu->pbdev->uid); - memory_region_init_iommu(&iommu->iommu_mr, sizeof(iommu->iommu_mr), - TYPE_S390_IOMMU_MEMORY_REGION, OBJECT(&iommu->mr), -- name, iommu->pal - iommu->pba + 1); -+ name, iommu->pal + 1); - iommu->enabled = true; - memory_region_add_subregion(&iommu->mr, 0, MEMORY_REGION(&iommu->iommu_mr)); - g_free(name); diff --git a/s390x-tcg-Fix-VERIM-with-32-64-bit-eleme.patch b/s390x-tcg-Fix-VERIM-with-32-64-bit-eleme.patch deleted file mode 100644 index 20a1d8c..0000000 --- a/s390x-tcg-Fix-VERIM-with-32-64-bit-eleme.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: David Hildenbrand -Date: Wed, 14 Aug 2019 17:12:42 +0200 -Subject: s390x/tcg: Fix VERIM with 32/64 bit elements - -Git-commit: 25bcb45d1b81d22634daa2b1a2d8bee746ac129b - -Wrong order of operands. The constant always comes last. Makes QEMU crash -reliably on specific git fetch invocations. - -Reported-by: Stefano Brivio -Signed-off-by: David Hildenbrand -Message-Id: <20190814151242.27199-1-david@redhat.com> -Reviewed-by: Cornelia Huck -Fixes: 5c4b0ab460ef ("s390x/tcg: Implement VECTOR ELEMENT ROTATE AND INSERT UNDER MASK") -Cc: qemu-stable@nongnu.org -Signed-off-by: Cornelia Huck -Signed-off-by: Bruce Rogers ---- - target/s390x/translate_vx.inc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/target/s390x/translate_vx.inc.c b/target/s390x/translate_vx.inc.c -index 41d5cf869f94ef4c5842582bf830..0caddb3958cdbc820c0d4f1a074b 100644 ---- a/target/s390x/translate_vx.inc.c -+++ b/target/s390x/translate_vx.inc.c -@@ -213,7 +213,7 @@ static void get_vec_element_ptr_i64(TCGv_ptr ptr, uint8_t reg, TCGv_i64 enr, - vec_full_reg_offset(v3), ptr, 16, 16, data, fn) - #define gen_gvec_3i(v1, v2, v3, c, gen) \ - tcg_gen_gvec_3i(vec_full_reg_offset(v1), vec_full_reg_offset(v2), \ -- vec_full_reg_offset(v3), c, 16, 16, gen) -+ vec_full_reg_offset(v3), 16, 16, c, gen) - #define gen_gvec_4(v1, v2, v3, v4, gen) \ - tcg_gen_gvec_4(vec_full_reg_offset(v1), vec_full_reg_offset(v2), \ - vec_full_reg_offset(v3), vec_full_reg_offset(v4), \ diff --git a/target-alpha-fix-tlb_fill-trap_arg2-valu.patch b/target-alpha-fix-tlb_fill-trap_arg2-valu.patch deleted file mode 100644 index e9d30f3..0000000 --- a/target-alpha-fix-tlb_fill-trap_arg2-valu.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: Aurelien Jarno -Date: Thu, 22 Aug 2019 10:45:14 -0700 -Subject: target/alpha: fix tlb_fill trap_arg2 value for instruction fetch - -Git-commit: cb1de55a83eaca9ee32be9c959dca99e11f2fea8 - -Commit e41c94529740cc26 ("target/alpha: Convert to CPUClass::tlb_fill") -slightly changed the way the trap_arg2 value is computed in case of TLB -fill. The type of the variable used in the ternary operator has been -changed from an int to an enum. This causes the -1 value to not be -sign-extended to 64-bit in case of an instruction fetch. The trap_arg2 -ends up with 0xffffffff instead of 0xffffffffffffffff. Fix that by -changing the -1 into -1LL. - -This fixes the execution of user space processes in qemu-system-alpha. - -Fixes: e41c94529740cc26 -Cc: qemu-stable@nongnu.org -Signed-off-by: Aurelien Jarno -[rth: Test MMU_DATA_LOAD and MMU_DATA_STORE instead of implying them.] -Signed-off-by: Richard Henderson -Signed-off-by: Bruce Rogers ---- - target/alpha/helper.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/target/alpha/helper.c b/target/alpha/helper.c -index 93b8e788b185f8b199b71256e5ff..d0cc6231925c932c192640632658 100644 ---- a/target/alpha/helper.c -+++ b/target/alpha/helper.c -@@ -283,7 +283,9 @@ bool alpha_cpu_tlb_fill(CPUState *cs, vaddr addr, int size, - cs->exception_index = EXCP_MMFAULT; - env->trap_arg0 = addr; - env->trap_arg1 = fail; -- env->trap_arg2 = (access_type == MMU_INST_FETCH ? -1 : access_type); -+ env->trap_arg2 = (access_type == MMU_DATA_LOAD ? 0ull : -+ access_type == MMU_DATA_STORE ? 1ull : -+ /* access_type == MMU_INST_FETCH */ -1ull); - cpu_loop_exit_restore(cs, retaddr); - } - diff --git a/target-arm-Don-t-abort-on-M-profile-exce.patch b/target-arm-Don-t-abort-on-M-profile-exce.patch deleted file mode 100644 index 079e120..0000000 --- a/target-arm-Don-t-abort-on-M-profile-exce.patch +++ /dev/null @@ -1,101 +0,0 @@ -From: Peter Maydell -Date: Thu, 22 Aug 2019 14:15:34 +0100 -Subject: target/arm: Don't abort on M-profile exception return in linux-user - mode - -Git-commit: 5e5584c89f36b302c666bc6db535fd3f7ff35ad2 - -An attempt to do an exception-return (branch to one of the magic -addresses) in linux-user mode for M-profile should behave like -a normal branch, because linux-user mode is always going to be -in 'handler' mode. This used to work, but we broke it when we added -support for the M-profile security extension in commit d02a8698d7ae2bfed. - -In that commit we allowed even handler-mode calls to magic return -values to be checked for and dealt with by causing an -EXCP_EXCEPTION_EXIT exception to be taken, because this is -needed for the FNC_RETURN return-from-non-secure-function-call -handling. For system mode we added a check in do_v7m_exception_exit() -to make any spurious calls from Handler mode behave correctly, but -forgot that linux-user mode would also be affected. - -How an attempted return-from-non-secure-function-call in linux-user -mode should be handled is not clear -- on real hardware it would -result in return to secure code (not to the Linux kernel) which -could then handle the error in any way it chose. For QEMU we take -the simple approach of treating this erroneous return the same way -it would be handled on a CPU without the security extensions -- -treat it as a normal branch. - -The upshot of all this is that for linux-user mode we should never -do any of the bx_excret magic, so the code change is simple. - -This ought to be a weird corner case that only affects broken guest -code (because Linux user processes should never be attempting to do -exception returns or NS function returns), except that the code that -assigns addresses in RAM for the process and stack in our linux-user -code does not attempt to avoid this magic address range, so -legitimate code attempting to return to a trampoline routine on the -stack can fall into this case. This change fixes those programs, -but we should also look at restricting the range of memory we -use for M-profile linux-user guests to the area that would be -real RAM in hardware. - -Cc: qemu-stable@nongnu.org -Reported-by: Christophe Lyon -Reviewed-by: Richard Henderson -Signed-off-by: Peter Maydell -Message-id: 20190822131534.16602-1-peter.maydell@linaro.org -Fixes: https://bugs.launchpad.net/qemu/+bug/1840922 -Signed-off-by: Peter Maydell -Signed-off-by: Bruce Rogers ---- - target/arm/translate.c | 21 ++++++++++++++++++++- - 1 file changed, 20 insertions(+), 1 deletion(-) - -diff --git a/target/arm/translate.c b/target/arm/translate.c -index 7853462b21b870fdc3e3d2166a3e..24cb4ba075d095e050b193570ad2 100644 ---- a/target/arm/translate.c -+++ b/target/arm/translate.c -@@ -952,10 +952,27 @@ static inline void gen_bx(DisasContext *s, TCGv_i32 var) - store_cpu_field(var, thumb); - } - --/* Set PC and Thumb state from var. var is marked as dead. -+/* -+ * Set PC and Thumb state from var. var is marked as dead. - * For M-profile CPUs, include logic to detect exception-return - * branches and handle them. This is needed for Thumb POP/LDM to PC, LDR to PC, - * and BX reg, and no others, and happens only for code in Handler mode. -+ * The Security Extension also requires us to check for the FNC_RETURN -+ * which signals a function return from non-secure state; this can happen -+ * in both Handler and Thread mode. -+ * To avoid having to do multiple comparisons in inline generated code, -+ * we make the check we do here loose, so it will match for EXC_RETURN -+ * in Thread mode. For system emulation do_v7m_exception_exit() checks -+ * for these spurious cases and returns without doing anything (giving -+ * the same behaviour as for a branch to a non-magic address). -+ * -+ * In linux-user mode it is unclear what the right behaviour for an -+ * attempted FNC_RETURN should be, because in real hardware this will go -+ * directly to Secure code (ie not the Linux kernel) which will then treat -+ * the error in any way it chooses. For QEMU we opt to make the FNC_RETURN -+ * attempt behave the way it would on a CPU without the security extension, -+ * which is to say "like a normal branch". That means we can simply treat -+ * all branches as normal with no magic address behaviour. - */ - static inline void gen_bx_excret(DisasContext *s, TCGv_i32 var) - { -@@ -963,10 +980,12 @@ static inline void gen_bx_excret(DisasContext *s, TCGv_i32 var) - * s->base.is_jmp that we need to do the rest of the work later. - */ - gen_bx(s, var); -+#ifndef CONFIG_USER_ONLY - if (arm_dc_feature(s, ARM_FEATURE_M_SECURITY) || - (s->v7m_handler_mode && arm_dc_feature(s, ARM_FEATURE_M))) { - s->base.is_jmp = DISAS_BX_EXCRET; - } -+#endif - } - - static inline void gen_bx_excret_final_code(DisasContext *s) diff --git a/target-arm-Free-TCG-temps-in-trans_VMOV_.patch b/target-arm-Free-TCG-temps-in-trans_VMOV_.patch deleted file mode 100644 index ddae868..0000000 --- a/target-arm-Free-TCG-temps-in-trans_VMOV_.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Peter Maydell -Date: Tue, 27 Aug 2019 13:19:31 +0100 -Subject: target/arm: Free TCG temps in trans_VMOV_64_sp() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: 342d27581bd3ecdb995e4fc55fcd383cf3242888 - -The function neon_store_reg32() doesn't free the TCG temp that it -is passed, so the caller must do that. We got this right in most -places but forgot to free the TCG temps in trans_VMOV_64_sp(). - -Cc: qemu-stable@nongnu.org -Signed-off-by: Peter Maydell -Reviewed-by: Richard Henderson -Reviewed-by: Philippe Mathieu-Daudé -Message-id: 20190827121931.26836-1-peter.maydell@linaro.org -Signed-off-by: Bruce Rogers ---- - target/arm/translate-vfp.inc.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/target/arm/translate-vfp.inc.c b/target/arm/translate-vfp.inc.c -index 092eb5ec53d944e078f4449c10f1..ef45cecbeac18edb6dffbcad7980 100644 ---- a/target/arm/translate-vfp.inc.c -+++ b/target/arm/translate-vfp.inc.c -@@ -881,8 +881,10 @@ static bool trans_VMOV_64_sp(DisasContext *s, arg_VMOV_64_sp *a) - /* gpreg to fpreg */ - tmp = load_reg(s, a->rt); - neon_store_reg32(tmp, a->vm); -+ tcg_temp_free_i32(tmp); - tmp = load_reg(s, a->rt2); - neon_store_reg32(tmp, a->vm + 1); -+ tcg_temp_free_i32(tmp); - } - - return true; diff --git a/tests-Disable-some-block-tests-for-now.patch b/tests-Disable-some-block-tests-for-now.patch index 75b02d6..77a3c9f 100644 --- a/tests-Disable-some-block-tests-for-now.patch +++ b/tests-Disable-some-block-tests-for-now.patch @@ -20,7 +20,7 @@ Signed-off-by: Bruce Rogers 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group -index f13e5f2e23417b94bd84d820bcf6..ed532134bb8af0a1f78a1a2abcf3 100644 +index 3070d160d5ae9108ca5e5a9ed234..0f6640db8a0a783b29aafb66eca2 100644 --- a/tests/qemu-iotests/group +++ b/tests/qemu-iotests/group @@ -86,7 +86,7 @@ diff --git a/util-iov-introduce-qemu_iovec_init_exten.patch b/util-iov-introduce-qemu_iovec_init_exten.patch deleted file mode 100644 index 9aca4cc..0000000 --- a/util-iov-introduce-qemu_iovec_init_exten.patch +++ /dev/null @@ -1,174 +0,0 @@ -From: Vladimir Sementsov-Ogievskiy -Date: Tue, 4 Jun 2019 19:15:03 +0300 -Subject: util/iov: introduce qemu_iovec_init_extended - -Git-commit: d953169d4840f312d3b9a54952f4a7ccfcb3b311 - -Introduce new initialization API, to create requests with padding. Will -be used in the following patch. New API uses qemu_iovec_init_buf if -resulting io vector has only one element, to avoid extra allocations. -So, we need to update qemu_iovec_destroy to support destroying such -QIOVs. - -Signed-off-by: Vladimir Sementsov-Ogievskiy -Acked-by: Stefan Hajnoczi -Message-id: 20190604161514.262241-2-vsementsov@virtuozzo.com -Message-Id: <20190604161514.262241-2-vsementsov@virtuozzo.com> -Signed-off-by: Stefan Hajnoczi -Signed-off-by: Bruce Rogers ---- - include/qemu/iov.h | 7 +++ - util/iov.c | 112 +++++++++++++++++++++++++++++++++++++++++++-- - 2 files changed, 114 insertions(+), 5 deletions(-) - -diff --git a/include/qemu/iov.h b/include/qemu/iov.h -index 48b45987b70ea28879af7989c31f..f3787a0cf768bd0ea1031913a038 100644 ---- a/include/qemu/iov.h -+++ b/include/qemu/iov.h -@@ -199,6 +199,13 @@ static inline void *qemu_iovec_buf(QEMUIOVector *qiov) - - void qemu_iovec_init(QEMUIOVector *qiov, int alloc_hint); - void qemu_iovec_init_external(QEMUIOVector *qiov, struct iovec *iov, int niov); -+void qemu_iovec_init_extended( -+ QEMUIOVector *qiov, -+ void *head_buf, size_t head_len, -+ QEMUIOVector *mid_qiov, size_t mid_offset, size_t mid_len, -+ void *tail_buf, size_t tail_len); -+void qemu_iovec_init_slice(QEMUIOVector *qiov, QEMUIOVector *source, -+ size_t offset, size_t len); - void qemu_iovec_add(QEMUIOVector *qiov, void *base, size_t len); - void qemu_iovec_concat(QEMUIOVector *dst, - QEMUIOVector *src, size_t soffset, size_t sbytes); -diff --git a/util/iov.c b/util/iov.c -index 74e6ca8ed7298c833e52257923c1..366ff9cdd1dee06c5d62712cb5ef 100644 ---- a/util/iov.c -+++ b/util/iov.c -@@ -353,6 +353,103 @@ void qemu_iovec_concat(QEMUIOVector *dst, - qemu_iovec_concat_iov(dst, src->iov, src->niov, soffset, sbytes); - } - -+/* -+ * qiov_find_iov -+ * -+ * Return pointer to iovec structure, where byte at @offset in original vector -+ * @iov exactly is. -+ * Set @remaining_offset to be offset inside that iovec to the same byte. -+ */ -+static struct iovec *iov_skip_offset(struct iovec *iov, size_t offset, -+ size_t *remaining_offset) -+{ -+ while (offset > 0 && offset >= iov->iov_len) { -+ offset -= iov->iov_len; -+ iov++; -+ } -+ *remaining_offset = offset; -+ -+ return iov; -+} -+ -+/* -+ * qiov_slice -+ * -+ * Find subarray of iovec's, containing requested range. @head would -+ * be offset in first iov (returned by the function), @tail would be -+ * count of extra bytes in last iovec (returned iov + @niov - 1). -+ */ -+static struct iovec *qiov_slice(QEMUIOVector *qiov, -+ size_t offset, size_t len, -+ size_t *head, size_t *tail, int *niov) -+{ -+ struct iovec *iov, *end_iov; -+ -+ assert(offset + len <= qiov->size); -+ -+ iov = iov_skip_offset(qiov->iov, offset, head); -+ end_iov = iov_skip_offset(iov, *head + len, tail); -+ -+ if (*tail > 0) { -+ assert(*tail < end_iov->iov_len); -+ *tail = end_iov->iov_len - *tail; -+ end_iov++; -+ } -+ -+ *niov = end_iov - iov; -+ -+ return iov; -+} -+ -+/* -+ * Compile new iovec, combining @head_buf buffer, sub-qiov of @mid_qiov, -+ * and @tail_buf buffer into new qiov. -+ */ -+void qemu_iovec_init_extended( -+ QEMUIOVector *qiov, -+ void *head_buf, size_t head_len, -+ QEMUIOVector *mid_qiov, size_t mid_offset, size_t mid_len, -+ void *tail_buf, size_t tail_len) -+{ -+ size_t mid_head, mid_tail; -+ int total_niov, mid_niov = 0; -+ struct iovec *p, *mid_iov; -+ -+ if (mid_len) { -+ mid_iov = qiov_slice(mid_qiov, mid_offset, mid_len, -+ &mid_head, &mid_tail, &mid_niov); -+ } -+ -+ total_niov = !!head_len + mid_niov + !!tail_len; -+ if (total_niov == 1) { -+ qemu_iovec_init_buf(qiov, NULL, 0); -+ p = &qiov->local_iov; -+ } else { -+ qiov->niov = qiov->nalloc = total_niov; -+ qiov->size = head_len + mid_len + tail_len; -+ p = qiov->iov = g_new(struct iovec, qiov->niov); -+ } -+ -+ if (head_len) { -+ p->iov_base = head_buf; -+ p->iov_len = head_len; -+ p++; -+ } -+ -+ if (mid_len) { -+ memcpy(p, mid_iov, mid_niov * sizeof(*p)); -+ p[0].iov_base = (uint8_t *)p[0].iov_base + mid_head; -+ p[0].iov_len -= mid_head; -+ p[mid_niov - 1].iov_len -= mid_tail; -+ p += mid_niov; -+ } -+ -+ if (tail_len) { -+ p->iov_base = tail_buf; -+ p->iov_len = tail_len; -+ } -+} -+ - /* - * Check if the contents of the iovecs are all zero - */ -@@ -374,14 +471,19 @@ bool qemu_iovec_is_zero(QEMUIOVector *qiov) - return true; - } - -+void qemu_iovec_init_slice(QEMUIOVector *qiov, QEMUIOVector *source, -+ size_t offset, size_t len) -+{ -+ qemu_iovec_init_extended(qiov, NULL, 0, source, offset, len, NULL, 0); -+} -+ - void qemu_iovec_destroy(QEMUIOVector *qiov) - { -- assert(qiov->nalloc != -1); -+ if (qiov->nalloc != -1) { -+ g_free(qiov->iov); -+ } - -- qemu_iovec_reset(qiov); -- g_free(qiov->iov); -- qiov->nalloc = 0; -- qiov->iov = NULL; -+ memset(qiov, 0, sizeof(*qiov)); - } - - void qemu_iovec_reset(QEMUIOVector *qiov) diff --git a/vhost-Fix-memory-region-section-comparis.patch b/vhost-Fix-memory-region-section-comparis.patch deleted file mode 100644 index f58cb30..0000000 --- a/vhost-Fix-memory-region-section-comparis.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: "Dr. David Alan Gilbert" -Date: Wed, 14 Aug 2019 18:55:35 +0100 -Subject: vhost: Fix memory region section comparison - -Git-commit: 3fc4a64cbaed2ddee4c60ddc06740b320e18ab82 - -Using memcmp to compare structures wasn't safe, -as I found out on ARM when I was getting falce miscompares. - -Use the helper function for comparing the MRSs. - -Fixes: ade6d081fc33948e56e6 ("vhost: Regenerate region list from changed sections list") -Cc: qemu-stable@nongnu.org -Signed-off-by: Dr. David Alan Gilbert -Message-Id: <20190814175535.2023-4-dgilbert@redhat.com> -Reviewed-by: Michael S. Tsirkin -Signed-off-by: Michael S. Tsirkin -Signed-off-by: Bruce Rogers ---- - hw/virtio/vhost.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c -index bc899fc60e8bad1651340910c1ca..2ef4bc720f04ddadca3305a73df2 100644 ---- a/hw/virtio/vhost.c -+++ b/hw/virtio/vhost.c -@@ -451,8 +451,13 @@ static void vhost_commit(MemoryListener *listener) - changed = true; - } else { - /* Same size, lets check the contents */ -- changed = n_old_sections && memcmp(dev->mem_sections, old_sections, -- n_old_sections * sizeof(old_sections[0])) != 0; -+ for (int i = 0; i < n_old_sections; i++) { -+ if (!MemoryRegionSection_eq(&old_sections[i], -+ &dev->mem_sections[i])) { -+ changed = true; -+ break; -+ } -+ } - } - - trace_vhost_commit(dev->started, changed); diff --git a/vpc-Return-0-from-vpc_co_create-on-succe.patch b/vpc-Return-0-from-vpc_co_create-on-succe.patch deleted file mode 100644 index d03b583..0000000 --- a/vpc-Return-0-from-vpc_co_create-on-succe.patch +++ /dev/null @@ -1,47 +0,0 @@ -From: Max Reitz -Date: Mon, 2 Sep 2019 21:33:16 +0200 -Subject: vpc: Return 0 from vpc_co_create() on success - -Git-commit: 1a37e3124407b5a145d44478d3ecbdb89c63789f - -blockdev_create_run() directly uses .bdrv_co_create()'s return value as -the job's return value. Jobs must return 0 on success, not just any -nonnegative value. Therefore, using blockdev-create for VPC images may -currently fail as the vpc driver may return a positive integer. - -Because there is no point in returning a positive integer anywhere in -the block layer (all non-negative integers are generally treated as -complete success), we probably do not want to add more such cases. -Therefore, fix this problem by making the vpc driver always return 0 in -case of success. - -Suggested-by: Kevin Wolf -Cc: qemu-stable@nongnu.org -Signed-off-by: Max Reitz -Signed-off-by: Kevin Wolf -Signed-off-by: Bruce Rogers ---- - block/vpc.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/block/vpc.c b/block/vpc.c -index d4776ee8a5229ff43e8fb4fb6e0f..3a88e28e2be18553ff50a9b5c070 100644 ---- a/block/vpc.c -+++ b/block/vpc.c -@@ -885,6 +885,7 @@ static int create_dynamic_disk(BlockBackend *blk, uint8_t *buf, - goto fail; - } - -+ ret = 0; - fail: - return ret; - } -@@ -908,7 +909,7 @@ static int create_fixed_disk(BlockBackend *blk, uint8_t *buf, - return ret; - } - -- return ret; -+ return 0; - } - - static int calculate_rounded_image_size(BlockdevCreateOptionsVpc *vpc_opts, From c77a5bbe453523136043cb93aaddfd8daa2d4a0386d1bb4c00e81a95196f8fa1 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Tue, 19 Nov 2019 20:31:43 +0000 Subject: [PATCH 2/4] Accepting request 749743 from home:bfrogers:branches:Virtualization - Expose pschange-mc-no "feature", indicating CPU does not have the page size change machine check vulnerability (CVE-2018-12207 bsc#1155812) target-i386-add-PSCHANGE_NO-bit-for-the-.patch - Expose taa-no "feature", indicating CPU does not have the TSX Async Abort vulnerability. (CVE-2019-11135 bsc#1152506) target-i386-Export-TAA_NO-bit-to-guests.patch Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-4.1 OBS-URL: https://build.opensuse.org/request/show/749743 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=512 --- config.sh | 5 + qemu.changes | 12 +++ qemu.spec | 97 ++++++++++--------- qemu.spec.in | 11 ++- target-i386-Export-TAA_NO-bit-to-guests.patch | 34 +++++++ ...et-i386-add-PSCHANGE_NO-bit-for-the-.patch | 29 ++++++ update_git.sh | 10 +- 7 files changed, 141 insertions(+), 57 deletions(-) create mode 100644 target-i386-Export-TAA_NO-bit-to-guests.patch create mode 100644 target-i386-add-PSCHANGE_NO-bit-for-the-.patch diff --git a/config.sh b/config.sh index fc40e0f..0042873 100644 --- a/config.sh +++ b/config.sh @@ -14,6 +14,11 @@ GIT_UPSTREAM_COMMIT_ISH=v4.1.1 # This is used to choose the version number when LATEST processing is active NEXT_RELEASE_IS_MAJOR=0 +# 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.12.1+ + # The shared openSUSE specific git repo, on which $GIT_LOCAL_TREE is based GIT_TREE=git://github.com/openSUSE/qemu.git diff --git a/qemu.changes b/qemu.changes index 121aff4..c6b000e 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Nov 19 19:13:41 UTC 2019 - Bruce Rogers + +- Expose pschange-mc-no "feature", indicating CPU does not have + the page size change machine check vulnerability (CVE-2018-12207 + bsc#1155812) + target-i386-add-PSCHANGE_NO-bit-for-the-.patch +- Expose taa-no "feature", indicating CPU does not have the + TSX Async Abort vulnerability. (CVE-2019-11135 bsc#1152506) + target-i386-Export-TAA_NO-bit-to-guests.patch +Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-4.1 + ------------------------------------------------------------------- Fri Nov 15 15:45:45 UTC 2019 - Bruce Rogers diff --git a/qemu.spec b/qemu.spec index 5a52a5c..6597e92 100644 --- a/qemu.spec +++ b/qemu.spec @@ -87,14 +87,15 @@ %define summary_string Machine emulator and virtualizer %endif +%define qemuver 4.1.1 +%define srcver 4.1.1 +%define sbver 1.12.1 %define srcname qemu Name: qemu%{name_suffix} URL: https://www.qemu.org/ Summary: %{summary_string} 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 -%define qemuver 4.1.1 -%define srcver 4.1.1 Version: %qemuver Release: 0 Source: https://wiki.qemu.org/download/%{srcname}-%{srcver}.tar.xz @@ -122,46 +123,48 @@ Source303: README.PACKAGING # This patch queue is auto-generated - see README.PACKAGING for process # Patches applied in base project: -Patch00000: XXX-dont-dump-core-on-sigabort.patch -Patch00001: qemu-binfmt-conf-Modify-default-path.patch -Patch00002: qemu-cvs-gettimeofday.patch -Patch00003: qemu-cvs-ioctl_debug.patch -Patch00004: qemu-cvs-ioctl_nodirection.patch -Patch00005: linux-user-add-binfmt-wrapper-for-argv-0.patch -Patch00006: PPC-KVM-Disable-mmu-notifier-check.patch -Patch00007: linux-user-binfmt-support-host-binaries.patch -Patch00008: linux-user-Fake-proc-cpuinfo.patch -Patch00009: linux-user-use-target_ulong.patch -Patch00010: Make-char-muxer-more-robust-wrt-small-FI.patch -Patch00011: linux-user-lseek-explicitly-cast-non-set.patch -Patch00012: AIO-Reduce-number-of-threads-for-32bit-h.patch -Patch00013: xen_disk-Add-suse-specific-flush-disable.patch -Patch00014: qemu-bridge-helper-reduce-security-profi.patch -Patch00015: qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch -Patch00016: linux-user-properly-test-for-infinite-ti.patch -Patch00017: roms-Makefile-pass-a-packaging-timestamp.patch -Patch00018: Raise-soft-address-space-limit-to-hard-l.patch -Patch00019: increase-x86_64-physical-bits-to-42.patch -Patch00020: vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch -Patch00021: i8254-Fix-migration-from-SLE11-SP2.patch -Patch00022: acpi_piix4-Fix-migration-from-SLE11-SP2.patch -Patch00023: Switch-order-of-libraries-for-mpath-supp.patch -Patch00024: Make-installed-scripts-explicitly-python.patch -Patch00025: hw-smbios-handle-both-file-formats-regar.patch -Patch00026: xen-add-block-resize-support-for-xen-dis.patch -Patch00027: tests-qemu-iotests-Triple-timeout-of-i-o.patch -Patch00028: tests-Fix-block-tests-to-be-compatible-w.patch -Patch00029: xen-ignore-live-parameter-from-xen-save-.patch -Patch00030: Conditionalize-ui-bitmap-installation-be.patch -Patch00031: tests-change-error-message-in-test-162.patch -Patch00032: hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch -Patch00033: hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch -Patch00034: hw-intc-exynos4210_gic-provide-more-room.patch -Patch00035: configure-only-populate-roms-if-softmmu.patch -Patch00036: pc-bios-s390-ccw-net-avoid-warning-about.patch -Patch00037: roms-change-cross-compiler-naming-to-be-.patch -Patch00038: tests-Disable-some-block-tests-for-now.patch -Patch00039: test-add-mapping-from-arch-of-i686-to-qe.patch +Patch00000: target-i386-add-PSCHANGE_NO-bit-for-the-.patch +Patch00001: target-i386-Export-TAA_NO-bit-to-guests.patch +Patch00002: XXX-dont-dump-core-on-sigabort.patch +Patch00003: qemu-binfmt-conf-Modify-default-path.patch +Patch00004: qemu-cvs-gettimeofday.patch +Patch00005: qemu-cvs-ioctl_debug.patch +Patch00006: qemu-cvs-ioctl_nodirection.patch +Patch00007: linux-user-add-binfmt-wrapper-for-argv-0.patch +Patch00008: PPC-KVM-Disable-mmu-notifier-check.patch +Patch00009: linux-user-binfmt-support-host-binaries.patch +Patch00010: linux-user-Fake-proc-cpuinfo.patch +Patch00011: linux-user-use-target_ulong.patch +Patch00012: Make-char-muxer-more-robust-wrt-small-FI.patch +Patch00013: linux-user-lseek-explicitly-cast-non-set.patch +Patch00014: AIO-Reduce-number-of-threads-for-32bit-h.patch +Patch00015: xen_disk-Add-suse-specific-flush-disable.patch +Patch00016: qemu-bridge-helper-reduce-security-profi.patch +Patch00017: qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch +Patch00018: linux-user-properly-test-for-infinite-ti.patch +Patch00019: roms-Makefile-pass-a-packaging-timestamp.patch +Patch00020: Raise-soft-address-space-limit-to-hard-l.patch +Patch00021: increase-x86_64-physical-bits-to-42.patch +Patch00022: vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch +Patch00023: i8254-Fix-migration-from-SLE11-SP2.patch +Patch00024: acpi_piix4-Fix-migration-from-SLE11-SP2.patch +Patch00025: Switch-order-of-libraries-for-mpath-supp.patch +Patch00026: Make-installed-scripts-explicitly-python.patch +Patch00027: hw-smbios-handle-both-file-formats-regar.patch +Patch00028: xen-add-block-resize-support-for-xen-dis.patch +Patch00029: tests-qemu-iotests-Triple-timeout-of-i-o.patch +Patch00030: tests-Fix-block-tests-to-be-compatible-w.patch +Patch00031: xen-ignore-live-parameter-from-xen-save-.patch +Patch00032: Conditionalize-ui-bitmap-installation-be.patch +Patch00033: tests-change-error-message-in-test-162.patch +Patch00034: hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch +Patch00035: hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch +Patch00036: hw-intc-exynos4210_gic-provide-more-room.patch +Patch00037: configure-only-populate-roms-if-softmmu.patch +Patch00038: pc-bios-s390-ccw-net-avoid-warning-about.patch +Patch00039: roms-change-cross-compiler-naming-to-be-.patch +Patch00040: tests-Disable-some-block-tests-for-now.patch +Patch00041: test-add-mapping-from-arch-of-i686-to-qe.patch # Patches applied in roms/seabios/: Patch01000: seabios-use-python2-explicitly-as-needed.patch Patch01001: seabios-switch-to-python3-as-needed.patch @@ -373,7 +376,7 @@ BuildRequires: qemu-ksm = %{qemuver} BuildRequires: qemu-lang = %{qemuver} BuildRequires: qemu-ppc = %{qemuver} BuildRequires: qemu-s390 = %{qemuver} -BuildRequires: qemu-seabios = 1.12.1 +BuildRequires: qemu-seabios = %{sbver} BuildRequires: qemu-sgabios = 8 BuildRequires: qemu-tools = %{qemuver} BuildRequires: qemu-ui-curses = %{qemuver} @@ -381,7 +384,7 @@ BuildRequires: qemu-ui-gtk = %{qemuver} %if 0%{?is_opensuse} BuildRequires: qemu-ui-sdl = %{qemuver} %endif -BuildRequires: qemu-vgabios = 1.12.1 +BuildRequires: qemu-vgabios = %{sbver} BuildRequires: qemu-x86 = %{qemuver} %endif Requires(pre): shadow @@ -769,7 +772,7 @@ to provide information and control at the guest OS level. %package seabios Summary: x86 Legacy BIOS for QEMU Group: System/Emulators/PC -Version: 1.12.1 +Version: %{sbver} Release: 0 BuildArch: noarch Conflicts: %name < 1.6.0 @@ -781,7 +784,7 @@ is the default and legacy BIOS for QEMU. %package vgabios Summary: VGA BIOSes for QEMU Group: System/Emulators/PC -Version: 1.12.1 +Version: %{sbver} Release: 0 BuildArch: noarch Conflicts: %name < 1.6.0 @@ -891,6 +894,8 @@ This package provides a service file for starting and stopping KSM. %patch00037 -p1 %patch00038 -p1 %patch00039 -p1 +%patch00040 -p1 +%patch00041 -p1 %patch01000 -p1 %patch01001 -p1 %patch01002 -p1 diff --git a/qemu.spec.in b/qemu.spec.in index 5dd373f..a574150 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -87,13 +87,14 @@ %define summary_string Machine emulator and virtualizer %endif +INSERT_VERSIONING %define srcname qemu Name: qemu%{name_suffix} URL: https://www.qemu.org/ Summary: %{summary_string} 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 -QEMU_VERSION +Version: %qemuver Release: 0 Source: https://wiki.qemu.org/download/%{srcname}-%{srcver}.tar.xz Source100: %{srcname}.keyring @@ -301,7 +302,7 @@ BuildRequires: qemu-ksm = %{qemuver} BuildRequires: qemu-lang = %{qemuver} BuildRequires: qemu-ppc = %{qemuver} BuildRequires: qemu-s390 = %{qemuver} -BuildRequires: qemu-seabios = 1.12.1 +BuildRequires: qemu-seabios = %{sbver} BuildRequires: qemu-sgabios = 8 BuildRequires: qemu-tools = %{qemuver} BuildRequires: qemu-ui-curses = %{qemuver} @@ -309,7 +310,7 @@ BuildRequires: qemu-ui-gtk = %{qemuver} %if 0%{?is_opensuse} BuildRequires: qemu-ui-sdl = %{qemuver} %endif -BuildRequires: qemu-vgabios = 1.12.1 +BuildRequires: qemu-vgabios = %{sbver} BuildRequires: qemu-x86 = %{qemuver} %endif Requires(pre): shadow @@ -697,7 +698,7 @@ to provide information and control at the guest OS level. %package seabios Summary: x86 Legacy BIOS for QEMU Group: System/Emulators/PC -SEABIOS_VERSION +Version: %{sbver} Release: 0 BuildArch: noarch Conflicts: %name < 1.6.0 @@ -709,7 +710,7 @@ is the default and legacy BIOS for QEMU. %package vgabios Summary: VGA BIOSes for QEMU Group: System/Emulators/PC -SEABIOS_VERSION +Version: %{sbver} Release: 0 BuildArch: noarch Conflicts: %name < 1.6.0 diff --git a/target-i386-Export-TAA_NO-bit-to-guests.patch b/target-i386-Export-TAA_NO-bit-to-guests.patch new file mode 100644 index 0000000..72153e3 --- /dev/null +++ b/target-i386-Export-TAA_NO-bit-to-guests.patch @@ -0,0 +1,34 @@ +From: Pawan Gupta +Date: Mon, 18 Nov 2019 23:23:27 -0800 +Subject: target/i386: Export TAA_NO bit to guests + +Git-commit: 7fac38635e1cc5ebae34eb6530da1009bd5808e4 +Reference: bsc#1152506 CVE-2019-11135 + +TSX Async Abort (TAA) is a side channel attack on internal buffers in +some Intel processors similar to Microachitectural Data Sampling (MDS). + +Some future Intel processors will use the ARCH_CAP_TAA_NO bit in the +IA32_ARCH_CAPABILITIES MSR to report that they are not vulnerable to +TAA. Make this bit available to guests. + +Signed-off-by: Pawan Gupta +Signed-off-by: Paolo Bonzini +Signed-off-by: Bruce Rogers +--- + target/i386/cpu.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/target/i386/cpu.c b/target/i386/cpu.c +index 5191367f89ee4d1131c4309633de..530942baed87c5ff76beaf36df14 100644 +--- a/target/i386/cpu.c ++++ b/target/i386/cpu.c +@@ -1189,7 +1189,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { + .feat_names = { + "rdctl-no", "ibrs-all", "rsba", "skip-l1dfl-vmentry", + "ssb-no", "mds-no", "pschange-mc-no", NULL, +- NULL, NULL, NULL, NULL, ++ "taa-no", NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, diff --git a/target-i386-add-PSCHANGE_NO-bit-for-the-.patch b/target-i386-add-PSCHANGE_NO-bit-for-the-.patch new file mode 100644 index 0000000..9c926f2 --- /dev/null +++ b/target-i386-add-PSCHANGE_NO-bit-for-the-.patch @@ -0,0 +1,29 @@ +From: Paolo Bonzini +Date: Wed, 13 Nov 2019 15:54:35 +0100 +Subject: target/i386: add PSCHANGE_NO bit for the ARCH_CAPABILITIES MSR + +Git-commit: 7f7a585d5bd3c7f1275d28c77d9d67513c1de36c +Reference: bsc#1155812 CVE-2018-12207 + +This is required to disable ITLB multihit mitigations in nested +hypervisors. + +Signed-off-by: Paolo Bonzini +Signed-off-by: Bruce Rogers +--- + target/i386/cpu.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/target/i386/cpu.c b/target/i386/cpu.c +index 19751e37a71fee27944526fe507c..5191367f89ee4d1131c4309633de 100644 +--- a/target/i386/cpu.c ++++ b/target/i386/cpu.c +@@ -1188,7 +1188,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { + .type = MSR_FEATURE_WORD, + .feat_names = { + "rdctl-no", "ibrs-all", "rsba", "skip-l1dfl-vmentry", +- "ssb-no", "mds-no", NULL, NULL, ++ "ssb-no", "mds-no", "pschange-mc-no", NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, diff --git a/update_git.sh b/update_git.sh index 21802bf..6e38ce6 100644 --- a/update_git.sh +++ b/update_git.sh @@ -462,8 +462,8 @@ rm -rf $BUNDLE_DIR echo "QEMU source version: $SOURCE_VERSION" echo "QEMU version extra: $VERSION_EXTRA" - SEABIOS_VERSION=$(tar JxfO qemu-$SOURCE_VERSION$VERSION_EXTRA.tar.xz \ - qemu-$SOURCE_VERSION/roms/seabios/.version | cut -d '-' -f 2) + SEABIOS_VERSION=${SEABIOS_VERSION:-$(tar JxfO qemu-$SOURCE_VERSION$VERSION_EXTRA.tar.xz \ + qemu-$SOURCE_VERSION/roms/seabios/.version | cut -d '-' -f 2)} for package in qemu; do while IFS= read -r line; do @@ -507,18 +507,16 @@ rm -rf $BUNDLE_DIR echo "%patch$NUM -p1" fi done - elif [ "$line" = "QEMU_VERSION" ]; then + elif [ "$line" = "INSERT_VERSIONING" ]; then echo "%define qemuver $QEMU_VERSION$VERSION_EXTRA" echo "%define srcver $SOURCE_VERSION$VERSION_EXTRA" - echo "Version: %qemuver" + echo "%define sbver $SEABIOS_VERSION" elif [[ "$line" =~ ^Source: ]]; then echo "$line" if [ ${#QEMU_TARBALL_SIG[@]} -eq 1 ]; then # We assume the signature file corresponds - just add .sig echo "$line.sig"|sed 's/^Source: /Source99:/' fi - elif [ "$line" = "SEABIOS_VERSION" ]; then - echo "Version: $SEABIOS_VERSION" else echo "$line" fi From 3a333345a6fc74e9e0f05e1f7ff1f4534dead34822f2eb050f078972ea88b2fb Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Wed, 27 Nov 2019 12:46:32 +0000 Subject: [PATCH 3/4] Accepting request 751303 from home:bfrogers:branches:Virtualization:Staging Update to v4.2.0-rc3. Intent is to submit to Factory, and SLE-15-SP2 as well OBS-URL: https://build.opensuse.org/request/show/751303 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=513 --- 50-seabios-256k.json | 35 ++ 60-seabios-128k.json | 47 +++ ...itionalize-ui-bitmap-installation-be.patch | 6 +- ...ble-Waddress-of-packed-member-for-GC.patch | 29 -- ...le-cross-compile-prefix-for-C-compil.patch | 30 ++ ...-char-muxer-more-robust-wrt-small-FI.patch | 2 +- ...-installed-scripts-explicitly-python.patch | 2 +- PPC-KVM-Disable-mmu-notifier-check.patch | 4 +- README.PACKAGING | 28 +- ...e-soft-address-space-limit-to-hard-l.patch | 14 +- ...ch-order-of-libraries-for-mpath-supp.patch | 8 +- acpi_piix4-Fix-migration-from-SLE11-SP2.patch | 8 +- ati-add-edid-support.patch | 159 -------- ati-vga-add-rage128-edid-support.patch | 78 ---- ati-vga-fix-ati_read.patch | 28 -- ...vga-make-i2c-register-and-bits-confi.patch | 95 ----- ati-vga-make-less-verbose.patch | 27 -- ati-vga-try-vga-ddc-first.patch | 35 -- bundles.tar.xz | 4 +- config.sh | 10 +- configure-only-populate-roms-if-softmmu.patch | 15 +- enable-cross-compilation-on-ARM.patch | 2 +- ...re-headers-included-are-compatible-w.patch | 52 +++ hdata-vpd-fix-printing-char-0x00.patch | 64 --- ...ntc-exynos4210_gic-provide-more-room.patch | 4 +- ...mbios-handle-both-file-formats-regar.patch | 10 +- hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch | 4 +- hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch | 4 +- i8254-Fix-migration-from-SLE11-SP2.patch | 6 +- increase-x86_64-physical-bits-to-42.patch | 4 +- linux-user-Fake-proc-cpuinfo.patch | 6 +- ...x-user-add-binfmt-wrapper-for-argv-0.patch | 14 +- ...x-user-lseek-explicitly-cast-non-set.patch | 4 +- ...x-user-properly-test-for-infinite-ti.patch | 4 +- linux-user-use-target_ulong.patch | 12 +- qemu-4.1.1.tar.xz | 3 - qemu-4.1.1.tar.xz.sig | Bin 310 -> 0 bytes qemu-4.2.0-rc3.tar.xz | 3 + qemu-binfmt-conf-Modify-default-path.patch | 4 +- qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch | 6 +- qemu-cvs-gettimeofday.patch | 4 +- qemu-cvs-ioctl_debug.patch | 4 +- qemu-cvs-ioctl_nodirection.patch | 6 +- qemu.changes | 39 ++ qemu.spec | 236 ++++++----- qemu.spec.in | 113 ++++-- ...-Makefile-enable-cross-compile-for-b.patch | 22 + ...-Makefile-pass-a-packaging-timestamp.patch | 10 +- ...-change-cross-compiler-naming-to-be-.patch | 2 +- seabios-switch-to-python3-as-needed.patch | 2 +- ...ios-use-python2-explicitly-as-needed.patch | 2 +- target-i386-Export-TAA_NO-bit-to-guests.patch | 34 -- ...et-i386-add-PSCHANGE_NO-bit-for-the-.patch | 29 -- tests-Disable-some-block-tests-for-now.patch | 20 +- ...s-Fix-block-tests-to-be-compatible-w.patch | 45 +-- tests-change-error-message-in-test-162.patch | 4 +- ...s-qemu-iotests-Triple-timeout-of-i-o.patch | 2 +- update_git.sh | 21 + vbe-add-edid-support.patch | 87 ---- ...Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch | 4 +- vga-add-ati-bios-tables.patch | 79 ---- vga-add-atiext-driver.patch | 381 ------------------ vga-make-memcpy_high-public.patch | 39 -- ...move-modelist-from-bochsvga.c-to-new.patch | 272 ------------- ...add-block-resize-support-for-xen-dis.patch | 4 +- ...ignore-live-parameter-from-xen-save-.patch | 4 +- ...disk-Add-suse-specific-flush-disable.patch | 6 +- 67 files changed, 607 insertions(+), 1734 deletions(-) create mode 100644 50-seabios-256k.json create mode 100644 60-seabios-128k.json delete mode 100644 Disable-Waddress-of-packed-member-for-GC.patch create mode 100644 Enable-cross-compile-prefix-for-C-compil.patch delete mode 100644 ati-add-edid-support.patch delete mode 100644 ati-vga-add-rage128-edid-support.patch delete mode 100644 ati-vga-fix-ati_read.patch delete mode 100644 ati-vga-make-i2c-register-and-bits-confi.patch delete mode 100644 ati-vga-make-less-verbose.patch delete mode 100644 ati-vga-try-vga-ddc-first.patch create mode 100644 ensure-headers-included-are-compatible-w.patch delete mode 100644 hdata-vpd-fix-printing-char-0x00.patch delete mode 100644 qemu-4.1.1.tar.xz delete mode 100644 qemu-4.1.1.tar.xz.sig create mode 100644 qemu-4.2.0-rc3.tar.xz create mode 100644 roms-Makefile-enable-cross-compile-for-b.patch delete mode 100644 target-i386-Export-TAA_NO-bit-to-guests.patch delete mode 100644 target-i386-add-PSCHANGE_NO-bit-for-the-.patch delete mode 100644 vbe-add-edid-support.patch delete mode 100644 vga-add-ati-bios-tables.patch delete mode 100644 vga-add-atiext-driver.patch delete mode 100644 vga-make-memcpy_high-public.patch delete mode 100644 vga-move-modelist-from-bochsvga.c-to-new.patch diff --git a/50-seabios-256k.json b/50-seabios-256k.json new file mode 100644 index 0000000..5d86e42 --- /dev/null +++ b/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/60-seabios-128k.json b/60-seabios-128k.json new file mode 100644 index 0000000..77480e2 --- /dev/null +++ b/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/Conditionalize-ui-bitmap-installation-be.patch b/Conditionalize-ui-bitmap-installation-be.patch index a67baa3..1dbcbc9 100644 --- a/Conditionalize-ui-bitmap-installation-be.patch +++ b/Conditionalize-ui-bitmap-installation-be.patch @@ -8,10 +8,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile -index 00ed716275743a161ea05e7d2a1e..ab4d8683ad8f86aa680b343310e1 100644 +index 52881cbb12e7d980e0ed51f21174..edc3de72e6a94ef0503da640bbfe 100644 --- a/Makefile +++ b/Makefile -@@ -887,6 +887,7 @@ ifneq ($(DESCS),) +@@ -913,6 +913,7 @@ ifneq ($(DESCS),) "$(DESTDIR)$(qemu_datadir)/firmware/$$x"; \ done endif @@ -19,7 +19,7 @@ index 00ed716275743a161ea05e7d2a1e..ab4d8683ad8f86aa680b343310e1 100644 for s in $(ICON_SIZES); do \ mkdir -p "$(DESTDIR)$(qemu_icondir)/hicolor/$${s}/apps"; \ $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_$${s}.png \ -@@ -901,6 +902,7 @@ endif +@@ -927,6 +928,7 @@ endif mkdir -p "$(DESTDIR)$(qemu_desktopdir)" $(INSTALL_DATA) $(SRC_PATH)/ui/qemu.desktop \ "$(DESTDIR)$(qemu_desktopdir)/qemu.desktop" diff --git a/Disable-Waddress-of-packed-member-for-GC.patch b/Disable-Waddress-of-packed-member-for-GC.patch deleted file mode 100644 index cb78fb1..0000000 --- a/Disable-Waddress-of-packed-member-for-GC.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Stewart Smith -Date: Tue, 18 Jun 2019 16:09:44 +1000 -Subject: Disable -Waddress-of-packed-member for GCC9 - -Git-commit: b904cb733750de1bb0e04e5012c391a9c3094d11 - -We throw a bunch of errors in errorlog code otherwise, which we should -fix, but we don't *have* to yet. - -Signed-off-by: Stewart Smith -Signed-off-by: Bruce Rogers ---- - Makefile.main | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/roms/skiboot/Makefile.main b/roms/skiboot/Makefile.main -index a8e34d16c4729921901871b3f9e3..91dc73e06903e8f10c6ad09c1db9 100644 ---- a/roms/skiboot/Makefile.main -+++ b/roms/skiboot/Makefile.main -@@ -120,7 +120,8 @@ endif - CFLAGS += $(call try-cflag,$(CC),-Wjump-misses-init) \ - $(call try-cflag,$(CC),-Wsuggest-attribute=const) \ - $(call try-cflag,$(CC),-Wsuggest-attribute=noreturn) \ -- $(call try-cflag,$(CC),-Wstack-usage=1024) -+ $(call try-cflag,$(CC),-Wstack-usage=1024) \ -+ $(call try-cflag,$(CC),-Wno-error=address-of-packed-member) - - CFLAGS += $(CWARNS) $(OPTS) $(DBG) - diff --git a/Enable-cross-compile-prefix-for-C-compil.patch b/Enable-cross-compile-prefix-for-C-compil.patch new file mode 100644 index 0000000..9c7d26d --- /dev/null +++ b/Enable-cross-compile-prefix-for-C-compil.patch @@ -0,0 +1,30 @@ +From: Bruce Rogers +Date: Fri, 1 Nov 2019 19:41:52 -0600 +Subject: Enable cross compile prefix for C compiler invocation + +Signed-off-by: Bruce Rogers +--- + Makefile | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/roms/qboot/Makefile b/roms/qboot/Makefile +index adbf1b319e4a7bee78e2f95c5e51..cdde20fc37b13a1877668cd20e2f 100644 +--- a/roms/qboot/Makefile ++++ b/roms/qboot/Makefile +@@ -1,3 +1,4 @@ ++CROSS_COMPILE ?= + obj-y = code16.o entry.o main.o string.o printf.o cstart.o fw_cfg.o + obj-y += linuxboot.o malloc.o tables.o hwsetup.o pci.o code32seg.o + obj-y += mptable.o +@@ -25,9 +26,9 @@ autodepend-flags = -MMD -MF .deps/cc-$(patsubst %/,%,$(dir $*))-$(notdir $*).d + + .PRECIOUS: %.o + %.o: %.c +- $(CC) $(CFLAGS) $(BIOS_CFLAGS) $($@-cflags) -c -s $< -o $@ ++ $(CROSS_COMPILE)$(CC) $(CFLAGS) $(BIOS_CFLAGS) $($@-cflags) -c -s $< -o $@ + %.o: %.S +- $(CC) $(CFLAGS) $(BIOS_CFLAGS) -c -s $< -o $@ ++ $(CROSS_COMPILE)$(CC) $(CFLAGS) $(BIOS_CFLAGS) -c -s $< -o $@ + + bios.bin.elf: $(obj-y) flat.lds + $(LD) -T flat.lds -o bios.bin.elf $(obj-y) diff --git a/Make-char-muxer-more-robust-wrt-small-FI.patch b/Make-char-muxer-more-robust-wrt-small-FI.patch index 6f8c21a..0ef1eac 100644 --- a/Make-char-muxer-more-robust-wrt-small-FI.patch +++ b/Make-char-muxer-more-robust-wrt-small-FI.patch @@ -108,7 +108,7 @@ index 572cefd517c8fa9d605cbd10fc21..6e80785bd9c12b85e747fa9f924e 100644 int mux_cnt; int term_got_escape; diff --git a/tests/test-char.c b/tests/test-char.c -index f9440cdcfdb51f98b2f6542e6f21..d1f99632de1acb95ba8e1b4a8584 100644 +index 45e42af290d4c55c0d8ed9358ef2..8e8c983dc0adce3dea739c9d85fc 100644 --- a/tests/test-char.c +++ b/tests/test-char.c @@ -1,3 +1,4 @@ diff --git a/Make-installed-scripts-explicitly-python.patch b/Make-installed-scripts-explicitly-python.patch index f020405..215e10c 100644 --- a/Make-installed-scripts-explicitly-python.patch +++ b/Make-installed-scripts-explicitly-python.patch @@ -23,7 +23,7 @@ index e527eb168e9ce7c3944094ec6701..fd376eac71f73e6366a9e17a1c51 100755 # Migration Stream Analyzer # diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py -index d3467288dcc5dd2f7274576262f7..2046b1feddb4c225c8f3bee080ac 100755 +index f8b7b8f77252f2c03d6d7db9dc60..754159069dfae6838edaac14856f 100755 --- a/scripts/vmstate-static-checker.py +++ b/scripts/vmstate-static-checker.py @@ -1,4 +1,4 @@ diff --git a/PPC-KVM-Disable-mmu-notifier-check.patch b/PPC-KVM-Disable-mmu-notifier-check.patch index 302d522..308ed04 100644 --- a/PPC-KVM-Disable-mmu-notifier-check.patch +++ b/PPC-KVM-Disable-mmu-notifier-check.patch @@ -14,10 +14,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 2 insertions(+) diff --git a/exec.c b/exec.c -index 3e78de3b8f8bb1914811a7965377..d2183f58816f53f15ef64e844291 100644 +index ffdb5185353bdbacc613d4730228..0d0c0618bb70f9747c71048f5cde 100644 --- a/exec.c +++ b/exec.c -@@ -2339,11 +2339,13 @@ RAMBlock *qemu_ram_alloc_from_fd(ram_addr_t size, MemoryRegion *mr, +@@ -2291,11 +2291,13 @@ RAMBlock *qemu_ram_alloc_from_fd(ram_addr_t size, MemoryRegion *mr, return NULL; } diff --git a/README.PACKAGING b/README.PACKAGING index eca4025..260c1a0 100644 --- a/README.PACKAGING +++ b/README.PACKAGING @@ -5,36 +5,32 @@ you make be acceptable to the package maintainers. The qemu.spec file is generated from a qemu.spec.in template, so to make changes to the spec file (besides the script generated patch references), you'll need to edit the template, not the spec file. The spec file patch references are inserted -by scripts, which are described below. +by a script as described below. If you are not modifying any patches or their order, but just need to update the spec file from a changed template, run 'bash ./update_git.sh refresh'. If the set of patches is being modified, including their order, you will want to first run 'bash ./update_git.sh pkg2git', which makes the current package patch -queue available in a local git branch named frombundle (see confi.sh for the +queue available in a local git branch named frombundle (see config.sh for the locations). This set of patches comes from a "bundle of git bundles", the bundles.tar.xz file, which is included as a package source file. You will then -create an altered patch queue in the $GIT_BRANCH branch ( again,see config.sh), -and use the frombundle branch as the starting point for your changes (eg perhaps -start by doing git reset --hard frombundle, then cherry-pick upstream patches -from there). Once you have the patch queue ready to go run 'bash ./update_git.sh -git2pkg' which updates the bunndles.tar.xz file, as well as the spec and patch -files. +create an altered patch queue in the branch which corresponds to this release +(eg: opensuse-4.2), using the frombundle branch as the starting point for your +changes (eg perhaps start by doing git reset --hard frombundle, then cherry-pick +upstream patches from there). Once you have the patch queue ready to go run +'bash ./update_git.sh git2pkg' which updates the bundles.tar.xz file, as well as +the spec and patch files. + +The maintainer and automation use another workflow mode dealing with packaging +the latest upstream qemu. See 'LATEST' references in the scripts for details. ** SPECIAL NOTE ABOUT CURRENT STATUS *** -The current status as of 03 Oct 2019 is that for this incarnation of qemu +The current status as of 31 Oct 2019 is that for this incarnation of qemu packaging, the previous workflow which relied on the patches being in a shared git repo on github or gitlab is no longer supported. This new bundle based workflos is still a work in progress. If it isn't working right, please contact Bruce Rogers . - -Also note that qemu now takes advantage of the MultiBuild feature of the Build -Service. No longer do the qemu-linux-user and qemu-testsuite packages have build -service links to the qemu package, but instead are generated straight from the -main qemu spec file via the use of a _multibuild file which identifies those -package variants. -- Bruce Rogers *** END SPECIAL NOTE *** Additional Notes: diff --git a/Raise-soft-address-space-limit-to-hard-l.patch b/Raise-soft-address-space-limit-to-hard-l.patch index 66a2509..aaaed51 100644 --- a/Raise-soft-address-space-limit-to-hard-l.patch +++ b/Raise-soft-address-space-limit-to-hard-l.patch @@ -16,26 +16,26 @@ Signed-off-by: Bruce Rogers 1 file changed, 12 insertions(+) diff --git a/vl.c b/vl.c -index b426b3213461210565bd1db15a0c..2b864f7dbe8b60ace40fa3258a37 100644 +index 6a65a64bfd647afcf539145f9cf9..57e68fdc4526b7156af155be933f 100644 --- a/vl.c +++ b/vl.c -@@ -30,6 +30,7 @@ - #include "qemu/cutils.h" - #include "qemu/help_option.h" +@@ -33,6 +33,7 @@ #include "qemu/uuid.h" + #include "sysemu/reset.h" + #include "sysemu/runstate.h" +#include #include "sysemu/seccomp.h" #include "sysemu/tcg.h" -@@ -2889,6 +2890,7 @@ int main(int argc, char **argv, char **envp) - bool list_data_dirs = false; +@@ -2861,6 +2862,7 @@ int main(int argc, char **argv, char **envp) char *dir, **dirs; BlockdevOptionsQueue bdo_queue = QSIMPLEQ_HEAD_INITIALIZER(bdo_queue); + QemuPluginList plugin_list = QTAILQ_HEAD_INITIALIZER(plugin_list); + struct rlimit rlimit_as; os_set_line_buffering(); -@@ -2900,6 +2902,16 @@ int main(int argc, char **argv, char **envp) +@@ -2872,6 +2874,16 @@ int main(int argc, char **argv, char **envp) qemu_mutex_lock_iothread(); diff --git a/Switch-order-of-libraries-for-mpath-supp.patch b/Switch-order-of-libraries-for-mpath-supp.patch index 1b16950..e102404 100644 --- a/Switch-order-of-libraries-for-mpath-supp.patch +++ b/Switch-order-of-libraries-for-mpath-supp.patch @@ -9,10 +9,10 @@ Signed-off-by: Bruce Rogers 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile -index 85862fb81a1d276c41133a31b2d9..00ed716275743a161ea05e7d2a1e 100644 +index b437a346d71a55d75f207f36e85b..52881cbb12e7d980e0ed51f21174 100644 --- a/Makefile +++ b/Makefile -@@ -556,7 +556,7 @@ fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap +@@ -579,7 +579,7 @@ fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o $(authz-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS) ifdef CONFIG_MPATH @@ -22,10 +22,10 @@ index 85862fb81a1d276c41133a31b2d9..00ed716275743a161ea05e7d2a1e 100644 qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool diff --git a/configure b/configure -index 714e7fb6a1fbd72ccdcd92b506ce..578d208b374261803d84c22c2479 100755 +index 6099be1d848c7f52ea02694d6d86..09a33aecfd6ef543eeee8c5023b6 100755 --- a/configure +++ b/configure -@@ -3781,7 +3781,7 @@ int main(void) { +@@ -3836,7 +3836,7 @@ int main(void) { return 0; } EOF diff --git a/acpi_piix4-Fix-migration-from-SLE11-SP2.patch b/acpi_piix4-Fix-migration-from-SLE11-SP2.patch index 1e37521..f4e361d 100644 --- a/acpi_piix4-Fix-migration-from-SLE11-SP2.patch +++ b/acpi_piix4-Fix-migration-from-SLE11-SP2.patch @@ -16,15 +16,15 @@ Signed-off-by: Andreas Färber 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c -index ec4e186cec7ccff739b7bad8dcc4..be5529867ab426b38b26dab5498a 100644 +index 93aec2dd2ce1767784076c3544b0..1f2a8ea850e9115b689af90bf708 100644 --- a/hw/acpi/piix4.c +++ b/hw/acpi/piix4.c -@@ -306,7 +306,7 @@ static bool piix4_vmstate_need_smbus(void *opaque, int version_id) +@@ -273,7 +273,7 @@ static bool piix4_vmstate_need_smbus(void *opaque, int version_id) static const VMStateDescription vmstate_acpi = { .name = "piix4_pm", .version_id = 3, - .minimum_version_id = 3, + .minimum_version_id = 2, /* qemu-kvm */ - .minimum_version_id_old = 1, - .load_state_old = acpi_load_old, .post_load = vmstate_acpi_post_load, + .fields = (VMStateField[]) { + VMSTATE_PCI_DEVICE(parent_obj, PIIX4PMState), diff --git a/ati-add-edid-support.patch b/ati-add-edid-support.patch deleted file mode 100644 index d38b5d5..0000000 --- a/ati-add-edid-support.patch +++ /dev/null @@ -1,159 +0,0 @@ -From: Gerd Hoffmann -Date: Mon, 18 Mar 2019 15:43:53 +0100 -Subject: ati: add edid support. - -Git-commit: 588eb12163b51c4d402383369456ce1cd1ec86ab - -Read EDID blob via i2c, store in VBE_edid. - -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - vgasrc/atiext.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 114 insertions(+) - -diff --git a/roms/seabios/vgasrc/atiext.c b/roms/seabios/vgasrc/atiext.c -index 0586279ce214fac7d2a7e6c87a94..8c9e6966db47f083646193d7faf6 100644 ---- a/roms/seabios/vgasrc/atiext.c -+++ b/roms/seabios/vgasrc/atiext.c -@@ -19,6 +19,8 @@ - #define MM_DATA 0x0004 - #define CRTC_GEN_CNTL 0x0050 - #define CRTC_EXT_CNTL 0x0054 -+#define GPIO_VGA_DDC 0x0060 -+#define GPIO_DVI_DDC 0x0064 - #define CRTC_H_TOTAL_DISP 0x0200 - #define CRTC_V_TOTAL_DISP 0x0208 - #define CRTC_OFFSET 0x0224 -@@ -106,6 +108,20 @@ static inline void ati_write(u32 reg, u32 val) - } - } - -+static inline u32 ati_read(u32 reg) -+{ -+ u32 io_addr = GET_GLOBAL(ati_io_addr); -+ u32 val; -+ -+ if (reg < 0x100) { -+ val = inl(io_addr + reg); -+ } else { -+ outl(reg, io_addr + MM_INDEX); -+ reg = inl(io_addr + MM_DATA); -+ } -+ return val; -+} -+ - static void ati_clear(u32 offset, u32 size) - { - u8 data[64]; -@@ -180,6 +196,97 @@ ati_set_mode(struct vgamode_s *vmode_g, int flags) - return stdvga_set_mode(vmode_g, flags); - } - -+/**************************************************************** -+ * edid -+ ****************************************************************/ -+ -+static void -+ati_i2c_set_scl_sda(int scl, int sda) -+{ -+ u32 data = 0; -+ -+ if (!scl) -+ data |= (1 << 17); -+ if (!sda) -+ data |= (1 << 16); -+ ati_write(GPIO_DVI_DDC, data); -+} -+ -+static int -+ati_i2c_get_sda(void) -+{ -+ u32 data = ati_read(GPIO_DVI_DDC); -+ -+ return data & (1 << 8) ? 1 : 0; -+} -+ -+static void ati_i2c_start(void) -+{ -+ ati_i2c_set_scl_sda(1, 1); -+ ati_i2c_set_scl_sda(1, 0); -+ ati_i2c_set_scl_sda(0, 0); -+} -+ -+static void ati_i2c_ack(void) -+{ -+ ati_i2c_set_scl_sda(0, 0); -+ ati_i2c_set_scl_sda(1, 0); -+ ati_i2c_set_scl_sda(0, 0); -+} -+ -+static void ati_i2c_stop(void) -+{ -+ ati_i2c_set_scl_sda(0, 0); -+ ati_i2c_set_scl_sda(1, 0); -+ ati_i2c_set_scl_sda(1, 1); -+} -+ -+static void ati_i2c_send_byte(u8 byte) -+{ -+ int i, bit; -+ -+ for (i = 0; i < 8; i++) { -+ bit = (1 << (7-i)) & byte ? 1 : 0; -+ ati_i2c_set_scl_sda(0, bit); -+ ati_i2c_set_scl_sda(1, bit); -+ ati_i2c_set_scl_sda(0, bit); -+ } -+} -+ -+static u8 ati_i2c_recv_byte(void) -+{ -+ u8 byte = 0; -+ int i, bit; -+ -+ for (i = 0; i < 8; i++) { -+ ati_i2c_set_scl_sda(0, 1); -+ ati_i2c_set_scl_sda(1, 1); -+ bit = ati_i2c_get_sda(); -+ ati_i2c_set_scl_sda(0, 1); -+ if (bit) -+ byte |= (1 << (7-i)); -+ } -+ -+ return byte; -+} -+ -+static void ati_i2c_edid(void) -+{ -+ u8 byte; -+ int i; -+ -+ dprintf(1, "ati: reading edid blob\n"); -+ ati_i2c_start(); -+ ati_i2c_send_byte(0x50 << 1 | 1); -+ ati_i2c_ack(); -+ for (i = 0; i < 128; i++) { -+ byte = ati_i2c_recv_byte(); -+ ati_i2c_ack(); -+ SET_VGA(VBE_edid[i], byte); -+ } -+ ati_i2c_stop(); -+} -+ - /**************************************************************** - * init - ****************************************************************/ -@@ -241,5 +348,12 @@ ati_setup(void) - } - } - -+ u16 device = pci_config_readw(bdf, PCI_DEVICE_ID); -+ switch (device) { -+ case 0x5159: -+ ati_i2c_edid(); -+ break; -+ } -+ - return 0; - } diff --git a/ati-vga-add-rage128-edid-support.patch b/ati-vga-add-rage128-edid-support.patch deleted file mode 100644 index 08f7446..0000000 --- a/ati-vga-add-rage128-edid-support.patch +++ /dev/null @@ -1,78 +0,0 @@ -From: Gerd Hoffmann -Date: Mon, 24 Jun 2019 13:35:46 +0200 -Subject: ati-vga: add rage128 edid support - -Git-commit: 020bc4fc5ce93107c8e1bc731b9802cee56a123e - -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - vgasrc/atiext.c | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - -diff --git a/roms/seabios/vgasrc/atiext.c b/roms/seabios/vgasrc/atiext.c -index 71dfa859a22dc569ed2fd1312c6b..69dfd46e550a8865734def85c62d 100644 ---- a/roms/seabios/vgasrc/atiext.c -+++ b/roms/seabios/vgasrc/atiext.c -@@ -21,6 +21,7 @@ - #define CRTC_EXT_CNTL 0x0054 - #define GPIO_VGA_DDC 0x0060 - #define GPIO_DVI_DDC 0x0064 -+#define GPIO_MONID 0x0068 - #define CRTC_H_TOTAL_DISP 0x0200 - #define CRTC_V_TOTAL_DISP 0x0208 - #define CRTC_OFFSET 0x0224 -@@ -47,6 +48,7 @@ static u32 ati_i2c_reg VAR16; - static u32 ati_i2c_bit_scl_out VAR16; - static u32 ati_i2c_bit_sda_out VAR16; - static u32 ati_i2c_bit_sda_in VAR16; -+static u32 ati_i2c_bit_enable VAR16 = -1; - - - int -@@ -208,8 +210,11 @@ ati_set_mode(struct vgamode_s *vmode_g, int flags) - static void - ati_i2c_set_scl_sda(int scl, int sda) - { -+ u32 enable = GET_GLOBAL(ati_i2c_bit_enable); - u32 data = 0; - -+ if (enable != -1) -+ data |= (1 << enable); - if (!scl) - data |= (1 << GET_GLOBAL(ati_i2c_bit_scl_out)); - if (!sda) -@@ -316,6 +321,23 @@ static void ati_i2c_edid_radeon(void) - dprintf(1, "ati: ... %s\n", valid ? "good" : "invalid"); - } - -+static void ati_i2c_edid_rage128(void) -+{ -+ int valid; -+ -+ SET_VGA(ati_i2c_bit_enable, 25); -+ SET_VGA(ati_i2c_bit_scl_out, 18); -+ SET_VGA(ati_i2c_bit_sda_out, 17); -+ SET_VGA(ati_i2c_bit_sda_in, 9); -+ SET_VGA(ati_i2c_reg, GPIO_MONID); -+ -+ dprintf(1, "ati: reading edid blob (rage128) ... \n"); -+ ati_i2c_edid(); -+ valid = (GET_GLOBAL(VBE_edid[0]) == 0x00 && -+ GET_GLOBAL(VBE_edid[1]) == 0xff); -+ dprintf(1, "ati: ... %s\n", valid ? "good" : "invalid"); -+} -+ - /**************************************************************** - * init - ****************************************************************/ -@@ -379,6 +401,9 @@ ati_setup(void) - - u16 device = pci_config_readw(bdf, PCI_DEVICE_ID); - switch (device) { -+ case 0x5046: -+ ati_i2c_edid_rage128(); -+ break; - case 0x5159: - ati_i2c_edid_radeon(); - break; diff --git a/ati-vga-fix-ati_read.patch b/ati-vga-fix-ati_read.patch deleted file mode 100644 index 953c5a6..0000000 --- a/ati-vga-fix-ati_read.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Gerd Hoffmann -Date: Mon, 24 Jun 2019 12:09:31 +0200 -Subject: ati-vga: fix ati_read() - -Git-commit: 136e2612bd48ef06562625f15259fbacf7bcf66f - -Cut & paste bug probably. Had no bad effect so far because the code -doesn't read registers larger than 0x100. - -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - vgasrc/atiext.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/roms/seabios/vgasrc/atiext.c b/roms/seabios/vgasrc/atiext.c -index b3975226c47852c80ec4278b9a95..a24b980638a9562daaa37fe236b4 100644 ---- a/roms/seabios/vgasrc/atiext.c -+++ b/roms/seabios/vgasrc/atiext.c -@@ -117,7 +117,7 @@ static inline u32 ati_read(u32 reg) - val = inl(io_addr + reg); - } else { - outl(reg, io_addr + MM_INDEX); -- reg = inl(io_addr + MM_DATA); -+ val = inl(io_addr + MM_DATA); - } - return val; - } diff --git a/ati-vga-make-i2c-register-and-bits-confi.patch b/ati-vga-make-i2c-register-and-bits-confi.patch deleted file mode 100644 index ed21d54..0000000 --- a/ati-vga-make-i2c-register-and-bits-confi.patch +++ /dev/null @@ -1,95 +0,0 @@ -From: Gerd Hoffmann -Date: Mon, 24 Jun 2019 12:08:32 +0200 -Subject: ati-vga: make i2c register and bits configurable - -Git-commit: ae9a9796ec395e66ff0ed6d4484ea40ce85c0300 - -Prepare to support other ati cards. Also log access mode and whenever -we got a valid edid block. - -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - vgasrc/atiext.c | 34 +++++++++++++++++++++++++++------- - 1 file changed, 27 insertions(+), 7 deletions(-) - -diff --git a/roms/seabios/vgasrc/atiext.c b/roms/seabios/vgasrc/atiext.c -index a24b980638a9562daaa37fe236b4..901e82d013837f54f4db292628d1 100644 ---- a/roms/seabios/vgasrc/atiext.c -+++ b/roms/seabios/vgasrc/atiext.c -@@ -43,6 +43,11 @@ - #define CRT_CRTC_ON 0x00008000 - - static u32 ati_io_addr VAR16 = 0; -+static u32 ati_i2c_reg VAR16; -+static u32 ati_i2c_bit_scl_out VAR16; -+static u32 ati_i2c_bit_sda_out VAR16; -+static u32 ati_i2c_bit_sda_in VAR16; -+ - - int - is_ati_mode(struct vgamode_s *vmode_g) -@@ -206,18 +211,18 @@ ati_i2c_set_scl_sda(int scl, int sda) - u32 data = 0; - - if (!scl) -- data |= (1 << 17); -+ data |= (1 << GET_GLOBAL(ati_i2c_bit_scl_out)); - if (!sda) -- data |= (1 << 16); -- ati_write(GPIO_DVI_DDC, data); -+ data |= (1 << GET_GLOBAL(ati_i2c_bit_sda_out)); -+ ati_write(GET_GLOBAL(ati_i2c_reg), data); - } - - static int - ati_i2c_get_sda(void) - { -- u32 data = ati_read(GPIO_DVI_DDC); -+ u32 data = ati_read(GET_GLOBAL(ati_i2c_reg)); - -- return data & (1 << 8) ? 1 : 0; -+ return data & (1 << GET_GLOBAL(ati_i2c_bit_sda_in)) ? 1 : 0; - } - - static void ati_i2c_start(void) -@@ -275,7 +280,6 @@ static void ati_i2c_edid(void) - u8 byte; - int i; - -- dprintf(1, "ati: reading edid blob\n"); - ati_i2c_start(); - ati_i2c_send_byte(0x50 << 1 | 1); - ati_i2c_ack(); -@@ -287,6 +291,22 @@ static void ati_i2c_edid(void) - ati_i2c_stop(); - } - -+static void ati_i2c_edid_radeon(void) -+{ -+ int valid; -+ -+ SET_VGA(ati_i2c_bit_scl_out, 17); -+ SET_VGA(ati_i2c_bit_sda_out, 16); -+ SET_VGA(ati_i2c_bit_sda_in, 8); -+ -+ dprintf(1, "ati: reading edid blob (radeon dvi) ... \n"); -+ SET_VGA(ati_i2c_reg, GPIO_DVI_DDC); -+ ati_i2c_edid(); -+ valid = (GET_GLOBAL(VBE_edid[0]) == 0x00 && -+ GET_GLOBAL(VBE_edid[1]) == 0xff); -+ dprintf(1, "ati: ... %s\n", valid ? "good" : "invalid"); -+} -+ - /**************************************************************** - * init - ****************************************************************/ -@@ -351,7 +371,7 @@ ati_setup(void) - u16 device = pci_config_readw(bdf, PCI_DEVICE_ID); - switch (device) { - case 0x5159: -- ati_i2c_edid(); -+ ati_i2c_edid_radeon(); - break; - } - diff --git a/ati-vga-make-less-verbose.patch b/ati-vga-make-less-verbose.patch deleted file mode 100644 index 059203a..0000000 --- a/ati-vga-make-less-verbose.patch +++ /dev/null @@ -1,27 +0,0 @@ -From: Gerd Hoffmann -Date: Mon, 24 Jun 2019 12:09:52 +0200 -Subject: ati-vga: make less verbose - -Git-commit: ce52a31f612e33df66ac3553d9633732e34a277b - -Reduce loglevel for mode line removals from 1 to 3. - -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - vgasrc/atiext.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/roms/seabios/vgasrc/atiext.c b/roms/seabios/vgasrc/atiext.c -index 8c9e6966db47f083646193d7faf6..b3975226c47852c80ec4278b9a95 100644 ---- a/roms/seabios/vgasrc/atiext.c -+++ b/roms/seabios/vgasrc/atiext.c -@@ -343,7 +343,7 @@ ati_setup(void) - height > 0xfff || - mem > totalmem || - memmodel != MM_DIRECT) { -- dprintf(1, "ati: removing mode 0x%x\n", GET_GLOBAL(m->mode)); -+ dprintf(3, "ati: removing mode 0x%x\n", GET_GLOBAL(m->mode)); - SET_VGA(m->mode, 0xffff); - } - } diff --git a/ati-vga-try-vga-ddc-first.patch b/ati-vga-try-vga-ddc-first.patch deleted file mode 100644 index 099ef77..0000000 --- a/ati-vga-try-vga-ddc-first.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Gerd Hoffmann -Date: Mon, 24 Jun 2019 12:17:28 +0200 -Subject: ati-vga: try vga ddc first - -Git-commit: af573dceef7b9a45d13192ec5abf29b73c78540e - -Try vga ddc bus before dvi ddc bus. -Return early in case we got valid data. - -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - vgasrc/atiext.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/roms/seabios/vgasrc/atiext.c b/roms/seabios/vgasrc/atiext.c -index 901e82d013837f54f4db292628d1..71dfa859a22dc569ed2fd1312c6b 100644 ---- a/roms/seabios/vgasrc/atiext.c -+++ b/roms/seabios/vgasrc/atiext.c -@@ -299,6 +299,15 @@ static void ati_i2c_edid_radeon(void) - SET_VGA(ati_i2c_bit_sda_out, 16); - SET_VGA(ati_i2c_bit_sda_in, 8); - -+ dprintf(1, "ati: reading edid blob (radeon vga) ... \n"); -+ SET_VGA(ati_i2c_reg, GPIO_VGA_DDC); -+ ati_i2c_edid(); -+ valid = (GET_GLOBAL(VBE_edid[0]) == 0x00 && -+ GET_GLOBAL(VBE_edid[1]) == 0xff); -+ dprintf(1, "ati: ... %s\n", valid ? "good" : "invalid"); -+ if (valid) -+ return; -+ - dprintf(1, "ati: reading edid blob (radeon dvi) ... \n"); - SET_VGA(ati_i2c_reg, GPIO_DVI_DDC); - ati_i2c_edid(); diff --git a/bundles.tar.xz b/bundles.tar.xz index fe211ab..63af1cf 100644 --- a/bundles.tar.xz +++ b/bundles.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e298b3bf15adb6636508ea8533f64bf155f5afd6da75078522d133bddb6e21f6 -size 37264 +oid sha256:c6bfd1cc60007363229f3ac8ed21c098ca30a8119ad90ba37a38b5594a277a6b +size 29340 diff --git a/config.sh b/config.sh index 0042873..e619826 100644 --- a/config.sh +++ b/config.sh @@ -7,7 +7,7 @@ # 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=v4.1.1 +GIT_UPSTREAM_COMMIT_ISH=LATEST # 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 @@ -17,9 +17,9 @@ NEXT_RELEASE_IS_MAJOR=0 # 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.12.1+ +SEABIOS_VERSION=1.12.1+ -# The shared openSUSE specific git repo, on which $GIT_LOCAL_TREE is based +# The shared git repo, on which $GIT_LOCAL_TREE is based GIT_TREE=git://github.com/openSUSE/qemu.git # Temporary directories used by this script @@ -31,7 +31,7 @@ BUNDLE_DIR=/dev/shm/qemu-factory-bundle-dir NUMBERED_PATCHES=0 PATCH_RANGE=1000 -REPO_COUNT=26 +REPO_COUNT=27 # Perhaps we need to instead use the terminal local dirname as the index # and store the ~/git/ as a separate VARIABLE @@ -50,6 +50,7 @@ LOCAL_REPO_MAP=( ~/git/qemu-slirp ~/git/qemu-u-boot ~/git/qemu-openhackware + ~/git/qemu-qboot ~/git/qemu-dtc ~/git/qemu-opensbi ~/git/qemu-edk2-openssl @@ -79,6 +80,7 @@ PATCH_PATH_MAP=( "slirp/" "roms/u-boot/" "roms/openhackware/" + "roms/qboot/" "dtc/" "roms/opensbi/" "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/" diff --git a/configure-only-populate-roms-if-softmmu.patch b/configure-only-populate-roms-if-softmmu.patch index 41fff5b..ad8753b 100644 --- a/configure-only-populate-roms-if-softmmu.patch +++ b/configure-only-populate-roms-if-softmmu.patch @@ -8,21 +8,14 @@ roms is being added to. Signed-off-by: Bruce Rogers --- - configure | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure -index 578d208b374261803d84c22c2479..6cfe739061d2d8fef6d89147fcd5 100755 +index 09a33aecfd6ef543eeee8c5023b6..94984691ab378620ac2e0ae771ca 100755 --- a/configure +++ b/configure -@@ -6211,12 +6211,13 @@ if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \ - fi - done - fi --if test "$ARCH" = "ppc64" && test "$targetos" != "Darwin" ; then -+if test "$ARCH" = "ppc64" && test "$targetos" != "Darwin" && \ -+ test "$softmmu" = yes ; then - roms="$roms spapr-rtas" +@@ -6327,7 +6327,7 @@ if { test "$cpu" = "i386" || test "$cpu" = "x86_64"; } && \ fi # Only build s390-ccw bios if we're on s390x and the compiler has -march=z900 diff --git a/enable-cross-compilation-on-ARM.patch b/enable-cross-compilation-on-ARM.patch index d47786d..038f0e3 100644 --- a/enable-cross-compilation-on-ARM.patch +++ b/enable-cross-compilation-on-ARM.patch @@ -8,7 +8,7 @@ Signed-off-by: Bruce Rogers 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roms/seabios/Makefile b/roms/seabios/Makefile -index bd34cfc2394a9103fec2e951bb67..7b8a5cd6b17254685df89798ed10 100644 +index ca8d0283922bbfa931e85511e921..d807c558ef0f09b5975f6ccc38f1 100644 --- a/roms/seabios/Makefile +++ b/roms/seabios/Makefile @@ -13,7 +13,7 @@ export CONFIG_SHELL := sh diff --git a/ensure-headers-included-are-compatible-w.patch b/ensure-headers-included-are-compatible-w.patch new file mode 100644 index 0000000..724b927 --- /dev/null +++ b/ensure-headers-included-are-compatible-w.patch @@ -0,0 +1,52 @@ +From: Bruce Rogers +Date: Fri, 1 Nov 2019 19:32:57 -0600 +Subject: ensure headers included are compatible with freestanding mode + +Certain standard headers are designated for use in freestanding mode +while others are prohibited. To conform to these rules, use +instead of as well as switch one reference to +the "string.h" implemented in project. + +Signed-off-by: Bruce Rogers +--- + include/bios.h | 2 +- + malloc.c | 2 +- + pci.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/roms/qboot/include/bios.h b/roms/qboot/include/bios.h +index f36638b977864c220bf3ed9a612f..7f8f677671d7b47e7c07f800646c 100644 +--- a/roms/qboot/include/bios.h ++++ b/roms/qboot/include/bios.h +@@ -1,7 +1,7 @@ + #ifndef BIOS_H_ + #define BIOS_H_ + +-#include ++#include + #include + #include + +diff --git a/roms/qboot/malloc.c b/roms/qboot/malloc.c +index 8738373b774358425b2767fc7e9f..bd0ac0f23ee1e3c4a8f5e003ff1d 100644 +--- a/roms/qboot/malloc.c ++++ b/roms/qboot/malloc.c +@@ -1,4 +1,4 @@ +-#include ++#include + #include "string.h" + #include "bios.h" + +diff --git a/roms/qboot/pci.c b/roms/qboot/pci.c +index 65c9e81793ab7aad9b5d1679e78e..63ebda6a0580463ea2b562317cec 100644 +--- a/roms/qboot/pci.c ++++ b/roms/qboot/pci.c +@@ -1,7 +1,7 @@ + #include "bios.h" + #include "ioport.h" + #include "pci.h" +-#include ++#include "string.h" + + static uint16_t addend; + static uint8_t bus, bridge_head; diff --git a/hdata-vpd-fix-printing-char-0x00.patch b/hdata-vpd-fix-printing-char-0x00.patch deleted file mode 100644 index c2d22a0..0000000 --- a/hdata-vpd-fix-printing-char-0x00.patch +++ /dev/null @@ -1,64 +0,0 @@ -From: Stewart Smith -Date: Tue, 18 Jun 2019 16:06:44 +1000 -Subject: hdata/vpd: fix printing (char*)0x00 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Git-commit: ba977f2e4406f9de318afcdf5d666e77585ef269 - -GCC9 now catches this bug: - -In file included from hdata/vpd.c:17: -In function ‘vpd_vini_parse’, - inlined from ‘vpd_data_parse’ at hdata/vpd.c:416:3: -/home/stewart/skiboot/include/skiboot.h:93:31: error: ‘%s’ directive argument is null [-Werror=format-overflow=] - 93 | #define prlog(l, f, ...) do { _prlog(l, pr_fmt(f), ##__VA_ARGS__); } while(0) - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -hdata/vpd.c:390:5: note: in expansion of macro ‘prlog’ - 390 | prlog(PR_WARNING, - | ^~~~~ -hdata/vpd.c: In function ‘vpd_data_parse’: -hdata/vpd.c:391:46: note: format string is defined here - 391 | "VPD: CCIN desc not available for: %s\n", - | ^~ -cc1: all warnings being treated as errors - -Signed-off-by: Stewart Smith -Signed-off-by: Bruce Rogers ---- - hdata/vpd.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/roms/skiboot/hdata/vpd.c b/roms/skiboot/hdata/vpd.c -index 129b5062356a48d900c6aa5a140d..5a01bcc9f6fa2faef2a118eca938 100644 ---- a/roms/skiboot/hdata/vpd.c -+++ b/roms/skiboot/hdata/vpd.c -@@ -328,6 +328,7 @@ static void vpd_vini_parse(struct dt_node *node, - const void *fruvpd, unsigned int fruvpd_sz) - { - const void *kw; -+ const char *desc; - uint8_t sz; - const struct card_info *cinfo; - -@@ -381,15 +382,15 @@ static void vpd_vini_parse(struct dt_node *node, - dt_add_property_string(node, - "description", cinfo->description); - } else { -- kw = vpd_find(fruvpd, fruvpd_sz, "VINI", "DR", &sz); -- if (kw) { -+ desc = vpd_find(fruvpd, fruvpd_sz, "VINI", "DR", &sz); -+ if (desc) { - dt_add_prop_sanitize_val(node, -- "description", kw, sz); -+ "description", desc, sz); - } else { - dt_add_property_string(node, "description", "Unknown"); - prlog(PR_WARNING, - "VPD: CCIN desc not available for: %s\n", -- (char *)kw); -+ (char*)kw); - } - } - } diff --git a/hw-intc-exynos4210_gic-provide-more-room.patch b/hw-intc-exynos4210_gic-provide-more-room.patch index 6ce8523..760b054 100644 --- a/hw-intc-exynos4210_gic-provide-more-room.patch +++ b/hw-intc-exynos4210_gic-provide-more-room.patch @@ -41,10 +41,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c -index e37d457fcf3ae8f37ae3c4047161..640f146a50af42ccd03aa18786f2 100644 +index a1b699b6babc3105bfd4ad9a8383..17317c961caa9a09c476e9ecbd3f 100644 --- a/hw/intc/exynos4210_gic.c +++ b/hw/intc/exynos4210_gic.c -@@ -288,8 +288,8 @@ static void exynos4210_gic_realize(DeviceState *dev, Error **errp) +@@ -290,8 +290,8 @@ static void exynos4210_gic_realize(DeviceState *dev, Error **errp) SysBusDevice *sbd = SYS_BUS_DEVICE(obj); const char cpu_prefix[] = "exynos4210-gic-alias_cpu"; const char dist_prefix[] = "exynos4210-gic-alias_dist"; diff --git a/hw-smbios-handle-both-file-formats-regar.patch b/hw-smbios-handle-both-file-formats-regar.patch index dc9b261..bb18a7d 100644 --- a/hw-smbios-handle-both-file-formats-regar.patch +++ b/hw-smbios-handle-both-file-formats-regar.patch @@ -16,10 +16,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c -index 7bcd67b098e91a0e724b77b224c1..44e62c2a627195d71ac569e9de49 100644 +index 11d476c4a2cbdabc546c02b4f076..570ffa3acfa48b3721bdc578ee57 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c -@@ -965,6 +965,7 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) +@@ -964,6 +964,7 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) struct smbios_structure_header *header; int size; struct smbios_table *table; /* legacy mode only */ @@ -27,7 +27,7 @@ index 7bcd67b098e91a0e724b77b224c1..44e62c2a627195d71ac569e9de49 100644 qemu_opts_validate(opts, qemu_smbios_file_opts, &err); if (err) { -@@ -979,11 +980,21 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) +@@ -978,11 +979,21 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) } /* @@ -53,7 +53,7 @@ index 7bcd67b098e91a0e724b77b224c1..44e62c2a627195d71ac569e9de49 100644 header = (struct smbios_structure_header *)(smbios_tables + smbios_tables_len); -@@ -998,6 +1009,19 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) +@@ -997,6 +1008,19 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) header->type); return; } @@ -73,7 +73,7 @@ index 7bcd67b098e91a0e724b77b224c1..44e62c2a627195d71ac569e9de49 100644 set_bit(header->type, have_binfile_bitmap); if (header->type == 4) { -@@ -1018,6 +1042,17 @@ void smbios_entry_add(QemuOpts *opts, Error **errp) +@@ -1017,6 +1041,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. */ diff --git a/hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch b/hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch index 8e90ffb..78ddf5d 100644 --- a/hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch +++ b/hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch @@ -17,10 +17,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 13 insertions(+) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c -index fd1b3394a5b4b4827deece722e0c..8de503cc4d55423ae0bd070867c0 100644 +index 7c07295519d33d13fd3755ea7e0a..13815df4737ef8f46e6f857153b1 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c -@@ -1720,9 +1720,22 @@ static void usb_mtp_write_metadata(MTPState *s, uint64_t dlen) +@@ -1722,9 +1722,22 @@ static void usb_mtp_write_metadata(MTPState *s, uint64_t dlen) assert(!s->write_pending); assert(p != NULL); diff --git a/hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch b/hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch index a97b911..a7eac2c 100644 --- a/hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch +++ b/hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch @@ -28,10 +28,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 1 insertion(+) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c -index 5894a186633414970fe748dbd9f4..47ea8dd3a5f6a09e361f0f59c7b9 100644 +index 80988bb305a149f2974d329576a0..00b59bee44f4780727ca0279ced5 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c -@@ -3324,6 +3324,7 @@ static void usb_xhci_init(XHCIState *xhci) +@@ -3330,6 +3330,7 @@ static void usb_xhci_init(XHCIState *xhci) usb_bus_new(&xhci->bus, sizeof(xhci->bus), &xhci_bus_ops, dev); for (i = 0; i < usbports; i++) { diff --git a/i8254-Fix-migration-from-SLE11-SP2.patch b/i8254-Fix-migration-from-SLE11-SP2.patch index 7f8f44a..06286d0 100644 --- a/i8254-Fix-migration-from-SLE11-SP2.patch +++ b/i8254-Fix-migration-from-SLE11-SP2.patch @@ -16,10 +16,10 @@ Signed-off-by: Andreas Färber 1 file changed, 7 insertions(+) diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c -index 76ca6ec4446998f62d384a909814..fb9d5047f8c50df8ad0e662a42ac 100644 +index 050875b49738809ac586ba9ed259..59aa28b8a72590e7fdda0feecefe 100644 --- a/hw/timer/i8254_common.c +++ b/hw/timer/i8254_common.c -@@ -261,6 +261,12 @@ static int pit_dispatch_post_load(void *opaque, int version_id) +@@ -224,6 +224,12 @@ static int pit_dispatch_post_load(void *opaque, int version_id) return 0; } @@ -32,7 +32,7 @@ index 76ca6ec4446998f62d384a909814..fb9d5047f8c50df8ad0e662a42ac 100644 static const VMStateDescription vmstate_pit_common = { .name = "i8254", .version_id = 3, -@@ -270,6 +276,7 @@ static const VMStateDescription vmstate_pit_common = { +@@ -231,6 +237,7 @@ static const VMStateDescription vmstate_pit_common = { .pre_save = pit_dispatch_pre_save, .post_load = pit_dispatch_post_load, .fields = (VMStateField[]) { diff --git a/increase-x86_64-physical-bits-to-42.patch b/increase-x86_64-physical-bits-to-42.patch index d60827f..9609f30 100644 --- a/increase-x86_64-physical-bits-to-42.patch +++ b/increase-x86_64-physical-bits-to-42.patch @@ -18,10 +18,10 @@ Signed-off-by: Andreas Färber 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h -index 8b3dc5533e6994bf9066f88f1a5e..3440f1e4297940d8db2e533d5cb1 100644 +index cde2a16b941adeb1123d5d7411f3..39b9327a64d42bdace0d7346e038 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h -@@ -1713,7 +1713,7 @@ uint64_t cpu_get_tsc(CPUX86State *env); +@@ -1928,7 +1928,7 @@ uint64_t cpu_get_tsc(CPUX86State *env); /* XXX: This value should match the one returned by CPUID * and in exec.c */ # if defined(TARGET_X86_64) diff --git a/linux-user-Fake-proc-cpuinfo.patch b/linux-user-Fake-proc-cpuinfo.patch index da16445..5155876 100644 --- a/linux-user-Fake-proc-cpuinfo.patch +++ b/linux-user-Fake-proc-cpuinfo.patch @@ -21,10 +21,10 @@ Signed-off-by: Andreas Färber 1 file changed, 24 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index cf5de07a09235e6d92735332dc7f..3bb2c8921fc203264bbc0a37fe1d 100644 +index 57be4c98555e50f2263811cd11f4..243ec2a1e3bde8e6b3ac48989554 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -6958,6 +6958,27 @@ static int open_self_stat(void *cpu_env, int fd) +@@ -7068,6 +7068,27 @@ static int open_self_stat(void *cpu_env, int fd) return 0; } @@ -52,7 +52,7 @@ index cf5de07a09235e6d92735332dc7f..3bb2c8921fc203264bbc0a37fe1d 100644 static int open_self_auxv(void *cpu_env, int fd) { CPUState *cpu = env_cpu((CPUArchState *)cpu_env); -@@ -7100,6 +7121,9 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags, +@@ -7210,6 +7231,9 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags, #if defined(TARGET_SPARC) { "/proc/cpuinfo", open_cpuinfo, is_proc }, #endif diff --git a/linux-user-add-binfmt-wrapper-for-argv-0.patch b/linux-user-add-binfmt-wrapper-for-argv-0.patch index 09ab0a7..c05b021 100644 --- a/linux-user-add-binfmt-wrapper-for-argv-0.patch +++ b/linux-user-add-binfmt-wrapper-for-argv-0.patch @@ -35,12 +35,12 @@ Signed-off-by: Andreas Färber 3 files changed, 57 insertions(+) diff --git a/Makefile.target b/Makefile.target -index 933b27453a1dbb9273e0a9ff2d58..6e401da667fe4295acec4dc11302 100644 +index 24d79d26ebd00034bd97309fe5a7..1e9600834a25544063c313eba92a 100644 --- a/Makefile.target +++ b/Makefile.target -@@ -42,6 +42,10 @@ STPFILES= - # Makefile Tests - include $(SRC_PATH)/tests/tcg/Makefile.include +@@ -39,6 +39,10 @@ endif + PROGS=$(QEMU_PROG) $(QEMU_PROGW) + STPFILES= +ifdef CONFIG_LINUX_USER +PROGS+=$(QEMU_PROG)-binfmt @@ -49,7 +49,7 @@ index 933b27453a1dbb9273e0a9ff2d58..6e401da667fe4295acec4dc11302 100644 config-target.h: config-target.h-timestamp config-target.h-timestamp: config-target.mak -@@ -134,6 +138,8 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) \ +@@ -133,6 +137,8 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) \ obj-y += linux-user/ obj-y += gdbstub.o thunk.o @@ -58,7 +58,7 @@ index 933b27453a1dbb9273e0a9ff2d58..6e401da667fe4295acec4dc11302 100644 endif #CONFIG_LINUX_USER ######################################################### -@@ -175,7 +181,11 @@ generated-files-y += config-devices.h +@@ -174,7 +180,11 @@ generated-files-y += config-devices.h endif # CONFIG_SOFTMMU @@ -70,7 +70,7 @@ index 933b27453a1dbb9273e0a9ff2d58..6e401da667fe4295acec4dc11302 100644 all-obj-y := $(obj-y) include $(SRC_PATH)/Makefile.objs -@@ -212,6 +222,9 @@ ifdef CONFIG_DARWIN +@@ -211,6 +221,9 @@ ifdef CONFIG_DARWIN $(call quiet-command,SetFile -a C $@,"SETFILE","$(TARGET_DIR)$@") endif diff --git a/linux-user-lseek-explicitly-cast-non-set.patch b/linux-user-lseek-explicitly-cast-non-set.patch index b9d1997..4106bb8 100644 --- a/linux-user-lseek-explicitly-cast-non-set.patch +++ b/linux-user-lseek-explicitly-cast-non-set.patch @@ -15,10 +15,10 @@ Signed-off-by: Alexander Graf 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 8aa653262154326beced64bbe782..5360786be3466c44554b373b4238 100644 +index 61d976cca146a6deb2d74c95ec59..926a7dd587b39d0615cbbb077ef2 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -7619,8 +7619,13 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1, +@@ -7729,8 +7729,13 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1, return ret; #endif #ifdef TARGET_NR_lseek diff --git a/linux-user-properly-test-for-infinite-ti.patch b/linux-user-properly-test-for-infinite-ti.patch index 35503d3..499d5dd 100644 --- a/linux-user-properly-test-for-infinite-ti.patch +++ b/linux-user-properly-test-for-infinite-ti.patch @@ -15,10 +15,10 @@ Signed-off-by: Andreas Schwab 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 5360786be3466c44554b373b4238..330fbecb120ebc9ebc1c0ec121f6 100644 +index 926a7dd587b39d0615cbbb077ef2..9330a1ec6a15f16e4f7fd0f825c2 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -9646,7 +9646,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1, +@@ -9758,7 +9758,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1, { struct timespec ts, *pts; diff --git a/linux-user-use-target_ulong.patch b/linux-user-use-target_ulong.patch index 2e0fc1e..ebe069d 100644 --- a/linux-user-use-target_ulong.patch +++ b/linux-user-use-target_ulong.patch @@ -16,10 +16,10 @@ Signed-off-by: Alexander Graf 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/linux-user/qemu.h b/linux-user/qemu.h -index aac0334627003fbf375dfd4c88d0..abd0b4569699ff87d015c951e651 100644 +index f6f5fe5fbb553c151cb57146350c..b45b68221434e29636bb34c9f0b0 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h -@@ -207,10 +207,10 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src, +@@ -206,10 +206,10 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src, void target_set_brk(abi_ulong new_brk); abi_long do_brk(abi_ulong new_brk); void syscall_init(void); @@ -35,10 +35,10 @@ index aac0334627003fbf375dfd4c88d0..abd0b4569699ff87d015c951e651 100644 extern __thread CPUState *thread_cpu; void cpu_loop(CPUArchState *env); diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 3bb2c8921fc203264bbc0a37fe1d..8aa653262154326beced64bbe782 100644 +index 243ec2a1e3bde8e6b3ac48989554..61d976cca146a6deb2d74c95ec59 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -7264,10 +7264,10 @@ static int host_to_target_cpu_mask(const unsigned long *host_mask, +@@ -7374,10 +7374,10 @@ static int host_to_target_cpu_mask(const unsigned long *host_mask, * of syscall results, can be performed. * All errnos that do_syscall() returns must be -TARGET_. */ @@ -53,7 +53,7 @@ index 3bb2c8921fc203264bbc0a37fe1d..8aa653262154326beced64bbe782 100644 { CPUState *cpu = env_cpu(cpu_env); abi_long ret; -@@ -10013,7 +10013,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, +@@ -10125,7 +10125,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, */ ret = -TARGET_EINVAL; if (cpu_isar_feature(aa64_sve, env_archcpu(cpu_env)) @@ -62,7 +62,7 @@ index 3bb2c8921fc203264bbc0a37fe1d..8aa653262154326beced64bbe782 100644 CPUARMState *env = cpu_env; ARMCPU *cpu = env_archcpu(env); uint32_t vq, old_vq; -@@ -11993,10 +11993,10 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, +@@ -12116,10 +12116,10 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, return ret; } diff --git a/qemu-4.1.1.tar.xz b/qemu-4.1.1.tar.xz deleted file mode 100644 index 8f70a93..0000000 --- a/qemu-4.1.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ed6fdbbdd272611446ff8036991e9b9f04a2ab2e3ffa9e79f3bab0eb9a95a1d2 -size 61932460 diff --git a/qemu-4.1.1.tar.xz.sig b/qemu-4.1.1.tar.xz.sig deleted file mode 100644 index d724c8f44390174792c8e219e76f5e704bbcd8e57bdc5414c53ae6d05c5d0ac7..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 310 zcmV-60m=S}0W$;u0SW*e79j-AtjXb3H0!IlEkB?$Q_0Tp2(^R-0$t6?l>iC}5HnNB z&hZGfglg{y0G6!STcs%Ksl_7IBEwfLQZvPmlNgDeNsb6LAO3$DXs+;pf}>%;8hG|N zINy;)f{Pam(aw6v3|PpTrBkQgLk;-U(tn6_Pw2V>>OaY-^UXq^%<+Ou2@mS+mg0m_ zmDkzHK_M+TiITu@immCgU>=Ts(Xu9K=}NrJdFKXx4VNEsM^!M-)r<=-;W!HhV40T? z)N{@hNNi9kZ&fFfEM@;*Tw|}YzBThygM{iOP&`Zn=ED6c$6-@Qe=iPmA!j zxVk9nQ!!F`yhc}u#cQU{@7=L7v;U 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh -index b5a16742a149c0d2e08c6a34d08e..4f1358e2fd8c0da34cf06a763ca8 100755 +index 9f1580a91c7d3ad64120fe8ee66d..246546b10ca5df38035e5ba46a09 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh -@@ -319,7 +319,7 @@ BINFMT_SET=qemu_register_interpreter +@@ -323,7 +323,7 @@ BINFMT_SET=qemu_register_interpreter SYSTEMDDIR="/etc/binfmt.d" DEBIANDIR="/usr/share/binfmts" diff --git a/qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch b/qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch index d56150f..00d17eb 100644 --- a/qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch +++ b/qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch @@ -12,10 +12,10 @@ Signed-off-by: Andreas Färber 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh -index 4f1358e2fd8c0da34cf06a763ca8..13add7775eb7d24c52735b02cd51 100755 +index 246546b10ca5df38035e5ba46a09..e0666a3afdc81f0f8277a53f3e1e 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh -@@ -262,7 +262,7 @@ qemu_generate_register() { +@@ -266,7 +266,7 @@ qemu_generate_register() { flags="${flags}F" fi @@ -24,7 +24,7 @@ index 4f1358e2fd8c0da34cf06a763ca8..13add7775eb7d24c52735b02cd51 100755 } qemu_register_interpreter() { -@@ -301,9 +301,9 @@ qemu_set_binfmts() { +@@ -305,9 +305,9 @@ qemu_set_binfmts() { continue fi diff --git a/qemu-cvs-gettimeofday.patch b/qemu-cvs-gettimeofday.patch index ec559c0..0f2fea2 100644 --- a/qemu-cvs-gettimeofday.patch +++ b/qemu-cvs-gettimeofday.patch @@ -11,10 +11,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 3 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 8367cb138dfe075e06ca455009cc..17914fadfc9f3390d4b8ab8d74a6 100644 +index 171c0caef3a191c861e76493ccfc..25b0f3bba38b8629cb4bc027be96 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -8446,6 +8446,9 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, +@@ -8558,6 +8558,9 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, case TARGET_NR_gettimeofday: { struct timeval tv; diff --git a/qemu-cvs-ioctl_debug.patch b/qemu-cvs-ioctl_debug.patch index 3cd1bc9..d836d98 100644 --- a/qemu-cvs-ioctl_debug.patch +++ b/qemu-cvs-ioctl_debug.patch @@ -13,10 +13,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 17914fadfc9f3390d4b8ab8d74a6..25fd641816c0a54e49a167f5e818 100644 +index 25b0f3bba38b8629cb4bc027be96..49db231f031015265f6d8cead831 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -5043,7 +5043,19 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) +@@ -5151,7 +5151,19 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) ie = ioctl_entries; for(;;) { if (ie->target_cmd == 0) { diff --git a/qemu-cvs-ioctl_nodirection.patch b/qemu-cvs-ioctl_nodirection.patch index 7bc2051..ada3a73 100644 --- a/qemu-cvs-ioctl_nodirection.patch +++ b/qemu-cvs-ioctl_nodirection.patch @@ -16,10 +16,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 8 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 25fd641816c0a54e49a167f5e818..cf5de07a09235e6d92735332dc7f 100644 +index 49db231f031015265f6d8cead831..57be4c98555e50f2263811cd11f4 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -5084,6 +5084,13 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) +@@ -5192,6 +5192,13 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) arg_type++; target_size = thunk_type_size(arg_type, 0); switch(ie->access) { @@ -33,7 +33,7 @@ index 25fd641816c0a54e49a167f5e818..cf5de07a09235e6d92735332dc7f 100644 case IOC_R: ret = get_errno(safe_ioctl(fd, ie->host_cmd, buf_temp)); if (!is_error(ret)) { -@@ -5102,6 +5109,7 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) +@@ -5210,6 +5217,7 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) unlock_user(argptr, arg, 0); ret = get_errno(safe_ioctl(fd, ie->host_cmd, buf_temp)); break; diff --git a/qemu.changes b/qemu.changes index c6b000e..af3f4e6 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,42 @@ +------------------------------------------------------------------- +Wed Nov 27 03:10:09 UTC 2019 - Bruce Rogers + +- Update to v4.2.0-rc3: See http://wiki.qemu.org/ChangeLog/4.2 +* Patches dropped (upstream unless otherwise noted): + ati-add-edid-support.patch + ati-vga-add-rage128-edid-support.patch + ati-vga-fix-ati_read.patch + ati-vga-make-i2c-register-and-bits-confi.patch + ati-vga-make-less-verbose.patch + ati-vga-try-vga-ddc-first.patch + Disable-Waddress-of-packed-member-for-GC.patch + hdata-vpd-fix-printing-char-0x00.patch + target-i386-add-PSCHANGE_NO-bit-for-the-.patch + target-i386-Export-TAA_NO-bit-to-guests.patch + vbe-add-edid-support.patch + vga-add-ati-bios-tables.patch + vga-add-atiext-driver.patch + vga-make-memcpy_high-public.patch + vga-move-modelist-from-bochsvga.c-to-new.patch +* Patches added: + Enable-cross-compile-prefix-for-C-compil.patch + ensure-headers-included-are-compatible-w.patch + roms-Makefile-enable-cross-compile-for-b.patch +* Add qemu-ui-spice-app package containing ui-spice-app.so +* Add qemu-microvm package containing bios-microvm.bin +- Add descriptors for the 128k and 256k SeaBios firmware images +- For the record, the following issues reported for SUSE SLE15-SP1 + are either fixed in this current package, or are otherwise not an + issue: bsc#1079730 bsc#1098403 bsc#1111025 bsc#1128106 bsc#1133031 + bsc#1134883 bsc#1135210 bsc#1135902 bsc#1136540 bsc#1136778 + bsc#1138534 bsc#1140402 bsc#1143794 bsc#1145379 bsc#1144087 + bsc#1145427 bsc#1145436 bsc#1145774 bsc#1146873 bsc#1149811 + bsc#1152506 bsc#1155812 bsc#1156642 CVE-2018-12207 CVE-2019-5008 + CVE-2019-11135 CVE-2019-12068 CVE-2019-12155 CVE-2019-13164 + CVE-2019-14378 CVE-2019-15890, and the following feature requests + are satisfied by this package: fate#327410 fate#327764 fate#327796 + jira-SLE-4883 jira-SLE-6132 jira-SLE-6237 jira-SLE-6754 + ------------------------------------------------------------------- Tue Nov 19 19:13:41 UTC 2019 - Bruce Rogers diff --git a/qemu.spec b/qemu.spec index 6597e92..5206b33 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,7 +1,7 @@ # # spec file for package qemu # -# Copyright (c) 2019 SUSE LLC. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -87,9 +87,9 @@ %define summary_string Machine emulator and virtualizer %endif -%define qemuver 4.1.1 -%define srcver 4.1.1 -%define sbver 1.12.1 +%define qemuver 4.1.93 +%define srcver 4.2.0-rc3 +%define sbver 1.12.1+ %define srcname qemu Name: qemu%{name_suffix} URL: https://www.qemu.org/ @@ -99,7 +99,6 @@ Group: System/Emulators/PC Version: %qemuver Release: 0 Source: https://wiki.qemu.org/download/%{srcname}-%{srcver}.tar.xz -Source99: https://wiki.qemu.org/download/%{srcname}-%{srcver}.tar.xz.sig Source100: %{srcname}.keyring Source1: 80-kvm.rules Source2: kvm.conf @@ -114,6 +113,8 @@ Source10: supported.arm.txt Source11: supported.ppc.txt Source12: supported.x86.txt Source13: supported.s390.txt +Source14: 50-seabios-256k.json +Source15: 60-seabios-128k.json Source200: qemu-rpmlintrc Source300: bundles.tar.xz Source301: update_git.sh @@ -123,63 +124,51 @@ Source303: README.PACKAGING # This patch queue is auto-generated - see README.PACKAGING for process # Patches applied in base project: -Patch00000: target-i386-add-PSCHANGE_NO-bit-for-the-.patch -Patch00001: target-i386-Export-TAA_NO-bit-to-guests.patch -Patch00002: XXX-dont-dump-core-on-sigabort.patch -Patch00003: qemu-binfmt-conf-Modify-default-path.patch -Patch00004: qemu-cvs-gettimeofday.patch -Patch00005: qemu-cvs-ioctl_debug.patch -Patch00006: qemu-cvs-ioctl_nodirection.patch -Patch00007: linux-user-add-binfmt-wrapper-for-argv-0.patch -Patch00008: PPC-KVM-Disable-mmu-notifier-check.patch -Patch00009: linux-user-binfmt-support-host-binaries.patch -Patch00010: linux-user-Fake-proc-cpuinfo.patch -Patch00011: linux-user-use-target_ulong.patch -Patch00012: Make-char-muxer-more-robust-wrt-small-FI.patch -Patch00013: linux-user-lseek-explicitly-cast-non-set.patch -Patch00014: AIO-Reduce-number-of-threads-for-32bit-h.patch -Patch00015: xen_disk-Add-suse-specific-flush-disable.patch -Patch00016: qemu-bridge-helper-reduce-security-profi.patch -Patch00017: qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch -Patch00018: linux-user-properly-test-for-infinite-ti.patch -Patch00019: roms-Makefile-pass-a-packaging-timestamp.patch -Patch00020: Raise-soft-address-space-limit-to-hard-l.patch -Patch00021: increase-x86_64-physical-bits-to-42.patch -Patch00022: vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch -Patch00023: i8254-Fix-migration-from-SLE11-SP2.patch -Patch00024: acpi_piix4-Fix-migration-from-SLE11-SP2.patch -Patch00025: Switch-order-of-libraries-for-mpath-supp.patch -Patch00026: Make-installed-scripts-explicitly-python.patch -Patch00027: hw-smbios-handle-both-file-formats-regar.patch -Patch00028: xen-add-block-resize-support-for-xen-dis.patch -Patch00029: tests-qemu-iotests-Triple-timeout-of-i-o.patch -Patch00030: tests-Fix-block-tests-to-be-compatible-w.patch -Patch00031: xen-ignore-live-parameter-from-xen-save-.patch -Patch00032: Conditionalize-ui-bitmap-installation-be.patch -Patch00033: tests-change-error-message-in-test-162.patch -Patch00034: hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch -Patch00035: hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch -Patch00036: hw-intc-exynos4210_gic-provide-more-room.patch -Patch00037: configure-only-populate-roms-if-softmmu.patch -Patch00038: pc-bios-s390-ccw-net-avoid-warning-about.patch -Patch00039: roms-change-cross-compiler-naming-to-be-.patch -Patch00040: tests-Disable-some-block-tests-for-now.patch -Patch00041: test-add-mapping-from-arch-of-i686-to-qe.patch +Patch00000: XXX-dont-dump-core-on-sigabort.patch +Patch00001: qemu-binfmt-conf-Modify-default-path.patch +Patch00002: qemu-cvs-gettimeofday.patch +Patch00003: qemu-cvs-ioctl_debug.patch +Patch00004: qemu-cvs-ioctl_nodirection.patch +Patch00005: linux-user-add-binfmt-wrapper-for-argv-0.patch +Patch00006: PPC-KVM-Disable-mmu-notifier-check.patch +Patch00007: linux-user-binfmt-support-host-binaries.patch +Patch00008: linux-user-Fake-proc-cpuinfo.patch +Patch00009: linux-user-use-target_ulong.patch +Patch00010: Make-char-muxer-more-robust-wrt-small-FI.patch +Patch00011: linux-user-lseek-explicitly-cast-non-set.patch +Patch00012: AIO-Reduce-number-of-threads-for-32bit-h.patch +Patch00013: xen_disk-Add-suse-specific-flush-disable.patch +Patch00014: qemu-bridge-helper-reduce-security-profi.patch +Patch00015: qemu-binfmt-conf-use-qemu-ARCH-binfmt.patch +Patch00016: linux-user-properly-test-for-infinite-ti.patch +Patch00017: roms-Makefile-pass-a-packaging-timestamp.patch +Patch00018: Raise-soft-address-space-limit-to-hard-l.patch +Patch00019: increase-x86_64-physical-bits-to-42.patch +Patch00020: vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch +Patch00021: i8254-Fix-migration-from-SLE11-SP2.patch +Patch00022: acpi_piix4-Fix-migration-from-SLE11-SP2.patch +Patch00023: Switch-order-of-libraries-for-mpath-supp.patch +Patch00024: Make-installed-scripts-explicitly-python.patch +Patch00025: hw-smbios-handle-both-file-formats-regar.patch +Patch00026: xen-add-block-resize-support-for-xen-dis.patch +Patch00027: tests-qemu-iotests-Triple-timeout-of-i-o.patch +Patch00028: tests-Fix-block-tests-to-be-compatible-w.patch +Patch00029: xen-ignore-live-parameter-from-xen-save-.patch +Patch00030: Conditionalize-ui-bitmap-installation-be.patch +Patch00031: tests-change-error-message-in-test-162.patch +Patch00032: hw-usb-hcd-xhci-Fix-GCC-9-build-warning.patch +Patch00033: hw-usb-dev-mtp-Fix-GCC-9-build-warning.patch +Patch00034: hw-intc-exynos4210_gic-provide-more-room.patch +Patch00035: configure-only-populate-roms-if-softmmu.patch +Patch00036: pc-bios-s390-ccw-net-avoid-warning-about.patch +Patch00037: roms-change-cross-compiler-naming-to-be-.patch +Patch00038: tests-Disable-some-block-tests-for-now.patch +Patch00039: test-add-mapping-from-arch-of-i686-to-qe.patch +Patch00040: roms-Makefile-enable-cross-compile-for-b.patch # Patches applied in roms/seabios/: Patch01000: seabios-use-python2-explicitly-as-needed.patch Patch01001: seabios-switch-to-python3-as-needed.patch Patch01002: enable-cross-compilation-on-ARM.patch -Patch01003: vga-move-modelist-from-bochsvga.c-to-new.patch -Patch01004: vga-make-memcpy_high-public.patch -Patch01005: vga-add-atiext-driver.patch -Patch01006: vga-add-ati-bios-tables.patch -Patch01007: vbe-add-edid-support.patch -Patch01008: ati-add-edid-support.patch -Patch01009: ati-vga-make-less-verbose.patch -Patch01010: ati-vga-fix-ati_read.patch -Patch01011: ati-vga-make-i2c-register-and-bits-confi.patch -Patch01012: ati-vga-try-vga-ddc-first.patch -Patch01013: ati-vga-add-rage128-edid-support.patch # Patches applied in roms/ipxe/: Patch02000: stub-out-the-SAN-req-s-in-int13.patch Patch02001: ipxe-Makefile-fix-issues-of-build-reprod.patch @@ -189,11 +178,11 @@ Patch02004: Do-not-apply-WORKAROUND_CFLAGS-for-host-.patch # Patches applied in roms/sgabios/: Patch03000: sgabios-Makefile-fix-issues-of-build-rep.patch Patch03001: roms-sgabios-Fix-csum8-to-be-built-by-ho.patch -# Patches applied in roms/skiboot/: -Patch05000: Disable-Waddress-of-packed-member-for-GC.patch -Patch05001: hdata-vpd-fix-printing-char-0x00.patch # Patches applied in ui/keycodemapdb/: Patch08000: Make-keycode-gen-output-reproducible-use.patch +# Patches applied in roms/qboot/: +Patch12000: ensure-headers-included-are-compatible-w.patch +Patch12001: Enable-cross-compile-prefix-for-C-compil.patch # Please do not add patches manually here. @@ -259,35 +248,38 @@ BuildRequires: e2fsprogs-devel BuildRequires: fdupes BuildRequires: flex BuildRequires: gcc-c++ -BuildRequires: glib2-devel -%if 0%{?with_glusterfs} -BuildRequires: glusterfs-devel +BuildRequires: glib2-devel >= 2.48 +%if build_x86_firmware_from_source +BuildRequires: glibc-devel-32bit %endif -BuildRequires: gtk3-devel +%if 0%{?with_glusterfs} +BuildRequires: glusterfs-devel >= 3 +%endif +BuildRequires: gtk3-devel >= 3.16 BuildRequires: libaio-devel BuildRequires: libattr-devel BuildRequires: libbz2-devel %if 0%{?is_opensuse} -BuildRequires: libcacard-devel +BuildRequires: libcacard-devel >= 2.5.1 %endif BuildRequires: libcap-devel BuildRequires: libcap-ng-devel BuildRequires: libdrm-devel BuildRequires: libepoxy-devel -BuildRequires: libfdt-devel +BuildRequires: libfdt-devel >= 1.4.2 BuildRequires: libgbm-devel -BuildRequires: libgcrypt-devel -BuildRequires: libgnutls-devel -BuildRequires: libiscsi-devel +BuildRequires: libgcrypt-devel >= 1.5.0 +BuildRequires: libgnutls-devel >= 3.1.18 +BuildRequires: libiscsi-devel >= 1.9.0 BuildRequires: libjpeg-devel %if 0%{?is_opensuse} -BuildRequires: libnfs-devel +BuildRequires: libnfs-devel >= 1.9.3 %endif %ifnarch %arm s390x BuildRequires: libnuma-devel %endif BuildRequires: libpcap-devel -BuildRequires: libpixman-1-0-devel +BuildRequires: libpixman-1-0-devel >= 0.21.8 %ifarch x86_64 BuildRequires: libpmem-devel %endif @@ -300,11 +292,11 @@ BuildRequires: librbd-devel BuildRequires: libSDL2-devel BuildRequires: libSDL2_image-devel %endif -BuildRequires: libseccomp-devel -BuildRequires: libspice-server-devel -BuildRequires: libssh-devel +BuildRequires: libseccomp-devel >= 2.3.0 +BuildRequires: libspice-server-devel >= 0.12.5 +BuildRequires: libssh-devel >= 0.8 BuildRequires: libudev-devel -BuildRequires: libusb-1_0-devel +BuildRequires: libusb-1_0-devel >= 1.0.13 BuildRequires: libvdeplug-devel %if 0%{?is_opensuse} BuildRequires: lzfse-devel @@ -325,17 +317,17 @@ BuildRequires: python3-Sphinx BuildRequires: python3-base BuildRequires: rdma-core-devel BuildRequires: snappy-devel -BuildRequires: spice-protocol-devel +BuildRequires: spice-protocol-devel >= 0.12.3 BuildRequires: systemd %{?systemd_requires} %if %{kvm_available} BuildRequires: pkgconfig(udev) %endif -BuildRequires: usbredir-devel +BuildRequires: usbredir-devel >= 0.6 BuildRequires: virglrenderer-devel >= 0.4.1 BuildRequires: vte-devel %ifarch x86_64 -BuildRequires: xen-devel +BuildRequires: xen-devel >= 4.2 %endif BuildRequires: xfsprogs-devel %if %{build_x86_firmware_from_source} @@ -384,6 +376,7 @@ BuildRequires: qemu-ui-gtk = %{qemuver} %if 0%{?is_opensuse} BuildRequires: qemu-ui-sdl = %{qemuver} %endif +BuildRequires: qemu-ui-spice-app = %{qemuver} BuildRequires: qemu-vgabios = %{sbver} BuildRequires: qemu-x86 = %{qemuver} %endif @@ -404,6 +397,7 @@ Recommends: qemu-ui-gtk %if 0%{?is_opensuse} Recommends: qemu-ui-sdl %endif +Recommends: qemu-ui-spice-app Recommends: qemu-x86 %ifarch ppc ppc64 ppc64le Recommends: qemu-ppc @@ -437,6 +431,7 @@ Suggests: qemu-lang %if 0%{?is_opensuse} Recommends: qemu-ksm = %{qemuver} %endif +Suggests: qemu-microvm Suggests: qemu-vhost-user-gpu Provides: qemu-audio-oss = %{qemuver} Obsoletes: qemu-audio-oss < %{qemuver} @@ -462,6 +457,7 @@ Version: %{qemuver} Release: 0 Requires: %name = %{qemuver} Requires: qemu-ipxe +Requires: qemu-microvm Requires: qemu-seabios Requires: qemu-sgabios Requires: qemu-vgabios @@ -691,6 +687,16 @@ Release: 0 This package contains a module for doing SDL based UI for QEMU. %endif +%package ui-spice-app +Summary: Spice UI support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description ui-spice-app +This package contains a module for doing Spice based UI for QEMU. + %package audio-alsa Summary: ALSA based audio support for QEMU Group: System/Emulators/PC @@ -769,6 +775,17 @@ This package contains the QEMU guest agent. It is installed in the linux guest to provide information and control at the guest OS level. %ifarch %{build_rom_arch} +%package microvm +Summary: x86 MicroVM BIOS for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +BuildArch: noarch + +%description microvm +MicroVM (qboot) is a miniam x86 firmware for booting Linux kernel. +It provides the minimum resources needed to boot PVH and bzImages. + %package seabios Summary: x86 Legacy BIOS for QEMU Group: System/Emulators/PC @@ -895,21 +912,9 @@ This package provides a service file for starting and stopping KSM. %patch00038 -p1 %patch00039 -p1 %patch00040 -p1 -%patch00041 -p1 %patch01000 -p1 %patch01001 -p1 %patch01002 -p1 -%patch01003 -p1 -%patch01004 -p1 -%patch01005 -p1 -%patch01006 -p1 -%patch01007 -p1 -%patch01008 -p1 -%patch01009 -p1 -%patch01010 -p1 -%patch01011 -p1 -%patch01012 -p1 -%patch01013 -p1 %if 0%{?patch-possibly-applied-elsewhere} %patch02000 -p1 %endif @@ -921,9 +926,9 @@ This package provides a service file for starting and stopping KSM. %endif %patch03000 -p1 %patch03001 -p1 -%patch05000 -p1 -%patch05001 -p1 %patch08000 -p1 +%patch12000 -p1 +%patch12001 -p1 %if "%{name}" != "qemu-linux-user" # for the record, this set of firmware files is installed, but we don't @@ -935,19 +940,20 @@ This package provides a service file for starting and stopping KSM. # This first list group isn't specific to what this instance builds %define ppc_default_firmware {%nil} %define ppc_extra_firmware {skiboot.lid slof.bin} -%define ppc64_only_default_firmware {spapr-rtas.bin} +%define ppc64_only_default_firmware {%nil} %define ppc64_only_extra_firmware {%nil} -%define riscv64_default_firmware {opensbi-riscv64-sifive_u-fw_jump.bin opensbi-riscv64-virt-fw_jump.bin} +%define riscv64_default_firmware {opensbi-riscv64-sifive_u-fw_jump.bin \ +opensbi-riscv64-virt-fw_jump.bin} %define riscv64_extra_firmware {%nil} %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 \ kvmvapic.bin pvh.bin} -%define x86_extra_firmware {bios.bin bios-256k.bin pxe-e1000.rom \ -pxe-eepro100.rom pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \ -sgabios.bin 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} +%define x86_extra_firmware {bios.bin bios-256k.bin bios-microvm.bin \ +pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom \ +pxe-virtio.rom sgabios.bin 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} %define x86_64_only_default_firmware {%nil} %define x86_64_only_extra_firmware {edk2-aarch64-code.fd.bz2 \ edk2-arm-code.fd.bz2 edk2-arm-vars.fd.bz2 edk2-i386-code.fd.bz2 \ @@ -1139,6 +1145,7 @@ cd %mybuilddir %endif --enable-opengl \ --enable-parallels \ + --disable-plugins \ --enable-pvrdma \ --enable-qcow1 \ --enable-qed \ @@ -1176,6 +1183,7 @@ cd %mybuilddir --enable-vhost-net \ --enable-vhost-scsi \ --enable-vhost-user \ + --enable-vhost-user-fs \ --enable-vhost-vsock \ --enable-virglrenderer \ --enable-virtfs \ @@ -1194,6 +1202,7 @@ cd %mybuilddir --disable-xen \ %endif --enable-xfsctl \ + --enable-xkbcommon \ # ------------------------------------------------------------------------ %else # qemu-linux-user --without-default-devices \ @@ -1216,6 +1225,7 @@ cd %mybuilddir --disable-malloc-trim \ --enable-membarrier \ --disable-parallels \ + --disable-plugins \ --disable-qcow1 \ --disable-qed \ --disable-replication \ @@ -1228,9 +1238,11 @@ cd %mybuilddir --disable-vhost-net \ --disable-vhost-scsi \ --disable-vhost-user \ + --disable-vhost-user-fs \ --disable-vhost-vsock \ --disable-vnc \ --disable-vvfat \ + --disable-xkbcommon \ %endif # qemu-linux-user %if "%{name}" == "qemu" @@ -1282,6 +1294,8 @@ make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms bios \ HOSTCC=cc \ %endif +make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms bios-microvm + %ifnarch %ix86 %if %{provide_edk2_firmware} make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms efi \ @@ -1310,7 +1324,9 @@ make -C %{_builddir}/%buildsubdir/roms sgabios \ HOSTCC=cc %if %{force_fit_virtio_pxe_rom} +pushd %{_builddir}/%buildsubdir patch -p1 < %_sourcedir/stub-out-the-SAN-req-s-in-int13.patch +popd make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms pxerom_variants=virtio pxerom_targets=1af41000 pxerom %endif @@ -1494,6 +1510,8 @@ unlink %{buildroot}%_datadir/%name/edk2-licenses.txt || true unlink %{buildroot}%_datadir/%name/edk2-x86_64-code.fd unlink %{buildroot}%_datadir/%name/edk2-x86_64-secure-code.fd %endif +install -D -m 0644 %{SOURCE14} %{buildroot}%_datadir/%name/firmware/50-seabios-256k.json +install -D -m 0644 %{SOURCE15} %{buildroot}%_datadir/%name/firmware/60-seabios-128k.json %endif %if 0%{?do_more_edk2_unlinks} || %{provide_edk2_firmware} == 0 unlink %{buildroot}%_datadir/%name/edk2-licenses.txt || true @@ -1627,7 +1645,7 @@ fi # ======================================================================== %files %defattr(-, root, root) -%doc Changelog README VERSION +%doc Changelog README.rst VERSION %license COPYING COPYING.LIB LICENSE %if "%{name}" == "qemu" @@ -1648,6 +1666,7 @@ fi %_docdir/%name/interop/vhost-user.html %_docdir/%name/specs/.buildinfo %_docdir/%name/specs/_static/* +%_docdir/%name/specs/acpi_hw_reduced_hotplug.html %_docdir/%name/specs/genindex.html %_docdir/%name/specs/index.html %_docdir/%name/specs/objects.inv @@ -1723,7 +1742,6 @@ fi %_datadir/%name/qemu_vga.ndrv %_datadir/%name/skiboot.lid %_datadir/%name/slof.bin -%_datadir/%name/spapr-rtas.bin %_datadir/%name/u-boot.e500 %_datadir/%name/u-boot-sam460-20100605.bin %if 0%{?is_opensuse} == 0 @@ -1860,6 +1878,11 @@ fi %_libdir/%name/ui-sdl.so %endif +%files ui-spice-app +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/ui-spice-app.so + %files audio-alsa %defattr(-, root, root) %dir %_libdir/%name @@ -1886,6 +1909,13 @@ fi %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 + +%files microvm +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/bios-microvm.bin %files vgabios %defattr(-, root, root) @@ -1976,6 +2006,8 @@ fi %files guest-agent %defattr(-, root, root) +%dir %_docdir/%name/interop +%_docdir/%name/interop/qemu-ga.html %_mandir/man8/qemu-ga.8.gz %attr(0755,root,kvm) %_bindir/qemu-ga %{_unitdir}/qemu-ga@.service diff --git a/qemu.spec.in b/qemu.spec.in index a574150..9592b1d 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -1,7 +1,7 @@ # # spec file for package qemu # -# Copyright (c) 2019 SUSE LLC. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -111,6 +111,8 @@ Source10: supported.arm.txt Source11: supported.ppc.txt Source12: supported.x86.txt Source13: supported.s390.txt +Source14: 50-seabios-256k.json +Source15: 60-seabios-128k.json Source200: qemu-rpmlintrc Source300: bundles.tar.xz Source301: update_git.sh @@ -185,35 +187,38 @@ BuildRequires: e2fsprogs-devel BuildRequires: fdupes BuildRequires: flex BuildRequires: gcc-c++ -BuildRequires: glib2-devel -%if 0%{?with_glusterfs} -BuildRequires: glusterfs-devel +BuildRequires: glib2-devel >= 2.48 +%if build_x86_firmware_from_source +BuildRequires: glibc-devel-32bit %endif -BuildRequires: gtk3-devel +%if 0%{?with_glusterfs} +BuildRequires: glusterfs-devel >= 3 +%endif +BuildRequires: gtk3-devel >= 3.16 BuildRequires: libaio-devel BuildRequires: libattr-devel BuildRequires: libbz2-devel %if 0%{?is_opensuse} -BuildRequires: libcacard-devel +BuildRequires: libcacard-devel >= 2.5.1 %endif BuildRequires: libcap-devel BuildRequires: libcap-ng-devel BuildRequires: libdrm-devel BuildRequires: libepoxy-devel -BuildRequires: libfdt-devel +BuildRequires: libfdt-devel >= 1.4.2 BuildRequires: libgbm-devel -BuildRequires: libgcrypt-devel -BuildRequires: libgnutls-devel -BuildRequires: libiscsi-devel +BuildRequires: libgcrypt-devel >= 1.5.0 +BuildRequires: libgnutls-devel >= 3.1.18 +BuildRequires: libiscsi-devel >= 1.9.0 BuildRequires: libjpeg-devel %if 0%{?is_opensuse} -BuildRequires: libnfs-devel +BuildRequires: libnfs-devel >= 1.9.3 %endif %ifnarch %arm s390x BuildRequires: libnuma-devel %endif BuildRequires: libpcap-devel -BuildRequires: libpixman-1-0-devel +BuildRequires: libpixman-1-0-devel >= 0.21.8 %ifarch x86_64 BuildRequires: libpmem-devel %endif @@ -226,11 +231,11 @@ BuildRequires: librbd-devel BuildRequires: libSDL2-devel BuildRequires: libSDL2_image-devel %endif -BuildRequires: libseccomp-devel -BuildRequires: libspice-server-devel -BuildRequires: libssh-devel +BuildRequires: libseccomp-devel >= 2.3.0 +BuildRequires: libspice-server-devel >= 0.12.5 +BuildRequires: libssh-devel >= 0.8 BuildRequires: libudev-devel -BuildRequires: libusb-1_0-devel +BuildRequires: libusb-1_0-devel >= 1.0.13 BuildRequires: libvdeplug-devel %if 0%{?is_opensuse} BuildRequires: lzfse-devel @@ -251,17 +256,17 @@ BuildRequires: python3-Sphinx BuildRequires: python3-base BuildRequires: rdma-core-devel BuildRequires: snappy-devel -BuildRequires: spice-protocol-devel +BuildRequires: spice-protocol-devel >= 0.12.3 BuildRequires: systemd %{?systemd_requires} %if %{kvm_available} BuildRequires: pkgconfig(udev) %endif -BuildRequires: usbredir-devel +BuildRequires: usbredir-devel >= 0.6 BuildRequires: virglrenderer-devel >= 0.4.1 BuildRequires: vte-devel %ifarch x86_64 -BuildRequires: xen-devel +BuildRequires: xen-devel >= 4.2 %endif BuildRequires: xfsprogs-devel %if %{build_x86_firmware_from_source} @@ -310,6 +315,7 @@ BuildRequires: qemu-ui-gtk = %{qemuver} %if 0%{?is_opensuse} BuildRequires: qemu-ui-sdl = %{qemuver} %endif +BuildRequires: qemu-ui-spice-app = %{qemuver} BuildRequires: qemu-vgabios = %{sbver} BuildRequires: qemu-x86 = %{qemuver} %endif @@ -330,6 +336,7 @@ Recommends: qemu-ui-gtk %if 0%{?is_opensuse} Recommends: qemu-ui-sdl %endif +Recommends: qemu-ui-spice-app Recommends: qemu-x86 %ifarch ppc ppc64 ppc64le Recommends: qemu-ppc @@ -363,6 +370,7 @@ Suggests: qemu-lang %if 0%{?is_opensuse} Recommends: qemu-ksm = %{qemuver} %endif +Suggests: qemu-microvm Suggests: qemu-vhost-user-gpu Provides: qemu-audio-oss = %{qemuver} Obsoletes: qemu-audio-oss < %{qemuver} @@ -388,6 +396,7 @@ Version: %{qemuver} Release: 0 Requires: %name = %{qemuver} Requires: qemu-ipxe +Requires: qemu-microvm Requires: qemu-seabios Requires: qemu-sgabios Requires: qemu-vgabios @@ -617,6 +626,16 @@ Release: 0 This package contains a module for doing SDL based UI for QEMU. %endif +%package ui-spice-app +Summary: Spice UI support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description ui-spice-app +This package contains a module for doing Spice based UI for QEMU. + %package audio-alsa Summary: ALSA based audio support for QEMU Group: System/Emulators/PC @@ -695,6 +714,17 @@ This package contains the QEMU guest agent. It is installed in the linux guest to provide information and control at the guest OS level. %ifarch %{build_rom_arch} +%package microvm +Summary: x86 MicroVM BIOS for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +BuildArch: noarch + +%description microvm +MicroVM (qboot) is a miniam x86 firmware for booting Linux kernel. +It provides the minimum resources needed to boot PVH and bzImages. + %package seabios Summary: x86 Legacy BIOS for QEMU Group: System/Emulators/PC @@ -792,19 +822,20 @@ PATCH_EXEC # This first list group isn't specific to what this instance builds %define ppc_default_firmware {%nil} %define ppc_extra_firmware {skiboot.lid slof.bin} -%define ppc64_only_default_firmware {spapr-rtas.bin} +%define ppc64_only_default_firmware {%nil} %define ppc64_only_extra_firmware {%nil} -%define riscv64_default_firmware {opensbi-riscv64-sifive_u-fw_jump.bin opensbi-riscv64-virt-fw_jump.bin} +%define riscv64_default_firmware {opensbi-riscv64-sifive_u-fw_jump.bin \ +opensbi-riscv64-virt-fw_jump.bin} %define riscv64_extra_firmware {%nil} %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 \ kvmvapic.bin pvh.bin} -%define x86_extra_firmware {bios.bin bios-256k.bin pxe-e1000.rom \ -pxe-eepro100.rom pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \ -sgabios.bin 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} +%define x86_extra_firmware {bios.bin bios-256k.bin bios-microvm.bin \ +pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom \ +pxe-virtio.rom sgabios.bin 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} %define x86_64_only_default_firmware {%nil} %define x86_64_only_extra_firmware {edk2-aarch64-code.fd.bz2 \ edk2-arm-code.fd.bz2 edk2-arm-vars.fd.bz2 edk2-i386-code.fd.bz2 \ @@ -996,6 +1027,7 @@ cd %mybuilddir %endif --enable-opengl \ --enable-parallels \ + --disable-plugins \ --enable-pvrdma \ --enable-qcow1 \ --enable-qed \ @@ -1033,6 +1065,7 @@ cd %mybuilddir --enable-vhost-net \ --enable-vhost-scsi \ --enable-vhost-user \ + --enable-vhost-user-fs \ --enable-vhost-vsock \ --enable-virglrenderer \ --enable-virtfs \ @@ -1051,6 +1084,7 @@ cd %mybuilddir --disable-xen \ %endif --enable-xfsctl \ + --enable-xkbcommon \ # ------------------------------------------------------------------------ %else # qemu-linux-user --without-default-devices \ @@ -1073,6 +1107,7 @@ cd %mybuilddir --disable-malloc-trim \ --enable-membarrier \ --disable-parallels \ + --disable-plugins \ --disable-qcow1 \ --disable-qed \ --disable-replication \ @@ -1085,9 +1120,11 @@ cd %mybuilddir --disable-vhost-net \ --disable-vhost-scsi \ --disable-vhost-user \ + --disable-vhost-user-fs \ --disable-vhost-vsock \ --disable-vnc \ --disable-vvfat \ + --disable-xkbcommon \ %endif # qemu-linux-user %if "%{name}" == "qemu" @@ -1139,6 +1176,8 @@ make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms bios \ HOSTCC=cc \ %endif +make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms bios-microvm + %ifnarch %ix86 %if %{provide_edk2_firmware} make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms efi \ @@ -1167,7 +1206,9 @@ make -C %{_builddir}/%buildsubdir/roms sgabios \ HOSTCC=cc %if %{force_fit_virtio_pxe_rom} +pushd %{_builddir}/%buildsubdir patch -p1 < %_sourcedir/stub-out-the-SAN-req-s-in-int13.patch +popd make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms pxerom_variants=virtio pxerom_targets=1af41000 pxerom %endif @@ -1351,6 +1392,8 @@ unlink %{buildroot}%_datadir/%name/edk2-licenses.txt || true unlink %{buildroot}%_datadir/%name/edk2-x86_64-code.fd unlink %{buildroot}%_datadir/%name/edk2-x86_64-secure-code.fd %endif +install -D -m 0644 %{SOURCE14} %{buildroot}%_datadir/%name/firmware/50-seabios-256k.json +install -D -m 0644 %{SOURCE15} %{buildroot}%_datadir/%name/firmware/60-seabios-128k.json %endif %if 0%{?do_more_edk2_unlinks} || %{provide_edk2_firmware} == 0 unlink %{buildroot}%_datadir/%name/edk2-licenses.txt || true @@ -1484,7 +1527,7 @@ fi # ======================================================================== %files %defattr(-, root, root) -%doc Changelog README VERSION +%doc Changelog README.rst VERSION %license COPYING COPYING.LIB LICENSE %if "%{name}" == "qemu" @@ -1505,6 +1548,7 @@ fi %_docdir/%name/interop/vhost-user.html %_docdir/%name/specs/.buildinfo %_docdir/%name/specs/_static/* +%_docdir/%name/specs/acpi_hw_reduced_hotplug.html %_docdir/%name/specs/genindex.html %_docdir/%name/specs/index.html %_docdir/%name/specs/objects.inv @@ -1580,7 +1624,6 @@ fi %_datadir/%name/qemu_vga.ndrv %_datadir/%name/skiboot.lid %_datadir/%name/slof.bin -%_datadir/%name/spapr-rtas.bin %_datadir/%name/u-boot.e500 %_datadir/%name/u-boot-sam460-20100605.bin %if 0%{?is_opensuse} == 0 @@ -1717,6 +1760,11 @@ fi %_libdir/%name/ui-sdl.so %endif +%files ui-spice-app +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/ui-spice-app.so + %files audio-alsa %defattr(-, root, root) %dir %_libdir/%name @@ -1743,6 +1791,13 @@ fi %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 + +%files microvm +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/bios-microvm.bin %files vgabios %defattr(-, root, root) @@ -1833,6 +1888,8 @@ fi %files guest-agent %defattr(-, root, root) +%dir %_docdir/%name/interop +%_docdir/%name/interop/qemu-ga.html %_mandir/man8/qemu-ga.8.gz %attr(0755,root,kvm) %_bindir/qemu-ga %{_unitdir}/qemu-ga@.service diff --git a/roms-Makefile-enable-cross-compile-for-b.patch b/roms-Makefile-enable-cross-compile-for-b.patch new file mode 100644 index 0000000..c8b0545 --- /dev/null +++ b/roms-Makefile-enable-cross-compile-for-b.patch @@ -0,0 +1,22 @@ +From: Bruce Rogers +Date: Sun, 3 Nov 2019 07:21:40 -0700 +Subject: roms/Makefile: enable cross compile for building microvm bios + +Signed-off-by: Bruce Rogers +--- + roms/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/roms/Makefile b/roms/Makefile +index 091ad51c1e91a2b9709c5810e562..a6f084820f489bef42c6f487a6b2 100644 +--- a/roms/Makefile ++++ b/roms/Makefile +@@ -198,7 +198,7 @@ opensbi64-sifive_u: + cp opensbi/build/platform/sifive/fu540/firmware/fw_jump.bin ../pc-bios/opensbi-riscv64-sifive_u-fw_jump.bin + + bios-microvm: +- $(MAKE) -C qboot ++ $(MAKE) -C qboot CROSS_COMPILE=$(x86_64_cross_prefix) CC=gcc + cp qboot/bios.bin ../pc-bios/bios-microvm.bin + + clean: diff --git a/roms-Makefile-pass-a-packaging-timestamp.patch b/roms-Makefile-pass-a-packaging-timestamp.patch index 5022ea0..4eaff01 100644 --- a/roms-Makefile-pass-a-packaging-timestamp.patch +++ b/roms-Makefile-pass-a-packaging-timestamp.patch @@ -20,7 +20,7 @@ Signed-off-by: Bruce Rogers 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/roms/Makefile b/roms/Makefile -index 775c963f9dd55bfa17772afb73f4..6efeb1ef7c38fb71556b762d6bf1 100644 +index 28e1e557b0763cabe6da3d07602d..091ad51c1e91a2b9709c5810e562 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -51,6 +51,12 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org" @@ -33,10 +33,10 @@ index 775c963f9dd55bfa17772afb73f4..6efeb1ef7c38fb71556b762d6bf1 100644 +# build. +PACKAGING_TIMESTAMP = $(shell date -r ../VERSION +%s) + - default: + default help: @echo "nothing is build by default" @echo "available build targets:" -@@ -99,7 +105,7 @@ build-seabios-config-%: config.% +@@ -100,7 +106,7 @@ build-seabios-config-%: config.% .PHONY: sgabios skiboot sgabios: @@ -45,7 +45,7 @@ index 775c963f9dd55bfa17772afb73f4..6efeb1ef7c38fb71556b762d6bf1 100644 cp sgabios/sgabios.bin ../pc-bios -@@ -119,11 +125,13 @@ efi-rom-%: build-pxe-roms build-efi-roms edk2-basetools +@@ -120,11 +126,13 @@ efi-rom-%: build-pxe-roms build-efi-roms edk2-basetools build-pxe-roms: $(MAKE) -C ipxe/src CONFIG=qemu \ @@ -59,7 +59,7 @@ index 775c963f9dd55bfa17772afb73f4..6efeb1ef7c38fb71556b762d6bf1 100644 CROSS_COMPILE=$(x86_64_cross_prefix) \ $(patsubst %,bin-i386-efi/%.efidrv,$(pxerom_targets)) \ $(patsubst %,bin-x86_64-efi/%.efidrv,$(pxerom_targets)) -@@ -145,7 +153,9 @@ edk2-basetools: +@@ -147,7 +155,9 @@ edk2-basetools: EXTRA_LDFLAGS='$(EDK2_BASETOOLS_LDFLAGS)' slof: diff --git a/roms-change-cross-compiler-naming-to-be-.patch b/roms-change-cross-compiler-naming-to-be-.patch index 4a8056d..8ff9919 100644 --- a/roms-change-cross-compiler-naming-to-be-.patch +++ b/roms-change-cross-compiler-naming-to-be-.patch @@ -8,7 +8,7 @@ Signed-off-by: Bruce Rogers 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/roms/edk2-funcs.sh b/roms/edk2-funcs.sh -index a9fae7ee891bc4cadbe1a3cb3f54..d70bed1729cf0a3ce41ab72df78e 100644 +index 3f4485b201f1f6f8cff47a9933da..5a3a8d885c9138d3c857d8b1e6d0 100644 --- a/roms/edk2-funcs.sh +++ b/roms/edk2-funcs.sh @@ -113,7 +113,15 @@ qemu_edk2_get_cross_prefix() diff --git a/seabios-switch-to-python3-as-needed.patch b/seabios-switch-to-python3-as-needed.patch index 9f6f0ad..b8b1349 100644 --- a/seabios-switch-to-python3-as-needed.patch +++ b/seabios-switch-to-python3-as-needed.patch @@ -17,7 +17,7 @@ Signed-off-by: Bruce Rogers 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/roms/seabios/Makefile b/roms/seabios/Makefile -index 629185ed9f7153fa08ba56c121ee..bd34cfc2394a9103fec2e951bb67 100644 +index de1fa90035b82ef3608d68d62f59..ca8d0283922bbfa931e85511e921 100644 --- a/roms/seabios/Makefile +++ b/roms/seabios/Makefile @@ -22,7 +22,7 @@ LD=$(CROSS_PREFIX)ld diff --git a/seabios-use-python2-explicitly-as-needed.patch b/seabios-use-python2-explicitly-as-needed.patch index 53803d4..5c84806 100644 --- a/seabios-use-python2-explicitly-as-needed.patch +++ b/seabios-use-python2-explicitly-as-needed.patch @@ -14,7 +14,7 @@ Signed-off-by: Bruce Rogers 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roms/seabios/Makefile b/roms/seabios/Makefile -index d2d11dbef87521d82c30a7c6f0bf..629185ed9f7153fa08ba56c121ee 100644 +index 5f7d5370198abac950b24e08a7aa..de1fa90035b82ef3608d68d62f59 100644 --- a/roms/seabios/Makefile +++ b/roms/seabios/Makefile @@ -22,7 +22,7 @@ LD=$(CROSS_PREFIX)ld diff --git a/target-i386-Export-TAA_NO-bit-to-guests.patch b/target-i386-Export-TAA_NO-bit-to-guests.patch deleted file mode 100644 index 72153e3..0000000 --- a/target-i386-Export-TAA_NO-bit-to-guests.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Pawan Gupta -Date: Mon, 18 Nov 2019 23:23:27 -0800 -Subject: target/i386: Export TAA_NO bit to guests - -Git-commit: 7fac38635e1cc5ebae34eb6530da1009bd5808e4 -Reference: bsc#1152506 CVE-2019-11135 - -TSX Async Abort (TAA) is a side channel attack on internal buffers in -some Intel processors similar to Microachitectural Data Sampling (MDS). - -Some future Intel processors will use the ARCH_CAP_TAA_NO bit in the -IA32_ARCH_CAPABILITIES MSR to report that they are not vulnerable to -TAA. Make this bit available to guests. - -Signed-off-by: Pawan Gupta -Signed-off-by: Paolo Bonzini -Signed-off-by: Bruce Rogers ---- - target/i386/cpu.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/target/i386/cpu.c b/target/i386/cpu.c -index 5191367f89ee4d1131c4309633de..530942baed87c5ff76beaf36df14 100644 ---- a/target/i386/cpu.c -+++ b/target/i386/cpu.c -@@ -1189,7 +1189,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { - .feat_names = { - "rdctl-no", "ibrs-all", "rsba", "skip-l1dfl-vmentry", - "ssb-no", "mds-no", "pschange-mc-no", NULL, -- NULL, NULL, NULL, NULL, -+ "taa-no", NULL, NULL, NULL, - NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, diff --git a/target-i386-add-PSCHANGE_NO-bit-for-the-.patch b/target-i386-add-PSCHANGE_NO-bit-for-the-.patch deleted file mode 100644 index 9c926f2..0000000 --- a/target-i386-add-PSCHANGE_NO-bit-for-the-.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Paolo Bonzini -Date: Wed, 13 Nov 2019 15:54:35 +0100 -Subject: target/i386: add PSCHANGE_NO bit for the ARCH_CAPABILITIES MSR - -Git-commit: 7f7a585d5bd3c7f1275d28c77d9d67513c1de36c -Reference: bsc#1155812 CVE-2018-12207 - -This is required to disable ITLB multihit mitigations in nested -hypervisors. - -Signed-off-by: Paolo Bonzini -Signed-off-by: Bruce Rogers ---- - target/i386/cpu.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/target/i386/cpu.c b/target/i386/cpu.c -index 19751e37a71fee27944526fe507c..5191367f89ee4d1131c4309633de 100644 ---- a/target/i386/cpu.c -+++ b/target/i386/cpu.c -@@ -1188,7 +1188,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = { - .type = MSR_FEATURE_WORD, - .feat_names = { - "rdctl-no", "ibrs-all", "rsba", "skip-l1dfl-vmentry", -- "ssb-no", "mds-no", NULL, NULL, -+ "ssb-no", "mds-no", "pschange-mc-no", NULL, - NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, diff --git a/tests-Disable-some-block-tests-for-now.patch b/tests-Disable-some-block-tests-for-now.patch index 77a3c9f..4f1eb47 100644 --- a/tests-Disable-some-block-tests-for-now.patch +++ b/tests-Disable-some-block-tests-for-now.patch @@ -14,13 +14,15 @@ v4.1.0 qemu: disable 065, 129, 169, 182, 205, 218, 242, 248, 250 (other architectures not evaluated at this time) +27NOV2019 - added 161 since it is failing on s390x and ppc consistently + Signed-off-by: Bruce Rogers --- - tests/qemu-iotests/group | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) + tests/qemu-iotests/group | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group -index 3070d160d5ae9108ca5e5a9ed234..0f6640db8a0a783b29aafb66eca2 100644 +index 6b10a6a762..150800ce1c 100644 --- a/tests/qemu-iotests/group +++ b/tests/qemu-iotests/group @@ -86,7 +86,7 @@ @@ -38,10 +40,15 @@ index 3070d160d5ae9108ca5e5a9ed234..0f6640db8a0a783b29aafb66eca2 100644 128 rw quick -129 rw quick +#DISABLE FOR NOW 129 rw quick - 130 rw auto quick + 130 rw quick 131 rw quick 132 rw quick -@@ -186,7 +186,7 @@ +@@ -182,11 +182,11 @@ + 158 rw auto quick + 159 rw auto quick + 160 rw quick +-161 rw auto quick ++#DISABLE FOR NOW 161 rw auto quick 162 quick 163 rw 165 rw quick @@ -96,3 +103,6 @@ index 3070d160d5ae9108ca5e5a9ed234..0f6640db8a0a783b29aafb66eca2 100644 251 rw auto quick 252 rw auto backing quick 253 rw quick +-- +2.24.0 + diff --git a/tests-Fix-block-tests-to-be-compatible-w.patch b/tests-Fix-block-tests-to-be-compatible-w.patch index e327b34..36b902f 100644 --- a/tests-Fix-block-tests-to-be-compatible-w.patch +++ b/tests-Fix-block-tests-to-be-compatible-w.patch @@ -3,7 +3,9 @@ Date: Tue, 15 Oct 2019 11:16:14 -0600 Subject: tests: Fix block tests to be compatible with membarrier configuration The use of membarriers collides with the block test's practice of -SIGKILLing test vm's. Have them quit politely. Tests: 130, 153, 161 +SIGKILLing test vm's. Have them quit politely. Tests: 130, 153 - and +though test 161 seems to have the same issue, it is not yet fixed, but +just marked here as possibly needing a fix. Signed-off-by: Bruce Rogers --- @@ -11,8 +13,7 @@ Signed-off-by: Bruce Rogers tests/qemu-iotests/130.out | 2 ++ tests/qemu-iotests/153 | 6 ++++-- tests/qemu-iotests/153.out | 4 ++++ - tests/qemu-iotests/161 | 3 +++ - 5 files changed, 17 insertions(+), 4 deletions(-) + 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/130 b/tests/qemu-iotests/130 index 77ad2aa13a06094f26d2c8991e48..fd84a4c77d192e15ee961b07994b 100755 @@ -83,19 +84,19 @@ index c969a1a16ff8382b9bb69252f6de..39d6da725bff3932a7cb88acff8e 100755 echo echo "== Detecting -U and force-share conflicts ==" diff --git a/tests/qemu-iotests/153.out b/tests/qemu-iotests/153.out -index e9694200066280fa0637292de3ef..177b08b7e3e6606db552d7e54c8e 100644 +index f7464dd8d345a853f7b64a67c6d0..8bc14f6abf94662473d6d93b5672 100644 --- a/tests/qemu-iotests/153.out +++ b/tests/qemu-iotests/153.out -@@ -416,6 +416,8 @@ Is another process using the image [TEST_DIR/t.qcow2]? - +@@ -421,6 +421,8 @@ Is another process using the image [TEST_DIR/t.qcow2]? _qemu_img_wrapper commit -b TEST_DIR/t.qcow2.b TEST_DIR/t.qcow2.c + { 'execute': 'qmp_capabilities' } {"return": {}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}} +{"return": {}} Adding drive + { 'execute': 'human-monitor-command', 'arguments': { 'command-line': 'drive_add 0 if=none,id=d0,file=TEST_DIR/t.IMGFMT' } } {"return": "OKrn"} - -@@ -443,6 +445,8 @@ Closing the other +@@ -454,6 +456,8 @@ Closing the other {"return": ""} _qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512 @@ -104,31 +105,3 @@ index e9694200066280fa0637292de3ef..177b08b7e3e6606db552d7e54c8e 100644 == Detecting -U and force-share conflicts == -diff --git a/tests/qemu-iotests/161 b/tests/qemu-iotests/161 -index 456a4bd8c4cb54c9c0d295f83bed..990af8a412d72fd522068490638b 100755 ---- a/tests/qemu-iotests/161 -+++ b/tests/qemu-iotests/161 -@@ -68,6 +68,7 @@ _send_qemu_cmd $QEMU_HANDLE \ - 'qemu-io none0 \"reopen -o backing.detect-zeroes=on\"' } }" \ - "return" - -+_send_qemu_cmd $QEMU_HANDLE "{ 'execute': 'quit' }" '' - _cleanup_qemu - - # Second test: stream $TEST_IMG.base into $TEST_IMG.int and then -@@ -96,6 +97,7 @@ _send_qemu_cmd $QEMU_HANDLE \ - 'qemu-io none0 \"reopen -o backing.detect-zeroes=on\"' } }" \ - "return" - -+_send_qemu_cmd $QEMU_HANDLE "{ 'execute': 'quit' }" '' - _cleanup_qemu - - # Third test: commit $TEST_IMG.int into $TEST_IMG.base and then reopen -@@ -129,6 +131,7 @@ _send_qemu_cmd $QEMU_HANDLE \ - 'qemu-io none0 \"reopen -o backing.detect-zeroes=on\"' } }" \ - "return" - -+_send_qemu_cmd $QEMU_HANDLE "{ 'execute': 'quit' }" '' - _cleanup_qemu - - # success, all done diff --git a/tests-change-error-message-in-test-162.patch b/tests-change-error-message-in-test-162.patch index 87e1ca5..a7c779c 100644 --- a/tests-change-error-message-in-test-162.patch +++ b/tests-change-error-message-in-test-162.patch @@ -13,14 +13,14 @@ Signed-off-by: Bruce Rogers 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/162.out b/tests/qemu-iotests/162.out -index 3c5be2c5699a225cc80bbdc40bec..390cca9027e918f1a0d252753ce5 100644 +index 5a00d36d17878376380430dad705..390cca9027e918f1a0d252753ce5 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": 42}': Failed to connect socket: Invalid argument +-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-Triple-timeout-of-i-o.patch b/tests-qemu-iotests-Triple-timeout-of-i-o.patch index bdc1ca7..d4ed236 100644 --- a/tests-qemu-iotests-Triple-timeout-of-i-o.patch +++ b/tests-qemu-iotests-Triple-timeout-of-i-o.patch @@ -13,7 +13,7 @@ Signed-off-by: Bruce Rogers 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu -index 8d2021a7eb0c7085802c6f4c0597..e19ea76fff5789e4bc5b925bdcb9 100644 +index de680cf1c7c92e50b82aa2bc0262..4f2557cc568beed038223af7660b 100644 --- a/tests/qemu-iotests/common.qemu +++ b/tests/qemu-iotests/common.qemu @@ -76,7 +76,7 @@ _timed_wait_for() diff --git a/update_git.sh b/update_git.sh index 6e38ce6..ccabfbf 100644 --- a/update_git.sh +++ b/update_git.sh @@ -8,6 +8,26 @@ # # (default is git2pkg) +# TODO NOTES: + +# after ensuring current status of local repo is clean, incl submodules, we checkout master+submodules, then also ensure they're clean, then checkout the commit or tag corresponding to latest / stable-release + submodules (but don't bother to verift that's clean) - so this is a detached HEAD for stable-release and IS master (almost certainly) for LATEST. WOW - is that what we need to be doing!?!?! At least it seems to be working for the cases I've seen!!!! +# initbundle operates from the current checked out state of the local superproject, to get the submodule ids - CORRECT!!!! +# the LATEST processing of cloning the local repo, clones master - but perhaps it doesn't matter? because it adds upstream as a remote and probably gets most things from there? INVESTIGATE!!!!!!!!!!!!!!!!!!!1 +# bundle2local checks out master in local repo to ensure we're off the frombundle branch (doesn't seem needed the way the script currently is). It fetches the bundle's head (FETCH_HEAD) REQUIRING that the base commit be present (which it seems to be. Then it creates the frombundle branch, with the current FETCH_HEAD (SAME AS IN BUNDLE, RIGHT?) +# The LATEST's rebase loop checks out the frombundle branch (with force), so we are now OFF of the "correct checkout" that happened at the beginning, it DELETES the GIT_BRANCH (so in this case it DIDN'T MATTER WHAT WAS THERE WHEN SCRIPT STARTED !!!!!!! WARNING !!!!!, branches off of the frombundle branch (w/checkout), then rebases that (which came from bundle) onto the current superproject, or submodule commit id. +# At this point, if the GIT_BRANCH rebased ok, it's ready for making a patchqueue, out of, if the rebase failed, it's time to manually fix that.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1 + +# LATEST processing implies updated upstream/master IS the right thing +# HOW do we protect against a bad bundle being created (we do have the build service's tracking of previous files - is that sufficient? +# initbundle - what does it need? Currently we take the default branch in local superproject for the superproject and submodule commit ids, so it needs to be right! (ie which ever branch it is (DECIDE!), make it the RIGHT ONE for this release. It takes the commits from the $GIT_BUNDLE branch of each of superproject and submodule repos, which are beyond above found commits. IT CERTIANLY SEEMS REASONABLE THAT WE WOULD HAVE THE $$GIT_BRANCH BRANCH BE THE DEFAULT AND CORRECT BUT HOW DO WE GUARANTEE THATS OK? GIVEN OUR REQS HERE QEMU_VERSION CAN BE GRABBED HERE IN LOCAL SUPERPROJECT RIGHT AWAY! +# bundle2local - what does it need? This checks out local master just to get off of frombundle (could have been $GIT_BRANCH as well) No other req's +# bundle2spec - what does it need? THIS SHOULD HAVE LATEST SPLIT OUT!!!! We allow this alone, so see what setup it alone needs - for this one particularly, we don't want to REQUIRE local repo. FOR NOW I ASSUME THE RIGHT THING IS CHECKED OUT! +# +# SEEMS WE SHOULD NOT,NOT,NOT require user to have previously updated, or set local repo a certain way, but for us to enforce it or actually do it +# TODO: confirm local repo present, correct remotes, correct local branches, somehow validate local branch content against remote, ... +# +# In both cases we DO require the $GIT_BRANCH to exist, and should confirm that the appropriate upstream basis commit is indeed part of that. In the LATEST case, we can treat master as a source for initial current upstream. + set -e source ./config.sh @@ -52,6 +72,7 @@ REQUIRED_LOCAL_REPO_MAP=( ~/git/qemu-sgabios ~/git/qemu-skiboot ~/git/qemu-keycodemapdb + ~/git/qemu-qboot ) # Validate that all the local repos that we currently have patches in are available diff --git a/vbe-add-edid-support.patch b/vbe-add-edid-support.patch deleted file mode 100644 index 46addf6..0000000 --- a/vbe-add-edid-support.patch +++ /dev/null @@ -1,87 +0,0 @@ -From: Gerd Hoffmann -Date: Tue, 19 Mar 2019 11:09:33 +0100 -Subject: vbe: add edid support. - -Git-commit: a307d0adc50f41787424a9453145293248a1908c - -VBE subfunction 0x15, read ddc data. - -Add VBE_edid where drivers can fill in a EDID data blob. -If we find valid data there (checking the first two header -bytes), then report the function as supported and hand out -the data. - -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - vgasrc/vbe.c | 30 ++++++++++++++++++++++++++++++ - vgasrc/vgautil.h | 1 + - 2 files changed, 31 insertions(+) - -diff --git a/roms/seabios/vgasrc/vbe.c b/roms/seabios/vgasrc/vbe.c -index 724c1bad6d7a8f612e05c198223f..66afb011ada034d53b518f8de068 100644 ---- a/roms/seabios/vgasrc/vbe.c -+++ b/roms/seabios/vgasrc/vbe.c -@@ -25,6 +25,7 @@ u32 VBE_total_memory VAR16 = 256 * 1024; - u32 VBE_capabilities VAR16; - u32 VBE_framebuffer VAR16; - u16 VBE_win_granularity VAR16; -+u8 VBE_edid[256] VAR16; - - static void - vbe_104f00(struct bregs *regs) -@@ -400,6 +401,34 @@ vbe_104f10(struct bregs *regs) - regs->ax = 0x004f; - } - -+static void -+vbe_104f15(struct bregs *regs) -+{ -+ int offset; -+ -+ switch (regs->bl) { -+ case 0x00: -+ if (GET_GLOBAL(VBE_edid[0]) != 0x00 || -+ GET_GLOBAL(VBE_edid[1]) != 0xff) -+ goto err; -+ regs->bx = 0x0103; -+ break; -+ case 0x01: -+ offset = regs->dx * 128; -+ if (offset >= sizeof(VBE_edid)) -+ goto err; -+ memcpy_far(regs->es, (void*)(regs->di+0), -+ get_global_seg(), VBE_edid + offset, -+ 128); -+ break; -+ err: -+ default: -+ regs->ax = 0x014f; -+ return; -+ } -+ regs->ax = 0x004f; -+} -+ - static void - vbe_104fXX(struct bregs *regs) - { -@@ -427,6 +456,7 @@ handle_104f(struct bregs *regs) - case 0x08: vbe_104f08(regs); break; - case 0x0a: vbe_104f0a(regs); break; - case 0x10: vbe_104f10(regs); break; -+ case 0x15: vbe_104f15(regs); break; - default: vbe_104fXX(regs); break; - } - } -diff --git a/roms/seabios/vgasrc/vgautil.h b/roms/seabios/vgasrc/vgautil.h -index a9940402e45bf293f95b29bbdc2c..dd1aa189547a212ae45bae941f61 100644 ---- a/roms/seabios/vgasrc/vgautil.h -+++ b/roms/seabios/vgasrc/vgautil.h -@@ -89,6 +89,7 @@ extern u32 VBE_total_memory; - extern u32 VBE_capabilities; - extern u32 VBE_framebuffer; - extern u16 VBE_win_granularity; -+extern u8 VBE_edid[256]; - void handle_104f(struct bregs *regs); - - // vgafonts.c diff --git a/vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch b/vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch index 1abb733..56f7aa1 100644 --- a/vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch +++ b/vga-Raise-VRAM-to-16-MiB-for-pc-0.15-and.patch @@ -24,10 +24,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 25 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c -index c2280c72effb7e2a4dd5aec1eed4..53ee84b542496cbdfebb2eebaa1c 100644 +index 1bd70d1abbc434edb8b5ca69ee5d..d760d3589607daf4997ea76854c4 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c -@@ -800,6 +800,31 @@ static void pc_i440fx_0_15_machine_options(MachineClass *m) +@@ -804,6 +804,31 @@ static void pc_i440fx_0_15_machine_options(MachineClass *m) { static GlobalProperty compat[] = { PC_CPU_MODEL_IDS("0.15") diff --git a/vga-add-ati-bios-tables.patch b/vga-add-ati-bios-tables.patch deleted file mode 100644 index ee85291..0000000 --- a/vga-add-ati-bios-tables.patch +++ /dev/null @@ -1,79 +0,0 @@ -From: Gerd Hoffmann -Date: Fri, 8 Mar 2019 11:42:25 +0100 -Subject: vga: add ati bios tables - -Git-commit: f4c6e4c19daf3deac2d7fc3288db5294aba955ad - -Needed to make drivers happy which try to gather -informations from these tables. - -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - vgasrc/ati-tables.S | 43 +++++++++++++++++++++++++++++++++++++++++++ - vgasrc/vgaentry.S | 3 +++ - 2 files changed, 46 insertions(+) - -diff --git a/roms/seabios/vgasrc/ati-tables.S b/roms/seabios/vgasrc/ati-tables.S -new file mode 100644 -index 0000000000000000000000000000000000000000..cdbde2fa4aec74f62da898be8b79e4a7c16f6c11 ---- /dev/null -+++ b/roms/seabios/vgasrc/ati-tables.S -@@ -0,0 +1,43 @@ -+// -+// Fake ati bios tables. -+// -+// aty128fb and radeonfb try to gather informations from these tables, -+// so add some stuff here to make the drivers happy. Specifically -+// radeonfb needs the pll information, otherwise it'll crash with a -+// division by zero ... -+// -+ .org 0x48 -+ .word _ati_main -+ -+ // main info -+ .org 0x50 -+_ati_main: -+ .org 0x50 + 0x30 -+ .word _ati_pll -+ .org 0x50 + 0x50 -+ .word _ati_connector -+ -+ // pll info -+ .org 0x100 -+_ati_pll: -+ .word 0 // ??? (not used by radeonfb) -+ .word 0 -+ .word 0 -+ .word 0 -+ .word 23000 // sclk -+ .word 23000 // mclk -+ .word 0 -+ .word 2700 // ref_clk -+ .word 4 // ref_div -+ .long 12000 // ppll_min -+ .long 35000 // ppll_max -+ -+ // connector info -+ .org 0x140 -+_ati_connector: -+ .byte 0x10 // one chip -+ .byte 0x01 // one connector -+ .word 0x3000 // type DVI-I -+ .word 0 // end of list -+ -+ .org 0x200 -diff --git a/roms/seabios/vgasrc/vgaentry.S b/roms/seabios/vgasrc/vgaentry.S -index 53be2b38ca520c691a4fde927bd8..f9624fce2ed9c570d6283b2905f4 100644 ---- a/roms/seabios/vgasrc/vgaentry.S -+++ b/roms/seabios/vgasrc/vgaentry.S -@@ -40,6 +40,9 @@ _rom_header_other2: - _rom_header_signature: - .asciz "IBM" - -+#if CONFIG_VGA_ATI -+#include "ati-tables.S" -+#endif - - /**************************************************************** - * Entry points diff --git a/vga-add-atiext-driver.patch b/vga-add-atiext-driver.patch deleted file mode 100644 index 736b272..0000000 --- a/vga-add-atiext-driver.patch +++ /dev/null @@ -1,381 +0,0 @@ -From: Gerd Hoffmann -Date: Mon, 25 Feb 2019 10:51:37 +0100 -Subject: vga: add atiext driver - -Git-commit: 34b6ecc160749a691b80fcb8638216518d971c65 - -Supports qemu emulated ati cards. They have been added in qemu 4.0. -Acceleration support (in qemu) is pretty rough still. A simple -framebuffer works fine though. - -Available models: - * ati rage 128 pro - * ati rv100 - -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - Makefile | 2 +- - vgasrc/Kconfig | 11 +++ - vgasrc/atiext.c | 245 +++++++++++++++++++++++++++++++++++++++++++++++ - vgasrc/vgahw.h | 8 ++ - vgasrc/vgautil.h | 6 ++ - 5 files changed, 271 insertions(+), 1 deletion(-) - -diff --git a/roms/seabios/Makefile b/roms/seabios/Makefile -index 79b264ef87565106987fc88eeffe..ecec084825e706cc9d5afacefc10 100644 ---- a/roms/seabios/Makefile -+++ b/roms/seabios/Makefile -@@ -212,7 +212,7 @@ SRCVGA=src/output.c src/string.c src/hw/pci.c src/hw/serialio.c \ - vgasrc/vgainit.c vgasrc/vgabios.c vgasrc/vgafb.c vgasrc/swcursor.c \ - vgasrc/vgafonts.c vgasrc/vbe.c \ - vgasrc/stdvga.c vgasrc/stdvgamodes.c vgasrc/stdvgaio.c \ -- vgasrc/clext.c vgasrc/svgamodes.c vgasrc/bochsvga.c vgasrc/geodevga.c \ -+ vgasrc/clext.c vgasrc/svgamodes.c vgasrc/atiext.c vgasrc/bochsvga.c vgasrc/geodevga.c \ - src/fw/coreboot.c vgasrc/cbvga.c vgasrc/bochsdisplay.c vgasrc/ramfb.c - - ifeq "$(CONFIG_VGA_FIXUP_ASM)" "y" -diff --git a/roms/seabios/vgasrc/Kconfig b/roms/seabios/vgasrc/Kconfig -index f6d843e0900bda3900bc268fae97..c8fac36fb92baa27e06076ec68c5 100644 ---- a/roms/seabios/vgasrc/Kconfig -+++ b/roms/seabios/vgasrc/Kconfig -@@ -27,6 +27,15 @@ menu "VGA ROM" - and Bochs emulators. This is for emulators; it is not - intended for use on real Cirrus hardware. - -+ config VGA_ATI -+ depends on QEMU -+ bool "QEMU ATI SVGA" -+ select VGA_STDVGA_PORTS -+ help -+ Build support for ATI VGA emulation found on QEMU -+ and emulators. This is for emulators; it is not -+ intended for use on real ATI hardware. -+ - config VGA_BOCHS - depends on QEMU - bool "QEMU/Bochs VBE SVGA" -@@ -182,6 +191,7 @@ menu "VGA ROM" - hex - prompt "PCI Vendor ID" if OVERRIDE_PCI_ID - default 0x1013 if VGA_CIRRUS -+ default 0x1002 if VGA_ATI - default 0x1234 if VGA_BOCHS_STDVGA - default 0x15ad if VGA_BOCHS_VMWARE - default 0x1b36 if VGA_BOCHS_QXL -@@ -198,6 +208,7 @@ menu "VGA ROM" - hex - prompt "PCI Vendor ID" if OVERRIDE_PCI_ID - default 0x00b8 if VGA_CIRRUS -+ default 0x5159 if VGA_ATI - default 0x1111 if VGA_BOCHS_STDVGA - default 0x0405 if VGA_BOCHS_VMWARE - default 0x0100 if VGA_BOCHS_QXL -diff --git a/roms/seabios/vgasrc/atiext.c b/roms/seabios/vgasrc/atiext.c -new file mode 100644 -index 0000000000000000000000000000000000000000..0586279ce214fac7d2a7e6c87a9409a6e32eb5af ---- /dev/null -+++ b/roms/seabios/vgasrc/atiext.c -@@ -0,0 +1,245 @@ -+// QEMU ATI VGABIOS Extension. -+// -+// This file may be distributed under the terms of the GNU LGPLv3 license. -+ -+#include "biosvar.h" // GET_GLOBAL -+#include "bregs.h" // struct bregs -+#include "hw/pci.h" // pci_config_readl -+#include "hw/pci_regs.h" // PCI_BASE_ADDRESS_0 -+#include "output.h" // dprintf -+#include "stdvga.h" // VGAREG_SEQU_ADDRESS -+#include "string.h" // memset16_far -+#include "vgabios.h" // SET_VGA -+#include "vgautil.h" // VBE_total_memory -+#include "vgafb.h" // memset_high -+ -+#include "svgamodes.h" -+ -+#define MM_INDEX 0x0000 -+#define MM_DATA 0x0004 -+#define CRTC_GEN_CNTL 0x0050 -+#define CRTC_EXT_CNTL 0x0054 -+#define CRTC_H_TOTAL_DISP 0x0200 -+#define CRTC_V_TOTAL_DISP 0x0208 -+#define CRTC_OFFSET 0x0224 -+#define CRTC_PITCH 0x022c -+ -+/* CRTC control values (CRTC_GEN_CNTL) */ -+#define CRTC2_EXT_DISP_EN 0x01000000 -+#define CRTC2_EN 0x02000000 -+ -+#define CRTC_PIX_WIDTH_MASK 0x00000700 -+#define CRTC_PIX_WIDTH_4BPP 0x00000100 -+#define CRTC_PIX_WIDTH_8BPP 0x00000200 -+#define CRTC_PIX_WIDTH_15BPP 0x00000300 -+#define CRTC_PIX_WIDTH_16BPP 0x00000400 -+#define CRTC_PIX_WIDTH_24BPP 0x00000500 -+#define CRTC_PIX_WIDTH_32BPP 0x00000600 -+ -+/* CRTC_EXT_CNTL */ -+#define CRT_CRTC_DISPLAY_DIS 0x00000400 -+#define CRT_CRTC_ON 0x00008000 -+ -+static u32 ati_io_addr VAR16 = 0; -+ -+int -+is_ati_mode(struct vgamode_s *vmode_g) -+{ -+ unsigned int mcount = GET_GLOBAL(svga_mcount); -+ -+ return (vmode_g >= &svga_modes[0].info && -+ vmode_g <= &svga_modes[mcount-1].info); -+} -+ -+struct vgamode_s * -+ati_find_mode(int mode) -+{ -+ u32 io_addr = GET_GLOBAL(ati_io_addr); -+ struct generic_svga_mode *table_g = svga_modes; -+ unsigned int mcount = GET_GLOBAL(svga_mcount); -+ -+ if (io_addr) { -+ while (table_g < &svga_modes[mcount]) { -+ if (GET_GLOBAL(table_g->mode) == mode) -+ return &table_g->info; -+ table_g++; -+ } -+ } -+ -+ return stdvga_find_mode(mode); -+} -+ -+void -+ati_list_modes(u16 seg, u16 *dest, u16 *last) -+{ -+ u32 io_addr = GET_GLOBAL(ati_io_addr); -+ unsigned int mcount = GET_GLOBAL(svga_mcount); -+ -+ dprintf(1, "%s: ati ext %s\n", __func__, io_addr ? "yes" : "no"); -+ if (io_addr) { -+ int i; -+ for (i=0; iinfo.width); -+ u32 height = GET_GLOBAL(table->info.height); -+ u32 depth = GET_GLOBAL(table->info.depth); -+ u32 stride = width; -+ u32 offset = 0; -+ u32 pxmask = 0; -+ u32 bytes = 0; -+ -+ dprintf(1, "%s: 0x%x, %dx%d-%d\n", __func__, -+ GET_GLOBAL(table->mode), -+ width, height, depth); -+ -+ switch (depth) { -+ case 8: pxmask = CRTC_PIX_WIDTH_8BPP; bytes = 1; break; -+ case 15: pxmask = CRTC_PIX_WIDTH_15BPP; bytes = 2; break; -+ case 16: pxmask = CRTC_PIX_WIDTH_16BPP; bytes = 2; break; -+ case 24: pxmask = CRTC_PIX_WIDTH_24BPP; bytes = 3; break; -+ case 32: pxmask = CRTC_PIX_WIDTH_32BPP; bytes = 4; break; -+ } -+ -+ /* disable display */ -+ ati_write(CRTC_EXT_CNTL, CRT_CRTC_DISPLAY_DIS); -+ -+ /* modeset */ -+ ati_write(CRTC_GEN_CNTL, CRTC2_EXT_DISP_EN | CRTC2_EN | pxmask); -+ ati_write(CRTC_H_TOTAL_DISP, ((width / 8) - 1) << 16); -+ ati_write(CRTC_V_TOTAL_DISP, (height - 1) << 16); -+ ati_write(CRTC_OFFSET, offset); -+ ati_write(CRTC_PITCH, stride / 8); -+ -+ /* clear screen */ -+ if (!(flags & MF_NOCLEARMEM)) { -+ u32 size = width * height * bytes; -+ ati_clear(offset, size); -+ } -+ -+ /* enable display */ -+ ati_write(CRTC_EXT_CNTL, 0); -+ -+ return 0; -+} -+ -+int -+ati_set_mode(struct vgamode_s *vmode_g, int flags) -+{ -+ struct generic_svga_mode *table_g = -+ container_of(vmode_g, struct generic_svga_mode, info); -+ -+ if (is_ati_mode(vmode_g)) { -+ return ati_ext_mode(table_g, flags); -+ } -+ -+ ati_write(CRTC_GEN_CNTL, 0); -+ return stdvga_set_mode(vmode_g, flags); -+} -+ -+/**************************************************************** -+ * init -+ ****************************************************************/ -+ -+int -+ati_setup(void) -+{ -+ int ret = stdvga_setup(); -+ if (ret) -+ return ret; -+ -+ dprintf(1, "%s:%d\n", __func__, __LINE__); -+ -+ if (GET_GLOBAL(HaveRunInit)) -+ return 0; -+ -+ int bdf = GET_GLOBAL(VgaBDF); -+ if (!CONFIG_VGA_PCI || bdf == 0) -+ return 0; -+ -+ u32 bar = pci_config_readl(bdf, PCI_BASE_ADDRESS_0); -+ u32 lfb_addr = bar & PCI_BASE_ADDRESS_MEM_MASK; -+ pci_config_writel(bdf, PCI_BASE_ADDRESS_0, ~0); -+ u32 barmask = pci_config_readl(bdf, PCI_BASE_ADDRESS_0); -+ u32 totalmem = ~(barmask & PCI_BASE_ADDRESS_MEM_MASK) + 1; -+ pci_config_writel(bdf, PCI_BASE_ADDRESS_0, bar); -+ -+ bar = pci_config_readl(bdf, PCI_BASE_ADDRESS_1); -+ u32 io_addr = bar & PCI_BASE_ADDRESS_IO_MASK; -+ -+ bar = pci_config_readl(bdf, PCI_BASE_ADDRESS_2); -+ u32 mmio_addr = bar & PCI_BASE_ADDRESS_MEM_MASK; -+ -+ dprintf(1, "ati: bdf %02x:%02x.%x, lfb 0x%x, %d MB, io 0x%x, mmio 0x%x\n", -+ pci_bdf_to_bus(bdf), pci_bdf_to_dev(bdf), pci_bdf_to_fn(bdf), -+ lfb_addr, totalmem / (1024 * 1024), io_addr, mmio_addr); -+ -+ SET_VGA(VBE_framebuffer, lfb_addr); -+ SET_VGA(VBE_total_memory, totalmem); -+ SET_VGA(ati_io_addr, io_addr); -+ -+ // Validate modes -+ struct generic_svga_mode *m = svga_modes; -+ unsigned int mcount = GET_GLOBAL(svga_mcount); -+ for (; m < &svga_modes[mcount]; m++) { -+ u8 memmodel = GET_GLOBAL(m->info.memmodel); -+ u16 width = GET_GLOBAL(m->info.width); -+ u16 height = GET_GLOBAL(m->info.height); -+ u32 mem = (height * DIV_ROUND_UP(width * vga_bpp(&m->info), 8) -+ * stdvga_vram_ratio(&m->info)); -+ -+ if (width % 8 != 0 || -+ width > 0x7ff * 8 || -+ height > 0xfff || -+ mem > totalmem || -+ memmodel != MM_DIRECT) { -+ dprintf(1, "ati: removing mode 0x%x\n", GET_GLOBAL(m->mode)); -+ SET_VGA(m->mode, 0xffff); -+ } -+ } -+ -+ return 0; -+} -diff --git a/roms/seabios/vgasrc/vgahw.h b/roms/seabios/vgasrc/vgahw.h -index 51777458da629a759f762317e9f6..c774f4f2c6b7c8012096bac2f0ed 100644 ---- a/roms/seabios/vgasrc/vgahw.h -+++ b/roms/seabios/vgasrc/vgahw.h -@@ -12,6 +12,8 @@ - static inline struct vgamode_s *vgahw_find_mode(int mode) { - if (CONFIG_VGA_CIRRUS) - return clext_find_mode(mode); -+ if (CONFIG_VGA_ATI) -+ return ati_find_mode(mode); - if (CONFIG_VGA_BOCHS) - return bochsvga_find_mode(mode); - if (CONFIG_VGA_EMULATE_TEXT) -@@ -22,6 +24,8 @@ static inline struct vgamode_s *vgahw_find_mode(int mode) { - static inline int vgahw_set_mode(struct vgamode_s *vmode_g, int flags) { - if (CONFIG_VGA_CIRRUS) - return clext_set_mode(vmode_g, flags); -+ if (CONFIG_VGA_ATI) -+ return ati_set_mode(vmode_g, flags); - if (CONFIG_VGA_BOCHS) - return bochsvga_set_mode(vmode_g, flags); - if (CONFIG_VGA_EMULATE_TEXT) -@@ -32,6 +36,8 @@ static inline int vgahw_set_mode(struct vgamode_s *vmode_g, int flags) { - static inline void vgahw_list_modes(u16 seg, u16 *dest, u16 *last) { - if (CONFIG_VGA_CIRRUS) - clext_list_modes(seg, dest, last); -+ if (CONFIG_VGA_ATI) -+ ati_list_modes(seg, dest, last); - else if (CONFIG_VGA_BOCHS) - bochsvga_list_modes(seg, dest, last); - else if (CONFIG_VGA_EMULATE_TEXT) -@@ -43,6 +49,8 @@ static inline void vgahw_list_modes(u16 seg, u16 *dest, u16 *last) { - static inline int vgahw_setup(void) { - if (CONFIG_VGA_CIRRUS) - return clext_setup(); -+ if (CONFIG_VGA_ATI) -+ return ati_setup(); - if (CONFIG_VGA_BOCHS) - return bochsvga_setup(); - if (CONFIG_VGA_GEODEGX2 || CONFIG_VGA_GEODELX) -diff --git a/roms/seabios/vgasrc/vgautil.h b/roms/seabios/vgasrc/vgautil.h -index 4f37bf947c42e9f73f7148f668c8..a9940402e45bf293f95b29bbdc2c 100644 ---- a/roms/seabios/vgasrc/vgautil.h -+++ b/roms/seabios/vgasrc/vgautil.h -@@ -42,6 +42,12 @@ struct bregs; - void clext_1012(struct bregs *regs); - int clext_setup(void); - -+// atiext.c -+struct vgamode_s *ati_find_mode(int mode); -+void ati_list_modes(u16 seg, u16 *dest, u16 *last); -+int ati_set_mode(struct vgamode_s *vmode_g, int flags); -+int ati_setup(void); -+ - // stdvgaio.c - u8 stdvga_pelmask_read(void); - void stdvga_pelmask_write(u8 val); diff --git a/vga-make-memcpy_high-public.patch b/vga-make-memcpy_high-public.patch deleted file mode 100644 index cea49f6..0000000 --- a/vga-make-memcpy_high-public.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Gerd Hoffmann -Date: Fri, 8 Mar 2019 12:34:38 +0100 -Subject: vga: make memcpy_high() public - -Git-commit: 03f5061c0a44dcf8d73a05a6f375e3fe5005f050 - -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - vgasrc/vgafb.c | 3 +-- - vgasrc/vgafb.h | 1 + - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/roms/seabios/vgasrc/vgafb.c b/roms/seabios/vgasrc/vgafb.c -index 46adfb5e06143d63eeb46ddb122b..f8f35c2d2fbabb2bf816b5652e4f 100644 ---- a/roms/seabios/vgasrc/vgafb.c -+++ b/roms/seabios/vgasrc/vgafb.c -@@ -187,8 +187,7 @@ gfx_packed(struct gfx_op *op) - ****************************************************************/ - - // Use int 1587 call to copy memory to/from the framebuffer. --static void --memcpy_high(void *dest, void *src, u32 len) -+void memcpy_high(void *dest, void *src, u32 len) - { - u64 gdt[6]; - gdt[2] = GDT_DATA | GDT_LIMIT(0xfffff) | GDT_BASE((u32)src); -diff --git a/roms/seabios/vgasrc/vgafb.h b/roms/seabios/vgasrc/vgafb.h -index ccdc70355caf9e05327e3fb4c39c..aae6b9b3a873d3c3d42a9107ae23 100644 ---- a/roms/seabios/vgasrc/vgafb.h -+++ b/roms/seabios/vgasrc/vgafb.h -@@ -29,6 +29,7 @@ struct carattr { - }; - - // vgafb.c -+void memcpy_high(void *dest, void *src, u32 len); - void init_gfx_op(struct gfx_op *op, struct vgamode_s *vmode_g); - void handle_gfx_op(struct gfx_op *op); - void *text_address(struct cursorpos cp); diff --git a/vga-move-modelist-from-bochsvga.c-to-new.patch b/vga-move-modelist-from-bochsvga.c-to-new.patch deleted file mode 100644 index 13e1610..0000000 --- a/vga-move-modelist-from-bochsvga.c-to-new.patch +++ /dev/null @@ -1,272 +0,0 @@ -From: Gerd Hoffmann -Date: Fri, 8 Mar 2019 11:10:59 +0100 -Subject: vga: move modelist from bochsvga.c to new svgamodes.c - -Git-commit: 004f5b3ae561df688595b341e6880182ed5794ed - -So other drivers can simply use the same list too. - -Signed-off-by: Gerd Hoffmann -Signed-off-by: Bruce Rogers ---- - Makefile | 2 +- - vgasrc/bochsvga.c | 102 +++++++-------------------------------------- - vgasrc/svgamodes.c | 80 +++++++++++++++++++++++++++++++++++ - vgasrc/svgamodes.h | 12 ++++++ - 4 files changed, 109 insertions(+), 87 deletions(-) - -diff --git a/roms/seabios/Makefile b/roms/seabios/Makefile -index 7b8a5cd6b17254685df89798ed10..79b264ef87565106987fc88eeffe 100644 ---- a/roms/seabios/Makefile -+++ b/roms/seabios/Makefile -@@ -212,7 +212,7 @@ SRCVGA=src/output.c src/string.c src/hw/pci.c src/hw/serialio.c \ - vgasrc/vgainit.c vgasrc/vgabios.c vgasrc/vgafb.c vgasrc/swcursor.c \ - vgasrc/vgafonts.c vgasrc/vbe.c \ - vgasrc/stdvga.c vgasrc/stdvgamodes.c vgasrc/stdvgaio.c \ -- vgasrc/clext.c vgasrc/bochsvga.c vgasrc/geodevga.c \ -+ vgasrc/clext.c vgasrc/svgamodes.c vgasrc/bochsvga.c vgasrc/geodevga.c \ - src/fw/coreboot.c vgasrc/cbvga.c vgasrc/bochsdisplay.c vgasrc/ramfb.c - - ifeq "$(CONFIG_VGA_FIXUP_ASM)" "y" -diff --git a/roms/seabios/vgasrc/bochsvga.c b/roms/seabios/vgasrc/bochsvga.c -index ec5d1018686e6dbefd5e944db659..479582f1dd4e066de7c8ba50341b 100644 ---- a/roms/seabios/vgasrc/bochsvga.c -+++ b/roms/seabios/vgasrc/bochsvga.c -@@ -23,98 +23,25 @@ - * Mode tables - ****************************************************************/ - --static struct bochsvga_mode --{ -- u16 mode; -- struct vgamode_s info; --} bochsvga_modes[] VAR16 = { -- /* standard modes */ -- { 0x100, { MM_PACKED, 640, 400, 8, 8, 16, SEG_GRAPH } }, -- { 0x101, { MM_PACKED, 640, 480, 8, 8, 16, SEG_GRAPH } }, -- { 0x102, { MM_PLANAR, 800, 600, 4, 8, 16, SEG_GRAPH } }, -- { 0x103, { MM_PACKED, 800, 600, 8, 8, 16, SEG_GRAPH } }, -- { 0x104, { MM_PLANAR, 1024, 768, 4, 8, 16, SEG_GRAPH } }, -- { 0x105, { MM_PACKED, 1024, 768, 8, 8, 16, SEG_GRAPH } }, -- { 0x106, { MM_PLANAR, 1280, 1024, 4, 8, 16, SEG_GRAPH } }, -- { 0x107, { MM_PACKED, 1280, 1024, 8, 8, 16, SEG_GRAPH } }, -- { 0x10D, { MM_DIRECT, 320, 200, 15, 8, 16, SEG_GRAPH } }, -- { 0x10E, { MM_DIRECT, 320, 200, 16, 8, 16, SEG_GRAPH } }, -- { 0x10F, { MM_DIRECT, 320, 200, 24, 8, 16, SEG_GRAPH } }, -- { 0x110, { MM_DIRECT, 640, 480, 15, 8, 16, SEG_GRAPH } }, -- { 0x111, { MM_DIRECT, 640, 480, 16, 8, 16, SEG_GRAPH } }, -- { 0x112, { MM_DIRECT, 640, 480, 24, 8, 16, SEG_GRAPH } }, -- { 0x113, { MM_DIRECT, 800, 600, 15, 8, 16, SEG_GRAPH } }, -- { 0x114, { MM_DIRECT, 800, 600, 16, 8, 16, SEG_GRAPH } }, -- { 0x115, { MM_DIRECT, 800, 600, 24, 8, 16, SEG_GRAPH } }, -- { 0x116, { MM_DIRECT, 1024, 768, 15, 8, 16, SEG_GRAPH } }, -- { 0x117, { MM_DIRECT, 1024, 768, 16, 8, 16, SEG_GRAPH } }, -- { 0x118, { MM_DIRECT, 1024, 768, 24, 8, 16, SEG_GRAPH } }, -- { 0x119, { MM_DIRECT, 1280, 1024, 15, 8, 16, SEG_GRAPH } }, -- { 0x11A, { MM_DIRECT, 1280, 1024, 16, 8, 16, SEG_GRAPH } }, -- { 0x11B, { MM_DIRECT, 1280, 1024, 24, 8, 16, SEG_GRAPH } }, -- { 0x11C, { MM_PACKED, 1600, 1200, 8, 8, 16, SEG_GRAPH } }, -- { 0x11D, { MM_DIRECT, 1600, 1200, 15, 8, 16, SEG_GRAPH } }, -- { 0x11E, { MM_DIRECT, 1600, 1200, 16, 8, 16, SEG_GRAPH } }, -- { 0x11F, { MM_DIRECT, 1600, 1200, 24, 8, 16, SEG_GRAPH } }, -- /* BOCHS modes */ -- { 0x140, { MM_DIRECT, 320, 200, 32, 8, 16, SEG_GRAPH } }, -- { 0x141, { MM_DIRECT, 640, 400, 32, 8, 16, SEG_GRAPH } }, -- { 0x142, { MM_DIRECT, 640, 480, 32, 8, 16, SEG_GRAPH } }, -- { 0x143, { MM_DIRECT, 800, 600, 32, 8, 16, SEG_GRAPH } }, -- { 0x144, { MM_DIRECT, 1024, 768, 32, 8, 16, SEG_GRAPH } }, -- { 0x145, { MM_DIRECT, 1280, 1024, 32, 8, 16, SEG_GRAPH } }, -- { 0x146, { MM_PACKED, 320, 200, 8, 8, 16, SEG_GRAPH } }, -- { 0x147, { MM_DIRECT, 1600, 1200, 32, 8, 16, SEG_GRAPH } }, -- { 0x148, { MM_PACKED, 1152, 864, 8, 8, 16, SEG_GRAPH } }, -- { 0x149, { MM_DIRECT, 1152, 864, 15, 8, 16, SEG_GRAPH } }, -- { 0x14a, { MM_DIRECT, 1152, 864, 16, 8, 16, SEG_GRAPH } }, -- { 0x14b, { MM_DIRECT, 1152, 864, 24, 8, 16, SEG_GRAPH } }, -- { 0x14c, { MM_DIRECT, 1152, 864, 32, 8, 16, SEG_GRAPH } }, -- { 0x175, { MM_DIRECT, 1280, 768, 16, 8, 16, SEG_GRAPH } }, -- { 0x176, { MM_DIRECT, 1280, 768, 24, 8, 16, SEG_GRAPH } }, -- { 0x177, { MM_DIRECT, 1280, 768, 32, 8, 16, SEG_GRAPH } }, -- { 0x178, { MM_DIRECT, 1280, 800, 16, 8, 16, SEG_GRAPH } }, -- { 0x179, { MM_DIRECT, 1280, 800, 24, 8, 16, SEG_GRAPH } }, -- { 0x17a, { MM_DIRECT, 1280, 800, 32, 8, 16, SEG_GRAPH } }, -- { 0x17b, { MM_DIRECT, 1280, 960, 16, 8, 16, SEG_GRAPH } }, -- { 0x17c, { MM_DIRECT, 1280, 960, 24, 8, 16, SEG_GRAPH } }, -- { 0x17d, { MM_DIRECT, 1280, 960, 32, 8, 16, SEG_GRAPH } }, -- { 0x17e, { MM_DIRECT, 1440, 900, 16, 8, 16, SEG_GRAPH } }, -- { 0x17f, { MM_DIRECT, 1440, 900, 24, 8, 16, SEG_GRAPH } }, -- { 0x180, { MM_DIRECT, 1440, 900, 32, 8, 16, SEG_GRAPH } }, -- { 0x181, { MM_DIRECT, 1400, 1050, 16, 8, 16, SEG_GRAPH } }, -- { 0x182, { MM_DIRECT, 1400, 1050, 24, 8, 16, SEG_GRAPH } }, -- { 0x183, { MM_DIRECT, 1400, 1050, 32, 8, 16, SEG_GRAPH } }, -- { 0x184, { MM_DIRECT, 1680, 1050, 16, 8, 16, SEG_GRAPH } }, -- { 0x185, { MM_DIRECT, 1680, 1050, 24, 8, 16, SEG_GRAPH } }, -- { 0x186, { MM_DIRECT, 1680, 1050, 32, 8, 16, SEG_GRAPH } }, -- { 0x187, { MM_DIRECT, 1920, 1200, 16, 8, 16, SEG_GRAPH } }, -- { 0x188, { MM_DIRECT, 1920, 1200, 24, 8, 16, SEG_GRAPH } }, -- { 0x189, { MM_DIRECT, 1920, 1200, 32, 8, 16, SEG_GRAPH } }, -- { 0x18a, { MM_DIRECT, 2560, 1600, 16, 8, 16, SEG_GRAPH } }, -- { 0x18b, { MM_DIRECT, 2560, 1600, 24, 8, 16, SEG_GRAPH } }, -- { 0x18c, { MM_DIRECT, 2560, 1600, 32, 8, 16, SEG_GRAPH } }, -- { 0x18d, { MM_DIRECT, 1280, 720, 16, 8, 16, SEG_GRAPH } }, -- { 0x18e, { MM_DIRECT, 1280, 720, 24, 8, 16, SEG_GRAPH } }, -- { 0x18f, { MM_DIRECT, 1280, 720, 32, 8, 16, SEG_GRAPH } }, -- { 0x190, { MM_DIRECT, 1920, 1080, 16, 8, 16, SEG_GRAPH } }, -- { 0x191, { MM_DIRECT, 1920, 1080, 24, 8, 16, SEG_GRAPH } }, -- { 0x192, { MM_DIRECT, 1920, 1080, 32, 8, 16, SEG_GRAPH } }, --}; -+#include "svgamodes.h" - - static int dispi_found VAR16 = 0; - - static int is_bochsvga_mode(struct vgamode_s *vmode_g) - { -- return (vmode_g >= &bochsvga_modes[0].info -- && vmode_g <= &bochsvga_modes[ARRAY_SIZE(bochsvga_modes)-1].info); -+ unsigned int mcount = GET_GLOBAL(svga_mcount); -+ -+ return (vmode_g >= &svga_modes[0].info -+ && vmode_g <= &svga_modes[mcount-1].info); - } - - struct vgamode_s *bochsvga_find_mode(int mode) - { -- struct bochsvga_mode *m = bochsvga_modes; -+ struct generic_svga_mode *m = svga_modes; -+ unsigned int mcount = GET_GLOBAL(svga_mcount); -+ - if (GET_GLOBAL(dispi_found)) -- for (; m < &bochsvga_modes[ARRAY_SIZE(bochsvga_modes)]; m++) -+ for (; m < &svga_modes[mcount]; m++) - if (GET_GLOBAL(m->mode) == mode) - return &m->info; - return stdvga_find_mode(mode); -@@ -123,9 +50,11 @@ struct vgamode_s *bochsvga_find_mode(int mode) - void - bochsvga_list_modes(u16 seg, u16 *dest, u16 *last) - { -- struct bochsvga_mode *m = bochsvga_modes; -+ struct generic_svga_mode *m = svga_modes; -+ unsigned int mcount = GET_GLOBAL(svga_mcount); -+ - if (GET_GLOBAL(dispi_found)) { -- for (; m < &bochsvga_modes[ARRAY_SIZE(bochsvga_modes)] && destmode); - if (mode == 0xffff) - continue; -@@ -429,8 +358,9 @@ bochsvga_setup(void) - u16 max_xres = dispi_read(VBE_DISPI_INDEX_XRES); - u16 max_bpp = dispi_read(VBE_DISPI_INDEX_BPP); - dispi_write(VBE_DISPI_INDEX_ENABLE, en); -- struct bochsvga_mode *m = bochsvga_modes; -- for (; m < &bochsvga_modes[ARRAY_SIZE(bochsvga_modes)]; m++) { -+ struct generic_svga_mode *m = svga_modes; -+ unsigned int mcount = GET_GLOBAL(svga_mcount); -+ for (; m < &svga_modes[mcount]; m++) { - u16 width = GET_GLOBAL(m->info.width); - u16 height = GET_GLOBAL(m->info.height); - u8 depth = GET_GLOBAL(m->info.depth); -diff --git a/roms/seabios/vgasrc/svgamodes.c b/roms/seabios/vgasrc/svgamodes.c -new file mode 100644 -index 0000000000000000000000000000000000000000..013504c3e691b7d533fd0baa3b62b77b087dd39c ---- /dev/null -+++ b/roms/seabios/vgasrc/svgamodes.c -@@ -0,0 +1,80 @@ -+#include "stdvga.h" // SEG_GRAPH -+#include "vgabios.h" // VAR16 -+ -+#include "svgamodes.h" -+ -+struct generic_svga_mode svga_modes[] VAR16 = { -+ /* standard modes */ -+ { 0x100, { MM_PACKED, 640, 400, 8, 8, 16, SEG_GRAPH } }, -+ { 0x101, { MM_PACKED, 640, 480, 8, 8, 16, SEG_GRAPH } }, -+ { 0x102, { MM_PLANAR, 800, 600, 4, 8, 16, SEG_GRAPH } }, -+ { 0x103, { MM_PACKED, 800, 600, 8, 8, 16, SEG_GRAPH } }, -+ { 0x104, { MM_PLANAR, 1024, 768, 4, 8, 16, SEG_GRAPH } }, -+ { 0x105, { MM_PACKED, 1024, 768, 8, 8, 16, SEG_GRAPH } }, -+ { 0x106, { MM_PLANAR, 1280, 1024, 4, 8, 16, SEG_GRAPH } }, -+ { 0x107, { MM_PACKED, 1280, 1024, 8, 8, 16, SEG_GRAPH } }, -+ { 0x10D, { MM_DIRECT, 320, 200, 15, 8, 16, SEG_GRAPH } }, -+ { 0x10E, { MM_DIRECT, 320, 200, 16, 8, 16, SEG_GRAPH } }, -+ { 0x10F, { MM_DIRECT, 320, 200, 24, 8, 16, SEG_GRAPH } }, -+ { 0x110, { MM_DIRECT, 640, 480, 15, 8, 16, SEG_GRAPH } }, -+ { 0x111, { MM_DIRECT, 640, 480, 16, 8, 16, SEG_GRAPH } }, -+ { 0x112, { MM_DIRECT, 640, 480, 24, 8, 16, SEG_GRAPH } }, -+ { 0x113, { MM_DIRECT, 800, 600, 15, 8, 16, SEG_GRAPH } }, -+ { 0x114, { MM_DIRECT, 800, 600, 16, 8, 16, SEG_GRAPH } }, -+ { 0x115, { MM_DIRECT, 800, 600, 24, 8, 16, SEG_GRAPH } }, -+ { 0x116, { MM_DIRECT, 1024, 768, 15, 8, 16, SEG_GRAPH } }, -+ { 0x117, { MM_DIRECT, 1024, 768, 16, 8, 16, SEG_GRAPH } }, -+ { 0x118, { MM_DIRECT, 1024, 768, 24, 8, 16, SEG_GRAPH } }, -+ { 0x119, { MM_DIRECT, 1280, 1024, 15, 8, 16, SEG_GRAPH } }, -+ { 0x11A, { MM_DIRECT, 1280, 1024, 16, 8, 16, SEG_GRAPH } }, -+ { 0x11B, { MM_DIRECT, 1280, 1024, 24, 8, 16, SEG_GRAPH } }, -+ { 0x11C, { MM_PACKED, 1600, 1200, 8, 8, 16, SEG_GRAPH } }, -+ { 0x11D, { MM_DIRECT, 1600, 1200, 15, 8, 16, SEG_GRAPH } }, -+ { 0x11E, { MM_DIRECT, 1600, 1200, 16, 8, 16, SEG_GRAPH } }, -+ { 0x11F, { MM_DIRECT, 1600, 1200, 24, 8, 16, SEG_GRAPH } }, -+ /* other modes */ -+ { 0x140, { MM_DIRECT, 320, 200, 32, 8, 16, SEG_GRAPH } }, -+ { 0x141, { MM_DIRECT, 640, 400, 32, 8, 16, SEG_GRAPH } }, -+ { 0x142, { MM_DIRECT, 640, 480, 32, 8, 16, SEG_GRAPH } }, -+ { 0x143, { MM_DIRECT, 800, 600, 32, 8, 16, SEG_GRAPH } }, -+ { 0x144, { MM_DIRECT, 1024, 768, 32, 8, 16, SEG_GRAPH } }, -+ { 0x145, { MM_DIRECT, 1280, 1024, 32, 8, 16, SEG_GRAPH } }, -+ { 0x146, { MM_PACKED, 320, 200, 8, 8, 16, SEG_GRAPH } }, -+ { 0x147, { MM_DIRECT, 1600, 1200, 32, 8, 16, SEG_GRAPH } }, -+ { 0x148, { MM_PACKED, 1152, 864, 8, 8, 16, SEG_GRAPH } }, -+ { 0x149, { MM_DIRECT, 1152, 864, 15, 8, 16, SEG_GRAPH } }, -+ { 0x14a, { MM_DIRECT, 1152, 864, 16, 8, 16, SEG_GRAPH } }, -+ { 0x14b, { MM_DIRECT, 1152, 864, 24, 8, 16, SEG_GRAPH } }, -+ { 0x14c, { MM_DIRECT, 1152, 864, 32, 8, 16, SEG_GRAPH } }, -+ { 0x175, { MM_DIRECT, 1280, 768, 16, 8, 16, SEG_GRAPH } }, -+ { 0x176, { MM_DIRECT, 1280, 768, 24, 8, 16, SEG_GRAPH } }, -+ { 0x177, { MM_DIRECT, 1280, 768, 32, 8, 16, SEG_GRAPH } }, -+ { 0x178, { MM_DIRECT, 1280, 800, 16, 8, 16, SEG_GRAPH } }, -+ { 0x179, { MM_DIRECT, 1280, 800, 24, 8, 16, SEG_GRAPH } }, -+ { 0x17a, { MM_DIRECT, 1280, 800, 32, 8, 16, SEG_GRAPH } }, -+ { 0x17b, { MM_DIRECT, 1280, 960, 16, 8, 16, SEG_GRAPH } }, -+ { 0x17c, { MM_DIRECT, 1280, 960, 24, 8, 16, SEG_GRAPH } }, -+ { 0x17d, { MM_DIRECT, 1280, 960, 32, 8, 16, SEG_GRAPH } }, -+ { 0x17e, { MM_DIRECT, 1440, 900, 16, 8, 16, SEG_GRAPH } }, -+ { 0x17f, { MM_DIRECT, 1440, 900, 24, 8, 16, SEG_GRAPH } }, -+ { 0x180, { MM_DIRECT, 1440, 900, 32, 8, 16, SEG_GRAPH } }, -+ { 0x181, { MM_DIRECT, 1400, 1050, 16, 8, 16, SEG_GRAPH } }, -+ { 0x182, { MM_DIRECT, 1400, 1050, 24, 8, 16, SEG_GRAPH } }, -+ { 0x183, { MM_DIRECT, 1400, 1050, 32, 8, 16, SEG_GRAPH } }, -+ { 0x184, { MM_DIRECT, 1680, 1050, 16, 8, 16, SEG_GRAPH } }, -+ { 0x185, { MM_DIRECT, 1680, 1050, 24, 8, 16, SEG_GRAPH } }, -+ { 0x186, { MM_DIRECT, 1680, 1050, 32, 8, 16, SEG_GRAPH } }, -+ { 0x187, { MM_DIRECT, 1920, 1200, 16, 8, 16, SEG_GRAPH } }, -+ { 0x188, { MM_DIRECT, 1920, 1200, 24, 8, 16, SEG_GRAPH } }, -+ { 0x189, { MM_DIRECT, 1920, 1200, 32, 8, 16, SEG_GRAPH } }, -+ { 0x18a, { MM_DIRECT, 2560, 1600, 16, 8, 16, SEG_GRAPH } }, -+ { 0x18b, { MM_DIRECT, 2560, 1600, 24, 8, 16, SEG_GRAPH } }, -+ { 0x18c, { MM_DIRECT, 2560, 1600, 32, 8, 16, SEG_GRAPH } }, -+ { 0x18d, { MM_DIRECT, 1280, 720, 16, 8, 16, SEG_GRAPH } }, -+ { 0x18e, { MM_DIRECT, 1280, 720, 24, 8, 16, SEG_GRAPH } }, -+ { 0x18f, { MM_DIRECT, 1280, 720, 32, 8, 16, SEG_GRAPH } }, -+ { 0x190, { MM_DIRECT, 1920, 1080, 16, 8, 16, SEG_GRAPH } }, -+ { 0x191, { MM_DIRECT, 1920, 1080, 24, 8, 16, SEG_GRAPH } }, -+ { 0x192, { MM_DIRECT, 1920, 1080, 32, 8, 16, SEG_GRAPH } }, -+}; -+unsigned int svga_mcount VAR16 = ARRAY_SIZE(svga_modes); -diff --git a/roms/seabios/vgasrc/svgamodes.h b/roms/seabios/vgasrc/svgamodes.h -new file mode 100644 -index 0000000000000000000000000000000000000000..782d30b9768f4a7cb8bfea6c1d24c483d68b45ed ---- /dev/null -+++ b/roms/seabios/vgasrc/svgamodes.h -@@ -0,0 +1,12 @@ -+#ifndef __SVGAMODES_H -+#define __SVGAMODES_H -+ -+struct generic_svga_mode { -+ u16 mode; -+ struct vgamode_s info; -+}; -+ -+extern struct generic_svga_mode svga_modes[] VAR16; -+extern unsigned int svga_mcount VAR16; -+ -+#endif /* __SVGAMODES_H */ diff --git a/xen-add-block-resize-support-for-xen-dis.patch b/xen-add-block-resize-support-for-xen-dis.patch index 0177ba3..3f800a0 100644 --- a/xen-add-block-resize-support-for-xen-dis.patch +++ b/xen-add-block-resize-support-for-xen-dis.patch @@ -15,10 +15,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 3 insertions(+) diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c -index 9bc6db52b4be8510e322e61ba5a7..1f8c8ae85abde736b5a58d1f4cb9 100644 +index 0007ee64c75f38a2a3256f0b9462..86de57f9c6f7405bc26303065d2c 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c -@@ -273,6 +273,9 @@ static void xen_block_realize(XenDevice *xendev, Error **errp) +@@ -274,6 +274,9 @@ static void xen_block_realize(XenDevice *xendev, Error **errp) xen_block_set_size(blockdev); diff --git a/xen-ignore-live-parameter-from-xen-save-.patch b/xen-ignore-live-parameter-from-xen-save-.patch index 27e5da8..6e3ccad 100644 --- a/xen-ignore-live-parameter-from-xen-save-.patch +++ b/xen-ignore-live-parameter-from-xen-save-.patch @@ -27,10 +27,10 @@ Signed-off-by: Bruce Rogers 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/savevm.c b/migration/savevm.c -index 79ed44d47576ff2942da04827eae..106e6e640e87c99b655aca3a5d96 100644 +index a71b930b91f71ed9763fcb07b525..c5cc5fed211e693723538e19850b 100644 --- a/migration/savevm.c +++ b/migration/savevm.c -@@ -2693,7 +2693,7 @@ void qmp_xen_save_devices_state(const char *filename, bool has_live, bool live, +@@ -2774,7 +2774,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 controle of the images. */ diff --git a/xen_disk-Add-suse-specific-flush-disable.patch b/xen_disk-Add-suse-specific-flush-disable.patch index 7fe7a3a..01973b3 100644 --- a/xen_disk-Add-suse-specific-flush-disable.patch +++ b/xen_disk-Add-suse-specific-flush-disable.patch @@ -18,10 +18,10 @@ Signed-off-by: Olaf Hering 1 file changed, 12 insertions(+) diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c -index 69d73196e2a074e771f5fb771649..9bc6db52b4be8510e322e61ba5a7 100644 +index 879fc310a4c5dfa4a7d8936f7d8e..0007ee64c75f38a2a3256f0b9462 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c -@@ -741,6 +741,8 @@ static XenBlockDrive *xen_block_drive_create(const char *id, +@@ -743,6 +743,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"); @@ -30,7 +30,7 @@ index 69d73196e2a074e771f5fb771649..9bc6db52b4be8510e322e61ba5a7 100644 char *driver = NULL; char *filename = NULL; XenBlockDrive *drive = NULL; -@@ -810,6 +812,16 @@ static XenBlockDrive *xen_block_drive_create(const char *id, +@@ -812,6 +814,16 @@ static XenBlockDrive *xen_block_drive_create(const char *id, } } From 49980fd2ebbb883fd534cc88cc71e8521d909d97de3881a6fd78ef7ec2ae3934 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Wed, 27 Nov 2019 13:05:39 +0000 Subject: [PATCH 4/4] Accepting request 751312 from home:bfrogers:branches:Virtualization:Staging Update to v4.2.0-rc3. Intent is to submit to Factory, and SLE-15-SP2 as well OBS-URL: https://build.opensuse.org/request/show/751312 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=514 --- qemu-4.2.0-rc3.tar.xz | 4 ++-- qemu-4.2.0-rc3.tar.xz.sig | Bin 0 -> 310 bytes qemu.spec | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 qemu-4.2.0-rc3.tar.xz.sig diff --git a/qemu-4.2.0-rc3.tar.xz b/qemu-4.2.0-rc3.tar.xz index a747e1e..bbaf33a 100644 --- a/qemu-4.2.0-rc3.tar.xz +++ b/qemu-4.2.0-rc3.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:253687e815ad57e1a61b6ed16251e7d275661a1507e065886cdbf24552150b69 -size 64784720 +oid sha256:5d5aece78673c758f648b3ae06ea9758ffe0345b7db07d92f3e5ce9bdcd55ed8 +size 62220168 diff --git a/qemu-4.2.0-rc3.tar.xz.sig b/qemu-4.2.0-rc3.tar.xz.sig new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..fed514a37b15a9f9545d14d91ad7f2409178f479f965a359ec46d38baa29a55c GIT binary patch literal 310 zcmV-60m=S}0W$;u0SW*e79j-AtjXb3H0!IlEkB?$Q_0Tp2(^R-0$tszaR3Sl5HnNB z&hZGfgj*sA0ErRVPVJ%C{(j2sg_Yol6Hrlu9zk!o>J_EWNVFtg?Qeag*9G3VH7n-T z0j*N-Ol-m4mlB^QzsHW+x%mt+%kfJ_Qbs+1<#PXDZ!)$eu(43vi~$b1bD-s?oWk9< z;oGjDaw^L4+LD8Msx5^RGc~GrDB38SIRxV$=*@wg(b&&bn=%aur8nb?|4de1pcderpyfO*Zec_Cy Ilh_H-