diff options
author | kamil <kamil@pkgsrc.org> | 2019-02-13 05:16:12 +0000 |
---|---|---|
committer | kamil <kamil@pkgsrc.org> | 2019-02-13 05:16:12 +0000 |
commit | 40b12367c5bd45f1c8abedc2a22203193af0ae25 (patch) | |
tree | 29fb8c6e31825f80dde762971405916900be7d0d /emulators | |
parent | bb328be275e2978b55f7148cc5c5a5a510fd4b0c (diff) | |
download | pkgsrc-40b12367c5bd45f1c8abedc2a22203193af0ae25.tar.gz |
qemu: Add HAXM/NetBSD/amd64 support and fix NetBSD debug build
Bump PKGREVISION.
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/qemu/Makefile | 4 | ||||
-rw-r--r-- | emulators/qemu/distinfo | 7 | ||||
-rw-r--r-- | emulators/qemu/patches/patch-configure | 14 | ||||
-rw-r--r-- | emulators/qemu/patches/patch-include_sysemu_kvm.h | 23 | ||||
-rw-r--r-- | emulators/qemu/patches/patch-target_i386_Makefile.objs | 20 | ||||
-rw-r--r-- | emulators/qemu/patches/patch-target_i386_hax-i386.h | 26 | ||||
-rw-r--r-- | emulators/qemu/patches/patch-target_i386_kvm-stub.c | 23 |
7 files changed, 114 insertions, 3 deletions
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile index 05af921ac39..dce8a4574d3 100644 --- a/emulators/qemu/Makefile +++ b/emulators/qemu/Makefile @@ -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 --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo index eb0d8396c18..28218dda641 100644 --- a/emulators/qemu/distinfo +++ b/emulators/qemu/distinfo @@ -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 @@ Size (qemu-3.1.0.tar.xz) = 36070104 bytes 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_display_omap__dss.c) = 6b13242f28e32346bc70548c216c578d98fd3420 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 --git a/emulators/qemu/patches/patch-configure b/emulators/qemu/patches/patch-configure new file mode 100644 index 00000000000..fac18d335e0 --- /dev/null +++ b/emulators/qemu/patches/patch-configure @@ -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 --git a/emulators/qemu/patches/patch-include_sysemu_kvm.h b/emulators/qemu/patches/patch-include_sysemu_kvm.h new file mode 100644 index 00000000000..12d33a4aa10 --- /dev/null +++ b/emulators/qemu/patches/patch-include_sysemu_kvm.h @@ -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 --git a/emulators/qemu/patches/patch-target_i386_Makefile.objs b/emulators/qemu/patches/patch-target_i386_Makefile.objs new file mode 100644 index 00000000000..13da315cd27 --- /dev/null +++ b/emulators/qemu/patches/patch-target_i386_Makefile.objs @@ -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 --git a/emulators/qemu/patches/patch-target_i386_hax-i386.h b/emulators/qemu/patches/patch-target_i386_hax-i386.h new file mode 100644 index 00000000000..3578999af4b --- /dev/null +++ b/emulators/qemu/patches/patch-target_i386_hax-i386.h @@ -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 --git a/emulators/qemu/patches/patch-target_i386_kvm-stub.c b/emulators/qemu/patches/patch-target_i386_kvm-stub.c new file mode 100644 index 00000000000..0b551728c5b --- /dev/null +++ b/emulators/qemu/patches/patch-target_i386_kvm-stub.c @@ -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) |