update to qemu-3.1.0, from Brad.

This commit is contained in:
sthen 2018-12-19 17:57:06 +00:00
parent 32949401fa
commit c2f6b945df
6 changed files with 13 additions and 66 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.182 2018/10/01 19:52:41 naddy Exp $
# $OpenBSD: Makefile,v 1.183 2018/12/19 17:57:06 sthen Exp $
USE_WXNEEDED= Yes
@ -6,8 +6,7 @@ ONLY_FOR_ARCHS= aarch64 amd64 arm i386 powerpc sparc64
COMMENT= multi system emulator
DISTNAME= qemu-3.0.0
REVISION= 2
DISTNAME= qemu-3.1.0
CATEGORIES= emulators
MASTER_SITES= https://download.qemu.org/
EXTRACT_SUFX= .tar.xz

View File

@ -1,2 +1,2 @@
SHA256 (qemu-3.0.0.tar.xz) = jXr2T+i9XqXDvfFxMai4WEkbzOHuODlCWm2R+4IbVxM=
SIZE (qemu-3.0.0.tar.xz) = 35624516
SHA256 (qemu-3.1.0.tar.xz) = agUI3weaCjPCSHypNqVsEhIvEFuKlqRDdHBL72xpq/w=
SIZE (qemu-3.1.0.tar.xz) = 36070104

View File

@ -1,12 +1,11 @@
$OpenBSD: patch-configure,v 1.58 2018/09/05 07:01:50 ajacoutot Exp $
$OpenBSD: patch-configure,v 1.59 2018/12/19 17:57:06 sthen Exp $
- Fix curses test to work on OpenBSD
- More appropriate CFLAGS handling
Fix curses test to work on OpenBSD
Index: configure
--- configure.orig
+++ configure
@@ -3371,6 +3371,7 @@ if test "$curses" != "no" ; then
@@ -3370,6 +3370,7 @@ if test "$curses" != "no" ; then
fi
curses_found=no
cat > $TMPC << EOF
@ -14,7 +13,7 @@ Index: configure
#include <locale.h>
#include <curses.h>
#include <wchar.h>
@@ -5554,10 +5555,6 @@ write_c_skeleton
@@ -5631,10 +5632,6 @@ write_c_skeleton
if test "$gcov" = "yes" ; then
CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"

View File

@ -1,38 +0,0 @@
$OpenBSD: patch-hw_virtio_virtio_c,v 1.4 2018/09/05 07:01:50 ajacoutot Exp $
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.
Index: hw/virtio/virtio.c
--- hw/virtio/virtio.c.orig
+++ hw/virtio/virtio.c
@@ -2006,14 +2006,25 @@ static int virtio_set_features_nocheck(VirtIODevice *v
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)

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-util_oslib-posix_c,v 1.2 2018/05/02 08:21:13 ajacoutot Exp $
Pass MAP_STACK flag when allocating memory for stack usage.
Index: util/oslib-posix.c
--- util/oslib-posix.c.orig
+++ util/oslib-posix.c
@@ -538,7 +538,7 @@ void *qemu_alloc_stack(size_t *sz)
*sz += pagesz;
ptr = mmap(NULL, *sz, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);
if (ptr == MAP_FAILED) {
perror("failed to allocate memory for stack");
abort();

View File

@ -1,9 +1,10 @@
@comment $OpenBSD: PLIST,v 1.40 2018/09/04 12:46:12 espie Exp $
@comment $OpenBSD: PLIST,v 1.41 2018/12/19 17:57:06 sthen Exp $
@conflict kqemu-*
@conflict qemu-*
@pkgpath emulators/kqemu
@pkgpath emulators/qemu,kqemu
@pkgpath emulators/qemu-old[,no_x11]
@bin bin/qemu-edid
@bin bin/qemu-ga
@bin bin/qemu-img
@bin bin/qemu-io
@ -28,7 +29,6 @@
@bin bin/qemu-system-or1k
@bin bin/qemu-system-ppc
@bin bin/qemu-system-ppc64
@bin bin/qemu-system-ppcemb
@bin bin/qemu-system-riscv32
@bin bin/qemu-system-riscv64
@bin bin/qemu-system-s390x
@ -44,6 +44,7 @@
@man man/man1/qemu-img.1
@man man/man1/qemu.1
@man man/man7/qemu-block-drivers.7
@man man/man7/qemu-cpu-models.7
@man man/man7/qemu-ga-ref.7
@man man/man7/qemu-qmp-ref.7
@man man/man8/qemu-ga.8
@ -159,8 +160,10 @@ share/qemu/spapr-rtas.bin
share/qemu/trace-events-all
share/qemu/u-boot-sam460-20100605.bin
share/qemu/u-boot.e500
share/qemu/vgabios-bochs-display.bin
share/qemu/vgabios-cirrus.bin
share/qemu/vgabios-qxl.bin
share/qemu/vgabios-ramfb.bin
share/qemu/vgabios-stdvga.bin
share/qemu/vgabios-virtio.bin
share/qemu/vgabios-vmware.bin