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:   reinoud
Date:           Wed Mar 31 08:52:27 UTC 2021

Modified Files:
        pkgsrc/emulators/qemu: Makefile distinfo
        pkgsrc/emulators/qemu/patches: patch-target_i386_nvmm_all.c

Log Message:
Add support for the enhanced NVMM found in -current


To generate a diff of this commit:
cvs rdiff -u -r1.268 -r1.269 pkgsrc/emulators/qemu/Makefile
cvs rdiff -u -r1.175 -r1.176 pkgsrc/emulators/qemu/distinfo
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/emulators/qemu/patches/patch-target_i386_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.268 pkgsrc/emulators/qemu/Makefile:1.269
--- pkgsrc/emulators/qemu/Makefile:1.268        Fri Mar 19 13:24:15 2021
+++ pkgsrc/emulators/qemu/Makefile      Wed Mar 31 08:52:27 2021
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.268 2021/03/19 13:24:15 reinoud Exp $
+# $NetBSD: Makefile,v 1.269 2021/03/31 08:52:27 reinoud Exp $
 
 DISTNAME=      qemu-5.2.0
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    emulators
 MASTER_SITES=  https://download.qemu.org/
 EXTRACT_SUFX=  .tar.xz

Index: pkgsrc/emulators/qemu/distinfo
diff -u pkgsrc/emulators/qemu/distinfo:1.175 pkgsrc/emulators/qemu/distinfo:1.176
--- pkgsrc/emulators/qemu/distinfo:1.175        Fri Mar 19 13:25:36 2021
+++ pkgsrc/emulators/qemu/distinfo      Wed Mar 31 08:52:27 2021
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.175 2021/03/19 13:25:36 reinoud Exp $
+$NetBSD: distinfo,v 1.176 2021/03/31 08:52:27 reinoud Exp $
 
 SHA1 (palcode-clipper) = e25ae10a10e0801e47b62b9ee2d10c8ccb4ee940
 RMD160 (palcode-clipper) = a637f1cc38dabfdff36e3f02b6dd02d7c63cb8db
@@ -49,7 +49,7 @@ SHA1 (patch-roms_u-boot_tools_imx8m__ima
 SHA1 (patch-target_i386_helper.c) = 3314e65df11492438af2ec2c53ed3082a0b62b09
 SHA1 (patch-target_i386_kvm-stub.c) = 4cd2b7a8d8d8a317829f982b5acff7fdf2479d9f
 SHA1 (patch-target_i386_meson.build) = d0e0d7d4dd96ea43fc386e7166bbabbd71b0f4fc
-SHA1 (patch-target_i386_nvmm_all.c) = dd22747aa0b94bc371303fc865d523d3623ec043
+SHA1 (patch-target_i386_nvmm_all.c) = 9a6d85eb650b260dc33d63caee4bcd0e1f4cb49c
 SHA1 (patch-target_i386_nvmm_cpus.c) = 7f028bf2637fe31d8524f710a9e508c8ce65c822
 SHA1 (patch-target_i386_nvmm_cpus.h) = 0a25e49929cb772fc46a4ace91127ccf3605521d
 SHA1 (patch-target_sparc_translate.c) = 7ec2add2fd808facb48b9a66ccc345599251bf76

Index: pkgsrc/emulators/qemu/patches/patch-target_i386_nvmm_all.c
diff -u pkgsrc/emulators/qemu/patches/patch-target_i386_nvmm_all.c:1.1 pkgsrc/emulators/qemu/patches/patch-target_i386_nvmm_all.c:1.2
--- pkgsrc/emulators/qemu/patches/patch-target_i386_nvmm_all.c:1.1      Sat Mar  6 11:19:34 2021
+++ pkgsrc/emulators/qemu/patches/patch-target_i386_nvmm_all.c  Wed Mar 31 08:52:27 2021
@@ -1,8 +1,8 @@
-$NetBSD: patch-target_i386_nvmm_all.c,v 1.1 2021/03/06 11:19:34 reinoud Exp $
+$NetBSD: patch-target_i386_nvmm_all.c,v 1.2 2021/03/31 08:52:27 reinoud Exp $
 
---- target/i386/nvmm-all.c.orig        2021-03-05 20:20:34.189784289 +0000
+--- target/i386/nvmm-all.c.orig        2021-03-29 12:28:50.237420268 +0000
 +++ target/i386/nvmm-all.c
-@@ -0,0 +1,1216 @@
+@@ -0,0 +1,1234 @@
 +/*
 + * Copyright (c) 2018-2019 Maxime Villard, All rights reserved.
 + *
@@ -756,7 +756,11 @@ $NetBSD: patch-target_i386_nvmm_all.c,v 
 +        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
 +        }
 +
 +        ret = nvmm_vcpu_run(mach, vcpu);
@@ -771,6 +775,11 @@ $NetBSD: patch-target_i386_nvmm_all.c,v 
 +        switch (exit->reason) {
 +        case NVMM_VCPU_EXIT_NONE:
 +            break;
++#if NVMM_USER_VERSION >= 2
++        case NVMM_VCPU_EXIT_STOPPED:
++            qcpu->stop = true;
++            break;
++#endif
 +        case NVMM_VCPU_EXIT_MEMORY:
 +            ret = nvmm_handle_mem(mach, vcpu);
 +            break;
@@ -875,6 +884,7 @@ $NetBSD: patch-target_i386_nvmm_all.c,v 
 +
 +static Error *nvmm_migration_blocker;
 +
++#if NVMM_USER_VERSION == 1
 +static void
 +nvmm_ipi_signal(int sigcpu)
 +{
@@ -885,10 +895,12 @@ $NetBSD: patch-target_i386_nvmm_all.c,v 
 +        qcpu->stop = true;
 +    }
 +}
++#endif
 +
 +static void
 +nvmm_init_cpu_signals(void)
 +{
++#if NVMM_USER_VERSION == 1
 +    struct sigaction sigact;
 +    sigset_t set;
 +
@@ -901,6 +913,12 @@ $NetBSD: patch-target_i386_nvmm_all.c,v 
 +    sigprocmask(SIG_BLOCK, NULL, &set);
 +    sigdelset(&set, SIG_IPI);
 +    pthread_sigmask(SIG_SETMASK, &set, NULL);
++#else
++    /*
++     * We use the nvmm_vcpu_stop() mechanism, and don't use signals.
++     * Nothing to do.
++     */
++#endif
 +}
 +
 +int
@@ -1166,7 +1184,7 @@ $NetBSD: patch-target_i386_nvmm_all.c,v 
 +        error_report("NVMM: Unable to fetch capability, error=%d", errno);
 +        return -err;
 +    }
-+    if (qemu_mach.cap.version != 1) {
++    if (qemu_mach.cap.version < NVMM_KERN_VERSION) {
 +        error_report("NVMM: Unsupported version %u", qemu_mach.cap.version);
 +        return -EPROGMISMATCH;
 +    }



Home | Main Index | Thread Index | Old Index