pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/emulators/qemu qemu: Add HAXM/NetBSD/amd64 support and...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f41a11146540
branches:  trunk
changeset: 329636:f41a11146540
user:      kamil <kamil%pkgsrc.org@localhost>
date:      Wed Feb 13 05:16:12 2019 +0000

description:
qemu: Add HAXM/NetBSD/amd64 support and fix NetBSD debug build

Bump PKGREVISION.

diffstat:

 emulators/qemu/Makefile                                |   4 +-
 emulators/qemu/distinfo                                |   7 ++++-
 emulators/qemu/patches/patch-configure                 |  14 +++++++++
 emulators/qemu/patches/patch-include_sysemu_kvm.h      |  23 +++++++++++++++
 emulators/qemu/patches/patch-target_i386_Makefile.objs |  20 +++++++++++++
 emulators/qemu/patches/patch-target_i386_hax-i386.h    |  26 ++++++++++++++++++
 emulators/qemu/patches/patch-target_i386_kvm-stub.c    |  23 +++++++++++++++
 7 files changed, 114 insertions(+), 3 deletions(-)

diffs (167 lines):

diff -r 650fdf97b172 -r f41a11146540 emulators/qemu/Makefile
--- a/emulators/qemu/Makefile   Wed Feb 13 03:45:29 2019 +0000
+++ b/emulators/qemu/Makefile   Wed Feb 13 05:16:12 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.200 2019/01/31 13:39:10 martin Exp $
+# $NetBSD: Makefile,v 1.201 2019/02/13 05:16:12 kamil Exp $
 
 DISTNAME=      qemu-3.1.0
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    emulators
 MASTER_SITES=  https://download.qemu.org/
 EXTRACT_SUFX=  .tar.xz
diff -r 650fdf97b172 -r f41a11146540 emulators/qemu/distinfo
--- a/emulators/qemu/distinfo   Wed Feb 13 03:45:29 2019 +0000
+++ b/emulators/qemu/distinfo   Wed Feb 13 05:16:12 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.141 2019/01/31 13:39:10 martin Exp $
+$NetBSD: distinfo,v 1.142 2019/02/13 05:16:12 kamil Exp $
 
 SHA1 (qemu-3.1.0.tar.xz) = 3ed63c0c05abc8c8ec075dac2688c229f139a5da
 RMD160 (qemu-3.1.0.tar.xz) = 7650d76b8578ee2c31cef048c7929b30c607b83d
@@ -7,6 +7,7 @@
 SHA1 (patch-Makefile) = b3899fb8d0dd2f29bf3edd843836612e6e6c019c
 SHA1 (patch-audio_audio.c) = 98a1de2fd48638886b5d16f6a61dc72910e98b41
 SHA1 (patch-block.c) = 5eb15a87d6646719bf1e9277fbe73a99e4905481
+SHA1 (patch-configure) = eb720300f48392da936773f003d8fc4d5aedea1f
 SHA1 (patch-contrib_ivshmem-client_ivshmem-client.c) = 40c8751607cbf66a37e4c4e08f2664b864e2e984
 SHA1 (patch-contrib_ivshmem-server_ivshmem-server.c) = d8f53432b5752f4263dc4ef96108a976a05147a3
 SHA1 (patch-hw_arm_boot.c) = bd28e4b8e8732a2b01ba1d0e8a727e8e7bc5227a
@@ -16,6 +17,10 @@
 SHA1 (patch-hw_net_etraxfs__eth.c) = e5dd1661d60dbcd27b332403e0843500ba9544bc
 SHA1 (patch-hw_net_xilinx__axienet.c) = ebcd2676d64ce6f31e4a8c976d4fdf530ad5e8b7
 SHA1 (patch-hw_usb_dev-mtp.c) = 66543b5559d92f8e2fa9a6eb85e5dfe7c1ad3339
+SHA1 (patch-include_sysemu_kvm.h) = f99e8ad021f6c8e89e3ca52538bd9b0656e6f619
 SHA1 (patch-target_arm_cpu.h) = 0f70a35900c7cc3124dc11969643e0eef6ad6af5
 SHA1 (patch-target_arm_helper.c) = 08f9425422080442a2c90bb252423bab38651ae4
+SHA1 (patch-target_i386_Makefile.objs) = bf6e641f44abead5c1909c43681c2b8ea97f31a0
+SHA1 (patch-target_i386_hax-i386.h) = 040f5c4df532a027bb3d7305c7d924e1bd8fd831
+SHA1 (patch-target_i386_kvm-stub.c) = 4cd2b7a8d8d8a317829f982b5acff7fdf2479d9f
 SHA1 (patch-tests_Makefile.include) = 42345d697cb2e324dccf1d68bd8d61e8001c6162
diff -r 650fdf97b172 -r f41a11146540 emulators/qemu/patches/patch-configure
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-configure    Wed Feb 13 05:16:12 2019 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-configure,v 1.24 2019/02/13 05:16:12 kamil Exp $
+
+configure: Add HAX support in NetBSD
+
+--- configure.orig     2018-12-11 17:44:34.000000000 +0000
++++ configure
+@@ -809,6 +809,7 @@ DragonFly)
+ ;;
+ NetBSD)
+   bsd="yes"
++  hax="yes"
+   make="${MAKE-gmake}"
+   audio_drv_list="oss"
+   audio_possible_drivers="oss sdl"
diff -r 650fdf97b172 -r f41a11146540 emulators/qemu/patches/patch-include_sysemu_kvm.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-include_sysemu_kvm.h Wed Feb 13 05:16:12 2019 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-include_sysemu_kvm.h,v 1.1 2019/02/13 05:16:12 kamil Exp $
+
+Fix debug build on NetBSD (without Linux-KVM).
+
+--- include/sysemu/kvm.h.orig  2019-02-02 13:14:03.877852089 +0000
++++ include/sysemu/kvm.h
+@@ -459,8 +459,16 @@ int kvm_vm_check_extension(KVMState *s, 
+         kvm_vcpu_ioctl(cpu, KVM_ENABLE_CAP, &cap);                   \
+     })
+ 
++#ifdef CONFIG_KVM
+ uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function,
+                                       uint32_t index, int reg);
++#else
++#define kvm_arch_get_supported_cpuid(a,b,c,d)                        \
++    ({                                                               \
++        abort();                                                     \
++        0;                                                           \
++    })
++#endif
+ uint32_t kvm_arch_get_supported_msr_feature(KVMState *s, uint32_t index);
+ 
+ 
diff -r 650fdf97b172 -r f41a11146540 emulators/qemu/patches/patch-target_i386_Makefile.objs
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-target_i386_Makefile.objs    Wed Feb 13 05:16:12 2019 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-target_i386_Makefile.objs,v 1.1 2019/02/13 05:16:12 kamil Exp $
+
+Cherry-pick:
+ - hax: Support for Linux hosts [modified for pkgsrc]
+   b65cc8dec07fec77dbda7bc5daf1defcb7c411d9
+
+--- target/i386/Makefile.objs.orig     2018-12-11 17:44:34.000000000 +0000
++++ target/i386/Makefile.objs
+@@ -12,8 +12,10 @@ obj-$(call lnot,$(CONFIG_HYPERV)) += hyp
+ ifeq ($(CONFIG_WIN32),y)
+ obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-windows.o
+ endif
+-ifeq ($(CONFIG_DARWIN),y)
++ifeq ($(CONFIG_POSIX),y)
+ obj-$(CONFIG_HAX) += hax-all.o hax-mem.o hax-darwin.o
++endif
++ifeq ($(CONFIG_DARWIN),y)
+ obj-$(CONFIG_HVF) += hvf/
+ endif
+ obj-$(CONFIG_WHPX) += whpx-all.o
diff -r 650fdf97b172 -r f41a11146540 emulators/qemu/patches/patch-target_i386_hax-i386.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-target_i386_hax-i386.h       Wed Feb 13 05:16:12 2019 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-target_i386_hax-i386.h,v 1.1 2019/02/13 05:16:12 kamil Exp $
+
+Cherry-pick:
+ - hax: Support for Linux hosts [modified for pkgsrc]
+   b65cc8dec07fec77dbda7bc5daf1defcb7c411d9
+
+--- target/i386/hax-i386.h.orig        2018-12-11 17:44:34.000000000 +0000
++++ target/i386/hax-i386.h
+@@ -16,7 +16,7 @@
+ #include "cpu.h"
+ #include "sysemu/hax.h"
+ 
+-#ifdef CONFIG_DARWIN
++#ifdef CONFIG_POSIX
+ typedef int hax_fd;
+ #endif
+ 
+@@ -82,7 +82,7 @@ hax_fd hax_mod_open(void);
+ void hax_memory_init(void);
+ 
+ 
+-#ifdef CONFIG_DARWIN
++#ifdef CONFIG_POSIX
+ #include "target/i386/hax-darwin.h"
+ #endif
+ 
diff -r 650fdf97b172 -r f41a11146540 emulators/qemu/patches/patch-target_i386_kvm-stub.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-target_i386_kvm-stub.c       Wed Feb 13 05:16:12 2019 +0000
@@ -0,0 +1,23 @@
+$NetBSD: patch-target_i386_kvm-stub.c,v 1.1 2019/02/13 05:16:12 kamil Exp $
+
+Fix debug build on NetBSD (without Linux-KVM).
+
+--- target/i386/kvm-stub.c.orig        2019-02-02 13:12:09.564671574 +0000
++++ target/i386/kvm-stub.c
+@@ -29,16 +29,6 @@ bool kvm_enable_x2apic(void)
+ {
+     return false;
+ }
+-
+-/* This function is only called inside conditionals which we
+- * rely on the compiler to optimize out when CONFIG_KVM is not
+- * defined.
+- */
+-uint32_t kvm_arch_get_supported_cpuid(KVMState *env, uint32_t function,
+-                                      uint32_t index, int reg)
+-{
+-    abort();
+-}
+ #endif
+ 
+ bool kvm_hv_vpindex_settable(void)



Home | Main Index | Thread Index | Old Index