pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils Add Xen 4.11.0 packages.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fc6e3e51c84c
branches:  trunk
changeset: 383173:fc6e3e51c84c
user:      bouyer <bouyer%pkgsrc.org@localhost>
date:      Tue Jul 24 13:40:11 2018 +0000

description:
Add Xen 4.11.0 packages.
Note that there is a bug in 4.11 (also present in recent 4.6 and 4.8)
which causes an infrequent assert failure when running NetBSD PV guests.
The root cause has not been found, but a workaround is inclued which doesn't
seems to have ill effects. See xenkernel411/patches/patch-zz-bouyer
for details.

diffstat:

 sysutils/xenkernel411/DESCR                                                           |   14 +
 sysutils/xenkernel411/MESSAGE                                                         |   11 +
 sysutils/xenkernel411/Makefile                                                        |   78 +
 sysutils/xenkernel411/PLIST                                                           |    3 +
 sysutils/xenkernel411/distinfo                                                        |   14 +
 sysutils/xenkernel411/patches/patch-Config.mk                                         |   14 +
 sysutils/xenkernel411/patches/patch-xen_Makefile                                      |   13 +
 sysutils/xenkernel411/patches/patch-xen_Rules.mk                                      |   12 +
 sysutils/xenkernel411/patches/patch-xen_arch_x86_Rules.mk                             |   12 +
 sysutils/xenkernel411/patches/patch-xen_arch_x86_boot_build32.mk                      |   15 +
 sysutils/xenkernel411/patches/patch-xen_tools_symbols.c                               |   19 +
 sysutils/xenkernel411/patches/patch-zz-JBeulich                                       |   59 +
 sysutils/xenkernel411/patches/patch-zz-bouyer                                         |   23 +
 sysutils/xentools411/DESCR                                                            |    5 +
 sysutils/xentools411/MESSAGE                                                          |   11 +
 sysutils/xentools411/MESSAGE.NetBSD                                                   |   17 +
 sysutils/xentools411/Makefile                                                         |  283 +++++
 sysutils/xentools411/PLIST                                                            |  499 ++++++++++
 sysutils/xentools411/distinfo                                                         |   79 +
 sysutils/xentools411/patches/patch-.._ipxe_src_core_settings.c                        |   34 +
 sysutils/xentools411/patches/patch-.._ipxe_src_net_fcels.c                            |  124 ++
 sysutils/xentools411/patches/patch-Config.mk                                          |   22 +
 sysutils/xentools411/patches/patch-Makefile                                           |   30 +
 sysutils/xentools411/patches/patch-docs_man_xl-disk-configuration.pod.5               |   13 +
 sysutils/xentools411/patches/patch-docs_man_xl.cfg.pod.5.in                           |   29 +
 sysutils/xentools411/patches/patch-docs_man_xl.conf.pod.5                             |   37 +
 sysutils/xentools411/patches/patch-docs_man_xl.pod.1.in                               |   44 +
 sysutils/xentools411/patches/patch-docs_man_xlcpupool.cfg.pod.5                       |   28 +
 sysutils/xentools411/patches/patch-docs_misc_block-scripts.txt                        |   13 +
 sysutils/xentools411/patches/patch-extras_mini-os_Config.mk                           |   17 +
 sysutils/xentools411/patches/patch-extras_mini-os_arch_x86_arch.mk                    |   22 +
 sysutils/xentools411/patches/patch-extras_mini-os_include_fcntl.h                     |   12 +
 sysutils/xentools411/patches/patch-extras_mini-os_include_time.h                      |   12 +
 sysutils/xentools411/patches/patch-extras_mini-os_lib_sys.c                           |   18 +
 sysutils/xentools411/patches/patch-extras_mini-os_lock.c                              |   11 +
 sysutils/xentools411/patches/patch-m4_paths.m4                                        |   16 +
 sysutils/xentools411/patches/patch-tools_Makefile                                     |   43 +
 sysutils/xentools411/patches/patch-tools_Rules.mk                                     |  117 ++
 sysutils/xentools411/patches/patch-tools_configure                                    |   39 +
 sysutils/xentools411/patches/patch-tools_console_daemon_utils.c                       |   22 +
 sysutils/xentools411/patches/patch-tools_debugger_gdbsx_Makefile                      |   15 +
 sysutils/xentools411/patches/patch-tools_examples_Makefile                            |   12 +
 sysutils/xentools411/patches/patch-tools_firmware_etherboot_Makefile                  |   26 +
 sysutils/xentools411/patches/patch-tools_firmware_hvmloader_Makefile                  |   13 +
 sysutils/xentools411/patches/patch-tools_hotplug_NetBSD_Makefile                      |   52 +
 sysutils/xentools411/patches/patch-tools_hotplug_NetBSD_block                         |   37 +
 sysutils/xentools411/patches/patch-tools_hotplug_NetBSD_vif-bridge                    |   16 +
 sysutils/xentools411/patches/patch-tools_hotplug_NetBSD_vif-ip                        |   15 +
 sysutils/xentools411/patches/patch-tools_hotplug_common_Makefile                      |   24 +
 sysutils/xentools411/patches/patch-tools_include_xen-sys_NetBSD_gntdev.h              |  110 ++
 sysutils/xentools411/patches/patch-tools_libs_call_netbsd.c                           |   55 +
 sysutils/xentools411/patches/patch-tools_libs_call_private.h                          |   16 +
 sysutils/xentools411/patches/patch-tools_libs_evtchn_netbsd.c                         |   22 +
 sysutils/xentools411/patches/patch-tools_libs_foreignmemory_compat.c                  |   14 +
 sysutils/xentools411/patches/patch-tools_libs_foreignmemory_netbsd.c                  |   48 +
 sysutils/xentools411/patches/patch-tools_libs_foreignmemory_private.h                 |   13 +
 sysutils/xentools411/patches/patch-tools_libxl_libxl__create.c                        |   40 +
 sysutils/xentools411/patches/patch-tools_libxl_libxl_dom.c                            |   13 +
 sysutils/xentools411/patches/patch-tools_libxl_libxl_event.c                          |   24 +
 sysutils/xentools411/patches/patch-tools_libxl_libxl_internal.h                       |   23 +
 sysutils/xentools411/patches/patch-tools_libxl_libxl_uuid.c                           |   22 +
 sysutils/xentools411/patches/patch-tools_ocaml_common.make                            |   31 +
 sysutils/xentools411/patches/patch-tools_ocaml_xenstored_Makefile                     |   12 +
 sysutils/xentools411/patches/patch-tools_ocaml_xenstored_utils.ml                     |   13 +
 sysutils/xentools411/patches/patch-tools_qemu-xen-traditional_Makefile                |   84 +
 sysutils/xentools411/patches/patch-tools_qemu-xen-traditional_block-raw-posix.c       |   62 +
 sysutils/xentools411/patches/patch-tools_qemu-xen-traditional_configure               |   41 +
 sysutils/xentools411/patches/patch-tools_qemu-xen-traditional_hw_e1000.c              |   34 +
 sysutils/xentools411/patches/patch-tools_qemu-xen-traditional_hw_ide.c                |   37 +
 sysutils/xentools411/patches/patch-tools_qemu-xen-traditional_hw_pass-through.c       |   13 +
 sysutils/xentools411/patches/patch-tools_qemu-xen-traditional_hw_pass-through.h       |   18 +
 sysutils/xentools411/patches/patch-tools_qemu-xen-traditional_hw_piix4acpi.c          |   17 +
 sysutils/xentools411/patches/patch-tools_qemu-xen-traditional_hw_pt-graphics.c        |   13 +
 sysutils/xentools411/patches/patch-tools_qemu-xen-traditional_hw_pt-msi.c             |   15 +
 sysutils/xentools411/patches/patch-tools_qemu-xen-traditional_hw_pt-msi.h             |   12 +
 sysutils/xentools411/patches/patch-tools_qemu-xen-traditional_i386-dm_hookstarget.mak |   12 +
 sysutils/xentools411/patches/patch-tools_qemu-xen-traditional_net.c                   |   46 +
 sysutils/xentools411/patches/patch-tools_qemu-xen-traditional_xen-hooks.mak           |   51 +
 sysutils/xentools411/patches/patch-tools_qemu-xen_audio_audio.c                       |   12 +
 sysutils/xentools411/patches/patch-tools_qemu-xen_configure                           |   14 +
 sysutils/xentools411/patches/patch-tools_qemu-xen_qemu-doc.texi                       |   15 +
 sysutils/xentools411/patches/patch-tools_xenpaging_xenpaging.c                        |   18 +
 sysutils/xentools411/patches/patch-tools_xenstore_xc.c                                |   18 +
 sysutils/xentools411/patches/patch-tools_xenstore_xs_lib.c                            |   13 +
 sysutils/xentools411/patches/patch-tools_xentrace_xentrace.c                          |   13 +
 sysutils/xentools411/patches/patch-tools_xl_Makefile                                  |   16 +
 sysutils/xentools411/patches/patch-xen_Rules.mk                                       |   12 +
 sysutils/xentools411/patches/patch-xen_tools_symbols.c                                |   19 +
 88 files changed, 3155 insertions(+), 0 deletions(-)

diffs (truncated from 3507 to 300 lines):

diff -r 7151a40725d6 -r fc6e3e51c84c sysutils/xenkernel411/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel411/DESCR       Tue Jul 24 13:40:11 2018 +0000
@@ -0,0 +1,14 @@
+Xen is a hypervisor which supports running multiple guest operating
+systems on a single machine. Guest OSes (also called "domains")
+can be either paravirtualised (i.e. make hypercalls in order to
+access hardware), run in HVM (Hardware Virtualisation Mode) where
+they will be presented with virtual devices, or a combination where
+they use hypercalls to access hardware but manage memory themselves.
+At boot, the xen kernel is loaded along with the guest kernel for
+the first domain (called domain0). domain0 has privileges to access
+the physical hardware (PCI and ISA devices), administrate other
+domains and provide virtual devices (disks and network) to other
+domains.
+
+This package contains the 4.8 Xen kernel itself.  PCI passthrough is
+not supported.  PAE is mandatory; on i386 one must use XEN3PAE_DOM[0U].
diff -r 7151a40725d6 -r fc6e3e51c84c sysutils/xenkernel411/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel411/MESSAGE     Tue Jul 24 13:40:11 2018 +0000
@@ -0,0 +1,11 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2018/07/24 13:40:11 bouyer Exp $
+
+The Xen hypervisor is installed under the following locations:
+       ${XENKERNELDIR}/xen.gz          (standard hypervisor)
+       ${XENKERNELDIR}/xen-debug.gz    (debug hypervisor)
+
+Note that unlike upstream Xen, pv-linear-pt defaults to true.
+You can disable it using pv-linear-pt=false on the Xen command line,
+but then you can't boot NetBSD in PV mode.
+===========================================================================
diff -r 7151a40725d6 -r fc6e3e51c84c sysutils/xenkernel411/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel411/Makefile    Tue Jul 24 13:40:11 2018 +0000
@@ -0,0 +1,78 @@
+# $NetBSD: Makefile,v 1.1 2018/07/24 13:40:11 bouyer Exp $
+
+VERSION=       4.11.0
+#PKGREVISION=  4
+DISTNAME=      xen-${VERSION}
+PKGNAME=       xenkernel411-${VERSION}
+CATEGORIES=    sysutils
+MASTER_SITES=  https://downloads.xenproject.org/release/xen/${VERSION}/
+DIST_SUBDIR=   xen411
+
+MAINTAINER=    bouyer%NetBSD.org@localhost
+HOMEPAGE=      http://xenproject.org/
+COMMENT=       Xen 4.11.x Kernel
+
+LICENSE=       gnu-gpl-v2
+
+ONLY_FOR_PLATFORM=     Linux-2.6*-x86_64
+ONLY_FOR_PLATFORM+=    NetBSD-[5-9].*-x86_64
+
+SSP_SUPPORTED= no
+
+NO_CONFIGURE=  yes
+USE_TOOLS+=    gmake
+
+PYTHON_FOR_BUILD_ONLY=         YES
+PYTHON_VERSIONS_INCOMPATIBLE=  34 35 36
+
+MAKE_ENV+=     OCAML_TOOLS=no
+.if defined(PKGREVISION) && !empty(PKGREVISION) && (${PKGREVISION} != "0")
+MAKE_ENV+=     XEN_VENDORVERSION=nb${PKGREVISION}
+.else
+MAKE_ENV+=     XEN_VENDORVERSION=nb0
+.endif
+
+INSTALLATION_DIRS=     xen411-kernel
+XENKERNELDIR=          ${PREFIX}/${INSTALLATION_DIRS}
+
+MESSAGE_SUBST+=                XENKERNELDIR=${XENKERNELDIR}
+
+.include "../../mk/compiler.mk"
+.if !empty(PKGSRC_COMPILER:Mclang)
+EXTRA_CFLAGS+= -Qunused-arguments -no-integrated-as -Wno-error=format \
+               -Wno-error=parentheses-equality -Wno-error=enum-conversion \
+               -Wno-error=unused-function -Wno-error=unused-const-variable \
+               -Wno-error=ignored-attributes -Wno-error=constant-conversion \
+               -Wno-error=address-of-packed-member \
+               -Wno-error=initializer-overrides \
+               -Wno-error=tautological-compare
+.elif !empty(PKGSRC_COMPILER:Mgcc)
+EXTRA_CFLAGS+=  -falign-functions=16
+.endif
+
+MAKE_ENV+=     EXTRA_CFLAGS=${EXTRA_CFLAGS:Q}
+
+do-build:
+       cd ${WRKSRC} && ${BUILD_MAKE_CMD} build-xen
+       ${CP} ${WRKSRC}/xen/xen.gz ${WRKDIR}/xen.gz
+       cd ${WRKSRC} && ${MAKE_PROGRAM} clean
+       echo "CONFIG_DEBUG=y" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_CRASH_DEBUG is not set" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_FRAME_POINTER is not set" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_GCOV is not set" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_LOCK_PROFILE is not set" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_PERF_COUNTERS is not set" >> ${WRKSRC}/xen/.config
+       echo "CONFIG_VERBOSE_DEBUG=y" >> ${WRKSRC}/xen/.config
+       echo "CONFIG_SCRUB_DEBUG=y" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_UBSAN is not set" >> ${WRKSRC}/xen/.config
+       cd ${WRKSRC} && ${BUILD_MAKE_CMD} build-xen
+       ${CP} ${WRKSRC}/xen/xen.gz ${WRKDIR}/xen-debug.gz
+
+do-install:
+       ${INSTALL_DATA} ${WRKDIR}/xen.gz \
+           ${DESTDIR}${XENKERNELDIR}/xen.gz
+       ${INSTALL_DATA} ${WRKDIR}/xen-debug.gz \
+           ${DESTDIR}${XENKERNELDIR}/xen-debug.gz
+
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 7151a40725d6 -r fc6e3e51c84c sysutils/xenkernel411/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel411/PLIST       Tue Jul 24 13:40:11 2018 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2018/07/24 13:40:11 bouyer Exp $
+xen411-kernel/xen-debug.gz
+xen411-kernel/xen.gz
diff -r 7151a40725d6 -r fc6e3e51c84c sysutils/xenkernel411/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel411/distinfo    Tue Jul 24 13:40:11 2018 +0000
@@ -0,0 +1,14 @@
+$NetBSD: distinfo,v 1.1 2018/07/24 13:40:11 bouyer Exp $
+
+SHA1 (xen411/xen-4.11.0.tar.gz) = 32b0657002bcd1992dcb6b7437dd777463f3b59a
+RMD160 (xen411/xen-4.11.0.tar.gz) = a2195b67ffd4bc1e6fc36bfc580ee9efe1ae708c
+SHA512 (xen411/xen-4.11.0.tar.gz) = 33d431c194f10d5ee767558404a1f80a66b3df019012b0bbd587fcbc9524e1bba7ea04269020ce891fe9d211d2f81c63bf78abedcdbe1595aee26251c803a50a
+Size (xen411/xen-4.11.0.tar.gz) = 25131533 bytes
+SHA1 (patch-Config.mk) = 9372a09efd05c9fbdbc06f8121e411fcb7c7ba65
+SHA1 (patch-xen_Makefile) = 465388d80de414ca3bb84faefa0f52d817e423a6
+SHA1 (patch-xen_Rules.mk) = c743dc63f51fc280d529a7d9e08650292c171dac
+SHA1 (patch-xen_arch_x86_Rules.mk) = 0bedfc53a128a87b6a249ae04fbdf6a053bfb70b
+SHA1 (patch-xen_arch_x86_boot_build32.mk) = b82c20de9b86ddaa9d05bbc1ff28f970eb78473c
+SHA1 (patch-xen_tools_symbols.c) = 6070b3b5ccc38a196283cfc1c52f5d87858beb18
+SHA1 (patch-zz-JBeulich) = d9eed028cbaf24cfd3fd725fdbb8d0264a19d615
+SHA1 (patch-zz-bouyer) = fb8a8e27d1879663d2f4dd198484626eaf20dd50
diff -r 7151a40725d6 -r fc6e3e51c84c sysutils/xenkernel411/patches/patch-Config.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel411/patches/patch-Config.mk     Tue Jul 24 13:40:11 2018 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-Config.mk,v 1.1 2018/07/24 13:40:11 bouyer Exp $
+
+--- Config.mk.orig     2018-04-17 19:21:31.000000000 +0200
++++ Config.mk  2018-04-23 13:29:47.000000000 +0200
+@@ -32,6 +32,9 @@
+ # Tools to run on system hosting the build
+ HOSTCFLAGS  = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
+ HOSTCFLAGS += -fno-strict-aliasing
++HOSTCFLAGS += ${EXTRA_CFLAGS}
++CFLAGS     += ${EXTRA_CFLAGS}
++
+ 
+ DISTDIR     ?= $(XEN_ROOT)/dist
+ DESTDIR     ?= /
diff -r 7151a40725d6 -r fc6e3e51c84c sysutils/xenkernel411/patches/patch-xen_Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel411/patches/patch-xen_Makefile  Tue Jul 24 13:40:11 2018 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-xen_Makefile,v 1.1 2018/07/24 13:40:11 bouyer Exp $
+
+--- xen/Makefile.orig  2018-04-17 19:21:31.000000000 +0200
++++ xen/Makefile       2018-04-23 13:29:47.000000000 +0200
+@@ -167,7 +167,7 @@
+           -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
+           -e 's/@@domain@@/$(XEN_DOMAIN)/g' \
+           -e 's/@@hostname@@/$(XEN_BUILD_HOST)/g' \
+-          -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 2>&1 | head -1)!g' \
++          -e 's!@@compiler@@!$(shell $(CC) $(EXTRA_CFLAGS) $(CFLAGS) --version 2>&1 | head -1)!g' \
+           -e 's/@@version@@/$(XEN_VERSION)/g' \
+           -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
+           -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
diff -r 7151a40725d6 -r fc6e3e51c84c sysutils/xenkernel411/patches/patch-xen_Rules.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel411/patches/patch-xen_Rules.mk  Tue Jul 24 13:40:11 2018 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-xen_Rules.mk,v 1.1 2018/07/24 13:40:11 bouyer Exp $
+
+--- xen/Rules.mk.orig  2018-04-23 14:50:02.000000000 +0200
++++ xen/Rules.mk       2018-04-23 14:50:32.000000000 +0200
+@@ -1,4 +1,7 @@
+ 
++#reset cflags. Why is it needed in pkgsrc ?
++CFLAGS=
++
+ -include $(BASEDIR)/include/config/auto.conf
+ 
+ include $(XEN_ROOT)/Config.mk
diff -r 7151a40725d6 -r fc6e3e51c84c sysutils/xenkernel411/patches/patch-xen_arch_x86_Rules.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel411/patches/patch-xen_arch_x86_Rules.mk Tue Jul 24 13:40:11 2018 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-xen_arch_x86_Rules.mk,v 1.1 2018/07/24 13:40:11 bouyer Exp $
+
+--- xen/arch/x86/Rules.mk.orig 2018-04-17 19:21:31.000000000 +0200
++++ xen/arch/x86/Rules.mk      2018-04-23 13:31:24.000000000 +0200
+@@ -8,6 +8,7 @@
+ CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default
+ CFLAGS += -DXEN_IMG_OFFSET=$(XEN_IMG_OFFSET)
+ CFLAGS += '-D__OBJECT_LABEL__=$(subst /,$$,$(subst -,_,$(subst $(BASEDIR)/,,$(CURDIR))/$@))'
++CFLAGS += $(EXTRA_CFLAGS)
+ 
+ # Prevent floating-point variables from creeping into Xen.
+ CFLAGS += -msoft-float
diff -r 7151a40725d6 -r fc6e3e51c84c sysutils/xenkernel411/patches/patch-xen_arch_x86_boot_build32.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel411/patches/patch-xen_arch_x86_boot_build32.mk  Tue Jul 24 13:40:11 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-xen_arch_x86_boot_build32.mk,v 1.1 2018/07/24 13:40:11 bouyer Exp $
+linux's toolchain doesn't generate a .eh_frame section but NetBSD does.
+remove it.
+
+--- xen/arch/x86/boot/build32.mk.orig  2018-04-17 19:21:31.000000000 +0200
++++ xen/arch/x86/boot/build32.mk       2018-04-23 13:29:47.000000000 +0200
+@@ -25,7 +25,7 @@
+                               exit $$(expr $$idx + 1);; \
+                       esac; \
+               done
+-      $(OBJCOPY) -O binary -R .got.plt $< $@
++      $(OBJCOPY) -O binary -R .got.plt -R .eh_frame $< $@
+ 
+ %.lnk: %.o
+       $(LD) $(LDFLAGS_DIRECT) -N -T build32.lds -o $@ $<
diff -r 7151a40725d6 -r fc6e3e51c84c sysutils/xenkernel411/patches/patch-xen_tools_symbols.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel411/patches/patch-xen_tools_symbols.c   Tue Jul 24 13:40:11 2018 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-xen_tools_symbols.c,v 1.1 2018/07/24 13:40:11 bouyer Exp $
+fix "error: array subscript has type 'char'"
+
+--- xen/tools/symbols.c.orig   2018-04-17 19:21:31.000000000 +0200
++++ xen/tools/symbols.c        2018-04-23 13:29:47.000000000 +0200
+@@ -173,11 +173,11 @@
+       /* include the type field in the symbol name, so that it gets
+        * compressed together */
+       s->len = strlen(str) + 1;
+-      if (islower(stype) && filename)
++      if (islower((uint8_t)stype) && filename)
+               s->len += strlen(filename) + 1;
+       s->sym = malloc(s->len + 1);
+       sym = SYMBOL_NAME(s);
+-      if (islower(stype) && filename) {
++      if (islower((uint8_t)stype) && filename) {
+               sym = stpcpy(sym, filename);
+               *sym++ = '#';
+       }
diff -r 7151a40725d6 -r fc6e3e51c84c sysutils/xenkernel411/patches/patch-zz-JBeulich
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel411/patches/patch-zz-JBeulich   Tue Jul 24 13:40:11 2018 +0000
@@ -0,0 +1,59 @@
+$NetBSD: patch-zz-JBeulich,v 1.1 2018/07/24 13:40:11 bouyer Exp $
+
+x86: further avoid setting TLB flush time stamp
+
+NetBSD's use of linear page tables in 32-bit mode exposes an issue with
+us still storing TLB flush time stamps too early, corrupting the
+linear_pt_count field living in the same union. Since we go that path
+(for page tables) only when neither PGT_validated nor PGT_partial are
+set on a page, we don't really require a flush to happen (see also the
+code comment), yet we're also no concerned if one happens which isn't
+needed (which might occur when we never write the time stamp).
+
+Reported-by: Manuel Bouyer <bouyer%antioche.eu.org@localhost>
+Signed-off-by: Jan Beulich <jbeulich%suse.com@localhost>
+
+--- ./xen/arch/x86/mm.c.orig   2018-07-09 15:47:19.000000000 +0200
++++ ./xen/arch/x86/mm.c        2018-07-16 12:38:47.000000000 +0200
+@@ -2538,8 +2538,17 @@
+         switch ( nx & (PGT_locked | PGT_count_mask) )
+         {
+         case 0:
+-            if ( unlikely((nx & PGT_type_mask) <= PGT_l4_page_table) &&
+-                 likely(nx & (PGT_validated|PGT_partial)) )
++            /*
++             * set_tlbflush_timestamp() accesses the same union linear_pt_count
++             * lives in. Pages (including page table ones), however, don't need
++             * their flush time stamp set except when the last reference is
++             * dropped. For PT pages this happens in _put_final_page_type(). PT
++             * pages which don't have PGT_validated set do not require flushing,
++             * as they would never have been installed into a PT hierarchy.
++             */
++            if ( likely((nx & PGT_type_mask) > PGT_l4_page_table) )
++                set_tlbflush_timestamp(page);
++            else if ( likely(nx & (PGT_validated|PGT_partial)) )
+             {
+                 int rc;
+ 
+@@ -2560,19 +2569,8 @@
+                 return rc;
+             }
+ 
+-            if ( !ptpg || !PGT_type_equal(x, ptpg->u.inuse.type_info) )
+-            {
+-                /*
+-                 * set_tlbflush_timestamp() accesses the same union
+-                 * linear_pt_count lives in. Pages (including page table ones),
+-                 * however, don't need their flush time stamp set except when



Home | Main Index | Thread Index | Old Index