aboutsummaryrefslogtreecommitdiffstats
path: root/main/xen
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-08-13 09:56:09 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-08-13 09:59:01 +0000
commitcae7a12a244f566b4c5cc86f96ab495e1d106bbf (patch)
treec627c742d5c980a27fa709a52d13fc294d0c108a /main/xen
parent3e32e43c4bceb0542000eef8e0358ec8f6c1e502 (diff)
downloadaports-cae7a12a244f566b4c5cc86f96ab495e1d106bbf.tar.bz2
aports-cae7a12a244f566b4c5cc86f96ab495e1d106bbf.tar.xz
main/xen: upgrade to 4.1.3
Diffstat (limited to 'main/xen')
-rw-r--r--main/xen/APKBUILD16
-rw-r--r--main/xen/e1000.patch42
-rw-r--r--main/xen/fix_ipxe_no_pie_default.patch165
-rw-r--r--main/xen/pygrub_alpine.patch64
-rw-r--r--main/xen/xsa7-xsa8-xen-4.1.patch122
-rw-r--r--main/xen/xsa9-xen-4.1.patch46
6 files changed, 3 insertions, 452 deletions
diff --git a/main/xen/APKBUILD b/main/xen/APKBUILD
index ea31d32000..007f3006a0 100644
--- a/main/xen/APKBUILD
+++ b/main/xen/APKBUILD
@@ -2,8 +2,8 @@
# Contributor: Roger Pau Monne <roger.pau@entel.upc.edu>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=xen
-pkgver=4.1.2
-pkgrel=12
+pkgver=4.1.3
+pkgrel=0
pkgdesc="Xen hypervisor"
url="http://www.xen.org/"
arch="x86 x86_64"
@@ -19,14 +19,9 @@ source="http://bits.xensource.com/oss-xen/release/$pkgver/$pkgname-$pkgver.tar.g
detect_libiconv.patch
fix_bswap_blktap.patch
fix_bswap_blktap2.patch
- fix_ipxe_no_pie_default.patch
define_fsimage_dir.patch
- pygrub_alpine.patch
librt.patch
busybox-sed.patch
- e1000.patch
- xsa7-xsa8-xen-4.1.patch
- xsa9-xen-4.1.patch
xenstored.initd
xenstored.confd
@@ -118,19 +113,14 @@ hypervisor() {
mv "$pkgdir"/boot "$subpkgdir"/
}
-md5sums="73561faf3c1b5e36ec5c089b5db848ad xen-4.1.2.tar.gz
+md5sums="bed929d5c5e5135cab40e2a6aab73fa0 xen-4.1.3.tar.gz
6d4b045ae56be6288733d0e078f591ea blktap2_libvhd_add_iconv.patch
ed3283697cb1ddff066f4087eabf68c6 detect_libiconv.patch
503f0883f4a0b50fe4e37e09ed9a6177 fix_bswap_blktap.patch
b973dc1ffcc6872e222b36f3b7b4836b fix_bswap_blktap2.patch
-10dcf0b6a05691e9f88afc01bd414480 fix_ipxe_no_pie_default.patch
0bb8a435020a5a49b38b1a447fb69977 define_fsimage_dir.patch
-a7500c42804abdf68e051dc667e65f93 pygrub_alpine.patch
fa06495a175571f4aa3b6cb88937953e librt.patch
1bea3543ddc712330527b62fd9ff6520 busybox-sed.patch
-c31163a3cd6cf58b4e9cac0e96812d65 e1000.patch
-912bdedbec1359b6215dbf51e0608b7a xsa7-xsa8-xen-4.1.patch
-6bebaad2cfb7eed0bc7c166048e523e3 xsa9-xen-4.1.patch
6e5739dad7e2bd1b625e55ddc6c782b7 xenstored.initd
b017ccdd5e1c27bbf1513e3569d4ff07 xenstored.confd
ed262f15fb880badb53575539468646c xenconsoled.initd
diff --git a/main/xen/e1000.patch b/main/xen/e1000.patch
deleted file mode 100644
index 0be637661e..0000000000
--- a/main/xen/e1000.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 3cf61880403b4e484539596a95937cc066243388 Mon Sep 17 00:00:00 2001
-From: Ian Campbell <Ian.Campbell@citrix.com>
-Date: Thu, 2 Feb 2012 13:47:06 +0000
-Subject: [PATCH] e1000: bounds packet size against buffer size
-
-Otherwise we can write beyond the buffer and corrupt memory. This is tracked
-as CVE-2012-0029.
-
-Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-
-(Backported from qemu upstream 65f82df0d7a71ce1b10cd4c5ab08888d176ac840
- by Ian Campbell.)
-
-Signed-off-by: Ian Campbell <Ian.Campbell@citrix.com>
-(cherry picked from commit ebe37b2a3f844bad02dcc30d081f39eda06118f8)
----
- hw/e1000.c | 3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
-
-diff --git a/tools/ioemu-qemu-xen/hw/e1000.c b/tools/ioemu-qemu-xen/hw/e1000.c
-index bb3689e..97104ed 100644
---- a/tools/ioemu-qemu-xen/hw/e1000.c
-+++ b/tools/ioemu-qemu-xen/hw/e1000.c
-@@ -444,6 +444,8 @@ process_tx_desc(E1000State *s, struct e1000_tx_desc *dp)
- bytes = split_size;
- if (tp->size + bytes > msh)
- bytes = msh - tp->size;
-+
-+ bytes = MIN(sizeof(tp->data) - tp->size, bytes);
- cpu_physical_memory_read(addr, tp->data + tp->size, bytes);
- if ((sz = tp->size + bytes) >= hdr && tp->size < hdr)
- memmove(tp->header, tp->data, hdr);
-@@ -459,6 +461,7 @@ process_tx_desc(E1000State *s, struct e1000_tx_desc *dp)
- // context descriptor TSE is not set, while data descriptor TSE is set
- DBGOUT(TXERR, "TCP segmentaion Error\n");
- } else {
-+ split_size = MIN(sizeof(tp->data) - tp->size, split_size);
- cpu_physical_memory_read(addr, tp->data + tp->size, split_size);
- tp->size += split_size;
- }
---
-1.7.2.5
diff --git a/main/xen/fix_ipxe_no_pie_default.patch b/main/xen/fix_ipxe_no_pie_default.patch
deleted file mode 100644
index 3ffb5388c4..0000000000
--- a/main/xen/fix_ipxe_no_pie_default.patch
+++ /dev/null
@@ -1,165 +0,0 @@
-# HG changeset patch
-# Parent b60667a56ae085ee2bcea896887d0907fb86af41
-ipxe: fix compilation issues with some gcc versions
-
-Backported some changes from current ipxe, to fix a issue with some
-new versions of gcc that add -fPIC by default, and compilation fails
-with the following error:
-
-arch/i386/core/cpu.c: In function 'get_cpuinfo':
-arch/i386/include/bits/cpu.h:79:2: error: inconsistent operand
-constraints in an 'asm'
-arch/i386/include/bits/cpu.h:79:2: error: inconsistent operand
-constraints in an 'asm'
-arch/i386/include/bits/cpu.h:79:2: error: inconsistent operand
-constraints in an 'asm'
-arch/i386/include/bits/cpu.h:79:2: error: inconsistent operand
-constraints in an 'asm'
-
-Two patches from ipxe git have been added. The problem is reproducible
-with at least this version of gcc:
-
-Using built-in specs.
-COLLECT_GCC=gcc
-COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-alpine-linux-uclibc/4.6.2/lto-wrapper
-Target: x86_64-alpine-linux-uclibc
-Configured with:
-/home/buildozer/aports/main/gcc/src/gcc-4.6.2/configure --prefix=/usr
---mandir=/usr/share/man --infodir=/usr/share/info
---build=x86_64-alpine-linux-uclibc --host=x86_64-alpine-linux-uclibc
---target=x86_64-alpine-linux-uclibc --with-pkgversion='Alpine
-4.6.2-r1' --disable-altivec --disable-checking --disable-fixed-point
---disable-libssp --disable-libstdcxx-pch --disable-multilib
---disable-nls --disable-werror --enable-__cxa_atexit --enable-cld
---enable-esp --enable-cloog-backend
---enable-languages=c,c++,objc,java,go --enable-shared
---enable-target-optspace --enable-tls --enable-threads
---with-dynamic-linker=ld64-uClibc.so.0.9.32
---with-dynamic-linker-prefix=/lib --with-system-zlib
---without-system-libunwind
-Thread model: posix
-gcc version 4.6.2 (Alpine 4.6.2-r1)
-
-Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
-
-diff -r b60667a56ae0 tools/firmware/etherboot/patches/gpxe-git-b8924c1aed51
---- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/tools/firmware/etherboot/patches/gpxe-git-b8924c1aed51 Fri Dec 16 13:48:49 2011 +0100
-@@ -0,0 +1,72 @@
-+commit b8924c1aed512aa40cf28a43635df383880f771d
-+Author: Michael Brown <mcb30@ipxe.org>
-+Date: Wed Mar 16 19:30:42 2011 +0000
-+
-+ [build] Allow workaround-specific flags to override default flags
-+
-+ Signed-off-by: Michael Brown <mcb30@ipxe.org>
-+
-+diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
-+index 709f8de..78e78c9 100644
-+--- a/src/Makefile.housekeeping
-++++ b/src/Makefile.housekeeping
-+@@ -109,6 +109,10 @@ VERYCLEANUP += .toolcheck
-+ # Check for various tool workarounds
-+ #
-+
-++WORKAROUND_CFLAGS :=
-++WORKAROUND_ASFLAGS :=
-++WORKAROUND_LDFLAGS :=
-++
-+ # Make syntax does not allow use of comma or space in certain places.
-+ # This ugly workaround is suggested in the manual.
-+ #
-+@@ -119,7 +123,7 @@ SPACE := $(EMPTY) $(EMPTY)
-+ # Check for an old version of gas (binutils 2.9.1)
-+ #
-+ OLDGAS := $(shell $(AS) --version | grep -q '2\.9\.1' && $(ECHO) -DGAS291)
-+-CFLAGS += $(OLDGAS)
-++WORKAROUND_CFLAGS += $(OLDGAS)
-+ oldgas :
-+ @$(ECHO) $(oldgas)
-+
-+@@ -131,7 +135,7 @@ ifeq ($(CCTYPE),gcc)
-+ SP_TEST = $(CC) -fno-stack-protector -x c -c /dev/null \
-+ -o /dev/null >/dev/null 2>&1
-+ SP_FLAGS := $(shell $(SP_TEST) && $(ECHO) '-fno-stack-protector')
-+-CFLAGS += $(SP_FLAGS)
-++WORKAROUND_CFLAGS += $(SP_FLAGS)
-+ endif
-+
-+ # gcc 4.4 generates .eh_frame sections by default, which distort the
-+@@ -141,7 +145,7 @@ ifeq ($(CCTYPE),gcc)
-+ CFI_TEST = $(CC) -fno-dwarf2-cfi-asm -x c -c /dev/null \
-+ -o /dev/null >/dev/null 2>&1
-+ CFI_FLAGS := $(shell $(CFI_TEST) && $(ECHO) '-fno-dwarf2-cfi-asm')
-+-CFLAGS += $(CFI_FLAGS)
-++WORKAROUND_CFLAGS += $(CFI_FLAGS)
-+ endif
-+
-+ # Some versions of gas choke on division operators, treating them as
-+@@ -150,7 +154,7 @@ endif
-+ #
-+ DIVIDE_TEST = $(AS) --divide /dev/null -o /dev/null 2>/dev/null
-+ DIVIDE_FLAGS := $(shell $(DIVIDE_TEST) && $(ECHO) '--divide')
-+-ASFLAGS += $(DIVIDE_FLAGS)
-++WORKAROUND_ASFLAGS += $(DIVIDE_FLAGS)
-+
-+ ###############################################################################
-+ #
-+@@ -375,9 +379,9 @@ CFLAGS += -diag-disable 1419 # Missing prototypes
-+ CFLAGS += -diag-disable 1599 # Hidden variables
-+ CFLAGS += -Wall -Wmissing-declarations
-+ endif
-+-CFLAGS += $(EXTRA_CFLAGS)
-+-ASFLAGS += $(EXTRA_ASFLAGS)
-+-LDFLAGS += $(EXTRA_LDFLAGS)
-++CFLAGS += $(WORKAROUND_CFLAGS) $(EXTRA_CFLAGS)
-++ASFLAGS += $(WORKAROUND_ASFLAGS) $(EXTRA_ASFLAGS)
-++LDFLAGS += $(WORKAROUND_LDFLAGS) $(EXTRA_LDFLAGS)
-+
-+ # Inhibit -Werror if NO_WERROR is specified on make command line
-+ #
-diff -r b60667a56ae0 tools/firmware/etherboot/patches/gpxe-git-fe61f6de0dd5
---- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/tools/firmware/etherboot/patches/gpxe-git-fe61f6de0dd5 Fri Dec 16 13:48:49 2011 +0100
-@@ -0,0 +1,32 @@
-+commit fe61f6de0dd5d39ac3de5e8e18742f9bd0aafad7
-+Author: Gilles Espinasse <g.esp@free.fr>
-+Date: Tue Mar 29 15:30:11 2011 +0100
-+
-+ [build] Fix compilation when gcc is patched to default to -fPIE -Wl,-pie
-+
-+ Signed-off-by: Gilles Espinasse <g.esp@free.fr>
-+ Modified-by: Michael Brown <mcb30@ipxe.org>
-+ Signed-off-by: Michael Brown <mcb30@ipxe.org>
-+
-+diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
-+index 57e52c0..c184351 100644
-+--- a/src/Makefile.housekeeping
-++++ b/src/Makefile.housekeeping
-+@@ -138,6 +138,17 @@ SP_FLAGS := $(shell $(SP_TEST) && $(ECHO) '-fno-stack-protector')
-+ WORKAROUND_CFLAGS += $(SP_FLAGS)
-+ endif
-+
-++# Some widespread patched versions of gcc include -fPIE -Wl,-pie by
-++# default. Note that gcc will exit *successfully* if it fails to
-++# recognise an option that starts with "no", so we have to test for
-++# output on stderr instead of checking the exit status.
-++#
-++ifeq ($(CCTYPE),gcc)
-++PIE_TEST = [ -z "`$(CC) -fno-PIE -nopie -x c -c /dev/null -o /dev/null 2>&1`" ]
-++PIE_FLAGS := $(shell $(PIE_TEST) && $(ECHO) '-fno-PIE -nopie')
-++WORKAROUND_CFLAGS += $(PIE_FLAGS)
-++endif
-++
-+ # gcc 4.4 generates .eh_frame sections by default, which distort the
-+ # output of "size". Inhibit this.
-+ #
-diff -r b60667a56ae0 tools/firmware/etherboot/patches/series
---- a/tools/firmware/etherboot/patches/series Fri Dec 16 10:47:18 2011 +0100
-+++ b/tools/firmware/etherboot/patches/series Fri Dec 16 13:48:49 2011 +0100
-@@ -1,3 +1,5 @@
- boot_prompt_option.patch
- gpxe-git-0edf2405b457
- gpxe-git-a803ef3dfeac
-+gpxe-git-b8924c1aed51
-+gpxe-git-fe61f6de0dd5
diff --git a/main/xen/pygrub_alpine.patch b/main/xen/pygrub_alpine.patch
deleted file mode 100644
index 98d0822c71..0000000000
--- a/main/xen/pygrub_alpine.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-# HG changeset patch
-# Parent 3e02aa9670b3265e36bdddbd4760415cd87d047b
-pygrub: fix extlinux parsing
-
-pygrub was unable to parse extlinux config files correctly, exactly
-the ones like:
-
-LABEL grsec
- KERNEL vmlinuz-3.0.10-grsec
- APPEND initrd=initramfs-3.0.10-grsec
-root=UUID=cfd4a7b4-8c40-4025-b877-8205f1c622ee
-modules=sd-mod,usb-storage,ext4 xen quiet
-
-This patch fixes it, adding a new case when parsing the "append" line,
-that searches for the initrd image.
-
-Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
-
-diff -r 3e02aa9670b3 tools/pygrub/examples/alpine-linux-2.3.2.extlinux
---- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/tools/pygrub/examples/alpine-linux-2.3.2.extlinux Tue Jan 03 13:11:46 2012 +0100
-@@ -0,0 +1,11 @@
-+DEFAULT menu.c32
-+PROMPT 0
-+MENU TITLE Alpine/Linux Boot Menu
-+MENU HIDDEN
-+MENU AUTOBOOT Alpine will be booted automatically in # seconds.
-+TIMEOUT 30
-+LABEL grsec
-+ MENU DEFAULT
-+ MENU LABEL Linux 3.0.10-grsec
-+ KERNEL vmlinuz-3.0.10-grsec
-+ APPEND initrd=initramfs-3.0.10-grsec root=UUID=a97ffe64-430f-4fd3-830e-4736d9a27af0 modules=sd-mod,usb-storage,ext4 quiet
-diff -r 3e02aa9670b3 tools/pygrub/src/ExtLinuxConf.py
---- a/tools/pygrub/src/ExtLinuxConf.py Thu Dec 15 18:55:46 2011 +0100
-+++ b/tools/pygrub/src/ExtLinuxConf.py Tue Jan 03 13:11:46 2012 +0100
-@@ -60,6 +60,13 @@ class ExtLinuxImage(object):
-
- # Bypass regular self.commands handling
- com = None
-+ elif "initrd=" in arg:
-+ # find initrd image in append line
-+ args = arg.strip().split(" ")
-+ for a in args:
-+ if a.lower().startswith("initrd="):
-+ setattr(self, "initrd", a.replace("initrd=", ""))
-+ arg = arg.replace(a, "")
-
- if com is not None and self.commands.has_key(com):
- if self.commands[com] is not None:
-@@ -86,10 +93,12 @@ class ExtLinuxImage(object):
- self._args = args
- def get_kernel(self):
- return self._kernel
-+ def set_args(self, val):
-+ self._args = val
- def get_args(self):
- return self._args
- kernel = property(get_kernel, set_kernel)
-- args = property(get_args)
-+ args = property(get_args, set_args)
-
- def set_initrd(self, val):
- self._initrd = (None,val)
diff --git a/main/xen/xsa7-xsa8-xen-4.1.patch b/main/xen/xsa7-xsa8-xen-4.1.patch
deleted file mode 100644
index b92ceb24fa..0000000000
--- a/main/xen/xsa7-xsa8-xen-4.1.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-diff -r 35248be669e7 xen/arch/x86/x86_64/asm-offsets.c
---- a/xen/arch/x86/x86_64/asm-offsets.c Mon May 14 16:59:12 2012 +0100
-+++ b/xen/arch/x86/x86_64/asm-offsets.c Thu May 24 11:12:33 2012 +0100
-@@ -90,6 +90,8 @@ void __dummy__(void)
- arch.guest_context.trap_ctxt[TRAP_gp_fault].address);
- OFFSET(VCPU_gp_fault_sel, struct vcpu,
- arch.guest_context.trap_ctxt[TRAP_gp_fault].cs);
-+ OFFSET(VCPU_gp_fault_flags, struct vcpu,
-+ arch.guest_context.trap_ctxt[TRAP_gp_fault].flags);
- OFFSET(VCPU_kernel_sp, struct vcpu, arch.guest_context.kernel_sp);
- OFFSET(VCPU_kernel_ss, struct vcpu, arch.guest_context.kernel_ss);
- OFFSET(VCPU_guest_context_flags, struct vcpu, arch.guest_context.flags);
-diff -r 35248be669e7 xen/arch/x86/x86_64/compat/entry.S
---- a/xen/arch/x86/x86_64/compat/entry.S Mon May 14 16:59:12 2012 +0100
-+++ b/xen/arch/x86/x86_64/compat/entry.S Thu May 24 11:12:33 2012 +0100
-@@ -214,6 +214,7 @@ 1: call compat_create_bounce_frame
- ENTRY(compat_post_handle_exception)
- testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
- jz compat_test_all_events
-+.Lcompat_bounce_exception:
- call compat_create_bounce_frame
- movb $0,TRAPBOUNCE_flags(%rdx)
- jmp compat_test_all_events
-@@ -226,19 +227,20 @@ ENTRY(compat_syscall)
- leaq VCPU_trap_bounce(%rbx),%rdx
- testl $~3,%esi
- leal (,%rcx,TBF_INTERRUPT),%ecx
-- jz 2f
--1: movq %rax,TRAPBOUNCE_eip(%rdx)
-+UNLIKELY_START(z, compat_syscall_gpf)
-+ movl $TRAP_gp_fault,UREGS_entry_vector(%rsp)
-+ subl $2,UREGS_rip(%rsp)
-+ movl $0,TRAPBOUNCE_error_code(%rdx)
-+ movl VCPU_gp_fault_addr(%rbx),%eax
-+ movzwl VCPU_gp_fault_sel(%rbx),%esi
-+ testb $4,VCPU_gp_fault_flags(%rbx)
-+ setnz %cl
-+ leal TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE(,%rcx,TBF_INTERRUPT),%ecx
-+UNLIKELY_END(compat_syscall_gpf)
-+ movq %rax,TRAPBOUNCE_eip(%rdx)
- movw %si,TRAPBOUNCE_cs(%rdx)
- movb %cl,TRAPBOUNCE_flags(%rdx)
-- call compat_create_bounce_frame
-- jmp compat_test_all_events
--2: movl $TRAP_gp_fault,UREGS_entry_vector(%rsp)
-- subl $2,UREGS_rip(%rsp)
-- movq VCPU_gp_fault_addr(%rbx),%rax
-- movzwl VCPU_gp_fault_sel(%rbx),%esi
-- movb $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl
-- movl $0,TRAPBOUNCE_error_code(%rdx)
-- jmp 1b
-+ jmp .Lcompat_bounce_exception
-
- ENTRY(compat_sysenter)
- cmpl $TRAP_gp_fault,UREGS_entry_vector(%rsp)
-diff -r 35248be669e7 xen/arch/x86/x86_64/entry.S
---- a/xen/arch/x86/x86_64/entry.S Mon May 14 16:59:12 2012 +0100
-+++ b/xen/arch/x86/x86_64/entry.S Thu May 24 11:12:33 2012 +0100
-@@ -40,6 +40,13 @@ restore_all_guest:
- testw $TRAP_syscall,4(%rsp)
- jz iret_exit_to_guest
-
-+ /* Don't use SYSRET path if the return address is not canonical. */
-+ movq 8(%rsp),%rcx
-+ sarq $47,%rcx
-+ incl %ecx
-+ cmpl $1,%ecx
-+ ja .Lforce_iret
-+
- addq $8,%rsp
- popq %rcx # RIP
- popq %r11 # CS
-@@ -50,6 +57,10 @@ restore_all_guest:
- sysretq
- 1: sysretl
-
-+.Lforce_iret:
-+ /* Mimic SYSRET behavior. */
-+ movq 8(%rsp),%rcx # RIP
-+ movq 24(%rsp),%r11 # RFLAGS
- ALIGN
- /* No special register assumptions. */
- iret_exit_to_guest:
-@@ -278,19 +289,21 @@ sysenter_eflags_saved:
- leaq VCPU_trap_bounce(%rbx),%rdx
- testq %rax,%rax
- leal (,%rcx,TBF_INTERRUPT),%ecx
-- jz 2f
--1: movq VCPU_domain(%rbx),%rdi
-+UNLIKELY_START(z, sysenter_gpf)
-+ movl $TRAP_gp_fault,UREGS_entry_vector(%rsp)
-+ subq $2,UREGS_rip(%rsp)
-+ movl %eax,TRAPBOUNCE_error_code(%rdx)
-+ movq VCPU_gp_fault_addr(%rbx),%rax
-+ testb $4,VCPU_gp_fault_flags(%rbx)
-+ setnz %cl
-+ leal TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE(,%rcx,TBF_INTERRUPT),%ecx
-+UNLIKELY_END(sysenter_gpf)
-+ movq VCPU_domain(%rbx),%rdi
- movq %rax,TRAPBOUNCE_eip(%rdx)
- movb %cl,TRAPBOUNCE_flags(%rdx)
- testb $1,DOMAIN_is_32bit_pv(%rdi)
- jnz compat_sysenter
-- call create_bounce_frame
-- jmp test_all_events
--2: movl %eax,TRAPBOUNCE_error_code(%rdx)
-- movq VCPU_gp_fault_addr(%rbx),%rax
-- movb $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl
-- movl $TRAP_gp_fault,UREGS_entry_vector(%rsp)
-- jmp 1b
-+ jmp .Lbounce_exception
-
- ENTRY(int80_direct_trap)
- pushq $0
-@@ -482,6 +495,7 @@ 1: movq %rsp,%rdi
- jnz compat_post_handle_exception
- testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
- jz test_all_events
-+.Lbounce_exception:
- call create_bounce_frame
- movb $0,TRAPBOUNCE_flags(%rdx)
- jmp test_all_events
diff --git a/main/xen/xsa9-xen-4.1.patch b/main/xen/xsa9-xen-4.1.patch
deleted file mode 100644
index a0ded0c825..0000000000
--- a/main/xen/xsa9-xen-4.1.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-x86-64: detect processors subject to AMD erratum #121 and refuse to boot
-
-Processors with this erratum are subject to a DoS attack by unprivileged
-guest users.
-
-This is XSA-9 / CVE-2006-0744.
-
-Signed-off-by: Jan Beulich <JBeulich@suse.com>
-Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
-
---- a/xen/arch/x86/cpu/amd.c
-+++ b/xen/arch/x86/cpu/amd.c
-@@ -32,6 +32,9 @@
- static char opt_famrev[14];
- string_param("cpuid_mask_cpu", opt_famrev);
-
-+static int opt_allow_unsafe;
-+boolean_param("allow_unsafe", opt_allow_unsafe);
-+
- static inline void wrmsr_amd(unsigned int index, unsigned int lo,
- unsigned int hi)
- {
-@@ -620,6 +623,11 @@ static void __devinit init_amd(struct cp
- clear_bit(X86_FEATURE_MCE, c->x86_capability);
-
- #ifdef __x86_64__
-+ if (cpu_has_amd_erratum(c, AMD_ERRATUM_121) && !opt_allow_unsafe)
-+ panic("Xen will not boot on this CPU for security reasons.\n"
-+ "Pass \"allow_unsafe\" if you're trusting all your"
-+ " (PV) guest kernels.\n");
-+
- /* AMD CPUs do not support SYSENTER outside of legacy mode. */
- clear_bit(X86_FEATURE_SEP, c->x86_capability);
-
---- a/xen/include/asm-x86/amd.h
-+++ b/xen/include/asm-x86/amd.h
-@@ -127,6 +127,9 @@
- #define AMD_MODEL_RANGE_START(range) (((range) >> 12) & 0xfff)
- #define AMD_MODEL_RANGE_END(range) ((range) & 0xfff)
-
-+#define AMD_ERRATUM_121 \
-+ AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x3f, 0xf))
-+
- #define AMD_ERRATUM_170 \
- AMD_LEGACY_ERRATUM(AMD_MODEL_RANGE(0x0f, 0x0, 0x0, 0x67, 0xf))
-