Update to 4.0.0

Changelog:
Incompatible changes

    The "handle" option to -fsdev and -virtfs has been removed. The "local" or "proxy" options should be used instead.
    The "-virtioconsole" option has been removed. Use "-device virtconsole" instead.
    The "-no-frame" option has been removed. It was only usable with SDL1.2, and support for this library has been suspended now.
    The "-enable-hax" option has been removed. Use "-accel hax" instead.
    The "-clock" option has been removed. It was only a "dummy" option without meaning since QEMU 1.7, so there is no replacement.
    The legacy "ivshmem" device has been removed. Use "ivshmem-doorbell" or "ivshmem-plain" instead.
    The x86 machine types "pc-0.10" and "pc-0.11" have been removed. Use a newer machine type instead.
    The "irq" property of the "spapr-vscsi", "spapr-vlan" and "spapr-vty" devices has been removed with no replacement.
    The "memory-backend-memfd" backend object type will be reported as unavailable on hosts systems without memfd sealing support. On previous versions, "memory-backend-memfd" was reported as available, but didn't work properly without sealing support.
    HMP snapshot commands (such as "savevm", "loadvm" and "delvm") use only the snapshot tag, and not the ID any more, to identify snapshots. This removes ambiguity from the interface, but may require changing the HMP command in existing scripts.

New deprecated options and features

    cpu-add QMP/HMP command
    machine-types pc-0.12, pc-0.13, pc-0.14 and pc-0.15
    qemu-nbd --partition=N option
    The query-events QMP command has been superseded by the more powerful and accurate query-qmp-schema command.
    The acl option to the "-vnc" argument has been replaced by the tls-authz and sasl-authz options.
    The acl_show, acl_reset, acl_policy, acl_add, and acl_remove commands are deprecated with no replacement. Authorization for VNC should be performed using the pluggable QAuthZ objects.
    QEMU_AUDIO_ environment variables and "-audio-help" are now deprecated. Use "-audiodev" instead.

Consult the "Deprecated Features" appendix for the full list of historically deprecated features/options.

Architercture specific summary:
Arm

    Implement the ARMv8.0-SB extension
    Implement the ARMv8.0-PredInv extension
    Implement the ARMv8.1-HPD extension
    Implement the ARMv8.1-LOR extension (as the trivial "no limited ordering regions provided" minimum)
    Implement the ARMv8.2-FHM extension
    Implement the ARMv8.2-AA32HPD extension
    Implement the ARMv8.3-PAuth extension
    Implement the ARMv8.3-JSConv extension
    Implement the ARMv8.4-CondM extension
    Implement the ARMv8.5-CondM extension
    Implement the ARMv8.5-FRINT extension
    And new boards

MIPS

    Added support for I7200 CPU (nanoMIPS32 ISA + DSP ASE; system mode only).
    Added support for I6500 CPU (MIPS64R6 ISA + MSA ASE + multicore features).
    Added support for QMP-based querying of the available CPU types.
    Added support for SAARI and SAAR configuration registers.
    Added support for MTTCG (multi-threaded TCG).
    Improved support for ITU (Interthread Communication Unit).
    Improved support for Fulong 2E machine.
    Improved end user documentation.
    Fixed build for MIPS n32 hosts.

RISC-V

    The virt board now supports PCI and USB.
    The FS field of mstatus now supports three states (dirty, clean, and off).
    The TSR, TW, and TVM fields of mstatus are now implemented.
    The misa CSR is now writable.
    The built-in gdbserver supports register lists via XML files.
    The sifive_u machine supports SMP.
    The SiFive UART supports TX interrupts.
    The sifive_u machine has the correct number of PLIC interrupts.


x86

    The HAX accelerator is now supported for POSIX hosts other than Darwin, including Linux and NetBSD.
    Machines pc-* now support configuring firmware with -machine pflash0=ID0,pflash1=ID1 in addition to -drive if=pflash,... This permits use of -blockdev.
    MPX is considered a failed experiment by Intel, and has thus been removed from all named CPU models. It is still accessible via "-cpu host".
    PVH Linux images can be booted with "-kernel".
This commit is contained in:
ryoon 2019-04-24 13:59:32 +00:00
parent fd5d233353
commit 46baada16f
16 changed files with 79 additions and 258 deletions

View file

@ -1,7 +1,6 @@
# $NetBSD: Makefile,v 1.201 2019/02/13 05:16:12 kamil Exp $
# $NetBSD: Makefile,v 1.202 2019/04/24 13:59:32 ryoon Exp $
DISTNAME= qemu-3.1.0
PKGREVISION= 5
DISTNAME= qemu-4.0.0
CATEGORIES= emulators
MASTER_SITES= https://download.qemu.org/
EXTRACT_SUFX= .tar.xz

View file

@ -1,6 +1,5 @@
@comment $NetBSD: PLIST,v 1.55 2018/12/12 16:26:58 adam Exp $
${PLIST.ivshmem}bin/ivshmem-client
${PLIST.ivshmem}bin/ivshmem-server
@comment $NetBSD: PLIST,v 1.56 2019/04/24 13:59:32 ryoon Exp $
bin/elf2dmp
${PLIST.alpha}bin/qemu-alpha
${PLIST.arm}bin/qemu-arm
${PLIST.armeb}bin/qemu-armeb
@ -59,21 +58,18 @@ bin/qemu-system-xtensa
bin/qemu-system-xtensaeb
${PLIST.unicore32}bin/qemu-unicore32
${PLIST.x86_64}bin/qemu-x86_64
man/man1/qemu-img.1
man/man1/qemu.1
man/man7/qemu-block-drivers.7
man/man7/qemu-cpu-models.7
man/man7/qemu-ga-ref.7
man/man7/qemu-qmp-ref.7
man/man8/qemu-ga.8
man/man8/qemu-nbd.8
share/applications/qemu.desktop
share/doc/qemu/Makefile.multinode-NetBSD
share/doc/qemu/qemu-doc.html
share/doc/qemu/qemu-doc.txt
share/doc/qemu/qemu-ga-ref.html
share/doc/qemu/qemu-ga-ref.txt
share/doc/qemu/qemu-qmp-ref.html
share/doc/qemu/qemu-qmp-ref.txt
share/icons/hicolor/128x128/apps/qemu.png
share/icons/hicolor/16x16/apps/qemu.png
share/icons/hicolor/24x24/apps/qemu.png
share/icons/hicolor/256x256/apps/qemu.png
share/icons/hicolor/32x32/apps/qemu.bmp
share/icons/hicolor/32x32/apps/qemu.png
share/icons/hicolor/48x48/apps/qemu.png
share/icons/hicolor/512x512/apps/qemu.png
share/icons/hicolor/64x64/apps/qemu.png
share/icons/hicolor/scalable/apps/qemu.svg
${PLIST.gtk}share/locale/bg/LC_MESSAGES/qemu.mo
${PLIST.gtk}share/locale/de_DE/LC_MESSAGES/qemu.mo
${PLIST.gtk}share/locale/fr_FR/LC_MESSAGES/qemu.mo
@ -98,7 +94,6 @@ share/qemu/efi-vmxnet3.rom
share/qemu/hppa-firmware.img
share/qemu/keymaps/ar
share/qemu/keymaps/bepo
share/qemu/keymaps/common
share/qemu/keymaps/cz
share/qemu/keymaps/da
share/qemu/keymaps/de
@ -121,9 +116,7 @@ share/qemu/keymaps/ja
share/qemu/keymaps/lt
share/qemu/keymaps/lv
share/qemu/keymaps/mk
share/qemu/keymaps/modifiers
share/qemu/keymaps/nl
share/qemu/keymaps/nl-be
share/qemu/keymaps/no
share/qemu/keymaps/pl
share/qemu/keymaps/pt
@ -144,14 +137,13 @@ share/qemu/palcode-clipper
share/qemu/petalogix-ml605.dtb
share/qemu/petalogix-s3adsp1800.dtb
share/qemu/ppc_rom.bin
share/qemu/pvh.bin
share/qemu/pxe-e1000.rom
share/qemu/pxe-eepro100.rom
share/qemu/pxe-ne2k_pci.rom
share/qemu/pxe-pcnet.rom
share/qemu/pxe-rtl8139.rom
share/qemu/pxe-virtio.rom
share/qemu/qemu-icon.bmp
share/qemu/qemu_logo_no_text.svg
share/qemu/qemu_vga.ndrv
share/qemu/s390-ccw.img
share/qemu/s390-netboot.img

View file

@ -1,27 +1,21 @@
$NetBSD: distinfo,v 1.143 2019/02/13 14:08:42 jperkin Exp $
$NetBSD: distinfo,v 1.144 2019/04/24 13:59:32 ryoon Exp $
SHA1 (qemu-3.1.0.tar.xz) = 3ed63c0c05abc8c8ec075dac2688c229f139a5da
RMD160 (qemu-3.1.0.tar.xz) = 7650d76b8578ee2c31cef048c7929b30c607b83d
SHA512 (qemu-3.1.0.tar.xz) = 7e8dae823937cfac2f0c60406bd3bdcb89df40313dab2a4bed327d5198f7fcc68ac8b31e44692caa09299cc71256ee0b8c17e4f49f78ada8043d424f5daf82fe
Size (qemu-3.1.0.tar.xz) = 36070104 bytes
SHA1 (qemu-4.0.0.tar.xz) = 74cfb8f4724d9651fdd354560f2d291887b32cad
RMD160 (qemu-4.0.0.tar.xz) = 58135f00c391823edce780d55a816f29dd73c34b
SHA512 (qemu-4.0.0.tar.xz) = 952e94194ce9e64c15388c59035cb31fb9f761d30095c2fb9441012b609c18c9976285727b93bf37b95e15675802d73f8e1c4619ebecd23606675bb503646b13
Size (qemu-4.0.0.tar.xz) = 55628624 bytes
SHA1 (patch-Makefile) = b3899fb8d0dd2f29bf3edd843836612e6e6c019c
SHA1 (patch-audio_audio.c) = 98a1de2fd48638886b5d16f6a61dc72910e98b41
SHA1 (patch-block.c) = 5eb15a87d6646719bf1e9277fbe73a99e4905481
SHA1 (patch-configure) = eb720300f48392da936773f003d8fc4d5aedea1f
SHA1 (patch-configure) = 14c09363622bcee113b7fda5bd3f031bd9ff6b90
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
SHA1 (patch-hw_core_loader.c) = 06ff8bfa5be720e428668987598d55b6799202e7
SHA1 (patch-hw_core_uboot__image.h) = 26a656310d991747b7080b9f28042afd536e4c28
SHA1 (patch-hw_core_uboot__image.h) = 17eef02349343c5fcfb7a4069cb6f8fd11efcb59
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_tpm_tpm__ioctl.h) = f99aa2912a2229b4ae52d3a0a8f2a7b15756c9be
SHA1 (patch-hw_usb_dev-mtp.c) = 66543b5559d92f8e2fa9a6eb85e5dfe7c1ad3339
SHA1 (patch-hw_usb_dev-mtp.c) = c48e11fbe3a017f0e9f8dbd7bf46898b758ab79c
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-roms_u-boot_tools_imx8m__image.sh) = 22959b438d781abeb9d06cd9980175beaf27033c
SHA1 (patch-target_i386_kvm-stub.c) = 4cd2b7a8d8d8a317829f982b5acff7fdf2479d9f
SHA1 (patch-tests_Makefile.include) = 42345d697cb2e324dccf1d68bd8d61e8001c6162
SHA1 (patch-ui_curses.c) = b3372c42c6040d76a32f194967812b1d3ec5d342

View file

@ -1,42 +0,0 @@
$NetBSD: patch-block.c,v 1.2 2018/04/25 07:56:05 adam Exp $
Remove block driver whitelisting logic; reasons being:
- PkgSrc does not configure Qemu to use whitelisting
- sometimes CONFIG...WHITELIST macros contain ["", NULL],
and bdrv_is_whitelisted() fails.
--- block.c.orig 2018-03-27 22:29:23.000000000 +0000
+++ block.c
@@ -373,31 +373,7 @@ BlockDriver *bdrv_find_format(const char
int bdrv_is_whitelisted(BlockDriver *drv, bool read_only)
{
- static const char *whitelist_rw[] = {
- CONFIG_BDRV_RW_WHITELIST
- };
- static const char *whitelist_ro[] = {
- CONFIG_BDRV_RO_WHITELIST
- };
- const char **p;
-
- if (!whitelist_rw[0] && !whitelist_ro[0]) {
- return 1; /* no whitelist, anything goes */
- }
-
- for (p = whitelist_rw; *p; p++) {
- if (!strcmp(drv->format_name, *p)) {
- return 1;
- }
- }
- if (read_only) {
- for (p = whitelist_ro; *p; p++) {
- if (!strcmp(drv->format_name, *p)) {
- return 1;
- }
- }
- }
- return 0;
+ return 1;
}
bool bdrv_uses_whitelist(void)

View file

@ -1,14 +1,14 @@
$NetBSD: patch-configure,v 1.24 2019/02/13 05:16:12 kamil Exp $
$NetBSD: patch-configure,v 1.25 2019/04/24 13:59:32 ryoon Exp $
configure: Add HAX support in NetBSD
--- configure.orig 2018-12-11 17:44:34.000000000 +0000
--- configure.orig 2019-04-23 18:14:45.000000000 +0000
+++ configure
@@ -809,6 +809,7 @@ DragonFly)
@@ -815,6 +815,7 @@ FreeBSD)
;;
NetBSD)
DragonFly)
bsd="yes"
+ hax="yes"
make="${MAKE-gmake}"
audio_drv_list="oss"
audio_possible_drivers="oss sdl"
audio_drv_list="oss try-sdl"
audio_possible_drivers="oss sdl pa"

View file

@ -1,26 +0,0 @@
$NetBSD: patch-hw_arm_boot.c,v 1.1 2018/11/05 07:27:59 skrll Exp $
--- hw/arm/boot.c.orig 2018-11-04 17:27:47.000000000 +0000
+++ hw/arm/boot.c
@@ -29,8 +29,9 @@
* Documentation/arm/Booting and Documentation/arm64/booting.txt
* They have different preferred image load offsets from system RAM base.
*/
-#define KERNEL_ARGS_ADDR 0x100
-#define KERNEL_LOAD_ADDR 0x00010000
+#define KERNEL_ARGS_ADDR 0x100
+#define KERNEL_NOLOAD_ADDR 0x00000000
+#define KERNEL_LOAD_ADDR 0x00010000
#define KERNEL64_LOAD_ADDR 0x00080000
#define ARM64_TEXT_OFFSET_OFFSET 8
@@ -1049,7 +1050,8 @@ void arm_load_kernel(ARMCPU *cpu, struct
}
entry = elf_entry;
if (kernel_size < 0) {
- kernel_size = load_uimage_as(info->kernel_filename, &entry, NULL,
+ uint64_t loadaddr = info->loader_start + KERNEL_NOLOAD_ADDR;
+ kernel_size = load_uimage_as(info->kernel_filename, &entry, &loadaddr,
&is_linux, NULL, NULL, as);
}
if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64) && kernel_size < 0) {

View file

@ -1,27 +0,0 @@
$NetBSD: patch-hw_core_loader.c,v 1.1 2018/11/05 07:27:59 skrll Exp $
--- hw/core/loader.c.orig 2018-08-14 19:10:34.000000000 +0000
+++ hw/core/loader.c
@@ -637,13 +637,19 @@ static int load_uboot_image(const char *
goto out;
if (hdr->ih_type != image_type) {
- fprintf(stderr, "Wrong image type %d, expected %d\n", hdr->ih_type,
- image_type);
- goto out;
+ if (image_type != IH_TYPE_KERNEL && hdr->ih_type != IH_TYPE_KERNEL_NOLOAD) {
+ fprintf(stderr, "Wrong image type %d, expected %d\n", hdr->ih_type,
+ image_type);
+ goto out;
+ }
}
/* TODO: Implement other image types. */
switch (hdr->ih_type) {
+ case IH_TYPE_KERNEL_NOLOAD:
+ hdr->ih_load = *loadaddr + sizeof(*hdr);
+ hdr->ih_ep += hdr->ih_load;
+
case IH_TYPE_KERNEL:
address = hdr->ih_load;
if (translate_fn) {

View file

@ -1,6 +1,6 @@
$NetBSD: patch-hw_core_uboot__image.h,v 1.1 2018/11/05 07:27:59 skrll Exp $
$NetBSD: patch-hw_core_uboot__image.h,v 1.2 2019/04/24 13:59:32 ryoon Exp $
--- hw/core/uboot_image.h.orig 2018-08-14 19:10:34.000000000 +0000
--- hw/core/uboot_image.h.orig 2019-04-23 18:14:45.000000000 +0000
+++ hw/core/uboot_image.h
@@ -75,6 +75,7 @@
#define IH_CPU_NIOS2 15 /* Nios-II */
@ -10,11 +10,3 @@ $NetBSD: patch-hw_core_uboot__image.h,v 1.1 2018/11/05 07:27:59 skrll Exp $
/*
* Image Types
@@ -124,6 +125,7 @@
#define IH_TYPE_SCRIPT 6 /* Script file */
#define IH_TYPE_FILESYSTEM 7 /* Filesystem Image (any type) */
#define IH_TYPE_FLATDT 8 /* Binary Flat Device Tree Blob */
+#define IH_TYPE_KERNEL_NOLOAD 14 /* OS Kernel Image (noload) */
/*
* Compression Types

View file

@ -1,12 +1,12 @@
$NetBSD: patch-hw_usb_dev-mtp.c,v 1.2 2018/08/16 10:15:09 adam Exp $
$NetBSD: patch-hw_usb_dev-mtp.c,v 1.3 2019/04/24 13:59:32 ryoon Exp $
Support NAME_MAX.
--- hw/usb/dev-mtp.c.orig 2018-08-14 19:10:34.000000000 +0000
--- hw/usb/dev-mtp.c.orig 2019-04-23 18:14:46.000000000 +0000
+++ hw/usb/dev-mtp.c
@@ -26,6 +26,10 @@
#include "hw/usb.h"
#include "desc.h"
#include "qemu/units.h"
+#ifndef NAME_MAX
+#define NAME_MAX 255

View file

@ -0,0 +1,24 @@
$NetBSD: patch-roms_u-boot_tools_imx8m__image.sh,v 1.1 2019/04/24 13:59:32 ryoon Exp $
* Improve POSIX shell portability
--- roms/u-boot/tools/imx8m_image.sh.orig 2019-04-23 18:16:46.000000000 +0000
+++ roms/u-boot/tools/imx8m_image.sh
@@ -12,7 +12,7 @@ blobs=`awk '/^SIGNED_HDMI/ {print $2} /^
for f in $blobs; do
tmp=$srctree/$f
- if [ $f == "spl/u-boot-spl-ddr.bin" ] || [ $f == "u-boot.itb" ]; then
+ if [ $f = "spl/u-boot-spl-ddr.bin" ] || [ $f = "u-boot.itb" ]; then
continue
fi
@@ -28,7 +28,7 @@ for f in $blobs; do
sed -in "s;$f;$tmp;" $file
done
-if [ $post_process == 1 ]; then
+if [ $post_process = 1 ]; then
if [ -f $srctree/lpddr4_pmu_train_1d_imem.bin ]; then
objcopy -I binary -O binary --pad-to 0x8000 --gap-fill=0x0 $srctree/lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_imem_pad.bin
objcopy -I binary -O binary --pad-to 0x4000 --gap-fill=0x0 $srctree/lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_1d_dmem_pad.bin

View file

@ -1,20 +0,0 @@
$NetBSD: patch-target_arm_cpu.h,v 1.2 2019/01/31 13:39:10 martin Exp $
Upstream fix for arm/aarch64 FPU exception handling
test failures in the NetBSD ATF test suit.
--- target/arm/cpu.h.orig 2018-12-11 18:44:34.000000000 +0100
+++ target/arm/cpu.h 2019-01-31 14:29:37.037792781 +0100
@@ -1299,6 +1299,12 @@ void vfp_set_fpscr(CPUARMState *env, uin
#define FPSR_MASK 0xf800009f
#define FPCR_MASK 0x07ff9f00
+#define FPCR_IOE (1 << 8) /* Invalid Operation exception trap enable */
+#define FPCR_DZE (1 << 9) /* Divide by Zero exception trap enable */
+#define FPCR_OFE (1 << 10) /* Overflow exception trap enable */
+#define FPCR_UFE (1 << 11) /* Underflow exception trap enable */
+#define FPCR_IXE (1 << 12) /* Inexact exception trap enable */
+#define FPCR_IDE (1 << 15) /* Input Denormal exception trap enable */
#define FPCR_FZ16 (1 << 19) /* ARMv8.2+, FP16 flush-to-zero */
#define FPCR_FZ (1 << 24) /* Flush-to-zero enable bit */
#define FPCR_DN (1 << 25) /* Default NaN enable bit */

View file

@ -1,20 +0,0 @@
$NetBSD: patch-target_arm_helper.c,v 1.1 2019/01/31 13:39:10 martin Exp $
Upstream fix for arm/aarch64 FPU exception handling
test failures in the NetBSD ATF test suit.
--- target/arm/helper.c.orig 2018-12-11 18:44:34.000000000 +0100
+++ target/arm/helper.c 2019-01-31 14:29:37.050410598 +0100
@@ -11747,6 +11747,12 @@
val &= ~FPCR_FZ16;
}
+ /*
+ * We don't implement trapped exception handling, so the
+ * trap enable bits are all RAZ/WI (not RES0!)
+ */
+ val &= ~(FPCR_IDE | FPCR_IXE | FPCR_UFE | FPCR_OFE | FPCR_DZE | FPCR_IOE);
+
changed = env->vfp.xregs[ARM_VFP_FPSCR];
env->vfp.xregs[ARM_VFP_FPSCR] = (val & 0xffc8ffff);
env->vfp.vec_len = (val >> 16) & 7;

View file

@ -1,20 +0,0 @@
$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

View file

@ -1,26 +0,0 @@
$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

View file

@ -1,17 +0,0 @@
$NetBSD: patch-tests_Makefile.include,v 1.1 2016/09/04 09:21:04 ryoon Exp $
* Don't link -lutil on SunOS
--- tests/Makefile.include.orig 2016-09-02 15:34:24.000000000 +0000
+++ tests/Makefile.include
@@ -645,8 +645,10 @@ tests/migration/initrd-stress.img: tests
rmdir $(INITRD_WORK_DIR)
ifeq ($(CONFIG_POSIX),y)
+ifneq ($(CONFIG_SOLARIS),y)
LIBS += -lutil
endif
+endif
# QTest rules

View file

@ -0,0 +1,18 @@
$NetBSD: patch-ui_curses.c,v 1.1 2019/04/24 13:59:32 ryoon Exp $
* For NetBSD curses
--- ui/curses.c.orig 2019-04-23 18:14:46.000000000 +0000
+++ ui/curses.c
@@ -46,6 +46,11 @@
#define FONT_HEIGHT 16
#define FONT_WIDTH 8
+#if defined(__NetBSD__)
+#define chars vals
+#define attr attributes
+#endif
+
enum maybe_keycode {
CURSES_KEYCODE,
CURSES_CHAR,