qemu: update to 3.1.0
This commit is contained in:
parent
38ddf3cc8a
commit
3c9cfda2ef
@ -2,10 +2,9 @@ TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr"
|
||||
|
||||
TERMUX_PKG_HOMEPAGE=https://www.qemu.org
|
||||
TERMUX_PKG_DESCRIPTION="A generic and open source machine emulator (x86_64)"
|
||||
TERMUX_PKG_VERSION=3.0.0
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_VERSION=3.1.0
|
||||
TERMUX_PKG_SRCURL=https://download.qemu.org/qemu-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=8d7af64fe8bd5ea5c3bdf17131a8b858491bcce1ee3839425a6d91fb821b5713
|
||||
TERMUX_PKG_SHA256=6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc
|
||||
TERMUX_PKG_DEPENDS="attr, glib, libandroid-shmem, libandroid-support, libbz2, libc++, libcap, libcurl, libgnutls, libjpeg-turbo, liblzo, libnettle, libpixman, libpng, libsasl, libssh2, libutil, ncurses, qemu-common, sdl2"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
diff -uNr qemu-3.0.0/slirp/misc.c qemu-3.0.0.mod/slirp/misc.c
|
||||
--- qemu-3.0.0/slirp/misc.c 2018-08-14 22:10:35.000000000 +0300
|
||||
+++ qemu-3.0.0.mod/slirp/misc.c 2018-10-26 16:49:45.296931943 +0300
|
||||
@@ -146,7 +146,7 @@
|
||||
dup2(s, 0);
|
||||
dup2(s, 1);
|
||||
dup2(s, 2);
|
||||
diff -uNr qemu-3.1.0/slirp/misc.c qemu-3.1.0.mod/slirp/misc.c
|
||||
--- qemu-3.1.0/slirp/misc.c 2018-12-11 19:44:34.000000000 +0200
|
||||
+++ qemu-3.1.0.mod/slirp/misc.c 2018-12-15 17:11:44.206298565 +0200
|
||||
@@ -161,7 +161,7 @@
|
||||
dup2(cs, 0);
|
||||
dup2(cs, 1);
|
||||
dup2(cs, 2);
|
||||
- for (s = getdtablesize() - 1; s >= 3; s--)
|
||||
+ for (s = sysconf(_SC_OPEN_MAX) - 1; s >= 3; s--)
|
||||
close(s);
|
||||
|
@ -1,55 +0,0 @@
|
||||
From db812c4073c77c8a64db8d6663b3416a587c7b4a Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Date: Thu, 23 Aug 2018 14:21:23 +0200
|
||||
Subject: [PATCH] virtio: update MemoryRegionCaches when guest negotiates
|
||||
features
|
||||
|
||||
Because the cache is sized to include the rings and the event indices,
|
||||
negotiating the VIRTIO_RING_F_EVENT_IDX feature will result in the size
|
||||
of the cache changing. And because MemoryRegionCache accesses are
|
||||
range-checked, if we skip this we end up with an assertion failure.
|
||||
This happens with OpenBSD 6.3.
|
||||
|
||||
Reported-by: Fam Zheng <famz@redhat.com>
|
||||
Fixes: 97cd965c070152bc626c7507df9fb356bbe1cd81
|
||||
Cc: qemu-stable@nongnu.org
|
||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||||
Tested-by: Fam Zheng <famz@redhat.com>
|
||||
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
||||
---
|
||||
hw/virtio/virtio.c | 15 +++++++++++++--
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
|
||||
index d4e4d98b595..f6a588ab57e 100644
|
||||
--- a/hw/virtio/virtio.c
|
||||
+++ b/hw/virtio/virtio.c
|
||||
@@ -2006,14 +2006,25 @@ static int virtio_set_features_nocheck(VirtIODevice *vdev, uint64_t val)
|
||||
|
||||
int virtio_set_features(VirtIODevice *vdev, uint64_t val)
|
||||
{
|
||||
- /*
|
||||
+ int ret;
|
||||
+ /*
|
||||
* The driver must not attempt to set features after feature negotiation
|
||||
* has finished.
|
||||
*/
|
||||
if (vdev->status & VIRTIO_CONFIG_S_FEATURES_OK) {
|
||||
return -EINVAL;
|
||||
}
|
||||
- return virtio_set_features_nocheck(vdev, val);
|
||||
+ ret = virtio_set_features_nocheck(vdev, val);
|
||||
+ if (!ret && virtio_vdev_has_feature(vdev, VIRTIO_RING_F_EVENT_IDX)) {
|
||||
+ /* VIRTIO_RING_F_EVENT_IDX changes the size of the caches. */
|
||||
+ int i;
|
||||
+ for (i = 0; i < VIRTIO_QUEUE_MAX; i++) {
|
||||
+ if (vdev->vq[i].vring.num != 0) {
|
||||
+ virtio_init_region_cache(vdev, i);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
int virtio_load(VirtIODevice *vdev, QEMUFile *f, int version_id)
|
Loading…
Reference in New Issue
Block a user