pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/emulators/qemu



Module Name:    pkgsrc
Committed By:   nia
Date:           Sun Sep  5 20:58:17 UTC 2021

Modified Files:
        pkgsrc/emulators/qemu: Makefile distinfo
        pkgsrc/emulators/qemu/patches: patch-meson.build
Added Files:
        pkgsrc/emulators/qemu/patches: patch-target_i386_nvmm_nvmm-all.c

Log Message:
qemu: Re-add NetBSD 9 NVMM support.


To generate a diff of this commit:
cvs rdiff -u -r1.284 -r1.285 pkgsrc/emulators/qemu/Makefile
cvs rdiff -u -r1.183 -r1.184 pkgsrc/emulators/qemu/distinfo
cvs rdiff -u -r1.8 -r1.9 pkgsrc/emulators/qemu/patches/patch-meson.build
cvs rdiff -u -r0 -r1.4 \
    pkgsrc/emulators/qemu/patches/patch-target_i386_nvmm_nvmm-all.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/emulators/qemu/Makefile
diff -u pkgsrc/emulators/qemu/Makefile:1.284 pkgsrc/emulators/qemu/Makefile:1.285
--- pkgsrc/emulators/qemu/Makefile:1.284        Sun Aug 29 01:53:06 2021
+++ pkgsrc/emulators/qemu/Makefile      Sun Sep  5 20:58:16 2021
@@ -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

Index: pkgsrc/emulators/qemu/distinfo
diff -u pkgsrc/emulators/qemu/distinfo:1.183 pkgsrc/emulators/qemu/distinfo:1.184
--- pkgsrc/emulators/qemu/distinfo:1.183        Fri Aug 27 03:32:37 2021
+++ pkgsrc/emulators/qemu/distinfo      Sun Sep  5 20:58:16 2021
@@ -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_rtc_mc146818rtc.c) = cc7a
 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

Index: pkgsrc/emulators/qemu/patches/patch-meson.build
diff -u pkgsrc/emulators/qemu/patches/patch-meson.build:1.8 pkgsrc/emulators/qemu/patches/patch-meson.build:1.9
--- pkgsrc/emulators/qemu/patches/patch-meson.build:1.8 Fri Aug 27 03:32:37 2021
+++ pkgsrc/emulators/qemu/patches/patch-meson.build     Sun Sep  5 20:58:16 2021
@@ -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'))
-   endif
+-    nvmm = cc.find_library('nvmm', required: get_option('nvmm'))
+-  endif
++  nvmm = cc.find_library('nvmm', required: get_option('nvmm'))
    if nvmm.found()
-@@ -613,7 +613,7 @@ if have_system and not get_option('curse
+     accelerators += 'CONFIG_NVMM'
+   endif
+@@ -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 @@ $NetBSD: patch-meson.build,v 1.8 2021/08
        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()

Added files:

Index: pkgsrc/emulators/qemu/patches/patch-target_i386_nvmm_nvmm-all.c
diff -u /dev/null pkgsrc/emulators/qemu/patches/patch-target_i386_nvmm_nvmm-all.c:1.4
--- /dev/null   Sun Sep  5 20:58:17 2021
+++ pkgsrc/emulators/qemu/patches/patch-target_i386_nvmm_nvmm-all.c     Sun Sep  5 20:58:16 2021
@@ -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