qemu: Add HAXM/NetBSD/amd64 support and fix NetBSD debug build Bump PKGREVISION.diff -r1.200 -r1.201 pkgsrc/emulators/qemu/Makefile
(kamil)
@@ -1,17 +1,17 @@ | @@ -1,17 +1,17 @@ | |||
1 | # $NetBSD: Makefile,v 1.200 2019/01/31 13:39:10 martin Exp $ | 1 | # $NetBSD: Makefile,v 1.201 2019/02/13 05:16:12 kamil Exp $ | |
2 | 2 | |||
3 | DISTNAME= qemu-3.1.0 | 3 | DISTNAME= qemu-3.1.0 | |
4 | PKGREVISION= 4 | 4 | PKGREVISION= 5 | |
5 | CATEGORIES= emulators | 5 | CATEGORIES= emulators | |
6 | MASTER_SITES= https://download.qemu.org/ | 6 | MASTER_SITES= https://download.qemu.org/ | |
7 | EXTRACT_SUFX= .tar.xz | 7 | EXTRACT_SUFX= .tar.xz | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= http://www.qemu-project.org/ | 10 | HOMEPAGE= http://www.qemu-project.org/ | |
11 | COMMENT= CPU emulator using dynamic translation | 11 | COMMENT= CPU emulator using dynamic translation | |
12 | LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd | 12 | LICENSE= gnu-gpl-v2 AND gnu-lgpl-v2.1 AND mit AND modified-bsd | |
13 | 13 | |||
14 | USE_CURSES= resize_term wide | 14 | USE_CURSES= resize_term wide | |
15 | USE_LANGUAGES+= c c++ | 15 | USE_LANGUAGES+= c c++ | |
16 | USE_TOOLS+= bison flex gmake makeinfo perl:build pkg-config | 16 | USE_TOOLS+= bison flex gmake makeinfo perl:build pkg-config | |
17 | FAKE_NCURSES= yes | 17 | FAKE_NCURSES= yes |
@@ -1,21 +1,26 @@ | @@ -1,21 +1,26 @@ | |||
1 | $NetBSD: distinfo,v 1.141 2019/01/31 13:39:10 martin Exp $ | 1 | $NetBSD: distinfo,v 1.142 2019/02/13 05:16:12 kamil Exp $ | |
2 | 2 | |||
3 | SHA1 (qemu-3.1.0.tar.xz) = 3ed63c0c05abc8c8ec075dac2688c229f139a5da | 3 | SHA1 (qemu-3.1.0.tar.xz) = 3ed63c0c05abc8c8ec075dac2688c229f139a5da | |
4 | RMD160 (qemu-3.1.0.tar.xz) = 7650d76b8578ee2c31cef048c7929b30c607b83d | 4 | RMD160 (qemu-3.1.0.tar.xz) = 7650d76b8578ee2c31cef048c7929b30c607b83d | |
5 | SHA512 (qemu-3.1.0.tar.xz) = 7e8dae823937cfac2f0c60406bd3bdcb89df40313dab2a4bed327d5198f7fcc68ac8b31e44692caa09299cc71256ee0b8c17e4f49f78ada8043d424f5daf82fe | 5 | SHA512 (qemu-3.1.0.tar.xz) = 7e8dae823937cfac2f0c60406bd3bdcb89df40313dab2a4bed327d5198f7fcc68ac8b31e44692caa09299cc71256ee0b8c17e4f49f78ada8043d424f5daf82fe | |
6 | Size (qemu-3.1.0.tar.xz) = 36070104 bytes | 6 | Size (qemu-3.1.0.tar.xz) = 36070104 bytes | |
7 | SHA1 (patch-Makefile) = b3899fb8d0dd2f29bf3edd843836612e6e6c019c | 7 | SHA1 (patch-Makefile) = b3899fb8d0dd2f29bf3edd843836612e6e6c019c | |
8 | SHA1 (patch-audio_audio.c) = 98a1de2fd48638886b5d16f6a61dc72910e98b41 | 8 | SHA1 (patch-audio_audio.c) = 98a1de2fd48638886b5d16f6a61dc72910e98b41 | |
9 | SHA1 (patch-block.c) = 5eb15a87d6646719bf1e9277fbe73a99e4905481 | 9 | SHA1 (patch-block.c) = 5eb15a87d6646719bf1e9277fbe73a99e4905481 | |
10 | SHA1 (patch-configure) = eb720300f48392da936773f003d8fc4d5aedea1f | |||
10 | SHA1 (patch-contrib_ivshmem-client_ivshmem-client.c) = 40c8751607cbf66a37e4c4e08f2664b864e2e984 | 11 | SHA1 (patch-contrib_ivshmem-client_ivshmem-client.c) = 40c8751607cbf66a37e4c4e08f2664b864e2e984 | |
11 | SHA1 (patch-contrib_ivshmem-server_ivshmem-server.c) = d8f53432b5752f4263dc4ef96108a976a05147a3 | 12 | SHA1 (patch-contrib_ivshmem-server_ivshmem-server.c) = d8f53432b5752f4263dc4ef96108a976a05147a3 | |
12 | SHA1 (patch-hw_arm_boot.c) = bd28e4b8e8732a2b01ba1d0e8a727e8e7bc5227a | 13 | SHA1 (patch-hw_arm_boot.c) = bd28e4b8e8732a2b01ba1d0e8a727e8e7bc5227a | |
13 | SHA1 (patch-hw_core_loader.c) = 06ff8bfa5be720e428668987598d55b6799202e7 | 14 | SHA1 (patch-hw_core_loader.c) = 06ff8bfa5be720e428668987598d55b6799202e7 | |
14 | SHA1 (patch-hw_core_uboot__image.h) = 26a656310d991747b7080b9f28042afd536e4c28 | 15 | SHA1 (patch-hw_core_uboot__image.h) = 26a656310d991747b7080b9f28042afd536e4c28 | |
15 | SHA1 (patch-hw_display_omap__dss.c) = 6b13242f28e32346bc70548c216c578d98fd3420 | 16 | SHA1 (patch-hw_display_omap__dss.c) = 6b13242f28e32346bc70548c216c578d98fd3420 | |
16 | SHA1 (patch-hw_net_etraxfs__eth.c) = e5dd1661d60dbcd27b332403e0843500ba9544bc | 17 | SHA1 (patch-hw_net_etraxfs__eth.c) = e5dd1661d60dbcd27b332403e0843500ba9544bc | |
17 | SHA1 (patch-hw_net_xilinx__axienet.c) = ebcd2676d64ce6f31e4a8c976d4fdf530ad5e8b7 | 18 | SHA1 (patch-hw_net_xilinx__axienet.c) = ebcd2676d64ce6f31e4a8c976d4fdf530ad5e8b7 | |
18 | SHA1 (patch-hw_usb_dev-mtp.c) = 66543b5559d92f8e2fa9a6eb85e5dfe7c1ad3339 | 19 | SHA1 (patch-hw_usb_dev-mtp.c) = 66543b5559d92f8e2fa9a6eb85e5dfe7c1ad3339 | |
20 | SHA1 (patch-include_sysemu_kvm.h) = f99e8ad021f6c8e89e3ca52538bd9b0656e6f619 | |||
19 | SHA1 (patch-target_arm_cpu.h) = 0f70a35900c7cc3124dc11969643e0eef6ad6af5 | 21 | SHA1 (patch-target_arm_cpu.h) = 0f70a35900c7cc3124dc11969643e0eef6ad6af5 | |
20 | SHA1 (patch-target_arm_helper.c) = 08f9425422080442a2c90bb252423bab38651ae4 | 22 | SHA1 (patch-target_arm_helper.c) = 08f9425422080442a2c90bb252423bab38651ae4 | |
23 | SHA1 (patch-target_i386_Makefile.objs) = bf6e641f44abead5c1909c43681c2b8ea97f31a0 | |||
24 | SHA1 (patch-target_i386_hax-i386.h) = 040f5c4df532a027bb3d7305c7d924e1bd8fd831 | |||
25 | SHA1 (patch-target_i386_kvm-stub.c) = 4cd2b7a8d8d8a317829f982b5acff7fdf2479d9f | |||
21 | SHA1 (patch-tests_Makefile.include) = 42345d697cb2e324dccf1d68bd8d61e8001c6162 | 26 | SHA1 (patch-tests_Makefile.include) = 42345d697cb2e324dccf1d68bd8d61e8001c6162 |
$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"
$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);
$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
$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
$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)