diff options
author | leot <leot@pkgsrc.org> | 2022-06-12 13:49:28 +0000 |
---|---|---|
committer | leot <leot@pkgsrc.org> | 2022-06-12 13:49:28 +0000 |
commit | 2ab08e93ac5d524e7fdb25779d644c3d31d3826f (patch) | |
tree | 51c64eaa47b1676847645786d3e9bf8eb17369c4 /emulators | |
parent | 403961bbc80d765116128da96c8fb21f230cf05e (diff) | |
download | pkgsrc-2ab08e93ac5d524e7fdb25779d644c3d31d3826f.tar.gz |
qemu: Permit to use `-cpu host' with NVMM
PKGREVISION++
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/qemu/Makefile | 3 | ||||
-rw-r--r-- | emulators/qemu/distinfo | 4 | ||||
-rw-r--r-- | emulators/qemu/patches/patch-target_i386_cpu.c | 33 | ||||
-rw-r--r-- | emulators/qemu/patches/patch-target_i386_meson.build | 14 |
4 files changed, 52 insertions, 2 deletions
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile index 50e086da6f2..584d95ff322 100644 --- a/emulators/qemu/Makefile +++ b/emulators/qemu/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.295 2022/05/19 16:10:15 ryoon Exp $ +# $NetBSD: Makefile,v 1.296 2022/06/12 13:49:28 leot Exp $ DISTNAME= qemu-7.0.0 +PKGREVISION= 1 CATEGORIES= emulators MASTER_SITES= https://download.qemu.org/ EXTRACT_SUFX= .tar.xz diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo index 3e2c7f900e4..0bbab85d98c 100644 --- a/emulators/qemu/distinfo +++ b/emulators/qemu/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.192 2022/06/11 10:13:05 bsiegert Exp $ +$NetBSD: distinfo,v 1.193 2022/06/12 13:49:28 leot Exp $ BLAKE2s (palcode-clipper-qemu-5.2.0nb8) = d388c896a80c1cc3d4785c8434d6688bbcfd54c28f7252ce550ab162a0bba321 SHA512 (palcode-clipper-qemu-5.2.0nb8) = 33695d6001d86a19793a92d5e31775607c4dfc9ab9eea019ea6c4d543a2e11e8c07f83cca4934811a13ef829b528737ea37d9d2aaf66cba6f2746d44d2aa0b43 @@ -22,4 +22,6 @@ SHA1 (patch-meson.build) = 67fcc428b1953a63e4c0aa32ac1d41ec234a2462 SHA1 (patch-net_tap-solaris.c) = cc953c9a624dd55ace4e130d0b31bbfb956c17d5 SHA1 (patch-roms_u-boot-sam460ex_Makefile) = 3a1bbf19b1422c10ebdd819eb0b711fafc78e2f2 SHA1 (patch-slirp_src_tcp__subr.c) = bd6d80ecf3baeaf6f8458b2361bcb92298d41f7e +SHA1 (patch-target_i386_cpu.c) = ec53954cbf0458d6974d87fa30951876ee0a6d3a +SHA1 (patch-target_i386_meson.build) = 0ef0636dd68e5eeb9a2a34473e2a24bf3c141c0f SHA1 (patch-target_sparc_translate.c) = 7ec2add2fd808facb48b9a66ccc345599251bf76 diff --git a/emulators/qemu/patches/patch-target_i386_cpu.c b/emulators/qemu/patches/patch-target_i386_cpu.c new file mode 100644 index 00000000000..5dfcc2dde40 --- /dev/null +++ b/emulators/qemu/patches/patch-target_i386_cpu.c @@ -0,0 +1,33 @@ +$NetBSD: patch-target_i386_cpu.c,v 1.1 2022/06/12 13:49:28 leot Exp $ + +Permit to use `-cpu host' with NVMM. + +--- target/i386/cpu.c.orig 2022-04-19 19:10:27.000000000 +0000 ++++ target/i386/cpu.c +@@ -26,6 +26,7 @@ + #include "tcg/helper-tcg.h" + #include "sysemu/reset.h" + #include "sysemu/hvf.h" ++#include "sysemu/nvmm.h" + #include "kvm/kvm_i386.h" + #include "sev.h" + #include "qapi/error.h" +@@ -1440,7 +1441,7 @@ static uint32_t xsave_area_size(uint64_t + + static inline bool accel_uses_host_cpuid(void) + { +- return kvm_enabled() || hvf_enabled(); ++ return kvm_enabled() || hvf_enabled() || nvmm_enabled(); + } + + static inline uint64_t x86_cpu_xsave_components(X86CPU *cpu) +@@ -6418,7 +6419,8 @@ static void x86_cpu_realizefn(DeviceStat + + if (xcc->host_cpuid_required && !accel_uses_host_cpuid()) { + g_autofree char *name = x86_cpu_class_get_model_name(xcc); +- error_setg(&local_err, "CPU model '%s' requires KVM or HVF", name); ++ error_setg(&local_err, ++ "CPU model '%s' requires KVM or HVF or NVMM", name); + goto out; + } + diff --git a/emulators/qemu/patches/patch-target_i386_meson.build b/emulators/qemu/patches/patch-target_i386_meson.build new file mode 100644 index 00000000000..88e48f58256 --- /dev/null +++ b/emulators/qemu/patches/patch-target_i386_meson.build @@ -0,0 +1,14 @@ +$NetBSD: patch-target_i386_meson.build,v 1.4 2022/06/12 13:49:28 leot Exp $ + +Permit to use `-cpu host' with NVMM. + +--- target/i386/meson.build.orig 2022-04-19 19:10:27.000000000 +0000 ++++ target/i386/meson.build +@@ -11,6 +11,7 @@ i386_ss.add(when: 'CONFIG_SEV', if_true: + # x86 cpu type + i386_ss.add(when: 'CONFIG_KVM', if_true: files('host-cpu.c')) + i386_ss.add(when: 'CONFIG_HVF', if_true: files('host-cpu.c')) ++i386_ss.add(when: 'CONFIG_NVMM', if_true: files('host-cpu.c')) + + i386_softmmu_ss = ss.source_set() + i386_softmmu_ss.add(files( |