pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/emulators/qemu qemu: Re-add NetBSD 9 NVMM support.
details: https://anonhg.NetBSD.org/pkgsrc/rev/cd8acc1a1ff8
branches: trunk
changeset: 457989:cd8acc1a1ff8
user: nia <nia%pkgsrc.org@localhost>
date: Sun Sep 05 20:58:16 2021 +0000
description:
qemu: Re-add NetBSD 9 NVMM support.
diffstat:
emulators/qemu/Makefile | 3 +-
emulators/qemu/distinfo | 5 +-
emulators/qemu/patches/patch-meson.build | 18 +++--
emulators/qemu/patches/patch-target_i386_nvmm_nvmm-all.c | 47 ++++++++++++++++
4 files changed, 62 insertions(+), 11 deletions(-)
diffs (127 lines):
diff -r ada2b3875f55 -r cd8acc1a1ff8 emulators/qemu/Makefile
--- a/emulators/qemu/Makefile Sun Sep 05 20:32:03 2021 +0000
+++ b/emulators/qemu/Makefile Sun Sep 05 20:58:16 2021 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.284 2021/08/29 01:53:06 mcf Exp $
+# $NetBSD: Makefile,v 1.285 2021/09/05 20:58:16 nia Exp $
DISTNAME= qemu-6.1.0
PKGNAME= ${DISTNAME:S/-rc/rc/}
+PKGREVISION= 1
CATEGORIES= emulators
MASTER_SITES= https://download.qemu.org/
EXTRACT_SUFX= .tar.xz
diff -r ada2b3875f55 -r cd8acc1a1ff8 emulators/qemu/distinfo
--- a/emulators/qemu/distinfo Sun Sep 05 20:32:03 2021 +0000
+++ b/emulators/qemu/distinfo Sun Sep 05 20:58:16 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.183 2021/08/27 03:32:37 ryoon Exp $
+$NetBSD: distinfo,v 1.184 2021/09/05 20:58:16 nia Exp $
SHA1 (palcode-clipper-qemu-5.2.0nb8) = ddbf1dffb7c2b2157e0bbe9fb7db7e57105130b1
RMD160 (palcode-clipper-qemu-5.2.0nb8) = 3f9fe19a40f7ca72ecfe047d1449e55b63cba3ee
@@ -21,7 +21,8 @@
SHA1 (patch-hw_scsi_scsi-disk.c) = fdbf2f962a6dcb1a115a7f8a5b8790ff9295fb33
SHA1 (patch-hw_usb_dev-mtp.c) = 94ddf53a41cc75810cfece1b8aef1831fab4ce43
SHA1 (patch-include_sysemu_nvmm.h) = 2cf9ea36c77570136b0678fe3b1c126ca7fa04cd
-SHA1 (patch-meson.build) = 086400b3eebd0d5ce91af7779fa4f2a56d953542
+SHA1 (patch-meson.build) = 35f4d563e99dcc014a011bb4c7cddefac852d4cf
SHA1 (patch-net_tap-solaris.c) = cc953c9a624dd55ace4e130d0b31bbfb956c17d5
SHA1 (patch-roms_u-boot-sam460ex_Makefile) = 3a1bbf19b1422c10ebdd819eb0b711fafc78e2f2
+SHA1 (patch-target_i386_nvmm_nvmm-all.c) = 8f4b51a6460090d7826af1ae02840a208767345b
SHA1 (patch-target_sparc_translate.c) = 7ec2add2fd808facb48b9a66ccc345599251bf76
diff -r ada2b3875f55 -r cd8acc1a1ff8 emulators/qemu/patches/patch-meson.build
--- a/emulators/qemu/patches/patch-meson.build Sun Sep 05 20:32:03 2021 +0000
+++ b/emulators/qemu/patches/patch-meson.build Sun Sep 05 20:58:16 2021 +0000
@@ -1,22 +1,24 @@
-$NetBSD: patch-meson.build,v 1.8 2021/08/27 03:32:37 ryoon Exp $
+$NetBSD: patch-meson.build,v 1.9 2021/09/05 20:58:16 nia Exp $
* Add NetBSD support.
* Detect iconv in libc properly for pkgsrc (pkgsrc removes -liconv)
to fix qemu-system-aarch64 link.
* Detect curses (non-ncurses{,w} too)
---- meson.build.orig 2021-08-04 16:29:08.000000000 +0000
+--- meson.build.orig 2021-08-24 17:35:41.000000000 +0000
+++ meson.build
-@@ -237,7 +237,7 @@ if not get_option('hax').disabled()
+@@ -237,9 +237,7 @@ if not get_option('hax').disabled()
endif
endif
if targetos == 'netbsd'
- if cc.has_header_symbol('nvmm.h', 'nvmm_cpu_stop', required: get_option('nvmm'))
-+ if cc.has_header_symbol('nvmm.h', 'nvmm_vcpu_stop', required: get_option('nvmm'))
- nvmm = cc.find_library('nvmm', required: get_option('nvmm'))
+- nvmm = cc.find_library('nvmm', required: get_option('nvmm'))
+- endif
++ nvmm = cc.find_library('nvmm', required: get_option('nvmm'))
+ if nvmm.found()
+ accelerators += 'CONFIG_NVMM'
endif
- if nvmm.found()
-@@ -613,7 +613,7 @@ if have_system and not get_option('curse
+@@ -613,7 +611,7 @@ if have_system and not get_option('curse
has_curses_h = cc.has_header('curses.h', args: curses_compile_args)
endif
if has_curses_h
@@ -25,7 +27,7 @@
foreach curses_libname : curses_libname_list
libcurses = cc.find_library(curses_libname,
required: false,
-@@ -631,7 +631,7 @@ if have_system and not get_option('curse
+@@ -631,7 +629,7 @@ if have_system and not get_option('curse
endif
endif
if not get_option('iconv').disabled()
diff -r ada2b3875f55 -r cd8acc1a1ff8 emulators/qemu/patches/patch-target_i386_nvmm_nvmm-all.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-target_i386_nvmm_nvmm-all.c Sun Sep 05 20:58:16 2021 +0000
@@ -0,0 +1,47 @@
+$NetBSD: patch-target_i386_nvmm_nvmm-all.c,v 1.4 2021/09/05 20:58:16 nia Exp $
+
+Re-add NetBSD 9 support.
+
+--- target/i386/nvmm/nvmm-all.c.orig 2021-08-24 17:35:41.000000000 +0000
++++ target/i386/nvmm/nvmm-all.c
+@@ -750,7 +750,11 @@ nvmm_vcpu_loop(CPUState *cpu)
+ nvmm_vcpu_pre_run(cpu);
+
+ if (qatomic_read(&cpu->exit_request)) {
++#if NVMM_USER_VERSION >= 2
+ nvmm_vcpu_stop(vcpu);
++#else
++ qemu_cpu_kick_self();
++#endif
+ }
+
+ /* Read exit_request before the kernel reads the immediate exit flag */
+@@ -767,6 +771,7 @@ nvmm_vcpu_loop(CPUState *cpu)
+ switch (exit->reason) {
+ case NVMM_VCPU_EXIT_NONE:
+ break;
++#if NVMM_USER_VERSION >= 2
+ case NVMM_VCPU_EXIT_STOPPED:
+ /*
+ * The kernel cleared the immediate exit flag; cpu->exit_request
+@@ -775,6 +780,7 @@ nvmm_vcpu_loop(CPUState *cpu)
+ smp_wmb();
+ qcpu->stop = true;
+ break;
++#endif
+ case NVMM_VCPU_EXIT_MEMORY:
+ ret = nvmm_handle_mem(mach, vcpu);
+ break;
+@@ -888,8 +894,12 @@ nvmm_ipi_signal(int sigcpu)
+ {
+ if (current_cpu) {
+ struct qemu_vcpu *qcpu = get_qemu_vcpu(current_cpu);
++#if NVMM_USER_VERSION >= 2
+ struct nvmm_vcpu *vcpu = &qcpu->vcpu;
+ nvmm_vcpu_stop(vcpu);
++#else
++ qcpu->stop = true;
++#endif
+ }
+ }
+
Home |
Main Index |
Thread Index |
Old Index