From c2f6b945df4f78b0ff50f94b648607bd59c7d1f7 Mon Sep 17 00:00:00 2001 From: sthen Date: Wed, 19 Dec 2018 17:57:06 +0000 Subject: [PATCH] update to qemu-3.1.0, from Brad. --- emulators/qemu/Makefile | 5 +-- emulators/qemu/distinfo | 4 +- emulators/qemu/patches/patch-configure | 9 ++--- .../qemu/patches/patch-hw_virtio_virtio_c | 38 ------------------- .../qemu/patches/patch-util_oslib-posix_c | 16 -------- emulators/qemu/pkg/PLIST | 7 +++- 6 files changed, 13 insertions(+), 66 deletions(-) diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile index 196edeee241..34bbdf91f12 100644 --- a/emulators/qemu/Makefile +++ b/emulators/qemu/Makefile @@ -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 diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo index 9bbfba8e8d7..da23c08c60d 100644 --- a/emulators/qemu/distinfo +++ b/emulators/qemu/distinfo @@ -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 diff --git a/emulators/qemu/patches/patch-configure b/emulators/qemu/patches/patch-configure index f0bb2d61ff5..e502e3af1b0 100644 --- a/emulators/qemu/patches/patch-configure +++ b/emulators/qemu/patches/patch-configure @@ -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 #include #include -@@ -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" diff --git a/emulators/qemu/patches/patch-hw_virtio_virtio_c b/emulators/qemu/patches/patch-hw_virtio_virtio_c index 1c9bd75440a..e69de29bb2d 100644 --- a/emulators/qemu/patches/patch-hw_virtio_virtio_c +++ b/emulators/qemu/patches/patch-hw_virtio_virtio_c @@ -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) diff --git a/emulators/qemu/patches/patch-util_oslib-posix_c b/emulators/qemu/patches/patch-util_oslib-posix_c index db8c0c596b2..e69de29bb2d 100644 --- a/emulators/qemu/patches/patch-util_oslib-posix_c +++ b/emulators/qemu/patches/patch-util_oslib-posix_c @@ -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(); diff --git a/emulators/qemu/pkg/PLIST b/emulators/qemu/pkg/PLIST index 5c6097a13b9..5c1202a3260 100644 --- a/emulators/qemu/pkg/PLIST +++ b/emulators/qemu/pkg/PLIST @@ -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