summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2019-08-16 15:12:19 +0000
committeradam <adam@pkgsrc.org>2019-08-16 15:12:19 +0000
commit3fb5b43dd46cc9a6104e9713af8ca034d9bc29e2 (patch)
tree0622da94251f460be7d4f6780356e45e85f4b2f8 /emulators
parent43e5aee1b8cce5acf40e4ddaa279be530c859d54 (diff)
downloadpkgsrc-3fb5b43dd46cc9a6104e9713af8ca034d9bc29e2.tar.gz
qemu: updated to 4.1.0
4.1.0: New deprecated options and features The "-virtfs_synth" option is now deprecated. Please use "-fsdev synth" and "-device virtio-9p-..." instead. The "-numa node,mem" sub-option is now deprecated. Please use "-numa node,memdev" instead. Default memory distribution between NUMA nodes is now deprecated. Please specify memory per NUMA node explicitly using "-numa node,memdev" Fallback to normal RAM allocation if QEMU is not able to allocate from the "-mem-path" provided file/filesystem is now deprecated. Make sure that host has sufficient resources on the filesystem/file pointed be "-mem-path". Arm QEMU now supports emulating an FPU for Cortex-M CPUs, and the Cortex-M4 and Cortex-M33 now provide the FPU. The Cortex-R5F now correctly provides an FPU with registers D0-D15 only, rather than incorrectly providing also D16-D31. The build config files have been switched to the new Kconfig system, so that a QEMU with individual boards can be built more easily. The ARMv8.5-RNG extension is supported, for cpu generated random numbers. The Exynos4210 SoC model now supports the PL330 DMA controllers. Some bugs in handling of GICv3 ICC_CTLR_EL3 and ICH_VMCR_EL2 register writes have been fixed. The built-in bootloader now handles loading AArch64 kernel Image files which are larger than 128MB. The GICv3 now correctly reports GICD_TYPER.SecurityExtn as 0 if GICD_CTLR.DS is 1. New board model: swift-bmc New board-model: sbsa-ref (an AArch64 system intended for development of the server firmware and kernel software stack) The Aspeed SoC/boards now support the RTC device and the xdma device The i.mx7 PCI controller emulation has been improved so it can boot current Linux krenels The pl031 RTC device now correctly makes the guest RTC track advances in host RTC time between a VM state save and a later reload. MIPS Improved marking referenced memory pages as executable (it is now restricted to necessary cases only). Fixed logic errors for certain cases of MFTR and MTTR instruction handling. Fixed some corner cases of MSA FCLASS.<W|D> instruction handling. Improved 'division by zero' cases in MSA ASE instructions DIV_<U|S>.<B|H|W|D> and MOD_<U|S>.<B|H|W|D> - they are now handled both in QEMU and on the reference hardware the same way. Fixed emulation of a number of MSA ASE instructions on big endian hosts. Affected instructions are LD.<B|H|W|D>, ST.<B|H|W|D>, COPY_S.<B|H|W|D>, COPY_U.<B|H|W>, INSERT.<B|H|W|D>, ILVEV.<B|H|W|D>, ILVOD.<B|H|W|D>, ILVL.<B|H|W|D>, ILVR.<B|H|W|D>, PCKEV.<B|H|W|D>, and PCKOD.<B|H|W|D>. Improved emulation performance of numerous MSA instructions, mostly integer and data permuting operations. Nios2 PowerPC NVIDIA V100 GPU/NVLink2 passthrough for spapr using VFIO PCI The TCG implementation of the Power9 DARN instruction now produces random numbers, instead of indicating failure. pseries machine now supports KVM acceleration (kernel_irqchip=on) of the XIVE interrupt controller pseries now defaults to XIVE interrupt controller if using pseries-4.1 machine version, POWER9 cpu and a guest OS which supports it pseries now supports hot-plug of PCI bridges and hot-plug and unplug of devices under PCI bridges powernv now supports dumping the device tree with the "dumpdtb" machine option A number of vector (Altivec and VSX) instructions have had their implementations optimized in TCG RISC-V Arbitrary bits in SIP can no longer be set. A new "spike" machine has been defined, with the old machines being deprecated. sfence.vma can no longer execute from userspace. Single-stepping over branches and jumps now works. A handful of illegal instructions (all compressed) are now handled correctly, as opposed to being treated as NOPs. Support for version 1.11.0 of the privileged specification has been added. SiFive's PRCI now supports reading and writing all the device registers. The ISA of the target machine can be controlled from the command line. QEMU provides a cpu-topology device tree node on targets that support device trees. Load reservations are broken by both store conditional and scheduling. The 32-bit syscall ABI has various bug fixes. The PCI bus-range property is now set correctly. s390 The bios now supports IPL (boot) from ECKD DASD assigned to the guest via vfio-ccw. The bios now tolerates the presence of bootmap signature entries written by zipl. All Vector Instructions introduced with the "Vector Facility" have been implemented for TCG. The "Vector Facility" is now indicated in the "qemu" cpu model, which has been updated to a stripped-down z13. More facilities and gen15 machines (official name not yet known) have been added to the cpu model. This also includes the AP Queue Interruption Facility, which allows to use interrupts for vfio-ap devices, if supported by the host kernel. vfio-ccw now supports forwarding HALT SUBCHANNEL and CLEAR SUBCHANNEL to the device. SPARC sun4m and sun4u fixes when running with -vga none (OpenBIOS) sunhme fixes when running on a TAP network interface Tricore Add FTOIZ/UTOF/QSEED insns Fix sync of hflags and swapped args of RRPW_INSERT x86 New Hygon Dhyana CPU model New Intel SnowRidge CPU model The host-cache-info CPU option now affects the TOPOEXT CPUID leaf (0x8000001D) The RDRAND extension is implemented for TCG. md-clear and mds-no feature flags, for detection and mitigation of MDS vulnerabilities (CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091) All x86 CPU models are now versioned CPU die topology can now be configured using the -smp ...,dies=... option Xtensa Implement memory protection unit (MPU) option Implement Exclusive Access option
Diffstat (limited to 'emulators')
-rw-r--r--emulators/qemu/Makefile8
-rw-r--r--emulators/qemu/PLIST56
-rw-r--r--emulators/qemu/distinfo18
-rw-r--r--emulators/qemu/patches/patch-Makefile10
-rw-r--r--emulators/qemu/patches/patch-hw_tpm_tpm__ioctl.h10
-rw-r--r--emulators/qemu/patches/patch-target_hppa_insns.decode14
-rw-r--r--emulators/qemu/patches/patch-target_hppa_mem__helper.c14
-rw-r--r--emulators/qemu/patches/patch-target_hppa_translate.c63
-rw-r--r--emulators/qemu/patches/patch-ui_curses.c287
9 files changed, 76 insertions, 404 deletions
diff --git a/emulators/qemu/Makefile b/emulators/qemu/Makefile
index e6ba336ba5c..22c8794a01b 100644
--- a/emulators/qemu/Makefile
+++ b/emulators/qemu/Makefile
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.215 2019/08/11 13:20:58 wiz Exp $
+# $NetBSD: Makefile,v 1.216 2019/08/16 15:12:19 adam Exp $
-DISTNAME= qemu-4.0.0
-PKGREVISION= 9
+DISTNAME= qemu-4.1.0
CATEGORIES= emulators
MASTER_SITES= https://download.qemu.org/
EXTRACT_SUFX= .tar.xz
@@ -18,6 +17,7 @@ FAKE_NCURSES= yes
UNLIMIT_RESOURCES= datasize
HAS_CONFIGURE= yes
+GMAKE_REQD= 4.1 # needed for docs
TOOL_DEPENDS+= ${PYPKGPREFIX}-sphinx-[0-9]*:../../textproc/py-sphinx
SUBST_CLASSES+= prefix
@@ -139,7 +139,7 @@ TEST_TARGET= check
post-install:
${INSTALL_DATA} ${FILESDIR}/Makefile.multinode-NetBSD \
${DESTDIR}${PREFIX}/share/doc/qemu/
- ${RM} ${DESTDIR}${PREFIX}/share/doc/qemu/interop/.buildinfo
+ ${RM} -f ${DESTDIR}${PREFIX}/share/doc/qemu/interop/.buildinfo
# On Darwin, qemu uses Cocoa and CoreAudio
.if ${OPSYS} != "Darwin"
diff --git a/emulators/qemu/PLIST b/emulators/qemu/PLIST
index 40fcb8a17f0..cf36ffac328 100644
--- a/emulators/qemu/PLIST
+++ b/emulators/qemu/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.60 2019/06/19 19:08:05 gson Exp $
+@comment $NetBSD: PLIST,v 1.61 2019/08/16 15:12:19 adam Exp $
bin/elf2dmp
${PLIST.ivshmem}bin/ivshmem-client
${PLIST.ivshmem}bin/ivshmem-server
@@ -119,12 +119,46 @@ share/doc/qemu/interop/objects.inv
share/doc/qemu/interop/pr-helper.html
share/doc/qemu/interop/search.html
share/doc/qemu/interop/searchindex.js
+share/doc/qemu/interop/vhost-user-gpu.html
+share/doc/qemu/interop/vhost-user.html
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/doc/qemu/specs/.buildinfo
+share/doc/qemu/specs/_static/ajax-loader.gif
+share/doc/qemu/specs/_static/alabaster.css
+share/doc/qemu/specs/_static/basic.css
+share/doc/qemu/specs/_static/comment-bright.png
+share/doc/qemu/specs/_static/comment-close.png
+share/doc/qemu/specs/_static/comment.png
+share/doc/qemu/specs/_static/custom.css
+share/doc/qemu/specs/_static/doctools.js
+share/doc/qemu/specs/_static/documentation_options.js
+share/doc/qemu/specs/_static/down-pressed.png
+share/doc/qemu/specs/_static/down.png
+share/doc/qemu/specs/_static/file.png
+share/doc/qemu/specs/_static/jquery-3.2.1.js
+share/doc/qemu/specs/_static/jquery.js
+share/doc/qemu/specs/_static/language_data.js
+share/doc/qemu/specs/_static/minus.png
+share/doc/qemu/specs/_static/plus.png
+share/doc/qemu/specs/_static/pygments.css
+share/doc/qemu/specs/_static/searchtools.js
+share/doc/qemu/specs/_static/underscore-1.3.1.js
+share/doc/qemu/specs/_static/underscore.js
+share/doc/qemu/specs/_static/up-pressed.png
+share/doc/qemu/specs/_static/up.png
+share/doc/qemu/specs/_static/websupport.js
+share/doc/qemu/specs/genindex.html
+share/doc/qemu/specs/index.html
+share/doc/qemu/specs/objects.inv
+share/doc/qemu/specs/ppc-spapr-xive.html
+share/doc/qemu/specs/ppc-xive.html
+share/doc/qemu/specs/search.html
+share/doc/qemu/specs/searchindex.js
share/icons/hicolor/128x128/apps/qemu.png
share/icons/hicolor/16x16/apps/qemu.png
share/icons/hicolor/24x24/apps/qemu.png
@@ -148,6 +182,15 @@ share/qemu/bamboo.dtb
share/qemu/bios-256k.bin
share/qemu/bios.bin
share/qemu/canyonlands.dtb
+share/qemu/edk2-aarch64-code.fd
+share/qemu/edk2-arm-code.fd
+share/qemu/edk2-arm-vars.fd
+share/qemu/edk2-i386-code.fd
+share/qemu/edk2-i386-secure-code.fd
+share/qemu/edk2-i386-vars.fd
+share/qemu/edk2-licenses.txt
+share/qemu/edk2-x86_64-code.fd
+share/qemu/edk2-x86_64-secure-code.fd
share/qemu/efi-e1000.rom
share/qemu/efi-e1000e.rom
share/qemu/efi-eepro100.rom
@@ -156,6 +199,12 @@ share/qemu/efi-pcnet.rom
share/qemu/efi-rtl8139.rom
share/qemu/efi-virtio.rom
share/qemu/efi-vmxnet3.rom
+share/qemu/firmware/50-edk2-i386-secure.json
+share/qemu/firmware/50-edk2-x86_64-secure.json
+share/qemu/firmware/60-edk2-aarch64.json
+share/qemu/firmware/60-edk2-arm.json
+share/qemu/firmware/60-edk2-i386.json
+share/qemu/firmware/60-edk2-x86_64.json
share/qemu/hppa-firmware.img
share/qemu/keymaps/ar
share/qemu/keymaps/bepo
@@ -198,6 +247,9 @@ share/qemu/multiboot.bin
share/qemu/openbios-ppc
share/qemu/openbios-sparc32
share/qemu/openbios-sparc64
+share/qemu/opensbi-riscv32-virt-fw_jump.bin
+share/qemu/opensbi-riscv64-sifive_u-fw_jump.bin
+share/qemu/opensbi-riscv64-virt-fw_jump.bin
share/qemu/palcode-clipper
share/qemu/petalogix-ml605.dtb
share/qemu/petalogix-s3adsp1800.dtb
@@ -209,6 +261,7 @@ share/qemu/pxe-ne2k_pci.rom
share/qemu/pxe-pcnet.rom
share/qemu/pxe-rtl8139.rom
share/qemu/pxe-virtio.rom
+share/qemu/qemu-nsis.bmp
share/qemu/qemu_vga.ndrv
share/qemu/s390-ccw.img
share/qemu/s390-netboot.img
@@ -219,6 +272,7 @@ share/qemu/spapr-rtas.bin
share/qemu/trace-events-all
share/qemu/u-boot-sam460-20100605.bin
share/qemu/u-boot.e500
+share/qemu/vgabios-ati.bin
share/qemu/vgabios-bochs-display.bin
share/qemu/vgabios-cirrus.bin
share/qemu/vgabios-qxl.bin
diff --git a/emulators/qemu/distinfo b/emulators/qemu/distinfo
index 7eb165dc40c..2fad765456d 100644
--- a/emulators/qemu/distinfo
+++ b/emulators/qemu/distinfo
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.150 2019/07/03 14:38:13 thorpej Exp $
+$NetBSD: distinfo,v 1.151 2019/08/16 15:12:19 adam Exp $
-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 (qemu-4.1.0.tar.xz) = 29c99be326cd8f3b2b75d7fec9066ca24854df1e
+RMD160 (qemu-4.1.0.tar.xz) = 7f95536777579cec1793c894089a2f72bb7f09d8
+SHA512 (qemu-4.1.0.tar.xz) = 82fd51702a7b9b1b00b2f1bd3b4a832b80249018dbba1add0b0a73e7d4bee452afd45574b4d8df7ce4477d8711f3bda4ca072a1a6de25895c93eb21cf78fc4b2
+Size (qemu-4.1.0.tar.xz) = 54001708 bytes
+SHA1 (patch-Makefile) = 85d24d842ad2f7e1e2ec6f0e0e3268c21ef9bf0d
SHA1 (patch-accel_tcg_user-exec.c) = 86ee62f6e5c8cd7942cf0aa9c9f64e4b0879ff33
SHA1 (patch-audio_audio.c) = 98a1de2fd48638886b5d16f6a61dc72910e98b41
SHA1 (patch-configure) = 14c09363622bcee113b7fda5bd3f031bd9ff6b90
@@ -14,12 +14,8 @@ 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_tpm_tpm__ioctl.h) = a350c1708e1f9d85e07c4c354068703a45174baf
SHA1 (patch-hw_usb_dev-mtp.c) = 0f9034fb3904e5d5e3b98d24b94e054181687d95
SHA1 (patch-include_sysemu_kvm.h) = f99e8ad021f6c8e89e3ca52538bd9b0656e6f619
SHA1 (patch-roms_u-boot_tools_imx8m__image.sh) = e4c452062f40569e33aa93eec4a65bd3af2e74fc
-SHA1 (patch-target_hppa_insns.decode) = 111ad3d5db1c46fd42bb033ac09db377303d352e
-SHA1 (patch-target_hppa_mem__helper.c) = 080d99b2a6dc7f5ab1df04ef6c316e5dcd133753
-SHA1 (patch-target_hppa_translate.c) = 8bdeaba3f19204ffd5465d33a44380bbcbfd7a57
SHA1 (patch-target_i386_kvm-stub.c) = 4cd2b7a8d8d8a317829f982b5acff7fdf2479d9f
-SHA1 (patch-ui_curses.c) = a8bd6ad93d53d6cfba3b6853aff5702fe40ae944
diff --git a/emulators/qemu/patches/patch-Makefile b/emulators/qemu/patches/patch-Makefile
index 76fa15ebb65..50538502508 100644
--- a/emulators/qemu/patches/patch-Makefile
+++ b/emulators/qemu/patches/patch-Makefile
@@ -1,12 +1,12 @@
-$NetBSD: patch-Makefile,v 1.1 2017/12/14 02:03:53 kamil Exp $
+$NetBSD: patch-Makefile,v 1.2 2019/08/16 15:12:19 adam Exp $
---- Makefile.orig 2017-12-13 17:27:20.000000000 +0000
+--- Makefile.orig 2019-08-15 19:01:42.000000000 +0000
+++ Makefile
-@@ -385,6 +385,7 @@ subdir-%:
+@@ -474,6 +474,7 @@ $(TARGET_DIRS_RULES):
DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt
DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS)
DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
+ARFLAGS= -rcs
- subdir-dtc: .git-submodule-status dtc/libfdt dtc/tests
- $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
+ .PHONY: dtc/all
+ dtc/all: .git-submodule-status dtc/libfdt dtc/tests
diff --git a/emulators/qemu/patches/patch-hw_tpm_tpm__ioctl.h b/emulators/qemu/patches/patch-hw_tpm_tpm__ioctl.h
index 572df615cef..efcea16226e 100644
--- a/emulators/qemu/patches/patch-hw_tpm_tpm__ioctl.h
+++ b/emulators/qemu/patches/patch-hw_tpm_tpm__ioctl.h
@@ -1,12 +1,12 @@
-$NetBSD: patch-hw_tpm_tpm__ioctl.h,v 1.1 2019/02/13 14:08:43 jperkin Exp $
+$NetBSD: patch-hw_tpm_tpm__ioctl.h,v 1.2 2019/08/16 15:12:19 adam Exp $
SunOS needs filio.h for _IO*() macros.
---- hw/tpm/tpm_ioctl.h.orig 2018-12-11 17:44:34.000000000 +0000
+--- hw/tpm/tpm_ioctl.h.orig 2019-08-15 19:01:42.000000000 +0000
+++ hw/tpm/tpm_ioctl.h
-@@ -8,6 +8,9 @@
- #ifndef _TPM_IOCTL_H_
- #define _TPM_IOCTL_H_
+@@ -9,6 +9,9 @@
+ #ifndef TPM_IOCTL_H
+ #define TPM_IOCTL_H
+#ifdef __sun
+#include <sys/filio.h>
diff --git a/emulators/qemu/patches/patch-target_hppa_insns.decode b/emulators/qemu/patches/patch-target_hppa_insns.decode
deleted file mode 100644
index e793b0778a6..00000000000
--- a/emulators/qemu/patches/patch-target_hppa_insns.decode
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-target_hppa_insns.decode,v 1.1 2019/04/25 11:33:02 skrll Exp $
-
---- target/hppa/insns.decode.orig 2019-04-23 18:14:46.000000000 +0000
-+++ target/hppa/insns.decode
-@@ -133,6 +133,9 @@ ixtlbx 000001 b:5 r:5 sp:2 0100
- ixtlbx 000001 b:5 r:5 ... 000000 addr:1 0 00000 \
- sp=%assemble_sr3x data=0
-
-+# pcxl and pcxl2 Fast TLB Insert instructions
-+ixtlbxf 000001 00000 r:5 00 0 data:1 01000 addr:1 0 00000
-+
- pxtlbx 000001 b:5 x:5 sp:2 0100100 local:1 m:1 ----- data=1
- pxtlbx 000001 b:5 x:5 ... 000100 local:1 m:1 ----- \
- sp=%assemble_sr3x data=0
diff --git a/emulators/qemu/patches/patch-target_hppa_mem__helper.c b/emulators/qemu/patches/patch-target_hppa_mem__helper.c
deleted file mode 100644
index 0e38d10252f..00000000000
--- a/emulators/qemu/patches/patch-target_hppa_mem__helper.c
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-target_hppa_mem__helper.c,v 1.1 2019/04/25 11:33:02 skrll Exp $
-
---- target/hppa/mem_helper.c.orig 2019-04-23 18:14:46.000000000 +0000
-+++ target/hppa/mem_helper.c
-@@ -154,8 +154,7 @@ int hppa_get_physical_address(CPUHPPASta
-
- if (unlikely(!(prot & type))) {
- /* The access isn't allowed -- Inst/Data Memory Protection Fault. */
-- ret = (type & PAGE_EXEC ? EXCP_IMP :
-- prot & PAGE_READ ? EXCP_DMP : EXCP_DMAR);
-+ ret = (type & PAGE_EXEC) ? EXCP_IMP : EXCP_DMAR;
- goto egress;
- }
-
diff --git a/emulators/qemu/patches/patch-target_hppa_translate.c b/emulators/qemu/patches/patch-target_hppa_translate.c
deleted file mode 100644
index 0a66d27f3f4..00000000000
--- a/emulators/qemu/patches/patch-target_hppa_translate.c
+++ /dev/null
@@ -1,63 +0,0 @@
-$NetBSD: patch-target_hppa_translate.c,v 1.1 2019/04/25 11:33:02 skrll Exp $
-
---- target/hppa/translate.c.orig 2019-04-23 18:14:46.000000000 +0000
-+++ target/hppa/translate.c
-@@ -2518,6 +2518,58 @@ static bool trans_pxtlbx(DisasContext *c
- #endif
- }
-
-+/* Implement the pcxl and pcxl2 Fast TLB Insert instructions.
-+ * See
-+ * https://parisc.wiki.kernel.org/images-parisc/a/a9/Pcxl2_ers.pdf
-+ * page 13-9 (195/206) */
-+static bool trans_ixtlbxf(DisasContext *ctx, arg_ixtlbxf *a)
-+{
-+ CHECK_MOST_PRIVILEGED(EXCP_PRIV_OPR);
-+#ifndef CONFIG_USER_ONLY
-+ TCGv_tl addr;
-+ TCGv_reg reg;
-+ TCGv_reg ar, sr;
-+ TCGv_tl atl, stl;
-+
-+ nullify_over(ctx);
-+
-+/* if (not (pcxl or pcxl2))
-+ return gen_illegal(ctx); */
-+
-+ ar = get_temp(ctx);
-+ sr = get_temp(ctx);
-+ atl = get_temp_tl(ctx);
-+ stl = get_temp_tl(ctx);
-+ addr = get_temp_tl(ctx);
-+
-+
-+ if (a->data) {
-+ tcg_gen_ld_reg(sr, cpu_env, offsetof(CPUHPPAState, cr[CR_ISR]));
-+ tcg_gen_ld_reg(ar, cpu_env, offsetof(CPUHPPAState, cr[CR_IOR]));
-+ } else {
-+ tcg_gen_ld_reg(sr, cpu_env, offsetof(CPUHPPAState, cr[CR_IIASQ]));
-+ tcg_gen_ld_reg(ar, cpu_env, offsetof(CPUHPPAState, cr[CR_IIAOQ]));
-+ }
-+
-+ tcg_gen_extu_reg_tl(atl, ar);
-+ tcg_gen_extu_reg_tl(stl, sr);
-+ tcg_gen_shli_i64(stl, stl, 32);
-+ tcg_gen_or_tl(addr, atl, stl);
-+ reg = load_gpr(ctx, a->r);
-+ if (a->addr) {
-+ gen_helper_itlba(cpu_env, addr, reg);
-+ } else {
-+ gen_helper_itlbp(cpu_env, addr, reg);
-+ }
-+
-+ /* Exit TB for TLB change if mmu is enabled. */
-+ if (ctx->tb_flags & PSW_C) {
-+ ctx->base.is_jmp = DISAS_IAQ_N_STALE;
-+ }
-+ return nullify_end(ctx);
-+#endif
-+}
-+
- static bool trans_lpa(DisasContext *ctx, arg_ldst *a)
- {
- CHECK_MOST_PRIVILEGED(EXCP_PRIV_OPR);
diff --git a/emulators/qemu/patches/patch-ui_curses.c b/emulators/qemu/patches/patch-ui_curses.c
deleted file mode 100644
index 278348384eb..00000000000
--- a/emulators/qemu/patches/patch-ui_curses.c
+++ /dev/null
@@ -1,287 +0,0 @@
-$NetBSD: patch-ui_curses.c,v 1.3 2019/04/27 18:00:46 kamil Exp $
-
- * fix compatibility with NetBSD curses(3)
-
-https://patchwork.ozlabs.org/patch/1092056/
-
- * fix portability of iconv(3) usage
-
-https://patchwork.ozlabs.org/patch/1092057/
-
---- ui/curses.c.orig 2019-04-23 18:14:46.000000000 +0000
-+++ ui/curses.c
-@@ -66,20 +66,22 @@ static void curses_update(DisplayChangeL
- {
- console_ch_t *line;
- cchar_t curses_line[width];
-+ wchar_t wch[CCHARW_MAX];
-+ attr_t attrs;
-+ short colors;
-+ int ret;
-
- line = screen + y * width;
- for (h += y; y < h; y ++, line += width) {
- for (x = 0; x < width; x++) {
- chtype ch = line[x] & 0xff;
- chtype at = line[x] & ~0xff;
-- if (vga_to_curses[ch].chars[0]) {
-- curses_line[x] = vga_to_curses[ch];
-- } else {
-- curses_line[x] = (cchar_t) {
-- .chars[0] = ch,
-- };
-+ ret = getcchar(&vga_to_curses[ch], wch, &attrs, &colors, NULL);
-+ if (ret == ERR || wch[0] == 0) {
-+ wch[0] = ch;
-+ wch[1] = 0;
- }
-- curses_line[x].attr |= at;
-+ setcchar(&curses_line[x], wch, at, 0, NULL);
- }
- mvwadd_wchnstr(screenpad, y, 0, curses_line, width);
- }
-@@ -400,65 +402,106 @@ static void curses_atexit(void)
- endwin();
- }
-
-+/*
-+ * In the following:
-+ * - fch is the font glyph number
-+ * - uch is the unicode value
-+ * - wch is the wchar_t value (may not be unicode, e.g. on BSD/solaris)
-+ * - mbch is the native local-dependent multibyte representation
-+ */
-+
- /* Setup wchar glyph for one UCS-2 char */
--static void convert_ucs(int glyph, uint16_t ch, iconv_t conv)
-+static void convert_ucs(unsigned char fch, uint16_t uch, iconv_t conv)
- {
-- wchar_t wch;
-- char *pch, *pwch;
-- size_t sch, swch;
--
-- pch = (char *) &ch;
-- pwch = (char *) &wch;
-- sch = sizeof(ch);
-- swch = sizeof(wch);
--
-- if (iconv(conv, &pch, &sch, &pwch, &swch) == (size_t) -1) {
-- fprintf(stderr, "Could not convert 0x%04x from UCS-2 to WCHAR_T: %s\n",
-- ch, strerror(errno));
-- } else {
-- vga_to_curses[glyph].chars[0] = wch;
-+ char mbch[MB_CUR_MAX];
-+ wchar_t wch[2];
-+ char *puch, *pmbch;
-+ size_t such, smbch;
-+
-+ puch = (char *) &uch;
-+ pmbch = (char *) mbch;
-+ such = sizeof(uch);
-+ smbch = sizeof(mbch);
-+
-+ if (iconv(conv, &puch, &such, &pmbch, &smbch) == (size_t) -1) {
-+ fprintf(stderr, "Could not convert 0x%04x "
-+ "from UCS-2 to a multibyte character: %s\n",
-+ uch, strerror(errno));
-+ return;
-+ }
-+
-+ if (mbtowc(&wch[0], mbch, sizeof(mbch) - smbch) == -1) {
-+ fprintf(stderr, "Could not convert 0x%04x "
-+ "from a multibyte character to wchar_t: %s\n",
-+ uch, strerror(errno));
-+ return;
- }
-+
-+ wch[1] = 0;
-+ setcchar(&vga_to_curses[fch], wch, 0, 0, NULL);
- }
-
- /* Setup wchar glyph for one font character */
--static void convert_font(unsigned char ch, iconv_t conv)
-+static void convert_font(unsigned char fch, iconv_t conv)
- {
-- wchar_t wch;
-- char *pch, *pwch;
-- size_t sch, swch;
--
-- pch = (char *) &ch;
-- pwch = (char *) &wch;
-- sch = sizeof(ch);
-- swch = sizeof(wch);
--
-- if (iconv(conv, &pch, &sch, &pwch, &swch) == (size_t) -1) {
-- fprintf(stderr, "Could not convert 0x%02x from %s to WCHAR_T: %s\n",
-- ch, font_charset, strerror(errno));
-- } else {
-- vga_to_curses[ch].chars[0] = wch;
-+ char mbch[MB_CUR_MAX];
-+ wchar_t wch[2];
-+ char *pfch, *pmbch;
-+ size_t sfch, smbch;
-+
-+ pfch = (char *) &fch;
-+ pmbch = (char *) &mbch;
-+ sfch = sizeof(fch);
-+ smbch = sizeof(mbch);
-+
-+ if (iconv(conv, &pfch, &sfch, &pmbch, &smbch) == (size_t) -1) {
-+ fprintf(stderr, "Could not convert font glyph 0x%02x "
-+ "from %s to a multibyte character: %s\n",
-+ fch, font_charset, strerror(errno));
-+ return;
-+ }
-+
-+ if (mbtowc(&wch[0], mbch, sizeof(mbch) - smbch) == -1) {
-+ fprintf(stderr, "Could not convert font glyph 0x%02x "
-+ "from a multibyte character to wchar_t: %s\n",
-+ fch, strerror(errno));
-+ return;
- }
-+
-+ wch[1] = 0;
-+ setcchar(&vga_to_curses[fch], wch, 0, 0, NULL);
- }
-
- /* Convert one wchar to UCS-2 */
- static uint16_t get_ucs(wchar_t wch, iconv_t conv)
- {
-- uint16_t ch;
-- char *pch, *pwch;
-- size_t sch, swch;
--
-- pch = (char *) &ch;
-- pwch = (char *) &wch;
-- sch = sizeof(ch);
-- swch = sizeof(wch);
--
-- if (iconv(conv, &pwch, &swch, &pch, &sch) == (size_t) -1) {
-- fprintf(stderr, "Could not convert 0x%02lx from WCHAR_T to UCS-2: %s\n",
-- (unsigned long)wch, strerror(errno));
-+ char mbch[MB_CUR_MAX];
-+ uint16_t uch;
-+ char *pmbch, *puch;
-+ size_t smbch, such;
-+ int ret;
-+
-+ ret = wctomb(mbch, wch);
-+ if (ret == -1) {
-+ fprintf(stderr, "Could not convert 0x%04x "
-+ "from wchar_t to a multibyte character: %s\n",
-+ wch, strerror(errno));
-+ return 0xFFFD;
-+ }
-+
-+ pmbch = (char *) mbch;
-+ puch = (char *) &uch;
-+ smbch = ret;
-+ such = sizeof(uch);
-+
-+ if (iconv(conv, &pmbch, &smbch, &puch, &such) == (size_t) -1) {
-+ fprintf(stderr, "Could not convert 0x%04x "
-+ "from a multibyte character to UCS-2 : %s\n",
-+ wch, strerror(errno));
- return 0xFFFD;
- }
-
-- return ch;
-+ return uch;
- }
-
- /*
-@@ -466,6 +509,11 @@ static uint16_t get_ucs(wchar_t wch, ico
- */
- static void font_setup(void)
- {
-+ iconv_t ucs2_to_nativecharset;
-+ iconv_t nativecharset_to_ucs2;
-+ iconv_t font_conv;
-+ int i;
-+
- /*
- * Control characters are normally non-printable, but VGA does have
- * well-known glyphs for them.
-@@ -505,30 +553,25 @@ static void font_setup(void)
- 0x25bc
- };
-
-- iconv_t ucs_to_wchar_conv;
-- iconv_t wchar_to_ucs_conv;
-- iconv_t font_conv;
-- int i;
--
-- ucs_to_wchar_conv = iconv_open("WCHAR_T", "UCS-2");
-- if (ucs_to_wchar_conv == (iconv_t) -1) {
-+ ucs2_to_nativecharset = iconv_open(nl_langinfo(CODESET), "UCS-2");
-+ if (ucs2_to_nativecharset == (iconv_t) -1) {
- fprintf(stderr, "Could not convert font glyphs from UCS-2: '%s'\n",
- strerror(errno));
- exit(1);
- }
-
-- wchar_to_ucs_conv = iconv_open("UCS-2", "WCHAR_T");
-- if (wchar_to_ucs_conv == (iconv_t) -1) {
-- iconv_close(ucs_to_wchar_conv);
-+ nativecharset_to_ucs2 = iconv_open("UCS-2", nl_langinfo(CODESET));
-+ if (nativecharset_to_ucs2 == (iconv_t) -1) {
-+ iconv_close(ucs2_to_nativecharset);
- fprintf(stderr, "Could not convert font glyphs to UCS-2: '%s'\n",
- strerror(errno));
- exit(1);
- }
-
-- font_conv = iconv_open("WCHAR_T", font_charset);
-+ font_conv = iconv_open(nl_langinfo(CODESET), font_charset);
- if (font_conv == (iconv_t) -1) {
-- iconv_close(ucs_to_wchar_conv);
-- iconv_close(wchar_to_ucs_conv);
-+ iconv_close(ucs2_to_nativecharset);
-+ iconv_close(nativecharset_to_ucs2);
- fprintf(stderr, "Could not convert font glyphs from %s: '%s'\n",
- font_charset, strerror(errno));
- exit(1);
-@@ -536,7 +579,7 @@ static void font_setup(void)
-
- /* Control characters */
- for (i = 0; i <= 0x1F; i++) {
-- convert_ucs(i, control_characters[i], ucs_to_wchar_conv);
-+ convert_ucs(i, control_characters[i], ucs2_to_nativecharset);
- }
-
- for (i = 0x20; i <= 0xFF; i++) {
-@@ -544,12 +587,21 @@ static void font_setup(void)
- }
-
- /* DEL */
-- convert_ucs(0x7F, 0x2302, ucs_to_wchar_conv);
-+ convert_ucs(0x7F, 0x2302, ucs2_to_nativecharset);
-
- if (strcmp(nl_langinfo(CODESET), "UTF-8")) {
- /* Non-Unicode capable, use termcap equivalents for those available */
- for (i = 0; i <= 0xFF; i++) {
-- switch (get_ucs(vga_to_curses[i].chars[0], wchar_to_ucs_conv)) {
-+ wchar_t wch[CCHARW_MAX];
-+ attr_t attr;
-+ short color;
-+ int ret;
-+
-+ ret = getcchar(&vga_to_curses[i], wch, &attr, &color, NULL);
-+ if (ret == ERR)
-+ continue;
-+
-+ switch (get_ucs(wch[0], nativecharset_to_ucs2)) {
- case 0x00a3:
- vga_to_curses[i] = *WACS_STERLING;
- break;
-@@ -649,8 +701,8 @@ static void font_setup(void)
- }
- }
- }
-- iconv_close(ucs_to_wchar_conv);
-- iconv_close(wchar_to_ucs_conv);
-+ iconv_close(ucs2_to_nativecharset);
-+ iconv_close(nativecharset_to_ucs2);
- iconv_close(font_conv);
- }
-