diff --git a/0001-XXX-dont-dump-core-on-sigabort.patch b/0001-XXX-dont-dump-core-on-sigabort.patch index 4913fedc..d1d657b2 100644 --- a/0001-XXX-dont-dump-core-on-sigabort.patch +++ b/0001-XXX-dont-dump-core-on-sigabort.patch @@ -1,4 +1,4 @@ -From 652983299b4b18cdf26414b0ba468c5dd166adc7 Mon Sep 17 00:00:00 2001 +From 69e1d0ef9e44d913774efb96b19ad43b037be920 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Mon, 21 Nov 2011 23:50:36 +0100 Subject: [PATCH] XXX dont dump core on sigabort @@ -8,10 +8,10 @@ Subject: [PATCH] XXX dont dump core on sigabort 1 file changed, 6 insertions(+) diff --git a/linux-user/signal.c b/linux-user/signal.c -index 96e86c0..d422aeb 100644 +index 9a4d894..2a07043 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c -@@ -443,6 +443,10 @@ static void QEMU_NORETURN force_sig(int target_sig) +@@ -526,6 +526,10 @@ static void QEMU_NORETURN force_sig(int target_sig) trace_user_force_sig(env, target_sig, host_sig); gdb_signalled(env, target_sig); @@ -22,7 +22,7 @@ index 96e86c0..d422aeb 100644 /* dump core if supported by target binary format */ if (core_dump_signal(target_sig) && (ts->bprm->core_dump != NULL)) { stop_all_tasks(); -@@ -460,6 +464,8 @@ static void QEMU_NORETURN force_sig(int target_sig) +@@ -543,6 +547,8 @@ static void QEMU_NORETURN force_sig(int target_sig) target_sig, strsignal(host_sig), "core dumped" ); } diff --git a/0002-qemu-0.9.0.cvs-binfmt.patch b/0002-qemu-0.9.0.cvs-binfmt.patch deleted file mode 100644 index 8ba608ce..00000000 --- a/0002-qemu-0.9.0.cvs-binfmt.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 611fe6b38bf118be59326f35fd3a066250328311 Mon Sep 17 00:00:00 2001 -From: Ulrich Hecht -Date: Tue, 14 Apr 2009 16:18:44 +0200 -Subject: [PATCH] qemu-0.9.0.cvs-binfmt -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fixes binfmt_misc setup script: -- x86_64 is i386-compatible -- m68k signature fixed -- path to QEMU - -Signed-off-by: Ulrich Hecht -[AF: Update path for qemu-aarch64 for v2.0.0-rc1] -Signed-off-by: Andreas Färber ---- - scripts/qemu-binfmt-conf.sh | 39 +++++++++++++++++++++------------------ - 1 file changed, 21 insertions(+), 18 deletions(-) - -diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh -index 289b1a3..75e0526 100644 ---- a/scripts/qemu-binfmt-conf.sh -+++ b/scripts/qemu-binfmt-conf.sh -@@ -27,46 +27,49 @@ case "$cpu" in - armv[4-9]*) - cpu="arm" - ;; -+ sparc*) -+ cpu="sparc" -+ ;; - esac - - # register the interpreter for each cpu except for the native one - if [ $cpu != "i386" ] ; then -- echo ':i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register -- echo ':i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register -+ echo ':i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register -+ echo ':i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "alpha" ] ; then -- echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-alpha:' > /proc/sys/fs/binfmt_misc/register -+ echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-alpha:' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "arm" ] ; then -- echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register -- echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-armeb:' > /proc/sys/fs/binfmt_misc/register -+ echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register -+ echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb:' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "aarch64" ] ; then -- echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-aarch64:' > /proc/sys/fs/binfmt_misc/register -+ echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-aarch64:' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "sparc" ] ; then -- echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-sparc:' > /proc/sys/fs/binfmt_misc/register -+ echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc:' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "ppc" ] ; then -- echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-ppc:' > /proc/sys/fs/binfmt_misc/register -+ echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc:' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "m68k" ] ; then - echo 'Please check cpu value and header information for m68k!' -- echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-m68k:' > /proc/sys/fs/binfmt_misc/register -+ echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-m68k:' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "mips" ] ; then - # FIXME: We could use the other endianness on a MIPS host. -- echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mips:' > /proc/sys/fs/binfmt_misc/register -- echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mipsel:' > /proc/sys/fs/binfmt_misc/register -- echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mipsn32:' > /proc/sys/fs/binfmt_misc/register -- echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mipsn32el:' > /proc/sys/fs/binfmt_misc/register -- echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-mips64:' > /proc/sys/fs/binfmt_misc/register -- echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-mips64el:' > /proc/sys/fs/binfmt_misc/register -+ echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips:' > /proc/sys/fs/binfmt_misc/register -+ echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel:' > /proc/sys/fs/binfmt_misc/register -+ echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mipsn32:' > /proc/sys/fs/binfmt_misc/register -+ echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsn32el:' > /proc/sys/fs/binfmt_misc/register -+ echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64:' > /proc/sys/fs/binfmt_misc/register -+ echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el:' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "sh" ] ; then -- echo ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-sh4:' > /proc/sys/fs/binfmt_misc/register -- echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-sh4eb:' > /proc/sys/fs/binfmt_misc/register -+ echo ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4:' > /proc/sys/fs/binfmt_misc/register -+ echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb:' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "s390x" ] ; then -- echo ':s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-s390x:' > /proc/sys/fs/binfmt_misc/register -+ echo ':s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-s390x:' > /proc/sys/fs/binfmt_misc/register - fi diff --git a/0002-qemu-binfmt-conf-Modify-default-pat.patch b/0002-qemu-binfmt-conf-Modify-default-pat.patch new file mode 100644 index 00000000..0c60de2e --- /dev/null +++ b/0002-qemu-binfmt-conf-Modify-default-pat.patch @@ -0,0 +1,28 @@ +From 92a7da288949c5f96e4aef3281652d5cd8a903bf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20F=C3=A4rber?= +Date: Wed, 10 Aug 2016 19:00:24 +0200 +Subject: [PATCH] qemu-binfmt-conf: Modify default path +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change QEMU_PATH from /usr/local/bin to /usr/bin prefix. + +Signed-off-by: Andreas Färber +--- + scripts/qemu-binfmt-conf.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh +index de4d1c1..7640255 100755 +--- a/scripts/qemu-binfmt-conf.sh ++++ b/scripts/qemu-binfmt-conf.sh +@@ -259,7 +259,7 @@ BINFMT_SET=qemu_register_interpreter + SYSTEMDDIR="/etc/binfmt.d" + DEBIANDIR="/usr/share/binfmts" + +-QEMU_PATH=/usr/local/bin ++QEMU_PATH=/usr/bin + FLAGS="" + + options=$(getopt -o ds:Q:e:hc: -l debian,systemd:,qemu-path:,exportdir:,help,credential: -- "$@") diff --git a/0003-qemu-cvs-alsa_bitfield.patch b/0003-qemu-cvs-alsa_bitfield.patch index a56b3937..adc111e4 100644 --- a/0003-qemu-cvs-alsa_bitfield.patch +++ b/0003-qemu-cvs-alsa_bitfield.patch @@ -1,4 +1,4 @@ -From 6171d82516b151c7d2bac6484c801c45d8de796e Mon Sep 17 00:00:00 2001 +From 3861f88d6d47d16a289dc17b94ed7ca8a7955280 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 14 Apr 2009 16:20:50 +0200 Subject: [PATCH] qemu-cvs-alsa_bitfield @@ -13,7 +13,7 @@ Signed-off-by: Ulrich Hecht 2 files changed, 24 insertions(+) diff --git a/include/exec/user/thunk.h b/include/exec/user/thunk.h -index ad1d602..4e082a7 100644 +index f19ef4b..b2659e0 100644 --- a/include/exec/user/thunk.h +++ b/include/exec/user/thunk.h @@ -37,6 +37,7 @@ typedef enum argtype { @@ -24,7 +24,7 @@ index ad1d602..4e082a7 100644 } argtype; #define MK_PTR(type) TYPE_PTR, type -@@ -90,6 +91,7 @@ static inline int thunk_type_size(const argtype *type_ptr, int is_host) +@@ -89,6 +90,7 @@ static inline int thunk_type_size(const argtype *type_ptr, int is_host) case TYPE_SHORT: return 2; case TYPE_INT: @@ -32,7 +32,7 @@ index ad1d602..4e082a7 100644 return 4; case TYPE_LONGLONG: case TYPE_ULONGLONG: -@@ -152,6 +154,7 @@ static inline int thunk_type_align(const argtype *type_ptr, int is_host) +@@ -151,6 +153,7 @@ static inline int thunk_type_align(const argtype *type_ptr, int is_host) case TYPE_SHORT: return 2; case TYPE_INT: @@ -41,7 +41,7 @@ index ad1d602..4e082a7 100644 case TYPE_LONGLONG: case TYPE_ULONGLONG: diff --git a/thunk.c b/thunk.c -index f057d86..6db7874 100644 +index 2dac366..0eb7286 100644 --- a/thunk.c +++ b/thunk.c @@ -37,6 +37,7 @@ static inline const argtype *thunk_type_next(const argtype *type_ptr) diff --git a/0004-qemu-cvs-alsa_ioctl.patch b/0004-qemu-cvs-alsa_ioctl.patch index 556cf70c..55496d14 100644 --- a/0004-qemu-cvs-alsa_ioctl.patch +++ b/0004-qemu-cvs-alsa_ioctl.patch @@ -1,12 +1,17 @@ -From b89afe9048994b21e361d9eebe96825d80d1ef56 Mon Sep 17 00:00:00 2001 +From 219067ccab5735ed9ae70c6079d5676cc6431727 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 14 Apr 2009 16:23:27 +0200 Subject: [PATCH] qemu-cvs-alsa_ioctl +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit Implements ALSA ioctls on PPC hosts. Signed-off-by: Alexander Graf Signed-off-by: Ulrich Hecht +[AF: Rebased for v2.7.0-rc2] +Signed-off-by: Andreas Färber --- linux-user/ioctls.h | 5 + linux-user/ioctls_alsa.h | 467 ++++++++++ @@ -20,10 +25,10 @@ Signed-off-by: Ulrich Hecht create mode 100644 linux-user/syscall_types_alsa.h diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h -index e672655..921d482 100644 +index 7e2c133..cf8851d 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h -@@ -319,6 +319,11 @@ +@@ -348,6 +348,11 @@ IOCTL(VFAT_IOCTL_READDIR_BOTH, IOC_R, MK_PTR(MK_ARRAY(MK_STRUCT(STRUCT_dirent), 2))) IOCTL(VFAT_IOCTL_READDIR_SHORT, IOC_R, MK_PTR(MK_ARRAY(MK_STRUCT(STRUCT_dirent), 2))) @@ -2255,20 +2260,20 @@ index 0000000..e09a30d + unsigned char *code; +}; diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h -index 9e2b3c2..b090cdb 100644 +index 7835654..b869b3d 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h -@@ -2545,6 +2545,8 @@ struct target_ucred { +@@ -2591,6 +2591,8 @@ struct target_ucred { uint32_t gid; }; +#include "ioctls_alsa_structs.h" + - #endif - typedef int32_t target_timer_t; + + #define TARGET_SIGEV_MAX_SIZE 64 diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h -index 1fd4ee0..e5331b4 100644 +index af79fbf..4d99a9d 100644 --- a/linux-user/syscall_types.h +++ b/linux-user/syscall_types.h @@ -83,6 +83,11 @@ STRUCT(buffmem_desc, diff --git a/0005-qemu-cvs-alsa_mmap.patch b/0005-qemu-cvs-alsa_mmap.patch index 411964f9..c2b0e8e7 100644 --- a/0005-qemu-cvs-alsa_mmap.patch +++ b/0005-qemu-cvs-alsa_mmap.patch @@ -1,4 +1,4 @@ -From 9c9cfb248223f4da2ea2333164ea7e6a6091c03a Mon Sep 17 00:00:00 2001 +From b62c901c47e3f38336c4aeb1e98a6140b4fe3469 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 14 Apr 2009 16:24:15 +0200 Subject: [PATCH] qemu-cvs-alsa_mmap @@ -12,10 +12,10 @@ Signed-off-by: Ulrich Hecht 1 file changed, 14 insertions(+) diff --git a/linux-user/mmap.c b/linux-user/mmap.c -index 3519147..671889b 100644 +index c4371d9..68a655e 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c -@@ -358,6 +358,9 @@ abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size) +@@ -357,6 +357,9 @@ abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size) } } @@ -25,7 +25,7 @@ index 3519147..671889b 100644 /* NOTE: all the constants are the HOST ones */ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, int flags, int fd, abi_ulong offset) -@@ -392,6 +395,17 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, +@@ -391,6 +394,17 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, } #endif diff --git a/0006-qemu-cvs-gettimeofday.patch b/0006-qemu-cvs-gettimeofday.patch index a10c1f78..1953c985 100644 --- a/0006-qemu-cvs-gettimeofday.patch +++ b/0006-qemu-cvs-gettimeofday.patch @@ -1,4 +1,4 @@ -From 2dc4a9d135ce472a59da891af09ba9529c57b61b Mon Sep 17 00:00:00 2001 +From 4259605f8b9d113ff33c395ad6232f076e4e261d Mon Sep 17 00:00:00 2001 From: Ulrich Hecht Date: Tue, 14 Apr 2009 16:25:41 +0200 Subject: [PATCH] qemu-cvs-gettimeofday @@ -9,10 +9,10 @@ No clue what this is for. 1 file changed, 2 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 032d338..d231758 100644 +index ca06943..f120665 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -6985,6 +6985,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, +@@ -8534,6 +8534,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, case TARGET_NR_gettimeofday: { struct timeval tv; diff --git a/0007-qemu-cvs-ioctl_debug.patch b/0007-qemu-cvs-ioctl_debug.patch index 5b3400dc..3dad5644 100644 --- a/0007-qemu-cvs-ioctl_debug.patch +++ b/0007-qemu-cvs-ioctl_debug.patch @@ -1,4 +1,4 @@ -From d2a4cedd351ff7e09843bb5cbb76038af2303df7 Mon Sep 17 00:00:00 2001 +From 382d3ca372e660d6961fd6a250d2241c4923ec19 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 14 Apr 2009 16:26:33 +0200 Subject: [PATCH] qemu-cvs-ioctl_debug @@ -12,10 +12,10 @@ Signed-off-by: Ulrich Hecht 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index d231758..d693f9d 100644 +index f120665..1b3ed97 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -4022,7 +4022,12 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) +@@ -5334,7 +5334,12 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) ie = ioctl_entries; for(;;) { if (ie->target_cmd == 0) { diff --git a/0008-qemu-cvs-ioctl_nodirection.patch b/0008-qemu-cvs-ioctl_nodirection.patch index b6dd3e23..defbe3cb 100644 --- a/0008-qemu-cvs-ioctl_nodirection.patch +++ b/0008-qemu-cvs-ioctl_nodirection.patch @@ -1,4 +1,4 @@ -From 43f2593e07e0de12dddf72c3205e6a0fb851dc2d Mon Sep 17 00:00:00 2001 +From c0baf4a94377f6d64d632effb3ffe077c5f928e1 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 14 Apr 2009 16:27:36 +0200 Subject: [PATCH] qemu-cvs-ioctl_nodirection @@ -15,10 +15,10 @@ Signed-off-by: Ulrich Hecht 1 file changed, 6 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index d693f9d..0858920 100644 +index 1b3ed97..8e69c15 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -4055,6 +4055,11 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) +@@ -5367,6 +5367,11 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) arg_type++; target_size = thunk_type_size(arg_type, 0); switch(ie->access) { @@ -28,11 +28,11 @@ index d693f9d..0858920 100644 + * declared ioctls IOC_R and IOC_W even though they were IOC_RW.*/ +/* case IOC_R: - ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp)); + ret = get_errno(safe_ioctl(fd, ie->host_cmd, buf_temp)); if (!is_error(ret)) { -@@ -4073,6 +4078,7 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) +@@ -5385,6 +5390,7 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) unlock_user(argptr, arg, 0); - ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp)); + ret = get_errno(safe_ioctl(fd, ie->host_cmd, buf_temp)); break; +*/ default: diff --git a/0009-block-vmdk-Support-creation-of-SCSI.patch b/0009-block-vmdk-Support-creation-of-SCSI.patch deleted file mode 100644 index 4dbaf37e..00000000 --- a/0009-block-vmdk-Support-creation-of-SCSI.patch +++ /dev/null @@ -1,101 +0,0 @@ -From d367bff9f8b514a0beacac3d21426d787dcef77f Mon Sep 17 00:00:00 2001 -From: Ulrich Hecht -Date: Tue, 14 Apr 2009 16:37:42 +0200 -Subject: [PATCH] block/vmdk: Support creation of SCSI VMDK images in qemu-img -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Ulrich Hecht -[AF: Changed BLOCK_FLAG_SCSI from 8 to 16 for v1.2] -[AF: Rebased onto upstream VMDK SCSI support] -[AF: Rebased onto skipping of image creation in v1.7] -[AF: Simplified in preparation for v1.7.1/v2.0] -[AF: Rebased onto QemuOpts conversion for v2.1] -Signed-off-by: Andreas Färber ---- - block.c | 3 +++ - block/vmdk.c | 10 +++++++++- - include/block/block_int.h | 2 ++ - qemu-img.c | 7 +++++++ - 4 files changed, 21 insertions(+), 1 deletion(-) - -diff --git a/block.c b/block.c -index d4939b4..b10e0fe 100644 ---- a/block.c -+++ b/block.c -@@ -3588,6 +3588,9 @@ void bdrv_img_create(const char *filename, const char *fmt, - if (!quiet) { - printf("Formatting '%s', fmt=%s ", filename, fmt); - qemu_opts_print(opts, " "); -+ if (qemu_opt_get_bool(opts, BLOCK_OPT_SCSI, false)) { -+ printf(", SCSI"); -+ } - puts(""); - } - -diff --git a/block/vmdk.c b/block/vmdk.c -index 45f9d3c..f5c68e0 100644 ---- a/block/vmdk.c -+++ b/block/vmdk.c -@@ -1885,9 +1885,12 @@ static int vmdk_create(const char *filename, QemuOpts *opts, Error **errp) - if (qemu_opt_get_bool_del(opts, BLOCK_OPT_ZEROED_GRAIN, false)) { - zeroed_grain = true; - } -+ if (qemu_opt_get_bool_del(opts, BLOCK_OPT_SCSI, false)) { -+ flags |= BLOCK_FLAG_SCSI; -+ } - - if (!adapter_type) { -- adapter_type = g_strdup("ide"); -+ adapter_type = g_strdup(flags & BLOCK_FLAG_SCSI ? "lsilogic" : "ide"); - } else if (strcmp(adapter_type, "ide") && - strcmp(adapter_type, "buslogic") && - strcmp(adapter_type, "lsilogic") && -@@ -2310,6 +2313,11 @@ static QemuOptsList vmdk_create_opts = { - .help = "Enable efficient zero writes " - "using the zeroed-grain GTE feature" - }, -+ { -+ .name = BLOCK_OPT_SCSI, -+ .type = QEMU_OPT_BOOL, -+ .help = "SCSI image" -+ }, - { /* end of list */ } - } - }; -diff --git a/include/block/block_int.h b/include/block/block_int.h -index 10d8759..7c0b99c 100644 ---- a/include/block/block_int.h -+++ b/include/block/block_int.h -@@ -40,10 +40,12 @@ - #define BLOCK_FLAG_ENCRYPT 1 - #define BLOCK_FLAG_COMPAT6 4 - #define BLOCK_FLAG_LAZY_REFCOUNTS 8 -+#define BLOCK_FLAG_SCSI 16 - - #define BLOCK_OPT_SIZE "size" - #define BLOCK_OPT_ENCRYPT "encryption" - #define BLOCK_OPT_COMPAT6 "compat6" -+#define BLOCK_OPT_SCSI "scsi" - #define BLOCK_OPT_BACKING_FILE "backing_file" - #define BLOCK_OPT_BACKING_FMT "backing_fmt" - #define BLOCK_OPT_CLUSTER_SIZE "cluster_size" -diff --git a/qemu-img.c b/qemu-img.c -index 46f2a6d..01e6f4a 100644 ---- a/qemu-img.c -+++ b/qemu-img.c -@@ -2027,6 +2027,13 @@ static int img_convert(int argc, char **argv) - } - } - -+ if (qemu_opt_get_bool(opts, BLOCK_OPT_SCSI, false) -+ && strcmp(drv->format_name, "vmdk")) { -+ error_report("SCSI devices not supported for this file format"); -+ ret = -1; -+ goto out; -+ } -+ - if (!skip_create) { - /* Create the new image */ - ret = bdrv_create(drv, out_filename, opts, &local_err); diff --git a/0009-linux-user-add-binfmt-wrapper-for-a.patch b/0009-linux-user-add-binfmt-wrapper-for-a.patch new file mode 100644 index 00000000..68c0ee63 --- /dev/null +++ b/0009-linux-user-add-binfmt-wrapper-for-a.patch @@ -0,0 +1,142 @@ +From 5a101ff0b5669280fa46d4f6d0f798f4b02bae5f Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Fri, 30 Sep 2011 19:40:36 +0200 +Subject: [PATCH] linux-user: add binfmt wrapper for argv[0] handling +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When using qemu's linux-user binaries through binfmt, argv[0] gets lost +along the execution because qemu only gets passed in the full file name +to the executable while argv[0] can be something completely different. + +This breaks in some subtile situations, such as the grep and make test +suites. + +This patch adds a wrapper binary called qemu-$TARGET-binfmt that can be +used with binfmt's P flag which passes the full path _and_ argv[0] to +the binfmt handler. + +The binary would be smart enough to be versatile and only exist in the +system once, creating the qemu binary path names from its own argv[0]. +However, this seemed like it didn't fit the make system too well, so +we're currently creating a new binary for each target archictecture. + +CC: Reinhard Max +Signed-off-by: Alexander Graf +[AF: Rebased onto new Makefile infrastructure, twice] +[AF: Updated for aarch64 for v2.0.0-rc1] +[AF: Rebased onto Makefile changes for v2.1.0-rc0] +[AF: Rebased onto script rewrite for v2.7.0-rc2 - to be fixed] +Signed-off-by: Andreas Färber +--- + Makefile.target | 13 +++++++++++++ + linux-user/Makefile.objs | 2 ++ + linux-user/binfmt.c | 42 ++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 57 insertions(+) + create mode 100644 linux-user/binfmt.c + +diff --git a/Makefile.target b/Makefile.target +index a440bcb..a65c55f 100644 +--- a/Makefile.target ++++ b/Makefile.target +@@ -36,6 +36,10 @@ endif + PROGS=$(QEMU_PROG) $(QEMU_PROGW) + STPFILES= + ++ifdef CONFIG_LINUX_USER ++PROGS+=$(QEMU_PROG)-binfmt ++endif ++ + config-target.h: config-target.h-timestamp + config-target.h-timestamp: config-target.mak + +@@ -115,6 +119,8 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) \ + obj-y += linux-user/ + obj-y += gdbstub.o thunk.o user-exec.o + ++obj-binfmt-y += linux-user/ ++ + endif #CONFIG_LINUX_USER + + ######################################################### +@@ -163,7 +169,11 @@ endif # CONFIG_SOFTMMU + # Workaround for http://gcc.gnu.org/PR55489, see configure. + %/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS) + ++ifdef CONFIG_LINUX_USER ++dummy := $(call unnest-vars,,obj-y obj-binfmt-y) ++else + dummy := $(call unnest-vars,,obj-y) ++endif + all-obj-y := $(obj-y) + + target-obj-y := +@@ -200,6 +210,9 @@ ifdef CONFIG_DARWIN + $(call quiet-command,SetFile -a C $@," SETFILE $(TARGET_DIR)$@") + endif + ++$(QEMU_PROG)-binfmt: $(obj-binfmt-y) ++ $(call LINK,$^) ++ + gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/scripts/feature_to_c.sh + $(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/scripts/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@") + +diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs +index 8c93058..607ca2d 100644 +--- a/linux-user/Makefile.objs ++++ b/linux-user/Makefile.objs +@@ -6,3 +6,5 @@ obj-$(TARGET_HAS_BFLT) += flatload.o + obj-$(TARGET_I386) += vm86.o + obj-$(TARGET_ARM) += arm/nwfpe/ + obj-$(TARGET_M68K) += m68k-sim.o ++ ++obj-binfmt-y = binfmt.o +diff --git a/linux-user/binfmt.c b/linux-user/binfmt.c +new file mode 100644 +index 0000000..cd1f513 +--- /dev/null ++++ b/linux-user/binfmt.c +@@ -0,0 +1,42 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++ ++int main(int argc, char **argv, char **envp) ++{ ++ char *binfmt; ++ char **new_argv; ++ ++ /* ++ * Check if our file name ends with -binfmt ++ */ ++ binfmt = argv[0] + strlen(argv[0]) - strlen("-binfmt"); ++ if (strcmp(binfmt, "-binfmt")) { ++ fprintf(stderr, "%s: Invalid executable name\n", argv[0]); ++ exit(1); ++ } ++ if (argc < 3) { ++ fprintf(stderr, "%s: Please use me through binfmt with P flag\n", ++ argv[0]); ++ exit(1); ++ } ++ ++ binfmt[0] = '\0'; ++ /* Now argv[0] is the real qemu binary name */ ++ ++ new_argv = (char **)malloc((argc + 2) * sizeof(*new_argv)); ++ if (argc > 3) { ++ memcpy(&new_argv[4], &argv[3], (argc - 3) * sizeof(*new_argv)); ++ } ++ new_argv[0] = argv[0]; ++ new_argv[1] = (char *)"-0"; ++ new_argv[2] = argv[2]; ++ new_argv[3] = argv[1]; ++ new_argv[argc + 1] = NULL; ++ ++ return execve(new_argv[0], new_argv, envp); ++} diff --git a/0011-PPC-KVM-Disable-mmu-notifier-check.patch b/0010-PPC-KVM-Disable-mmu-notifier-check.patch similarity index 83% rename from 0011-PPC-KVM-Disable-mmu-notifier-check.patch rename to 0010-PPC-KVM-Disable-mmu-notifier-check.patch index d1b24cde..b1021f17 100644 --- a/0011-PPC-KVM-Disable-mmu-notifier-check.patch +++ b/0010-PPC-KVM-Disable-mmu-notifier-check.patch @@ -1,4 +1,4 @@ -From 312bb9ff5f1448e2aebcccc4f124cf8f7fa1e0a0 Mon Sep 17 00:00:00 2001 +From 9f443d183c7658812e0ffb147ae38cdb74ea94b7 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 6 Jan 2012 01:05:55 +0100 Subject: [PATCH] PPC: KVM: Disable mmu notifier check @@ -13,10 +13,10 @@ KVM guests work there, even if possibly racy in some odd circumstances. 1 file changed, 2 insertions(+) diff --git a/exec.c b/exec.c -index fc75266..a50e148 100644 +index 8ffde75..3ac8a82 100644 --- a/exec.c +++ b/exec.c -@@ -1242,11 +1242,13 @@ static void *file_ram_alloc(RAMBlock *block, +@@ -1230,11 +1230,13 @@ static void *file_ram_alloc(RAMBlock *block, int fd = -1; int64_t page_size; diff --git a/0010-linux-user-add-binfmt-wrapper-for-a.patch b/0010-linux-user-add-binfmt-wrapper-for-a.patch deleted file mode 100644 index a96a5d48..00000000 --- a/0010-linux-user-add-binfmt-wrapper-for-a.patch +++ /dev/null @@ -1,207 +0,0 @@ -From 4234d2b99790fd33e82bee633f48d773e0c7c43e Mon Sep 17 00:00:00 2001 -From: Alexander Graf -Date: Fri, 30 Sep 2011 19:40:36 +0200 -Subject: [PATCH] linux-user: add binfmt wrapper for argv[0] handling -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -When using qemu's linux-user binaries through binfmt, argv[0] gets lost -along the execution because qemu only gets passed in the full file name -to the executable while argv[0] can be something completely different. - -This breaks in some subtile situations, such as the grep and make test -suites. - -This patch adds a wrapper binary called qemu-$TARGET-binfmt that can be -used with binfmt's P flag which passes the full path _and_ argv[0] to -the binfmt handler. - -The binary would be smart enough to be versatile and only exist in the -system once, creating the qemu binary path names from its own argv[0]. -However, this seemed like it didn't fit the make system too well, so -we're currently creating a new binary for each target archictecture. - -CC: Reinhard Max -Signed-off-by: Alexander Graf -[AF: Rebased onto new Makefile infrastructure, twice] -[AF: Updated for aarch64 for v2.0.0-rc1] -[AF: Rebased onto Makefile changes for v2.1.0-rc0] -Signed-off-by: Andreas Färber ---- - Makefile.target | 13 +++++++++++++ - linux-user/Makefile.objs | 2 ++ - linux-user/binfmt.c | 42 ++++++++++++++++++++++++++++++++++++++++++ - scripts/qemu-binfmt-conf.sh | 36 ++++++++++++++++++------------------ - 4 files changed, 75 insertions(+), 18 deletions(-) - create mode 100644 linux-user/binfmt.c - -diff --git a/Makefile.target b/Makefile.target -index 34ddb7e..cba1078 100644 ---- a/Makefile.target -+++ b/Makefile.target -@@ -36,6 +36,10 @@ endif - PROGS=$(QEMU_PROG) $(QEMU_PROGW) - STPFILES= - -+ifdef CONFIG_LINUX_USER -+PROGS+=$(QEMU_PROG)-binfmt -+endif -+ - config-target.h: config-target.h-timestamp - config-target.h-timestamp: config-target.mak - -@@ -113,6 +117,8 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) -I$(SRC_PATH)/linux-user - obj-y += linux-user/ - obj-y += gdbstub.o thunk.o user-exec.o - -+obj-binfmt-y += linux-user/ -+ - endif #CONFIG_LINUX_USER - - ######################################################### -@@ -161,7 +167,11 @@ endif # CONFIG_SOFTMMU - # Workaround for http://gcc.gnu.org/PR55489, see configure. - %/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS) - -+ifdef CONFIG_LINUX_USER -+dummy := $(call unnest-vars,,obj-y obj-binfmt-y) -+else - dummy := $(call unnest-vars,,obj-y) -+endif - all-obj-y := $(obj-y) - - target-obj-y := -@@ -198,6 +208,9 @@ ifdef CONFIG_DARWIN - $(call quiet-command,SetFile -a C $@," SETFILE $(TARGET_DIR)$@") - endif - -+$(QEMU_PROG)-binfmt: $(obj-binfmt-y) -+ $(call LINK,$^) -+ - gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/scripts/feature_to_c.sh - $(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/scripts/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@") - -diff --git a/linux-user/Makefile.objs b/linux-user/Makefile.objs -index fd50217..446aca7 100644 ---- a/linux-user/Makefile.objs -+++ b/linux-user/Makefile.objs -@@ -5,3 +5,5 @@ obj-$(TARGET_HAS_BFLT) += flatload.o - obj-$(TARGET_I386) += vm86.o - obj-$(TARGET_ARM) += arm/nwfpe/ - obj-$(TARGET_M68K) += m68k-sim.o -+ -+obj-binfmt-y = binfmt.o -diff --git a/linux-user/binfmt.c b/linux-user/binfmt.c -new file mode 100644 -index 0000000..cd1f513 ---- /dev/null -+++ b/linux-user/binfmt.c -@@ -0,0 +1,42 @@ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+ -+int main(int argc, char **argv, char **envp) -+{ -+ char *binfmt; -+ char **new_argv; -+ -+ /* -+ * Check if our file name ends with -binfmt -+ */ -+ binfmt = argv[0] + strlen(argv[0]) - strlen("-binfmt"); -+ if (strcmp(binfmt, "-binfmt")) { -+ fprintf(stderr, "%s: Invalid executable name\n", argv[0]); -+ exit(1); -+ } -+ if (argc < 3) { -+ fprintf(stderr, "%s: Please use me through binfmt with P flag\n", -+ argv[0]); -+ exit(1); -+ } -+ -+ binfmt[0] = '\0'; -+ /* Now argv[0] is the real qemu binary name */ -+ -+ new_argv = (char **)malloc((argc + 2) * sizeof(*new_argv)); -+ if (argc > 3) { -+ memcpy(&new_argv[4], &argv[3], (argc - 3) * sizeof(*new_argv)); -+ } -+ new_argv[0] = argv[0]; -+ new_argv[1] = (char *)"-0"; -+ new_argv[2] = argv[2]; -+ new_argv[3] = argv[1]; -+ new_argv[argc + 1] = NULL; -+ -+ return execve(new_argv[0], new_argv, envp); -+} -diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh -index 75e0526..557dd2c 100644 ---- a/scripts/qemu-binfmt-conf.sh -+++ b/scripts/qemu-binfmt-conf.sh -@@ -34,42 +34,42 @@ esac - - # register the interpreter for each cpu except for the native one - if [ $cpu != "i386" ] ; then -- echo ':i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register -- echo ':i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:' > /proc/sys/fs/binfmt_misc/register -+ echo ':i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386-binfmt:P' > /proc/sys/fs/binfmt_misc/register -+ echo ':i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386-binfmt:P' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "alpha" ] ; then -- echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-alpha:' > /proc/sys/fs/binfmt_misc/register -+ echo ':alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-alpha-binfmt:P' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "arm" ] ; then -- echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register -- echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb:' > /proc/sys/fs/binfmt_misc/register -+ echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-binfmt:P' > /proc/sys/fs/binfmt_misc/register -+ echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb-binfmt:P' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "aarch64" ] ; then -- echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-aarch64:' > /proc/sys/fs/binfmt_misc/register -+ echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-aarch64-binfmt:P' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "sparc" ] ; then -- echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc:' > /proc/sys/fs/binfmt_misc/register -+ echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc-binfmt:P' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "ppc" ] ; then -- echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc:' > /proc/sys/fs/binfmt_misc/register -+ echo ':ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc-binfmt:P' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "m68k" ] ; then - echo 'Please check cpu value and header information for m68k!' -- echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-m68k:' > /proc/sys/fs/binfmt_misc/register -+ echo ':m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-m68k-binfmt:P' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "mips" ] ; then - # FIXME: We could use the other endianness on a MIPS host. -- echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips:' > /proc/sys/fs/binfmt_misc/register -- echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel:' > /proc/sys/fs/binfmt_misc/register -- echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mipsn32:' > /proc/sys/fs/binfmt_misc/register -- echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsn32el:' > /proc/sys/fs/binfmt_misc/register -- echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64:' > /proc/sys/fs/binfmt_misc/register -- echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el:' > /proc/sys/fs/binfmt_misc/register -+ echo ':mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips-binfmt:P' > /proc/sys/fs/binfmt_misc/register -+ echo ':mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel-binfmt:P' > /proc/sys/fs/binfmt_misc/register -+ echo ':mipsn32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mipsn32-binfmt:P' > /proc/sys/fs/binfmt_misc/register -+ echo ':mipsn32el:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsn32el-binfmt:P' > /proc/sys/fs/binfmt_misc/register -+ echo ':mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64-binfmt:P' > /proc/sys/fs/binfmt_misc/register -+ echo ':mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el-binfmt:P' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "sh" ] ; then -- echo ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4:' > /proc/sys/fs/binfmt_misc/register -- echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb:' > /proc/sys/fs/binfmt_misc/register -+ echo ':sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4-binfmt:P' > /proc/sys/fs/binfmt_misc/register -+ echo ':sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb-binfmt:P' > /proc/sys/fs/binfmt_misc/register - fi - if [ $cpu != "s390x" ] ; then -- echo ':s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-s390x:' > /proc/sys/fs/binfmt_misc/register -+ echo ':s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-s390x-binfmt:P' > /proc/sys/fs/binfmt_misc/register - fi diff --git a/0012-linux-user-fix-segfault-deadlock.patch b/0011-linux-user-fix-segfault-deadlock.patch similarity index 84% rename from 0012-linux-user-fix-segfault-deadlock.patch rename to 0011-linux-user-fix-segfault-deadlock.patch index 027c3ab7..22028413 100644 --- a/0012-linux-user-fix-segfault-deadlock.patch +++ b/0011-linux-user-fix-segfault-deadlock.patch @@ -1,4 +1,4 @@ -From 48e23620ccc1efef237996fcc102215619a5ba7d Mon Sep 17 00:00:00 2001 +From 73678412d11f87834a901fe27d0d9882548be6ca Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 13 Jan 2012 17:05:41 +0100 Subject: [PATCH] linux-user: fix segfault deadlock @@ -26,10 +26,10 @@ Signed-off-by: Andreas Färber 1 file changed, 4 insertions(+) diff --git a/user-exec.c b/user-exec.c -index d8d597b..f8b7752 100644 +index 95f9f97..eaeb0b4 100644 --- a/user-exec.c +++ b/user-exec.c -@@ -94,6 +94,10 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address, +@@ -65,6 +65,10 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address, printf("qemu: SIGSEGV pc=0x%08lx address=%08lx w=%d oldset=0x%08lx\n", pc, address, is_write, *(unsigned long *)old_set); #endif @@ -38,5 +38,5 @@ index d8d597b..f8b7752 100644 + tb_lock_reset(); + /* XXX: locking issue */ - if (is_write && h2g_valid(address) - && page_unprotect(h2g(address), pc, puc)) { + if (is_write && h2g_valid(address)) { + switch (page_unprotect(h2g(address), pc)) { diff --git a/0013-linux-user-binfmt-support-host-bina.patch b/0012-linux-user-binfmt-support-host-bina.patch similarity index 96% rename from 0013-linux-user-binfmt-support-host-bina.patch rename to 0012-linux-user-binfmt-support-host-bina.patch index 0c12adbf..9c31b1c6 100644 --- a/0013-linux-user-binfmt-support-host-bina.patch +++ b/0012-linux-user-binfmt-support-host-bina.patch @@ -1,4 +1,4 @@ -From 7ada3e29b37a639129e36a7ed2f2f07a0efc3334 Mon Sep 17 00:00:00 2001 +From 25dd5db5e0e1745dab305155db0f739b00e2ec92 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Thu, 2 Feb 2012 18:02:33 +0100 Subject: [PATCH] linux-user: binfmt: support host binaries diff --git a/0015-linux-user-lock-tcg.patch b/0013-linux-user-lock-tcg.patch similarity index 77% rename from 0015-linux-user-lock-tcg.patch rename to 0013-linux-user-lock-tcg.patch index 7157d629..c89a97a3 100644 --- a/0015-linux-user-lock-tcg.patch +++ b/0013-linux-user-lock-tcg.patch @@ -1,4 +1,4 @@ -From 3c784b6969e0379542cf4661847effa17eacd27f Mon Sep 17 00:00:00 2001 +From 9d58ff5695952626bf3fb74d6fe9b5d666c43ce6 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Thu, 5 Jul 2012 17:31:39 +0200 Subject: [PATCH] linux-user: lock tcg @@ -13,18 +13,19 @@ Signed-off-by: Alexander Graf [AF: Rebased onto exec.c/translate-all.c split for 1.4] [AF: Rebased for v2.1.0-rc0] [AF: Rebased onto tcg_gen_code_common() drop for v2.5.0-rc0] +[AF: Rebased for v2.7.0-rc2] Signed-off-by: Andreas Färber --- linux-user/mmap.c | 3 +++ - tcg/tcg.c | 31 ++++++++++++++++++++++++++++++- + tcg/tcg.c | 29 +++++++++++++++++++++++++++++ tcg/tcg.h | 6 ++++++ - 3 files changed, 39 insertions(+), 1 deletion(-) + 3 files changed, 38 insertions(+) diff --git a/linux-user/mmap.c b/linux-user/mmap.c -index 671889b..b85905c 100644 +index 68a655e..d202e45 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c -@@ -23,6 +23,7 @@ +@@ -22,6 +22,7 @@ #include "qemu.h" #include "qemu-common.h" @@ -32,7 +33,7 @@ index 671889b..b85905c 100644 #include "translate-all.h" //#define DEBUG_MMAP -@@ -34,6 +35,7 @@ void mmap_lock(void) +@@ -33,6 +34,7 @@ void mmap_lock(void) { if (mmap_lock_count++ == 0) { pthread_mutex_lock(&mmap_mutex); @@ -40,7 +41,7 @@ index 671889b..b85905c 100644 } } -@@ -41,6 +43,7 @@ void mmap_unlock(void) +@@ -40,6 +42,7 @@ void mmap_unlock(void) { if (--mmap_lock_count == 0) { pthread_mutex_unlock(&mmap_mutex); @@ -49,10 +50,10 @@ index 671889b..b85905c 100644 } diff --git a/tcg/tcg.c b/tcg/tcg.c -index 796addd..8c511bf 100644 +index 42417bd..ef6ae10 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c -@@ -34,6 +34,8 @@ +@@ -33,6 +33,8 @@ #include "qemu/cutils.h" #include "qemu/host-utils.h" #include "qemu/timer.h" @@ -61,7 +62,7 @@ index 796addd..8c511bf 100644 /* Note: the long term plan is to reduce the dependencies on the QEMU CPU definitions. Currently they are used for qemu_ld/st -@@ -114,6 +116,29 @@ static bool tcg_out_tb_finalize(TCGContext *s); +@@ -120,6 +122,29 @@ static bool tcg_out_tb_finalize(TCGContext *s); static TCGRegSet tcg_target_available_regs[2]; static TCGRegSet tcg_target_call_clobber_regs; @@ -91,17 +92,15 @@ index 796addd..8c511bf 100644 #if TCG_TARGET_INSN_UNIT_SIZE == 1 static __attribute__((unused)) inline void tcg_out8(TCGContext *s, uint8_t v) { -@@ -326,7 +351,8 @@ void tcg_context_init(TCGContext *s) +@@ -332,6 +357,7 @@ void tcg_context_init(TCGContext *s) memset(s, 0, sizeof(*s)); s->nb_globals = 0; -- + qemu_mutex_init(&s->lock); -+ + /* Count total number of arguments and allocate the corresponding space */ - total_args = 0; -@@ -2353,6 +2379,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb) +@@ -2551,6 +2577,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb) qemu_log("\n"); } #endif @@ -109,7 +108,7 @@ index 796addd..8c511bf 100644 #ifdef CONFIG_PROFILER s->opt_time -= profile_getclock(); -@@ -2457,6 +2484,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb) +@@ -2673,6 +2700,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb) the buffer completely. Thus we can test for overflow after generating code without having to check during generation. */ if (unlikely((void *)s->code_ptr > s->code_gen_highwater)) { @@ -117,7 +116,7 @@ index 796addd..8c511bf 100644 return -1; } } -@@ -2470,6 +2498,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb) +@@ -2686,6 +2714,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb) /* flush instruction cache */ flush_icache_range((uintptr_t)s->code_buf, (uintptr_t)s->code_ptr); @@ -126,18 +125,18 @@ index 796addd..8c511bf 100644 return tcg_current_code_size(s); } diff --git a/tcg/tcg.h b/tcg/tcg.h -index 40c8fbe..6b826af2 100644 +index 1bcabca..5c2522e 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h -@@ -27,6 +27,7 @@ - - #include "qemu-common.h" +@@ -29,6 +29,7 @@ + #include "cpu.h" + #include "exec/tb-context.h" #include "qemu/bitops.h" +#include "qemu/thread.h" #include "tcg-target.h" - #define CPU_TEMP_BUF_NLONGS 128 -@@ -591,6 +592,8 @@ struct TCGContext { + /* XXX: make safe guess about sizes */ +@@ -697,6 +698,8 @@ struct TCGContext { uint16_t gen_insn_end_off[TCG_MAX_INSNS]; target_ulong gen_insn_data[TCG_MAX_INSNS][TARGET_INSN_START_WORDS]; @@ -146,8 +145,8 @@ index 40c8fbe..6b826af2 100644 }; extern TCGContext tcg_ctx; -@@ -798,6 +801,9 @@ void tcg_gen_callN(TCGContext *s, void *func, - void tcg_op_remove(TCGContext *s, TCGOp *op); +@@ -904,6 +907,9 @@ TCGOp *tcg_op_insert_after(TCGContext *s, TCGOp *op, TCGOpcode opc, int narg); + void tcg_optimize(TCGContext *s); +extern void tcg_lock(void); diff --git a/0014-linux-user-Ignore-broken-loop-ioctl.patch b/0014-linux-user-Ignore-broken-loop-ioctl.patch deleted file mode 100644 index e918a663..00000000 --- a/0014-linux-user-Ignore-broken-loop-ioctl.patch +++ /dev/null @@ -1,77 +0,0 @@ -From f3041527d08d4547ca88843c3be991569bca5152 Mon Sep 17 00:00:00 2001 -From: Alexander Graf -Date: Tue, 12 Jun 2012 04:41:10 +0200 -Subject: [PATCH] linux-user: Ignore broken loop ioctl -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -During invocations of losetup, we run into an ioctl that doesn't -exist. However, because of that we output an error, which then -screws up the kiwi logic around that call. - -So let's silently ignore that bogus ioctl. - -Signed-off-by: Alexander Graf -[AF: Rebased for v2.1.0-rc0] -Signed-off-by: Andreas Färber ---- - linux-user/ioctls.h | 1 + - linux-user/linux_loop.h | 1 + - linux-user/syscall.c | 7 +++++++ - linux-user/syscall_defs.h | 1 + - 4 files changed, 10 insertions(+) - -diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h -index 921d482..c180faf 100644 ---- a/linux-user/ioctls.h -+++ b/linux-user/ioctls.h -@@ -331,6 +331,7 @@ - IOCTL(LOOP_SET_STATUS64, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info64))) - IOCTL(LOOP_GET_STATUS64, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info64))) - IOCTL(LOOP_CHANGE_FD, 0, TYPE_INT) -+ IOCTL_SPECIAL(LOOP_BOGUS_CMD, 0, do_ioctl_fail, TYPE_INT) - - IOCTL(MTIOCTOP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_mtop))) - IOCTL(MTIOCGET, IOC_R, MK_PTR(MK_STRUCT(STRUCT_mtget))) -diff --git a/linux-user/linux_loop.h b/linux-user/linux_loop.h -index 8974caa..810ae61 100644 ---- a/linux-user/linux_loop.h -+++ b/linux-user/linux_loop.h -@@ -91,5 +91,6 @@ struct loop_info64 { - #define LOOP_SET_STATUS64 0x4C04 - #define LOOP_GET_STATUS64 0x4C05 - #define LOOP_CHANGE_FD 0x4C06 -+#define LOOP_BOGUS_CMD 0x4C82 - - #endif -diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 0858920..758f747 100644 ---- a/linux-user/syscall.c -+++ b/linux-user/syscall.c -@@ -3999,6 +3999,13 @@ static abi_long do_ioctl_kdsigaccept(const IOCTLEntry *ie, uint8_t *buf_temp, - return get_errno(ioctl(fd, ie->host_cmd, sig)); - } - -+static abi_long do_ioctl_fail(const IOCTLEntry *ie, uint8_t *buf_temp, int fd, -+ abi_long cmd, abi_long arg) -+{ -+ /* Fail silently */ -+ return -EINVAL; -+} -+ - static IOCTLEntry ioctl_entries[] = { - #define IOCTL(cmd, access, ...) \ - { TARGET_ ## cmd, cmd, #cmd, access, 0, { __VA_ARGS__ } }, -diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h -index b090cdb..f820b0b 100644 ---- a/linux-user/syscall_defs.h -+++ b/linux-user/syscall_defs.h -@@ -1087,6 +1087,7 @@ struct target_pollfd { - #define TARGET_LOOP_SET_STATUS64 0x4C04 - #define TARGET_LOOP_GET_STATUS64 0x4C05 - #define TARGET_LOOP_CHANGE_FD 0x4C06 -+#define TARGET_LOOP_BOGUS_CMD 0x4C82 - - /* fb ioctls */ - #define TARGET_FBIOGET_VSCREENINFO 0x4600 diff --git a/0016-linux-user-Run-multi-threaded-code-.patch b/0014-linux-user-Run-multi-threaded-code-.patch similarity index 89% rename from 0016-linux-user-Run-multi-threaded-code-.patch rename to 0014-linux-user-Run-multi-threaded-code-.patch index 05863d94..94d36b54 100644 --- a/0016-linux-user-Run-multi-threaded-code-.patch +++ b/0014-linux-user-Run-multi-threaded-code-.patch @@ -1,4 +1,4 @@ -From 0922a98683629c491b15b282d35cba46c225549f Mon Sep 17 00:00:00 2001 +From 394f7f1470c98525af7ac4aca52862837257e94a Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 10 Jul 2012 20:40:55 +0200 Subject: [PATCH] linux-user: Run multi-threaded code on a single core @@ -19,10 +19,10 @@ Signed-off-by: Alexander Graf 1 file changed, 9 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 758f747..b36273d 100644 +index 8e69c15..82195a2 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -4704,6 +4704,15 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp, +@@ -6010,6 +6010,15 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp, if (nptl_flags & CLONE_SETTLS) cpu_set_tls (new_env, newtls); diff --git a/0017-linux-user-lock-tb-flushing-too.patch b/0015-linux-user-lock-tb-flushing-too.patch similarity index 79% rename from 0017-linux-user-lock-tb-flushing-too.patch rename to 0015-linux-user-lock-tb-flushing-too.patch index 8bd65a25..72e2a49e 100644 --- a/0017-linux-user-lock-tb-flushing-too.patch +++ b/0015-linux-user-lock-tb-flushing-too.patch @@ -1,4 +1,4 @@ -From 598cc6f427821cbaf6b6a8eeadf90176ecf9b9d5 Mon Sep 17 00:00:00 2001 +From 0f2a2996a00880f39c8654797cd512013983d32a Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 11 Jul 2012 16:47:42 +0200 Subject: [PATCH] linux-user: lock tb flushing too @@ -15,10 +15,10 @@ Signed-off-by: Andreas Färber 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/translate-all.c b/translate-all.c -index 8329ea6..12a48c2 100644 +index 0dd6466..1e7c61b 100644 --- a/translate-all.c +++ b/translate-all.c -@@ -761,17 +761,21 @@ static TranslationBlock *tb_alloc(target_ulong pc) +@@ -767,17 +767,21 @@ static TranslationBlock *tb_alloc(target_ulong pc) { TranslationBlock *tb; @@ -40,7 +40,7 @@ index 8329ea6..12a48c2 100644 /* In practice this is mostly used for single use temporary TB Ignore the hard cases and just back up if this TB happens to be the last one generated. */ -@@ -780,6 +784,7 @@ void tb_free(TranslationBlock *tb) +@@ -786,6 +790,7 @@ void tb_free(TranslationBlock *tb) tcg_ctx.code_gen_ptr = tb->tc_ptr; tcg_ctx.tb_ctx.nb_tbs--; } @@ -48,7 +48,7 @@ index 8329ea6..12a48c2 100644 } static inline void invalidate_page_bitmap(PageDesc *p) -@@ -833,6 +838,7 @@ void tb_flush(CPUState *cpu) +@@ -844,6 +849,7 @@ void tb_flush(CPUState *cpu) ((unsigned long)(tcg_ctx.code_gen_ptr - tcg_ctx.code_gen_buffer)) / tcg_ctx.tb_ctx.nb_tbs : 0); #endif @@ -56,7 +56,7 @@ index 8329ea6..12a48c2 100644 if ((unsigned long)(tcg_ctx.code_gen_ptr - tcg_ctx.code_gen_buffer) > tcg_ctx.code_gen_buffer_size) { cpu_abort(cpu, "Internal error: code buffer overflow\n"); -@@ -850,6 +856,7 @@ void tb_flush(CPUState *cpu) +@@ -862,6 +868,7 @@ void tb_flush(CPUState *cpu) /* XXX: flush processor icache at this point if cache flush is expensive */ tcg_ctx.tb_ctx.tb_flush_count++; @@ -64,8 +64,8 @@ index 8329ea6..12a48c2 100644 } #ifdef DEBUG_TB_CHECK -@@ -1208,8 +1215,10 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, - int current_flags = 0; +@@ -1320,8 +1327,10 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, + uint32_t current_flags = 0; #endif /* TARGET_HAS_PRECISE_SMC */ + tcg_lock(); @@ -75,15 +75,15 @@ index 8329ea6..12a48c2 100644 return; } #if defined(TARGET_HAS_PRECISE_SMC) -@@ -1294,6 +1303,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, - cpu_resume_from_signal(cpu, NULL); +@@ -1392,6 +1401,7 @@ void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end, + cpu_loop_exit_noexc(cpu); } #endif + tcg_unlock(); } - /* len must be <= 8 and start must be a multiple of len */ -@@ -1511,13 +1521,16 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr) + #ifdef CONFIG_SOFTMMU +@@ -1509,13 +1519,16 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr) { int m_min, m_max, m; uintptr_t v; @@ -101,7 +101,7 @@ index 8329ea6..12a48c2 100644 return NULL; } /* binary search (cf Knuth) */ -@@ -1528,6 +1541,7 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr) +@@ -1526,6 +1539,7 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr) tb = &tcg_ctx.tb_ctx.tbs[m]; v = (uintptr_t)tb->tc_ptr; if (v == tc_ptr) { @@ -109,7 +109,7 @@ index 8329ea6..12a48c2 100644 return tb; } else if (tc_ptr < v) { m_max = m - 1; -@@ -1535,7 +1549,9 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr) +@@ -1533,7 +1547,9 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr) m_min = m + 1; } } diff --git a/0018-linux-user-Fake-proc-cpuinfo.patch b/0016-linux-user-Fake-proc-cpuinfo.patch similarity index 89% rename from 0018-linux-user-Fake-proc-cpuinfo.patch rename to 0016-linux-user-Fake-proc-cpuinfo.patch index 22ffd99a..6c823475 100644 --- a/0018-linux-user-Fake-proc-cpuinfo.patch +++ b/0016-linux-user-Fake-proc-cpuinfo.patch @@ -1,4 +1,4 @@ -From 39ce1e900aba8b93e2296b3d4c613fd7af58f347 Mon Sep 17 00:00:00 2001 +From a5a2c846148a73ab5f060690a489ca6b14b6af4e Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Mon, 23 Jul 2012 10:24:14 +0200 Subject: [PATCH] linux-user: Fake /proc/cpuinfo @@ -22,10 +22,10 @@ Signed-off-by: Andreas Färber 1 file changed, 20 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index b36273d..7476689 100644 +index 82195a2..4020ceb 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -5697,6 +5697,25 @@ static int open_self_stat(void *cpu_env, int fd) +@@ -7142,6 +7142,25 @@ static int open_self_stat(void *cpu_env, int fd) return 0; } @@ -51,7 +51,7 @@ index b36273d..7476689 100644 static int open_self_auxv(void *cpu_env, int fd) { CPUState *cpu = ENV_GET_CPU((CPUArchState *)cpu_env); -@@ -5811,6 +5830,7 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags, +@@ -7256,6 +7275,7 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags, #if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN) { "/proc/net/route", open_net_route, is_proc }, #endif diff --git a/0019-linux-user-implement-FS_IOC_GETFLAG.patch b/0017-linux-user-implement-FS_IOC_GETFLAG.patch similarity index 83% rename from 0019-linux-user-implement-FS_IOC_GETFLAG.patch rename to 0017-linux-user-implement-FS_IOC_GETFLAG.patch index 3a8e7896..24a51598 100644 --- a/0019-linux-user-implement-FS_IOC_GETFLAG.patch +++ b/0017-linux-user-implement-FS_IOC_GETFLAG.patch @@ -1,4 +1,4 @@ -From 2783b7f3c20040aaa53b59a9a716364f04562126 Mon Sep 17 00:00:00 2001 +From d6a5cfe7d374b8ca661a8f957139689348b26bd6 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Mon, 20 Aug 2012 00:02:52 +0200 Subject: [PATCH] linux-user: implement FS_IOC_GETFLAGS ioctl @@ -16,22 +16,22 @@ v1 -> v2: 2 files changed, 3 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h -index c180faf..8650a70 100644 +index cf8851d..f858954 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h -@@ -90,6 +90,7 @@ +@@ -119,6 +119,7 @@ IOCTL_SPECIAL(FS_IOC_FIEMAP, IOC_W | IOC_R, do_ioctl_fs_ioc_fiemap, MK_PTR(MK_STRUCT(STRUCT_fiemap))) #endif + IOCTL(FS_IOC_GETFLAGS, IOC_R, MK_PTR(TYPE_LONG)) - IOCTL(SIOCATMARK, 0, TYPE_NULL) + IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT)) IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT)) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h -index f820b0b..5152e89 100644 +index b869b3d..00a3f30 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h -@@ -2457,6 +2457,8 @@ struct target_f_owner_ex { +@@ -2502,6 +2502,8 @@ struct target_f_owner_ex { #define TARGET_MTIOCGET TARGET_IOR('m', 2, struct mtget) #define TARGET_MTIOCPOS TARGET_IOR('m', 3, struct mtpos) diff --git a/0020-linux-user-implement-FS_IOC_SETFLAG.patch b/0018-linux-user-implement-FS_IOC_SETFLAG.patch similarity index 81% rename from 0020-linux-user-implement-FS_IOC_SETFLAG.patch rename to 0018-linux-user-implement-FS_IOC_SETFLAG.patch index b980092d..9e5e6fd8 100644 --- a/0020-linux-user-implement-FS_IOC_SETFLAG.patch +++ b/0018-linux-user-implement-FS_IOC_SETFLAG.patch @@ -1,4 +1,4 @@ -From fe937a73ac633b34380ac53c9057a0664c3b77cc Mon Sep 17 00:00:00 2001 +From 4d8d32bbd31dc799c1befebef2563db1fbd5949c Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Mon, 20 Aug 2012 00:07:13 +0200 Subject: [PATCH] linux-user: implement FS_IOC_SETFLAGS ioctl @@ -16,22 +16,22 @@ v1 -> v2 2 files changed, 2 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h -index 8650a70..f9f7c83 100644 +index f858954..8a5be00 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h -@@ -91,6 +91,7 @@ +@@ -120,6 +120,7 @@ MK_PTR(MK_STRUCT(STRUCT_fiemap))) #endif IOCTL(FS_IOC_GETFLAGS, IOC_R, MK_PTR(TYPE_LONG)) + IOCTL(FS_IOC_SETFLAGS, IOC_W, MK_PTR(TYPE_LONG)) - IOCTL(SIOCATMARK, 0, TYPE_NULL) + IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT)) IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT)) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h -index 5152e89..77be181 100644 +index 00a3f30..d31541d 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h -@@ -2458,6 +2458,7 @@ struct target_f_owner_ex { +@@ -2503,6 +2503,7 @@ struct target_f_owner_ex { #define TARGET_MTIOCPOS TARGET_IOR('m', 3, struct mtpos) #define TARGET_FS_IOC_GETFLAGS TARGET_IORU('f', 1) diff --git a/0021-linux-user-XXX-disable-fiemap.patch b/0019-linux-user-XXX-disable-fiemap.patch similarity index 80% rename from 0021-linux-user-XXX-disable-fiemap.patch rename to 0019-linux-user-XXX-disable-fiemap.patch index 9e5a4304..2eda2d14 100644 --- a/0021-linux-user-XXX-disable-fiemap.patch +++ b/0019-linux-user-XXX-disable-fiemap.patch @@ -1,4 +1,4 @@ -From 11b56fbe40bf880945a0563044b58b03d9d0baa7 Mon Sep 17 00:00:00 2001 +From dbab3749b22bb80f92af3b7ce5892fe2b4199323 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 21 Aug 2012 14:20:40 +0200 Subject: [PATCH] linux-user: XXX disable fiemap @@ -9,10 +9,10 @@ agraf: fiemap breaks in libarchive. Disable it for now. 1 file changed, 5 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 7476689..7b72784 100644 +index 4020ceb..483efb0 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -3494,6 +3494,11 @@ static abi_long do_ioctl_fs_ioc_fiemap(const IOCTLEntry *ie, uint8_t *buf_temp, +@@ -4806,6 +4806,11 @@ static abi_long do_ioctl_fs_ioc_fiemap(const IOCTLEntry *ie, uint8_t *buf_temp, uint32_t outbufsz; int free_fm = 0; diff --git a/0022-slirp-nooutgoing.patch b/0020-slirp-nooutgoing.patch similarity index 90% rename from 0022-slirp-nooutgoing.patch rename to 0020-slirp-nooutgoing.patch index b0f6d8b1..b411e1e4 100644 --- a/0022-slirp-nooutgoing.patch +++ b/0020-slirp-nooutgoing.patch @@ -1,4 +1,4 @@ -From bd75d0195aef3af7392ce38952e018936da303ff Mon Sep 17 00:00:00 2001 +From 4f307877293d621bafe78abeca74db6b949b996d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 29 Aug 2012 18:42:56 +0200 Subject: [PATCH] slirp: -nooutgoing @@ -12,10 +12,10 @@ TBD (from SUSE Studio team) 4 files changed, 39 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx -index 6106520..32b25a5 100644 +index a71aaf8..7f32069 100644 --- a/qemu-options.hx +++ b/qemu-options.hx -@@ -3102,6 +3102,16 @@ Store the QEMU process PID in @var{file}. It is useful if you launch QEMU +@@ -3132,6 +3132,16 @@ Store the QEMU process PID in @var{file}. It is useful if you launch QEMU from a script. ETEXI @@ -33,7 +33,7 @@ index 6106520..32b25a5 100644 "-singlestep always run in singlestep mode\n", QEMU_ARCH_ALL) STEXI diff --git a/slirp/socket.c b/slirp/socket.c -index b336586..8e5bdc3 100644 +index 280050a..4fe68bb 100644 --- a/slirp/socket.c +++ b/slirp/socket.c @@ -608,6 +608,8 @@ sorecvfrom(struct socket *so) @@ -59,7 +59,7 @@ index b336586..8e5bdc3 100644 ret = sendto(so->s, m->m_data, m->m_len, 0, (struct sockaddr *)&addr, sockaddr_size(&addr)); diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c -index 6b9fef2..e712e21 100644 +index ed16e18..b2c7a8c 100644 --- a/slirp/tcp_subr.c +++ b/slirp/tcp_subr.c @@ -391,6 +391,8 @@ tcp_sockclosed(struct tcpcb *tp) @@ -96,10 +96,10 @@ index 6b9fef2..e712e21 100644 socket_set_fast_reuse(s); opt = 1; diff --git a/vl.c b/vl.c -index 5db5dc2..c082789 100644 +index b3c80d5..1b8e591 100644 --- a/vl.c +++ b/vl.c -@@ -162,6 +162,7 @@ int smp_threads = 1; +@@ -160,6 +160,7 @@ int smp_threads = 1; int acpi_enabled = 1; int no_hpet = 0; int fd_bootchk = 1; @@ -107,7 +107,7 @@ index 5db5dc2..c082789 100644 static int no_reboot; int no_shutdown = 0; int cursor_hide = 1; -@@ -3386,6 +3387,14 @@ int main(int argc, char **argv, char **envp) +@@ -3363,6 +3364,14 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_singlestep: singlestep = 1; break; diff --git a/0023-vnc-password-file-and-incoming-conn.patch b/0021-vnc-password-file-and-incoming-conn.patch similarity index 84% rename from 0023-vnc-password-file-and-incoming-conn.patch rename to 0021-vnc-password-file-and-incoming-conn.patch index 5bbfd1ec..2e7ebe12 100644 --- a/0023-vnc-password-file-and-incoming-conn.patch +++ b/0021-vnc-password-file-and-incoming-conn.patch @@ -1,4 +1,4 @@ -From aa0933c1b541cc1b7efae51d7a0cc3978e127c86 Mon Sep 17 00:00:00 2001 +From 5f1f3f07690386a731ecc7bea74c72ab9cb7d253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 29 Aug 2012 20:06:01 +0200 Subject: [PATCH] vnc: password-file= and incoming-connections= @@ -9,7 +9,7 @@ TBD (from SUSE Studio team) 1 file changed, 55 insertions(+) diff --git a/ui/vnc.c b/ui/vnc.c -index 3e89dad..e7946ba 100644 +index d1087c9..7f91d96 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -58,6 +58,8 @@ static const struct timeval VNC_REFRESH_LOSSY = { 2, 0 }; @@ -21,7 +21,7 @@ index 3e89dad..e7946ba 100644 static int vnc_cursor_define(VncState *vs); static void vnc_release_modifiers(VncState *vs); -@@ -1185,6 +1187,7 @@ static void vnc_disconnect_start(VncState *vs) +@@ -1197,6 +1199,7 @@ static void vnc_disconnect_start(VncState *vs) void vnc_disconnect_finish(VncState *vs) { int i; @@ -29,7 +29,7 @@ index 3e89dad..e7946ba 100644 vnc_jobs_join(vs); /* Wait encoding jobs */ -@@ -1235,6 +1238,13 @@ void vnc_disconnect_finish(VncState *vs) +@@ -1247,6 +1250,13 @@ void vnc_disconnect_finish(VncState *vs) object_unref(OBJECT(vs->sioc)); vs->sioc = NULL; g_free(vs); @@ -43,8 +43,8 @@ index 3e89dad..e7946ba 100644 } ssize_t vnc_client_io_error(VncState *vs, ssize_t ret, Error **errp) -@@ -3200,6 +3210,39 @@ char *vnc_display_local_addr(const char *id) - return ret; +@@ -3245,6 +3255,39 @@ static void vnc_display_print_local_addr(VncDisplay *vs) + qapi_free_SocketAddress(addr); } +static void read_file_password(const char *id, const char *filename) @@ -83,7 +83,7 @@ index 3e89dad..e7946ba 100644 static QemuOptsList qemu_vnc_opts = { .name = "vnc", .head = QTAILQ_HEAD_INITIALIZER(qemu_vnc_opts.head), -@@ -3231,6 +3274,9 @@ static QemuOptsList qemu_vnc_opts = { +@@ -3276,6 +3319,9 @@ static QemuOptsList qemu_vnc_opts = { .name = "connections", .type = QEMU_OPT_NUMBER, },{ @@ -93,7 +93,7 @@ index 3e89dad..e7946ba 100644 .name = "to", .type = QEMU_OPT_NUMBER, },{ -@@ -3243,6 +3289,9 @@ static QemuOptsList qemu_vnc_opts = { +@@ -3288,6 +3334,9 @@ static QemuOptsList qemu_vnc_opts = { .name = "password", .type = QEMU_OPT_BOOL, },{ @@ -103,7 +103,7 @@ index 3e89dad..e7946ba 100644 .name = "reverse", .type = QEMU_OPT_BOOL, },{ -@@ -3476,6 +3525,7 @@ void vnc_display_open(const char *id, Error **errp) +@@ -3524,6 +3573,7 @@ void vnc_display_open(const char *id, Error **errp) const char *share, *device_id; QemuConsole *con; bool password = false; @@ -111,7 +111,7 @@ index 3e89dad..e7946ba 100644 bool reverse = false; const char *vnc; char *h; -@@ -3601,6 +3651,10 @@ void vnc_display_open(const char *id, Error **errp) +@@ -3652,6 +3702,10 @@ void vnc_display_open(const char *id, Error **errp) goto fail; } } @@ -122,7 +122,7 @@ index 3e89dad..e7946ba 100644 reverse = qemu_opt_get_bool(opts, "reverse", false); lock_key_sync = qemu_opt_get_bool(opts, "lock-key-sync", true); -@@ -3689,6 +3743,7 @@ void vnc_display_open(const char *id, Error **errp) +@@ -3741,6 +3795,7 @@ void vnc_display_open(const char *id, Error **errp) vs->share_policy = VNC_SHARE_POLICY_ALLOW_EXCLUSIVE; } vs->connections_limit = qemu_opt_get_number(opts, "connections", 32); diff --git a/0025-linux-user-use-target_ulong.patch b/0022-linux-user-use-target_ulong.patch similarity index 90% rename from 0025-linux-user-use-target_ulong.patch rename to 0022-linux-user-use-target_ulong.patch index f6270e90..03d75f09 100644 --- a/0025-linux-user-use-target_ulong.patch +++ b/0022-linux-user-use-target_ulong.patch @@ -1,4 +1,4 @@ -From 232612b32aa306574282a98dafdef5772c99ea24 Mon Sep 17 00:00:00 2001 +From d84e1f7cb131ca5de1308db7b6682edeab2bfeee Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 9 Oct 2012 09:06:49 +0200 Subject: [PATCH] linux-user: use target_ulong @@ -17,10 +17,10 @@ Signed-off-by: Alexander Graf 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/linux-user/qemu.h b/linux-user/qemu.h -index 26b0ba2..b9a7123 100644 +index bef465d..dab3b6a 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h -@@ -176,10 +176,10 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src, +@@ -193,10 +193,10 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src, void target_set_brk(abi_ulong new_brk); abi_long do_brk(abi_ulong new_brk); void syscall_init(void); @@ -36,10 +36,10 @@ index 26b0ba2..b9a7123 100644 extern THREAD CPUState *thread_cpu; void cpu_loop(CPUArchState *env); diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 7b72784..ebeab57 100644 +index 483efb0..8ac1281 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -5902,10 +5902,10 @@ static target_timer_t get_timer_id(abi_long arg) +@@ -7349,10 +7349,10 @@ static target_timer_t get_timer_id(abi_long arg) /* do_syscall() should always have a single exit point at the end so that actions, such as logging of syscall results, can be performed. All errnos that do_syscall() returns must be -TARGET_. */ diff --git a/0026-block-Add-support-for-DictZip-enabl.patch b/0023-block-Add-support-for-DictZip-enabl.patch similarity index 92% rename from 0026-block-Add-support-for-DictZip-enabl.patch rename to 0023-block-Add-support-for-DictZip-enabl.patch index b9d471f6..806aac41 100644 --- a/0026-block-Add-support-for-DictZip-enabl.patch +++ b/0023-block-Add-support-for-DictZip-enabl.patch @@ -1,4 +1,4 @@ -From 171c8acfae279756c43f0265e1cfc7d984ab5464 Mon Sep 17 00:00:00 2001 +From 975ac1298231bb8ec825d4f1e48638ef13bdc62e Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 5 Aug 2009 09:49:37 +0200 Subject: [PATCH] block: Add support for DictZip enabled gzip files @@ -37,6 +37,9 @@ Signed-off-by: Tim Hardeck [AF: Drop bdrv_open() drv parameter for 2.5] Signed-off-by: Andreas Färber Signed-off-by: Bruce Rogers +[AF: Drop bdrv_open() bs parameter and change return value for v2.7.0-rc2, + for bdrv_pread() and bdrv_aio_readv() do s/s->hd/s->hd->file/] +Signed-off-by: Andreas Färber --- block/Makefile.objs | 1 + block/dictzip.c | 580 ++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -44,7 +47,7 @@ Signed-off-by: Bruce Rogers create mode 100644 block/dictzip.c diff --git a/block/Makefile.objs b/block/Makefile.objs -index 44a5416..12e0cca 100644 +index 2593a2f..f3f6f5f 100644 --- a/block/Makefile.objs +++ b/block/Makefile.objs @@ -21,6 +21,7 @@ block-obj-$(CONFIG_GLUSTERFS) += gluster.o @@ -57,7 +60,7 @@ index 44a5416..12e0cca 100644 block-obj-y += crypto.o diff --git a/block/dictzip.c b/block/dictzip.c new file mode 100644 -index 0000000..717a7d3 +index 0000000..4b7e2db --- /dev/null +++ b/block/dictzip.c @@ -0,0 +1,580 @@ @@ -246,9 +249,9 @@ index 0000000..717a7d3 + else if (!strncmp(filename, "dzip:", 5)) + filename += 5; + -+ ret = bdrv_open(&s->hd, filename, NULL, NULL, flags | BDRV_O_PROTOCOL, &local_err); -+ if (ret < 0) { -+ error_propagate(errp, local_err); ++ s->hd = bdrv_open(filename, NULL, NULL, flags | BDRV_O_PROTOCOL, errp); ++ if (!s->hd) { ++ ret = -EINVAL; + qemu_opts_del(opts); + return ret; + } @@ -262,7 +265,7 @@ index 0000000..717a7d3 + } + + /* gzip header */ -+ if (bdrv_pread(s->hd, GZ_ID, &magic, sizeof(magic)) != sizeof(magic)) ++ if (bdrv_pread(s->hd->file, GZ_ID, &magic, sizeof(magic)) != sizeof(magic)) + goto fail; + + if (!((magic[0] == GZ_MAGIC1) && (magic[1] == GZ_MAGIC2))) { @@ -271,7 +274,7 @@ index 0000000..717a7d3 + } + + /* dzip header */ -+ if (bdrv_pread(s->hd, GZ_FLG, &header_flags, 1) != 1) ++ if (bdrv_pread(s->hd->file, GZ_FLG, &header_flags, 1) != 1) + goto fail; + + if (!(header_flags & GZ_FEXTRA)) { @@ -280,13 +283,13 @@ index 0000000..717a7d3 + } + + /* extra length */ -+ if (bdrv_pread(s->hd, GZ_XLEN, &tmp_short, 2) != 2) ++ if (bdrv_pread(s->hd->file, GZ_XLEN, &tmp_short, 2) != 2) + goto fail; + + headerLength += le16_to_cpu(tmp_short) + 2; + + /* DictZip magic */ -+ if (bdrv_pread(s->hd, GZ_SI, &magic, 2) != 2) ++ if (bdrv_pread(s->hd->file, GZ_SI, &magic, 2) != 2) + goto fail; + + if (magic[0] != DZ_MAGIC1 || magic[1] != DZ_MAGIC2) { @@ -295,7 +298,7 @@ index 0000000..717a7d3 + } + + /* DictZip version */ -+ if (bdrv_pread(s->hd, GZ_VERSION, &header_ver, 2) != 2) ++ if (bdrv_pread(s->hd->file, GZ_VERSION, &header_ver, 2) != 2) + goto fail; + + header_ver = le16_to_cpu(header_ver); @@ -303,13 +306,13 @@ index 0000000..717a7d3 + switch (header_ver) { + case 1: /* Normal DictZip */ + /* number of chunks */ -+ if (bdrv_pread(s->hd, GZ_CHUNKSIZE, &chunk_len16, 2) != 2) ++ if (bdrv_pread(s->hd->file, GZ_CHUNKSIZE, &chunk_len16, 2) != 2) + goto fail; + + s->chunk_len = le16_to_cpu(chunk_len16); + + /* chunk count */ -+ if (bdrv_pread(s->hd, GZ_CHUNKCNT, &chunk_cnt16, 2) != 2) ++ if (bdrv_pread(s->hd->file, GZ_CHUNKCNT, &chunk_cnt16, 2) != 2) + goto fail; + + s->chunk_cnt = le16_to_cpu(chunk_cnt16); @@ -318,14 +321,14 @@ index 0000000..717a7d3 + break; + case 99: /* Special Alex pigz version */ + /* number of chunks */ -+ if (bdrv_pread(s->hd, GZ_99_CHUNKSIZE, &s->chunk_len, 4) != 4) ++ if (bdrv_pread(s->hd->file, GZ_99_CHUNKSIZE, &s->chunk_len, 4) != 4) + goto fail; + + dprintf("chunk len [%#x] = %d\n", GZ_99_CHUNKSIZE, s->chunk_len); + s->chunk_len = le32_to_cpu(s->chunk_len); + + /* chunk count */ -+ if (bdrv_pread(s->hd, GZ_99_CHUNKCNT, &s->chunk_cnt, 4) != 4) ++ if (bdrv_pread(s->hd->file, GZ_99_CHUNKCNT, &s->chunk_cnt, 4) != 4) + goto fail; + + s->chunk_cnt = le32_to_cpu(s->chunk_cnt); @@ -333,7 +336,7 @@ index 0000000..717a7d3 + dprintf("chunk len | count = %d | %d\n", s->chunk_len, s->chunk_cnt); + + /* file size */ -+ if (bdrv_pread(s->hd, GZ_99_FILESIZE, &s->file_len, 8) != 8) ++ if (bdrv_pread(s->hd->file, GZ_99_FILESIZE, &s->file_len, 8) != 8) + goto fail; + + s->file_len = le64_to_cpu(s->file_len); @@ -350,12 +353,12 @@ index 0000000..717a7d3 + if (header_ver == 99) + s->chunks32 = (uint32_t *)s->chunks; + -+ if (bdrv_pread(s->hd, rnd_offs, s->chunks, chunks_len) != chunks_len) ++ if (bdrv_pread(s->hd->file, rnd_offs, s->chunks, chunks_len) != chunks_len) + goto fail; + + /* orig filename */ + if (header_flags & GZ_FNAME) { -+ if (bdrv_pread(s->hd, headerLength + 1, buf, sizeof(buf)) != sizeof(buf)) ++ if (bdrv_pread(s->hd->file, headerLength + 1, buf, sizeof(buf)) != sizeof(buf)) + goto fail; + + buf[sizeof(buf) - 1] = '\0'; @@ -369,7 +372,7 @@ index 0000000..717a7d3 + + /* comment field */ + if (header_flags & GZ_COMMENT) { -+ if (bdrv_pread(s->hd, headerLength, buf, sizeof(buf)) != sizeof(buf)) ++ if (bdrv_pread(s->hd->file, headerLength, buf, sizeof(buf)) != sizeof(buf)) + goto fail; + + buf[sizeof(buf) - 1] = '\0'; @@ -388,7 +391,7 @@ index 0000000..717a7d3 + if (!s->file_len) { + uint32_t file_len; + -+ if (bdrv_pread(s->hd, bdrv_getlength(s->hd) - 4, &file_len, 4) != 4) ++ if (bdrv_pread(s->hd->file, bdrv_getlength(s->hd) - 4, &file_len, 4) != 4) + goto fail; + + s->file_len = le32_to_cpu(file_len); @@ -587,7 +590,7 @@ index 0000000..717a7d3 + acb->offset = first_offset; + acb->chunks_len = (last_chunk - first_chunk + 1) * s->chunk_len; + -+ return bdrv_aio_readv(s->hd, gz_sector_num, qiov_gz, gz_nb_sectors, ++ return bdrv_aio_readv(s->hd->file, gz_sector_num, qiov_gz, gz_nb_sectors, + dictzip_read_cb, acb); +} + diff --git a/0027-block-Add-tar-container-format.patch b/0024-block-Add-tar-container-format.patch similarity index 94% rename from 0027-block-Add-tar-container-format.patch rename to 0024-block-Add-tar-container-format.patch index 0c2e7419..5c408621 100644 --- a/0027-block-Add-tar-container-format.patch +++ b/0024-block-Add-tar-container-format.patch @@ -1,4 +1,4 @@ -From e05a6cfd83e972bf46ca8e8ce7a00d83c882e2d8 Mon Sep 17 00:00:00 2001 +From 7c81e618f5817533392440d8174d8d467886c61f Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 5 Aug 2009 17:28:38 +0200 Subject: [PATCH] block: Add tar container format @@ -38,6 +38,9 @@ Signed-off-by: Tim Hardeck [AF: Drop bdrv_open() drv parameter for 2.5] Signed-off-by: Andreas Färber Signed-off-by: Bruce Rogers +[AF: Changed bdrv_open() bs parameter and return value for v2.7.0-rc2, + for bdrv_pread() and bdrv_aio_readv() s/s->hd/s->hd->file/] +Signed-off-by: Andreas Färber --- block/Makefile.objs | 1 + block/tar.c | 370 ++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -45,7 +48,7 @@ Signed-off-by: Bruce Rogers create mode 100644 block/tar.c diff --git a/block/Makefile.objs b/block/Makefile.objs -index 12e0cca..34a6fba 100644 +index f3f6f5f..f049d53 100644 --- a/block/Makefile.objs +++ b/block/Makefile.objs @@ -22,6 +22,7 @@ block-obj-$(CONFIG_ARCHIPELAGO) += archipelago.o @@ -58,7 +61,7 @@ index 12e0cca..34a6fba 100644 block-obj-y += crypto.o diff --git a/block/tar.c b/block/tar.c new file mode 100644 -index 0000000..31da8b9 +index 0000000..508265e --- /dev/null +++ b/block/tar.c @@ -0,0 +1,370 @@ @@ -245,9 +248,9 @@ index 0000000..31da8b9 + else if (!strncmp(filename, "tar:", 4)) + filename += 4; + -+ ret = bdrv_open(&s->hd, filename, NULL, NULL, flags | BDRV_O_PROTOCOL, &local_err); -+ if (ret < 0) { -+ error_propagate(errp, local_err); ++ s->hd = bdrv_open(filename, NULL, NULL, flags | BDRV_O_PROTOCOL, errp); ++ if (!s->hd) { ++ ret = -EINVAL; + qemu_opts_del(opts); + return ret; + } @@ -256,7 +259,7 @@ index 0000000..31da8b9 + + do { + /* tar header */ -+ if (bdrv_pread(s->hd, header_offs, header, SECTOR_SIZE) != SECTOR_SIZE) ++ if (bdrv_pread(s->hd->file, header_offs, header, SECTOR_SIZE) != SECTOR_SIZE) + goto fail; + + if ((header_offs > 1) && !header[0]) { @@ -280,7 +283,7 @@ index 0000000..31da8b9 + header_offs += s->file_len + SECTOR_SIZE; + + if (header[OFFS_TYPE] == 'L') { -+ bdrv_pread(s->hd, header_offs - s->file_len, s->longfile, ++ bdrv_pread(s->hd->file, header_offs - s->file_len, s->longfile, + sizeof(s->longfile)); + s->longfile[sizeof(s->longfile)-1] = '\0'; + } else if (s->longfile[0]) { @@ -303,7 +306,7 @@ index 0000000..31da8b9 + isextended = header[OFFS_S_EXT]; + + while (isextended) { -+ if (bdrv_pread(s->hd, s->file_sec * SECTOR_SIZE, header, ++ if (bdrv_pread(s->hd->file, s->file_sec * SECTOR_SIZE, header, + SECTOR_SIZE) != SECTOR_SIZE) + goto fail; + @@ -385,7 +388,7 @@ index 0000000..31da8b9 + + for (offs = 0; offs < (nb_sectors * SECTOR_SIZE); + offs += SECTOR_SIZE) { -+ bdrv_pread(bs, (sector_num * SECTOR_SIZE) + offs, ++ bdrv_pread(bs->file, (sector_num * SECTOR_SIZE) + offs, + buf + offs, SECTOR_SIZE); + } + @@ -398,7 +401,7 @@ index 0000000..31da8b9 + } + } + -+ return bdrv_aio_readv(s->hd, sec_file, qiov, nb_sectors, ++ return bdrv_aio_readv(s->hd->file, sec_file, qiov, nb_sectors, + cb, opaque); +} + diff --git a/0024-linux-user-add-more-blk-ioctls.patch b/0024-linux-user-add-more-blk-ioctls.patch deleted file mode 100644 index 0f2a02db..00000000 --- a/0024-linux-user-add-more-blk-ioctls.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 32cee35bd3c2f98dc645350021de3d9e23be731d Mon Sep 17 00:00:00 2001 -From: Alexander Graf -Date: Wed, 10 Oct 2012 10:21:20 +0200 -Subject: [PATCH] linux-user: add more blk ioctls - -Implement a few more ioctls that operate on block devices. - -Signed-off-by: Alexander Graf ---- - linux-user/ioctls.h | 18 ++++++++++++++++++ - linux-user/syscall_defs.h | 6 ++++++ - linux-user/syscall_types.h | 3 +++ - 3 files changed, 27 insertions(+) - -diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h -index f9f7c83..8eb4446 100644 ---- a/linux-user/ioctls.h -+++ b/linux-user/ioctls.h -@@ -73,6 +73,24 @@ - #ifdef BLKGETSIZE64 - IOCTL(BLKGETSIZE64, IOC_R, MK_PTR(TYPE_ULONGLONG)) - #endif -+#ifdef BLKDISCARD -+ IOCTL(BLKDISCARD, IOC_W, MK_PTR(MK_STRUCT(STRUCT_blkdiscard))) -+#endif -+#ifdef BLKIOMIN -+ IOCTL(BLKIOMIN, IOC_R, MK_PTR(TYPE_INT)) -+#endif -+#ifdef BLKIOOPT -+ IOCTL(BLKIOOPT, IOC_R, MK_PTR(TYPE_INT)) -+#endif -+#ifdef BLKALIGNOFF -+ IOCTL(BLKALIGNOFF, IOC_R, MK_PTR(TYPE_INT)) -+#endif -+#ifdef BLKPBSZGET -+ IOCTL(BLKPBSZGET, IOC_R, MK_PTR(TYPE_INT)) -+#endif -+#ifdef BLKDISCARDZEROES -+ IOCTL(BLKDISCARDZEROES, IOC_R, MK_PTR(TYPE_INT)) -+#endif - IOCTL(BLKFLSBUF, 0, TYPE_NULL) - IOCTL(BLKRASET, 0, TYPE_INT) - IOCTL(BLKRAGET, IOC_R, MK_PTR(TYPE_LONG)) -diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h -index 77be181..787ba85 100644 ---- a/linux-user/syscall_defs.h -+++ b/linux-user/syscall_defs.h -@@ -956,6 +956,12 @@ struct target_pollfd { - #define TARGET_BLKGETSIZE64 TARGET_IOR(0x12,114,abi_ulong) - /* return device size in bytes - (u64 *arg) */ -+#define TARGET_BLKDISCARD TARGET_IO(0x12,119) -+#define TARGET_BLKIOMIN TARGET_IO(0x12,120) -+#define TARGET_BLKIOOPT TARGET_IO(0x12,121) -+#define TARGET_BLKALIGNOFF TARGET_IO(0x12,122) -+#define TARGET_BLKPBSZGET TARGET_IO(0x12,123) -+#define TARGET_BLKDISCARDZEROES TARGET_IO(0x12,124) - #define TARGET_FIBMAP TARGET_IO(0x00,1) /* bmap access */ - #define TARGET_FIGETBSZ TARGET_IO(0x00,2) /* get the block size used for bmap */ - #define TARGET_FS_IOC_FIEMAP TARGET_IOWR('f',11,struct fiemap) -diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h -index e5331b4..a730c87 100644 ---- a/linux-user/syscall_types.h -+++ b/linux-user/syscall_types.h -@@ -71,6 +71,9 @@ STRUCT(kbentry, - STRUCT(kbsentry, - TYPE_CHAR, MK_ARRAY(TYPE_CHAR, 512)) - -+STRUCT(blkdiscard, -+ MK_ARRAY(TYPE_LONGLONG, 2)) -+ - STRUCT(audio_buf_info, - TYPE_INT, TYPE_INT, TYPE_INT, TYPE_INT) - diff --git a/0028-Legacy-Patch-kvm-qemu-preXX-dictzip.patch b/0025-Legacy-Patch-kvm-qemu-preXX-dictzip.patch similarity index 90% rename from 0028-Legacy-Patch-kvm-qemu-preXX-dictzip.patch rename to 0025-Legacy-Patch-kvm-qemu-preXX-dictzip.patch index 81e13917..9ec27cc6 100644 --- a/0028-Legacy-Patch-kvm-qemu-preXX-dictzip.patch +++ b/0025-Legacy-Patch-kvm-qemu-preXX-dictzip.patch @@ -1,4 +1,4 @@ -From e04e97093af3fc593a7db57be40e7334f9776330 Mon Sep 17 00:00:00 2001 +From 674ccdfa8c935b192e553fe5a53607d6f5eb1f43 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 12 Dec 2012 19:11:30 +0100 Subject: [PATCH] Legacy Patch kvm-qemu-preXX-dictzip3.patch @@ -8,7 +8,7 @@ Subject: [PATCH] Legacy Patch kvm-qemu-preXX-dictzip3.patch 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/block/tar.c b/block/tar.c -index 31da8b9..41620fd 100644 +index 508265e..734082a 100644 --- a/block/tar.c +++ b/block/tar.c @@ -73,7 +73,8 @@ static int str_ends(char *str, const char *end) @@ -40,7 +40,7 @@ index 31da8b9..41620fd 100644 } @@ -219,12 +227,13 @@ static int tar_open(BlockDriverState *bs, QDict *options, int flags, Error **err - bdrv_pread(s->hd, header_offs - s->file_len, s->longfile, + bdrv_pread(s->hd->file, header_offs - s->file_len, s->longfile, sizeof(s->longfile)); s->longfile[sizeof(s->longfile)-1] = '\0'; + real_file = header; diff --git a/0029-console-add-question-mark-escape-op.patch b/0026-console-add-question-mark-escape-op.patch similarity index 91% rename from 0029-console-add-question-mark-escape-op.patch rename to 0026-console-add-question-mark-escape-op.patch index 27e6af81..77b3c8ba 100644 --- a/0029-console-add-question-mark-escape-op.patch +++ b/0026-console-add-question-mark-escape-op.patch @@ -1,4 +1,4 @@ -From 36f007f4de748aff064604637383a23cbebe813e Mon Sep 17 00:00:00 2001 +From b00ff88b97ba2ce476534674632e7b5500dbb890 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Mon, 6 Jun 2011 06:53:52 +0200 Subject: [PATCH] console: add question-mark escape operator @@ -16,7 +16,7 @@ Signed-off-by: Alexander Graf 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/console.c b/ui/console.c -index bf38579..0c1b4a3 100644 +index c24bfe4..44b46fd 100644 --- a/ui/console.c +++ b/ui/console.c @@ -868,7 +868,7 @@ static void console_putchar(QemuConsole *s, int ch) diff --git a/0030-Make-char-muxer-more-robust-wrt-sma.patch b/0027-Make-char-muxer-more-robust-wrt-sma.patch similarity index 86% rename from 0030-Make-char-muxer-more-robust-wrt-sma.patch rename to 0027-Make-char-muxer-more-robust-wrt-sma.patch index 420a97d1..b6b874be 100644 --- a/0030-Make-char-muxer-more-robust-wrt-sma.patch +++ b/0027-Make-char-muxer-more-robust-wrt-sma.patch @@ -1,4 +1,4 @@ -From f745251506bedd96fb153b838dbf8a399eb8e275 Mon Sep 17 00:00:00 2001 +From a6a54eb0ce3cec68f80f72a957bf6e2189118b5e Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Thu, 1 Apr 2010 17:36:23 +0200 Subject: [PATCH] Make char muxer more robust wrt small FIFOs @@ -17,15 +17,17 @@ active when the guest can not receive any more characters. In that case it polls again after a while to check if the guest is now receiving input. This patch fixes input when using -nographic on s390 for me. + +[AF: Rebased for v2.7.0-rc2] --- qemu-char.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/qemu-char.c b/qemu-char.c -index b597ee1..eedae4f 100644 +index 5f82ebb..be8396b 100644 --- a/qemu-char.c +++ b/qemu-char.c -@@ -512,6 +512,9 @@ typedef struct { +@@ -510,6 +510,9 @@ typedef struct { IOEventHandler *chr_event[MAX_MUX]; void *ext_opaque[MAX_MUX]; CharDriverState *drv; @@ -35,7 +37,7 @@ index b597ee1..eedae4f 100644 int focus; int mux_cnt; int term_got_escape; -@@ -671,6 +674,15 @@ static void mux_chr_accept_input(CharDriverState *chr) +@@ -669,6 +672,15 @@ static void mux_chr_accept_input(CharDriverState *chr) d->chr_read[m](d->ext_opaque[m], &d->buffer[m][d->cons[m]++ & MUX_BUFFER_MASK], 1); } @@ -51,7 +53,7 @@ index b597ee1..eedae4f 100644 } static int mux_chr_can_read(void *opaque) -@@ -812,6 +824,10 @@ static CharDriverState *qemu_chr_open_mux(const char *id, +@@ -817,6 +829,10 @@ static CharDriverState *qemu_chr_open_mux(const char *id, chr->opaque = d; d->drv = drv; d->focus = -1; @@ -59,6 +61,6 @@ index b597ee1..eedae4f 100644 + d->accept_timer = qemu_new_timer_ns(vm_clock, + (QEMUTimerCB*)mux_chr_accept_input, chr); +#endif + chr->chr_close = mux_chr_close; chr->chr_write = mux_chr_write; chr->chr_update_read_handler = mux_chr_update_read_handler; - chr->chr_accept_input = mux_chr_accept_input; diff --git a/0031-linux-user-lseek-explicitly-cast-no.patch b/0028-linux-user-lseek-explicitly-cast-no.patch similarity index 88% rename from 0031-linux-user-lseek-explicitly-cast-no.patch rename to 0028-linux-user-lseek-explicitly-cast-no.patch index 59854f29..5a369a20 100644 --- a/0031-linux-user-lseek-explicitly-cast-no.patch +++ b/0028-linux-user-lseek-explicitly-cast-no.patch @@ -1,4 +1,4 @@ -From e7c736a9bfa10f1acb5e6b02c73fd8662d5c6a6c Mon Sep 17 00:00:00 2001 +From fd4fc533fbd24b003f606d12bd114ff9ba215380 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Thu, 13 Dec 2012 14:29:22 +0100 Subject: [PATCH] linux-user: lseek: explicitly cast non-set offsets to signed @@ -16,10 +16,10 @@ Signed-off-by: Alexander Graf 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index ebeab57..c084f38 100644 +index 8ac1281..51c1091 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c -@@ -6233,9 +6233,14 @@ abi_long do_syscall(void *cpu_env, int num, abi_ulong arg1, +@@ -7710,9 +7710,14 @@ abi_long do_syscall(void *cpu_env, int num, abi_ulong arg1, case TARGET_NR_oldstat: goto unimplemented; #endif diff --git a/0032-virtfs-proxy-helper-Provide-__u64-f.patch b/0029-virtfs-proxy-helper-Provide-__u64-f.patch similarity index 92% rename from 0032-virtfs-proxy-helper-Provide-__u64-f.patch rename to 0029-virtfs-proxy-helper-Provide-__u64-f.patch index 0d743aec..a5ca6cd4 100644 --- a/0032-virtfs-proxy-helper-Provide-__u64-f.patch +++ b/0029-virtfs-proxy-helper-Provide-__u64-f.patch @@ -1,4 +1,4 @@ -From 96ff92eb1a6402f0b90e4394990eda7f5e457d13 Mon Sep 17 00:00:00 2001 +From 0e73e519a0d99d8fd366f024d768a349fc32e3f6 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Thu, 16 May 2013 12:39:10 +0200 Subject: [PATCH] virtfs-proxy-helper: Provide __u64 for broken diff --git a/0033-configure-Enable-PIE-for-ppc-and-pp.patch b/0030-configure-Enable-PIE-for-ppc-and-pp.patch similarity index 86% rename from 0033-configure-Enable-PIE-for-ppc-and-pp.patch rename to 0030-configure-Enable-PIE-for-ppc-and-pp.patch index db6745da..9ecf4b16 100644 --- a/0033-configure-Enable-PIE-for-ppc-and-pp.patch +++ b/0030-configure-Enable-PIE-for-ppc-and-pp.patch @@ -1,4 +1,4 @@ -From 2181064a8a8f7a22285ae767affb23dc684d7d10 Mon Sep 17 00:00:00 2001 +From 42032776551d183f971e0523b0216f9880a88413 Mon Sep 17 00:00:00 2001 From: Dinar Valeev Date: Wed, 2 Oct 2013 17:56:03 +0200 Subject: [PATCH] configure: Enable PIE for ppc and ppc64 hosts @@ -14,10 +14,10 @@ Signed-off-by: Andreas Färber 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure -index 60e3c0d..65232af 100755 +index 4b808f9..b882d19 100755 --- a/configure +++ b/configure -@@ -1537,7 +1537,7 @@ fi +@@ -1545,7 +1545,7 @@ fi if test "$pie" = ""; then case "$cpu-$targetos" in diff --git a/0035-AIO-Reduce-number-of-threads-for-32.patch b/0031-AIO-Reduce-number-of-threads-for-32.patch similarity index 92% rename from 0035-AIO-Reduce-number-of-threads-for-32.patch rename to 0031-AIO-Reduce-number-of-threads-for-32.patch index 7b9fa9d6..a1956479 100644 --- a/0035-AIO-Reduce-number-of-threads-for-32.patch +++ b/0031-AIO-Reduce-number-of-threads-for-32.patch @@ -1,4 +1,4 @@ -From e69780e5f390f491fae554f1a0b0649c9187869e Mon Sep 17 00:00:00 2001 +From 4aa17b7cf5d35e03c2e563477e920cd7104d5806 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 14 Jan 2015 01:32:11 +0100 Subject: [PATCH] AIO: Reduce number of threads for 32bit hosts @@ -21,7 +21,7 @@ Signed-off-by: Alexander Graf 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/thread-pool.c b/thread-pool.c -index 03ba0b0..b5b4fd3 100644 +index 6fba913..ee0b485 100644 --- a/thread-pool.c +++ b/thread-pool.c @@ -297,7 +297,12 @@ static void thread_pool_init_one(ThreadPool *pool, AioContext *ctx) diff --git a/0037-dictzip-Fix-on-big-endian-systems.patch b/0032-dictzip-Fix-on-big-endian-systems.patch similarity index 91% rename from 0037-dictzip-Fix-on-big-endian-systems.patch rename to 0032-dictzip-Fix-on-big-endian-systems.patch index fc6566fd..7ed589a1 100644 --- a/0037-dictzip-Fix-on-big-endian-systems.patch +++ b/0032-dictzip-Fix-on-big-endian-systems.patch @@ -1,4 +1,4 @@ -From bd33e933cbde5f822a0db069e7d368d0cb406249 Mon Sep 17 00:00:00 2001 +From aacebb4ff80cbd3cf32c3fa1b739f4999c2956ff Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Mon, 15 Jun 2015 17:36:32 +0200 Subject: [PATCH] dictzip: Fix on big endian systems @@ -14,13 +14,14 @@ Furthermore while at it, fix up the debug prints to not emit warnings. [AG: BSC#937572] Signed-off-by: Alexander Graf +[AF: Rebased for v2.7.0-rc2] Signed-off-by: Andreas Färber --- block/dictzip.c | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/block/dictzip.c b/block/dictzip.c -index 717a7d3..1a104ac 100644 +index 4b7e2db..3235337 100644 --- a/block/dictzip.c +++ b/block/dictzip.c @@ -156,6 +156,7 @@ static int dictzip_open(BlockDriverState *bs, QDict *options, int flags, Error * @@ -35,8 +36,8 @@ index 717a7d3..1a104ac 100644 break; case 99: /* Special Alex pigz version */ /* number of chunks */ -- if (bdrv_pread(s->hd, GZ_99_CHUNKSIZE, &s->chunk_len, 4) != 4) -+ if (bdrv_pread(s->hd, GZ_99_CHUNKSIZE, &chunk_len32, 4) != 4) +- if (bdrv_pread(s->hd->file, GZ_99_CHUNKSIZE, &s->chunk_len, 4) != 4) ++ if (bdrv_pread(s->hd->file, GZ_99_CHUNKSIZE, &chunk_len32, 4) != 4) goto fail; - dprintf("chunk len [%#x] = %d\n", GZ_99_CHUNKSIZE, s->chunk_len); @@ -45,7 +46,7 @@ index 717a7d3..1a104ac 100644 + s->chunk_len = le32_to_cpu(chunk_len32); /* chunk count */ - if (bdrv_pread(s->hd, GZ_99_CHUNKCNT, &s->chunk_cnt, 4) != 4) + if (bdrv_pread(s->hd->file, GZ_99_CHUNKCNT, &s->chunk_cnt, 4) != 4) @@ -267,7 +268,7 @@ static int dictzip_open(BlockDriverState *bs, QDict *options, int flags, Error * s->chunk_cnt = le32_to_cpu(s->chunk_cnt); @@ -54,7 +55,7 @@ index 717a7d3..1a104ac 100644 + dprintf("chunk len | count = %"PRId64" | %d\n", s->chunk_len, s->chunk_cnt); /* file size */ - if (bdrv_pread(s->hd, GZ_99_FILESIZE, &s->file_len, 8) != 8) + if (bdrv_pread(s->hd->file, GZ_99_FILESIZE, &s->file_len, 8) != 8) @@ -338,14 +339,14 @@ static int dictzip_open(BlockDriverState *bs, QDict *options, int flags, Error * s->offsets[i] = offset; switch (header_ver) { diff --git a/0039-xen_disk-Add-suse-specific-flush-di.patch b/0033-xen_disk-Add-suse-specific-flush-di.patch similarity index 93% rename from 0039-xen_disk-Add-suse-specific-flush-di.patch rename to 0033-xen_disk-Add-suse-specific-flush-di.patch index 506cb8ec..05d23a49 100644 --- a/0039-xen_disk-Add-suse-specific-flush-di.patch +++ b/0033-xen_disk-Add-suse-specific-flush-di.patch @@ -1,4 +1,4 @@ -From 2d38805131dee693fd9bd931239793514e36d3e0 Mon Sep 17 00:00:00 2001 +From d464395f484a4379ac5b14bde497625e1a0d2a02 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Wed, 9 Mar 2016 15:18:11 -0700 Subject: [PATCH] xen_disk: Add suse specific flush disable handling and map to @@ -17,10 +17,10 @@ Signed-off-by: Olaf Hering 1 file changed, 15 insertions(+) diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c -index d4ce380..9100862 100644 +index 3b8ad33..6f37eeb 100644 --- a/hw/block/xen_disk.c +++ b/hw/block/xen_disk.c -@@ -112,6 +112,7 @@ struct XenBlkDev { +@@ -111,6 +111,7 @@ struct XenBlkDev { int requests_inflight; int requests_finished; diff --git a/0040-build-link-with-libatomic-on-powerp.patch b/0034-build-link-with-libatomic-on-powerp.patch similarity index 89% rename from 0040-build-link-with-libatomic-on-powerp.patch rename to 0034-build-link-with-libatomic-on-powerp.patch index 0163f6ae..d15be869 100644 --- a/0040-build-link-with-libatomic-on-powerp.patch +++ b/0034-build-link-with-libatomic-on-powerp.patch @@ -1,4 +1,4 @@ -From f210e8f540cb261c11bffa4ed8e9918ad1731a9b Mon Sep 17 00:00:00 2001 +From bb8771719728d7bc6981aef1393dd3422d54c63c Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Fri, 1 Apr 2016 12:27:16 +0200 Subject: [PATCH] build: link with libatomic on powerpc-linux @@ -14,10 +14,10 @@ Signed-off-by: Olaf Hering 1 file changed, 27 insertions(+) diff --git a/configure b/configure -index bf74354..8892b36 100755 +index b882d19..dfd37b1 100755 --- a/configure +++ b/configure -@@ -4033,6 +4033,33 @@ if test "$usb_redir" != "no" ; then +@@ -4049,6 +4049,33 @@ if test "$usb_redir" != "no" ; then fi fi diff --git a/0034-qtest-Increase-socket-timeout.patch b/0034-qtest-Increase-socket-timeout.patch deleted file mode 100644 index ea752494..00000000 --- a/0034-qtest-Increase-socket-timeout.patch +++ /dev/null @@ -1,28 +0,0 @@ -From bc88332e8bf07bf413f32131cd20f4e2ba9aeb6a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20F=C3=A4rber?= -Date: Thu, 17 Apr 2014 18:39:10 +0200 -Subject: [PATCH] qtest: Increase socket timeout -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Change from 5 to 15 seconds. - -Signed-off-by: Andreas Färber ---- - tests/libqtest.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/libqtest.c b/tests/libqtest.c -index b12a9e4..8de01c0 100644 ---- a/tests/libqtest.c -+++ b/tests/libqtest.c -@@ -27,7 +27,7 @@ - #include "qapi/qmp/qjson.h" - - #define MAX_IRQ 256 --#define SOCKET_TIMEOUT 5 -+#define SOCKET_TIMEOUT 15 - - QTestState *global_qtest; - diff --git a/0049-xen-SUSE-xenlinux-unplug-for-emulat.patch b/0035-xen-SUSE-xenlinux-unplug-for-emulat.patch similarity index 96% rename from 0049-xen-SUSE-xenlinux-unplug-for-emulat.patch rename to 0035-xen-SUSE-xenlinux-unplug-for-emulat.patch index 4240f3ab..72172ff3 100644 --- a/0049-xen-SUSE-xenlinux-unplug-for-emulat.patch +++ b/0035-xen-SUSE-xenlinux-unplug-for-emulat.patch @@ -1,4 +1,4 @@ -From 6fc72ceb37357fb66b43b17a84b4b6fe128c5f4f Mon Sep 17 00:00:00 2001 +From cb9cefce08cdc9ed66e2e50998d9daf182af0354 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 21 Jun 2016 18:42:45 +0200 Subject: [PATCH] xen: SUSE xenlinux unplug for emulated PCI diff --git a/0036-configure-Enable-libseccomp-for-ppc.patch b/0036-configure-Enable-libseccomp-for-ppc.patch deleted file mode 100644 index fca458b7..00000000 --- a/0036-configure-Enable-libseccomp-for-ppc.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 6bfa8a2b720bb6cc36a933870a2a1c0a239b3e9d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20F=C3=A4rber?= -Date: Tue, 14 Apr 2015 18:42:06 +0200 -Subject: [PATCH] configure: Enable libseccomp for ppc -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Our Factory libseccomp is patched to support ppc, ppc64 and ppc64le. - -Signed-off-by: Andreas Färber ---- - configure | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/configure b/configure -index 65232af..bf74354 100755 ---- a/configure -+++ b/configure -@@ -1879,6 +1879,9 @@ if test "$seccomp" != "no" ; then - arm|aarch64) - libseccomp_minver="2.2.3" - ;; -+ ppc|ppc64) -+ libseccomp_minver="2.2.0" -+ ;; - *) - libseccomp_minver="" - ;; diff --git a/0054-qemu-bridge-helper-reduce-security-.patch b/0036-qemu-bridge-helper-reduce-security-.patch similarity index 78% rename from 0054-qemu-bridge-helper-reduce-security-.patch rename to 0036-qemu-bridge-helper-reduce-security-.patch index a1e94ca9..b4af3f6a 100644 --- a/0054-qemu-bridge-helper-reduce-security-.patch +++ b/0036-qemu-bridge-helper-reduce-security-.patch @@ -1,7 +1,10 @@ -From 66d8c1e91cb8b11fad0ddc68c7398c5ff202525e Mon Sep 17 00:00:00 2001 +From 02b362649c8e391e465f425a876eb914af3727a6 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Tue, 2 Aug 2016 11:36:02 -0600 Subject: [PATCH] qemu-bridge-helper: reduce security profile +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit Change from using glib alloc and free routines to those from libc. Also perform safety measure of dropping privs @@ -9,24 +12,17 @@ to user if configured no-caps. [BR: BOO#988279] Signed-off-by: Bruce Rogers +[AF: Rebased for v2.7.0-rc2] +Signed-off-by: Andreas Färber --- - qemu-bridge-helper.c | 29 ++++++++++++++++++++++++----- - 1 file changed, 24 insertions(+), 5 deletions(-) + qemu-bridge-helper.c | 27 ++++++++++++++++++++++++--- + 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/qemu-bridge-helper.c b/qemu-bridge-helper.c -index 830fb9e..73ac49b 100644 +index 5396fbf..f3710b8 100644 --- a/qemu-bridge-helper.c +++ b/qemu-bridge-helper.c -@@ -15,8 +15,6 @@ - - #include "qemu/osdep.h" - --#include -- - #include - #include - #include -@@ -111,7 +109,12 @@ static int parse_acl_file(const char *filename, ACLList *acl_list) +@@ -110,7 +110,12 @@ static int parse_acl_file(const char *filename, ACLList *acl_list) *argend = 0; if (strcmp(cmd, "deny") == 0) { @@ -40,7 +36,7 @@ index 830fb9e..73ac49b 100644 if (strcmp(arg, "all") == 0) { acl_rule->type = ACL_DENY_ALL; } else { -@@ -120,7 +123,12 @@ static int parse_acl_file(const char *filename, ACLList *acl_list) +@@ -119,7 +124,12 @@ static int parse_acl_file(const char *filename, ACLList *acl_list) } QSIMPLEQ_INSERT_TAIL(acl_list, acl_rule, entry); } else if (strcmp(cmd, "allow") == 0) { @@ -54,7 +50,7 @@ index 830fb9e..73ac49b 100644 if (strcmp(arg, "all") == 0) { acl_rule->type = ACL_ALLOW_ALL; } else { -@@ -414,6 +422,17 @@ int main(int argc, char **argv) +@@ -413,6 +423,17 @@ int main(int argc, char **argv) goto cleanup; } @@ -72,7 +68,7 @@ index 830fb9e..73ac49b 100644 /* write fd to the domain socket */ if (send_fd(unixfd, fd) == -1) { fprintf(stderr, "failed to write fd to unix socket: %s\n", -@@ -435,7 +454,7 @@ cleanup: +@@ -434,7 +455,7 @@ cleanup: } while ((acl_rule = QSIMPLEQ_FIRST(&acl_list)) != NULL) { QSIMPLEQ_REMOVE_HEAD(&acl_list, entry); diff --git a/0037-qemu-binfmt-conf-use-qemu-ARCH-binf.patch b/0037-qemu-binfmt-conf-use-qemu-ARCH-binf.patch new file mode 100644 index 00000000..fbdb7c3f --- /dev/null +++ b/0037-qemu-binfmt-conf-use-qemu-ARCH-binf.patch @@ -0,0 +1,39 @@ +From 30cba7c4e3835462a6e7ce5841594a2e02cd4466 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Fri, 12 Aug 2016 18:20:49 +0200 +Subject: [PATCH] qemu-binfmt-conf: use qemu-ARCH-binfmt +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Andreas Schwab +Signed-off-by: Andreas Färber +--- + scripts/qemu-binfmt-conf.sh | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh +index 7640255..3affcdc 100755 +--- a/scripts/qemu-binfmt-conf.sh ++++ b/scripts/qemu-binfmt-conf.sh +@@ -201,7 +201,7 @@ qemu_check_systemd() { + } + + qemu_generate_register() { +- echo ":qemu-$cpu:M::$magic:$mask:$qemu:$FLAGS" ++ echo ":qemu-$cpu:M::$magic:$mask:$qemu:P$FLAGS" + } + + qemu_register_interpreter() { +@@ -242,9 +242,9 @@ qemu_set_binfmts() { + continue + fi + +- qemu="$QEMU_PATH/qemu-$cpu" ++ qemu="$QEMU_PATH/qemu-$cpu-binfmt" + if [ "$cpu" = "i486" ] ; then +- qemu="$QEMU_PATH/qemu-i386" ++ qemu="$QEMU_PATH/qemu-i386-binfmt" + fi + + if [ "$host_family" != "$family" ] ; then diff --git a/0038-block-split-large-discard-requests-.patch b/0038-block-split-large-discard-requests-.patch deleted file mode 100644 index 36dad9cd..00000000 --- a/0038-block-split-large-discard-requests-.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 2cee6af27f7e7579c8690edfda4159a66406d2cd Mon Sep 17 00:00:00 2001 -From: Olaf Hering -Date: Thu, 24 Mar 2016 14:32:39 +0100 -Subject: [PATCH] block: split large discard requests from block frontend - -Large discard requests lead to sign expansion errors in qemu. -Since there is no API to tell a guest about the limitations qmeu -has to split a large request itself. - -[bsc#964427] - -Signed-off-by: Olaf Hering ---- - block/io.c | 22 +++++++++++++++++++++- - 1 file changed, 21 insertions(+), 1 deletion(-) - -diff --git a/block/io.c b/block/io.c -index d02e0d5..511bc75 100644 ---- a/block/io.c -+++ b/block/io.c -@@ -2487,7 +2487,7 @@ static void coroutine_fn bdrv_discard_co_entry(void *opaque) - rwco->ret = bdrv_co_discard(rwco->bs, rwco->sector_num, rwco->nb_sectors); - } - --int coroutine_fn bdrv_co_discard(BlockDriverState *bs, int64_t sector_num, -+static int __bdrv_co_discard(BlockDriverState *bs, int64_t sector_num, - int nb_sectors) - { - BdrvTrackedRequest req; -@@ -2569,6 +2569,26 @@ out: - return ret; - } - -+int coroutine_fn bdrv_co_discard(BlockDriverState *bs, int64_t sector_num, -+ int nb_sectors) -+{ -+ int num, ret; -+ int limit = BDRV_REQUEST_MAX_SECTORS; -+ int remaining = nb_sectors; -+ int64_t sector_offset = sector_num; -+ -+ do { -+ num = remaining > limit ? limit : remaining; -+ ret = __bdrv_co_discard(bs, sector_offset, num); -+ if (ret < 0) -+ break; -+ remaining -= num; -+ sector_offset += num; -+ } while (remaining > 0); -+ -+ return ret; -+} -+ - int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors) - { - Coroutine *co; diff --git a/0038-configure-Fix-detection-of-seccomp-.patch b/0038-configure-Fix-detection-of-seccomp-.patch new file mode 100644 index 00000000..70fca79b --- /dev/null +++ b/0038-configure-Fix-detection-of-seccomp-.patch @@ -0,0 +1,28 @@ +From b678731b465e09c6ee1b6a9e98560c6102c703c2 Mon Sep 17 00:00:00 2001 +From: markkp +Date: Thu, 11 Aug 2016 16:28:39 -0400 +Subject: [PATCH] configure: Fix detection of seccomp on s390x +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Mark Post +Signed-off-by: Andreas Färber +--- + configure | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/configure b/configure +index dfd37b1..4eb76a6 100755 +--- a/configure ++++ b/configure +@@ -1902,6 +1902,9 @@ if test "$seccomp" != "no" ; then + ppc|ppc64) + libseccomp_minver="2.3.0" + ;; ++ s390|s390x) ++ libseccomp_minver="2.2.0" ++ ;; + *) + libseccomp_minver="" + ;; diff --git a/0039-linux-user-properly-test-for-infini.patch b/0039-linux-user-properly-test-for-infini.patch new file mode 100644 index 00000000..845fed95 --- /dev/null +++ b/0039-linux-user-properly-test-for-infini.patch @@ -0,0 +1,30 @@ +From 35d123d3b2508186a8412144186a1d2fb7e033e5 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Thu, 8 Sep 2016 11:21:05 +0200 +Subject: [PATCH] linux-user: properly test for infinite timeout in poll (#8) + +After "linux-user: use target_ulong" the poll syscall was no longer +handling infinite timeout. + +/home/abuild/rpmbuild/BUILD/qemu-2.7.0-rc5/linux-user/syscall.c:9773:26: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] + if (arg3 >= 0) { + ^~ + +Signed-off-by: Andreas Schwab +--- + linux-user/syscall.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index 51c1091..856e75d 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -9770,7 +9770,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_ulong arg1, + { + struct timespec ts, *pts; + +- if (arg3 >= 0) { ++ if ((abi_long)arg3 >= 0) { + /* Convert ms to secs, ns */ + ts.tv_sec = arg3 / 1000; + ts.tv_nsec = (arg3 % 1000) * 1000000LL; diff --git a/0041-xen-introduce-dummy-system-device.patch b/0041-xen-introduce-dummy-system-device.patch deleted file mode 100644 index cc1bf12c..00000000 --- a/0041-xen-introduce-dummy-system-device.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 24b0afe9e7869a5a398cb5d04f6e7c5efbac65da Mon Sep 17 00:00:00 2001 -From: Juergen Gross -Date: Thu, 12 May 2016 16:13:39 +0200 -Subject: [PATCH] xen: introduce dummy system device - -Introduce a new dummy system device serving as parent for virtual -buses. This will enable new pv backends to introduce virtual buses -which are removable again opposed to system buses which are meant -to stay once added. - -Signed-off-by: Juergen Gross -Acked-by: Anthony PERARD -Reviewed-by: Wei Liu -Message-id: 1463062421-613-2-git-send-email-jgross@suse.com -Signed-off-by: Gerd Hoffmann -(cherry picked from commit 9432e53a5bc88681b2d3aec4dac9db07c5476d1b) -[BR: FATE#316612] -Signed-off-by: Bruce Rogers ---- - hw/xenpv/xen_machine_pv.c | 40 ++++++++++++++++++++++++++++++++++++++++ - include/hw/xen/xen_backend.h | 1 + - 2 files changed, 41 insertions(+) - -diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c -index fc13535..48d5bc6 100644 ---- a/hw/xenpv/xen_machine_pv.c -+++ b/hw/xenpv/xen_machine_pv.c -@@ -25,10 +25,15 @@ - #include "qemu/osdep.h" - #include "hw/hw.h" - #include "hw/boards.h" -+#include "hw/sysbus.h" - #include "hw/xen/xen_backend.h" - #include "xen_domainbuild.h" - #include "sysemu/block-backend.h" - -+#define TYPE_XENSYSDEV "xensysdev" -+ -+DeviceState *xen_sysdev; -+ - static void xen_init_pv(MachineState *machine) - { - DriveInfo *dinfo; -@@ -67,6 +72,9 @@ static void xen_init_pv(MachineState *machine) - break; - } - -+ xen_sysdev = qdev_create(NULL, TYPE_XENSYSDEV); -+ qdev_init_nofail(xen_sysdev); -+ - xen_be_register("console", &xen_console_ops); - xen_be_register("vkbd", &xen_kbdmouse_ops); - xen_be_register("vfb", &xen_framebuffer_ops); -@@ -101,6 +109,38 @@ static void xen_init_pv(MachineState *machine) - xen_init_display(xen_domid); - } - -+static int xen_sysdev_init(SysBusDevice *dev) -+{ -+ return 0; -+} -+ -+static Property xen_sysdev_properties[] = { -+ {/* end of property list */}, -+}; -+ -+static void xen_sysdev_class_init(ObjectClass *klass, void *data) -+{ -+ DeviceClass *dc = DEVICE_CLASS(klass); -+ SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); -+ -+ k->init = xen_sysdev_init; -+ dc->props = xen_sysdev_properties; -+} -+ -+static const TypeInfo xensysdev_info = { -+ .name = TYPE_XENSYSDEV, -+ .parent = TYPE_SYS_BUS_DEVICE, -+ .instance_size = sizeof(SysBusDevice), -+ .class_init = xen_sysdev_class_init, -+}; -+ -+static void xenpv_register_types(void) -+{ -+ type_register_static(&xensysdev_info); -+} -+ -+type_init(xenpv_register_types); -+ - static void xenpv_machine_init(MachineClass *mc) - { - mc->desc = "Xen Para-virtualized PC"; -diff --git a/include/hw/xen/xen_backend.h b/include/hw/xen/xen_backend.h -index c839eeb..b4b4ff0 100644 ---- a/include/hw/xen/xen_backend.h -+++ b/include/hw/xen/xen_backend.h -@@ -60,6 +60,7 @@ extern xc_interface *xen_xc; - extern xenforeignmemory_handle *xen_fmem; - extern struct xs_handle *xenstore; - extern const char *xen_protocol; -+extern DeviceState *xen_sysdev; - - /* xenstore helper functions */ - int xenstore_write_str(const char *base, const char *node, const char *val); diff --git a/0042-xen-write-information-about-support.patch b/0042-xen-write-information-about-support.patch deleted file mode 100644 index c29a05f5..00000000 --- a/0042-xen-write-information-about-support.patch +++ /dev/null @@ -1,219 +0,0 @@ -From 06bc1cf8722a7a5ad5cf7e0ad3adf9279516d77d Mon Sep 17 00:00:00 2001 -From: Juergen Gross -Date: Thu, 12 May 2016 16:13:40 +0200 -Subject: [PATCH] xen: write information about supported backends - -Add a Xenstore directory for each supported pv backend. This will allow -Xen tools to decide which backend type to use in case there are -multiple possibilities. - -The information is added under -/local/domain//device-model//backends -before the "running" state is written to Xenstore. Using a directory -for each backend enables us to add parameters for specific backends -in the future. - -This interface is documented in the Xen source repository in the file -docs/misc/qemu-backends.txt - -In order to reuse the Xenstore directory creation already present in -hw/xen/xen_devconfig.c move the related functions to -hw/xen/xen_backend.c where they fit better. - -Signed-off-by: Juergen Gross -Acked-by: Anthony PERARD -Reviewed-by: Wei Liu -Message-id: 1463062421-613-3-git-send-email-jgross@suse.com -Signed-off-by: Gerd Hoffmann -(cherry picked from commit 637c53ffcb891ce8876183e6b593b8f0c3763ab1) -[BR: FATE#316612] -Signed-off-by: Bruce Rogers ---- - hw/xen/xen_backend.c | 63 ++++++++++++++++++++++++++++++++++++++++++++ - hw/xen/xen_devconfig.c | 52 ++---------------------------------- - include/hw/xen/xen_backend.h | 2 ++ - 3 files changed, 67 insertions(+), 50 deletions(-) - -diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c -index 60575ad..c63f9df 100644 ---- a/hw/xen/xen_backend.c -+++ b/hw/xen/xen_backend.c -@@ -42,11 +42,36 @@ struct xs_handle *xenstore = NULL; - const char *xen_protocol; - - /* private */ -+struct xs_dirs { -+ char *xs_dir; -+ QTAILQ_ENTRY(xs_dirs) list; -+}; -+static QTAILQ_HEAD(xs_dirs_head, xs_dirs) xs_cleanup = -+ QTAILQ_HEAD_INITIALIZER(xs_cleanup); -+ - static QTAILQ_HEAD(XenDeviceHead, XenDevice) xendevs = QTAILQ_HEAD_INITIALIZER(xendevs); - static int debug = 0; - - /* ------------------------------------------------------------- */ - -+static void xenstore_cleanup_dir(char *dir) -+{ -+ struct xs_dirs *d; -+ -+ d = g_malloc(sizeof(*d)); -+ d->xs_dir = dir; -+ QTAILQ_INSERT_TAIL(&xs_cleanup, d, list); -+} -+ -+void xen_config_cleanup(void) -+{ -+ struct xs_dirs *d; -+ -+ QTAILQ_FOREACH(d, &xs_cleanup, list) { -+ xs_rm(xenstore, 0, d->xs_dir); -+ } -+} -+ - int xenstore_write_str(const char *base, const char *node, const char *val) - { - char abspath[XEN_BUFSIZE]; -@@ -75,6 +100,30 @@ char *xenstore_read_str(const char *base, const char *node) - return ret; - } - -+int xenstore_mkdir(char *path, int p) -+{ -+ struct xs_permissions perms[2] = { -+ { -+ .id = 0, /* set owner: dom0 */ -+ }, { -+ .id = xen_domid, -+ .perms = p, -+ } -+ }; -+ -+ if (!xs_mkdir(xenstore, 0, path)) { -+ xen_be_printf(NULL, 0, "xs_mkdir %s: failed\n", path); -+ return -1; -+ } -+ xenstore_cleanup_dir(g_strdup(path)); -+ -+ if (!xs_set_permissions(xenstore, 0, path, perms, 2)) { -+ xen_be_printf(NULL, 0, "xs_set_permissions %s: failed\n", path); -+ return -1; -+ } -+ return 0; -+} -+ - int xenstore_write_int(const char *base, const char *node, int ival) - { - char val[12]; -@@ -726,6 +775,20 @@ err: - - int xen_be_register(const char *type, struct XenDevOps *ops) - { -+ char path[50]; -+ int rc; -+ -+ if (ops->backend_register) { -+ rc = ops->backend_register(); -+ if (rc) { -+ return rc; -+ } -+ } -+ -+ snprintf(path, sizeof(path), "device-model/%u/backends/%s", xen_domid, -+ type); -+ xenstore_mkdir(path, XS_PERM_NONE); -+ - return xenstore_scan(type, xen_domid, ops); - } - -diff --git a/hw/xen/xen_devconfig.c b/hw/xen/xen_devconfig.c -index 1f30fe4..b7d290d 100644 ---- a/hw/xen/xen_devconfig.c -+++ b/hw/xen/xen_devconfig.c -@@ -5,54 +5,6 @@ - - /* ------------------------------------------------------------- */ - --struct xs_dirs { -- char *xs_dir; -- QTAILQ_ENTRY(xs_dirs) list; --}; --static QTAILQ_HEAD(xs_dirs_head, xs_dirs) xs_cleanup = QTAILQ_HEAD_INITIALIZER(xs_cleanup); -- --static void xen_config_cleanup_dir(char *dir) --{ -- struct xs_dirs *d; -- -- d = g_malloc(sizeof(*d)); -- d->xs_dir = dir; -- QTAILQ_INSERT_TAIL(&xs_cleanup, d, list); --} -- --void xen_config_cleanup(void) --{ -- struct xs_dirs *d; -- -- QTAILQ_FOREACH(d, &xs_cleanup, list) { -- xs_rm(xenstore, 0, d->xs_dir); -- } --} -- --/* ------------------------------------------------------------- */ -- --static int xen_config_dev_mkdir(char *dev, int p) --{ -- struct xs_permissions perms[2] = {{ -- .id = 0, /* set owner: dom0 */ -- },{ -- .id = xen_domid, -- .perms = p, -- }}; -- -- if (!xs_mkdir(xenstore, 0, dev)) { -- xen_be_printf(NULL, 0, "xs_mkdir %s: failed\n", dev); -- return -1; -- } -- xen_config_cleanup_dir(g_strdup(dev)); -- -- if (!xs_set_permissions(xenstore, 0, dev, perms, 2)) { -- xen_be_printf(NULL, 0, "xs_set_permissions %s: failed\n", dev); -- return -1; -- } -- return 0; --} -- - static int xen_config_dev_dirs(const char *ftype, const char *btype, int vdev, - char *fe, char *be, int len) - { -@@ -66,8 +18,8 @@ static int xen_config_dev_dirs(const char *ftype, const char *btype, int vdev, - snprintf(be, len, "%s/backend/%s/%d/%d", dom, btype, xen_domid, vdev); - free(dom); - -- xen_config_dev_mkdir(fe, XS_PERM_READ | XS_PERM_WRITE); -- xen_config_dev_mkdir(be, XS_PERM_READ); -+ xenstore_mkdir(fe, XS_PERM_READ | XS_PERM_WRITE); -+ xenstore_mkdir(be, XS_PERM_READ); - return 0; - } - -diff --git a/include/hw/xen/xen_backend.h b/include/hw/xen/xen_backend.h -index b4b4ff0..63364f7 100644 ---- a/include/hw/xen/xen_backend.h -+++ b/include/hw/xen/xen_backend.h -@@ -28,6 +28,7 @@ struct XenDevOps { - int (*free)(struct XenDevice *xendev); - void (*backend_changed)(struct XenDevice *xendev, const char *node); - void (*frontend_changed)(struct XenDevice *xendev, const char *node); -+ int (*backend_register)(void); - }; - - struct XenDevice { -@@ -63,6 +64,7 @@ extern const char *xen_protocol; - extern DeviceState *xen_sysdev; - - /* xenstore helper functions */ -+int xenstore_mkdir(char *path, int p); - int xenstore_write_str(const char *base, const char *node, const char *val); - int xenstore_write_int(const char *base, const char *node, int ival); - int xenstore_write_int64(const char *base, const char *node, int64_t ival); diff --git a/0043-xen-add-pvUSB-backend.patch b/0043-xen-add-pvUSB-backend.patch deleted file mode 100644 index c878f467..00000000 --- a/0043-xen-add-pvUSB-backend.patch +++ /dev/null @@ -1,1165 +0,0 @@ -From 013c67849bbe9688491b85483bce6e8fc81fa90f Mon Sep 17 00:00:00 2001 -From: Juergen Gross -Date: Thu, 12 May 2016 16:13:41 +0200 -Subject: [PATCH] xen: add pvUSB backend - -Add a backend for para-virtualized USB devices for xen domains. - -The backend is using host-libusb to forward USB requests from a -domain via libusb to the real device(s) passed through. - -Signed-off-by: Juergen Gross -Acked-by: Anthony PERARD -Message-id: 1463062421-613-4-git-send-email-jgross@suse.com -Signed-off-by: Gerd Hoffmann -(cherry picked from commit 816ac92ef769f9ffc534e49a1bb6177bddce7aa2) -[BR: FATE#316612] -Signed-off-by: Bruce Rogers ---- - hw/usb/Makefile.objs | 4 + - hw/usb/xen-usb.c | 1080 ++++++++++++++++++++++++++++++++++++++++++ - hw/xenpv/xen_machine_pv.c | 3 + - include/hw/xen/xen_backend.h | 3 + - include/hw/xen/xen_common.h | 2 + - 5 files changed, 1092 insertions(+) - create mode 100644 hw/usb/xen-usb.c - -diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs -index 2717027..98b5c9d 100644 ---- a/hw/usb/Makefile.objs -+++ b/hw/usb/Makefile.objs -@@ -38,3 +38,7 @@ common-obj-$(CONFIG_USB_REDIR) += redirect.o quirks.o - - # usb pass-through - common-obj-y += $(patsubst %,host-%.o,$(HOST_USB)) -+ -+ifeq ($(CONFIG_USB_LIBUSB),y) -+common-obj-$(CONFIG_XEN_BACKEND) += xen-usb.o -+endif -diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c -new file mode 100644 -index 0000000..664df04 ---- /dev/null -+++ b/hw/usb/xen-usb.c -@@ -0,0 +1,1080 @@ -+/* -+ * xen paravirt usb device backend -+ * -+ * (c) Juergen Gross -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; under version 2 of the License. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License along -+ * with this program; if not, see . -+ * -+ * Contributions after 2012-01-13 are licensed under the terms of the -+ * GNU GPL, version 2 or (at your option) any later version. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include "qemu/osdep.h" -+#include "qemu-common.h" -+#include "qemu/config-file.h" -+#include "hw/sysbus.h" -+#include "hw/usb.h" -+#include "hw/xen/xen_backend.h" -+#include "monitor/qdev.h" -+#include "qapi/qmp/qbool.h" -+#include "qapi/qmp/qint.h" -+#include "qapi/qmp/qstring.h" -+#include "sys/user.h" -+ -+#include -+#include -+ -+/* -+ * Check for required support of usbif.h: USBIF_SHORT_NOT_OK was the last -+ * macro added we rely on. -+ */ -+#ifdef USBIF_SHORT_NOT_OK -+ -+#define TR(xendev, lvl, fmt, args...) \ -+ { \ -+ struct timeval tv; \ -+ \ -+ gettimeofday(&tv, NULL); \ -+ xen_be_printf(xendev, lvl, "%8ld.%06ld xen-usb(%s):" fmt, \ -+ tv.tv_sec, tv.tv_usec, __func__, ##args); \ -+ } -+#define TR_BUS(xendev, fmt, args...) TR(xendev, 2, fmt, ##args) -+#define TR_REQ(xendev, fmt, args...) TR(xendev, 3, fmt, ##args) -+ -+#define USBBACK_MAXPORTS USBIF_PIPE_PORT_MASK -+#define USB_DEV_ADDR_SIZE (USBIF_PIPE_DEV_MASK + 1) -+ -+/* USB wire protocol: structure describing control request parameter. */ -+struct usbif_ctrlrequest { -+ uint8_t bRequestType; -+ uint8_t bRequest; -+ uint16_t wValue; -+ uint16_t wIndex; -+ uint16_t wLength; -+}; -+ -+struct usbback_info; -+struct usbback_req; -+ -+struct usbback_stub { -+ USBDevice *dev; -+ USBPort port; -+ unsigned int speed; -+ bool attached; -+ QTAILQ_HEAD(submit_q_head, usbback_req) submit_q; -+}; -+ -+struct usbback_req { -+ struct usbback_info *usbif; -+ struct usbback_stub *stub; -+ struct usbif_urb_request req; -+ USBPacket packet; -+ -+ unsigned int nr_buffer_segs; /* # of transfer_buffer segments */ -+ unsigned int nr_extra_segs; /* # of iso_frame_desc segments */ -+ -+ QTAILQ_ENTRY(usbback_req) q; -+ -+ void *buffer; -+ void *isoc_buffer; -+ struct libusb_transfer *xfer; -+}; -+ -+struct usbback_hotplug { -+ QSIMPLEQ_ENTRY(usbback_hotplug) q; -+ unsigned port; -+}; -+ -+struct usbback_info { -+ struct XenDevice xendev; /* must be first */ -+ USBBus bus; -+ void *urb_sring; -+ void *conn_sring; -+ struct usbif_urb_back_ring urb_ring; -+ struct usbif_conn_back_ring conn_ring; -+ int num_ports; -+ int usb_ver; -+ bool ring_error; -+ QTAILQ_HEAD(req_free_q_head, usbback_req) req_free_q; -+ QSIMPLEQ_HEAD(hotplug_q_head, usbback_hotplug) hotplug_q; -+ struct usbback_stub ports[USBBACK_MAXPORTS]; -+ struct usbback_stub *addr_table[USB_DEV_ADDR_SIZE]; -+ QEMUBH *bh; -+}; -+ -+static struct usbback_req *usbback_get_req(struct usbback_info *usbif) -+{ -+ struct usbback_req *usbback_req; -+ -+ if (QTAILQ_EMPTY(&usbif->req_free_q)) { -+ usbback_req = g_new0(struct usbback_req, 1); -+ } else { -+ usbback_req = QTAILQ_FIRST(&usbif->req_free_q); -+ QTAILQ_REMOVE(&usbif->req_free_q, usbback_req, q); -+ } -+ return usbback_req; -+} -+ -+static void usbback_put_req(struct usbback_req *usbback_req) -+{ -+ struct usbback_info *usbif; -+ -+ usbif = usbback_req->usbif; -+ memset(usbback_req, 0, sizeof(*usbback_req)); -+ QTAILQ_INSERT_HEAD(&usbif->req_free_q, usbback_req, q); -+} -+ -+static int usbback_gnttab_map(struct usbback_req *usbback_req) -+{ -+ unsigned int nr_segs, i, prot; -+ uint32_t ref[USBIF_MAX_SEGMENTS_PER_REQUEST]; -+ struct usbback_info *usbif = usbback_req->usbif; -+ struct XenDevice *xendev = &usbif->xendev; -+ struct usbif_request_segment *seg; -+ void *addr; -+ -+ nr_segs = usbback_req->nr_buffer_segs + usbback_req->nr_extra_segs; -+ if (!nr_segs) { -+ return 0; -+ } -+ -+ if (nr_segs > USBIF_MAX_SEGMENTS_PER_REQUEST) { -+ xen_be_printf(xendev, 0, "bad number of segments in request (%d)\n", -+ nr_segs); -+ return -EINVAL; -+ } -+ -+ for (i = 0; i < nr_segs; i++) { -+ if ((unsigned)usbback_req->req.seg[i].offset + -+ (unsigned)usbback_req->req.seg[i].length > PAGE_SIZE) { -+ xen_be_printf(xendev, 0, "segment crosses page boundary\n"); -+ return -EINVAL; -+ } -+ } -+ -+ if (usbback_req->nr_buffer_segs) { -+ prot = PROT_READ; -+ if (usbif_pipein(usbback_req->req.pipe)) { -+ prot |= PROT_WRITE; -+ } -+ for (i = 0; i < usbback_req->nr_buffer_segs; i++) { -+ ref[i] = usbback_req->req.seg[i].gref; -+ } -+ usbback_req->buffer = xengnttab_map_domain_grant_refs(xendev->gnttabdev, -+ usbback_req->nr_buffer_segs, xendev->dom, ref, prot); -+ -+ if (!usbback_req->buffer) { -+ return -ENOMEM; -+ } -+ -+ for (i = 0; i < usbback_req->nr_buffer_segs; i++) { -+ seg = usbback_req->req.seg + i; -+ addr = usbback_req->buffer + i * PAGE_SIZE + seg->offset; -+ qemu_iovec_add(&usbback_req->packet.iov, addr, seg->length); -+ } -+ } -+ -+ if (!usbif_pipeisoc(usbback_req->req.pipe)) { -+ return 0; -+ } -+ -+ /* -+ * Right now isoc requests are not supported. -+ * Prepare supporting those by doing the work needed on the guest -+ * interface side. -+ */ -+ -+ if (!usbback_req->nr_extra_segs) { -+ xen_be_printf(xendev, 0, "iso request without descriptor segments\n"); -+ return -EINVAL; -+ } -+ -+ prot = PROT_READ | PROT_WRITE; -+ for (i = 0; i < usbback_req->nr_extra_segs; i++) { -+ ref[i] = usbback_req->req.seg[i + usbback_req->req.nr_buffer_segs].gref; -+ } -+ usbback_req->isoc_buffer = xengnttab_map_domain_grant_refs( -+ xendev->gnttabdev, usbback_req->nr_extra_segs, xendev->dom, ref, prot); -+ -+ if (!usbback_req->isoc_buffer) { -+ return -ENOMEM; -+ } -+ -+ return 0; -+} -+ -+static int usbback_init_packet(struct usbback_req *usbback_req) -+{ -+ struct XenDevice *xendev = &usbback_req->usbif->xendev; -+ USBPacket *packet = &usbback_req->packet; -+ USBDevice *dev = usbback_req->stub->dev; -+ USBEndpoint *ep; -+ unsigned int pid, ep_nr; -+ bool sok; -+ int ret = 0; -+ -+ qemu_iovec_init(&packet->iov, USBIF_MAX_SEGMENTS_PER_REQUEST); -+ pid = usbif_pipein(usbback_req->req.pipe) ? USB_TOKEN_IN : USB_TOKEN_OUT; -+ ep_nr = usbif_pipeendpoint(usbback_req->req.pipe); -+ sok = !!(usbback_req->req.transfer_flags & USBIF_SHORT_NOT_OK); -+ if (usbif_pipectrl(usbback_req->req.pipe)) { -+ ep_nr = 0; -+ sok = false; -+ } -+ ep = usb_ep_get(dev, pid, ep_nr); -+ usb_packet_setup(packet, pid, ep, 0, 1, sok, true); -+ -+ switch (usbif_pipetype(usbback_req->req.pipe)) { -+ case USBIF_PIPE_TYPE_ISOC: -+ TR_REQ(xendev, "iso transfer %s: buflen: %x, %d frames\n", -+ (pid == USB_TOKEN_IN) ? "in" : "out", -+ usbback_req->req.buffer_length, -+ usbback_req->req.u.isoc.nr_frame_desc_segs); -+ ret = -EINVAL; /* isoc not implemented yet */ -+ break; -+ -+ case USBIF_PIPE_TYPE_INT: -+ TR_REQ(xendev, "int transfer %s: buflen: %x\n", -+ (pid == USB_TOKEN_IN) ? "in" : "out", -+ usbback_req->req.buffer_length); -+ break; -+ -+ case USBIF_PIPE_TYPE_CTRL: -+ packet->parameter = *(uint64_t *)usbback_req->req.u.ctrl; -+ TR_REQ(xendev, "ctrl parameter: %lx, buflen: %x\n", packet->parameter, -+ usbback_req->req.buffer_length); -+ break; -+ -+ case USBIF_PIPE_TYPE_BULK: -+ TR_REQ(xendev, "bulk transfer %s: buflen: %x\n", -+ (pid == USB_TOKEN_IN) ? "in" : "out", -+ usbback_req->req.buffer_length); -+ break; -+ default: -+ ret = -EINVAL; -+ break; -+ } -+ -+ return ret; -+} -+ -+static void usbback_do_response(struct usbback_req *usbback_req, int32_t status, -+ int32_t actual_length, int32_t error_count) -+{ -+ struct usbback_info *usbif; -+ struct usbif_urb_response *res; -+ struct XenDevice *xendev; -+ unsigned int notify; -+ -+ usbif = usbback_req->usbif; -+ xendev = &usbif->xendev; -+ -+ TR_REQ(xendev, "id %d, status %d, length %d, errcnt %d\n", -+ usbback_req->req.id, status, actual_length, error_count); -+ -+ if (usbback_req->packet.iov.iov) { -+ qemu_iovec_destroy(&usbback_req->packet.iov); -+ } -+ -+ if (usbback_req->buffer) { -+ xengnttab_unmap(xendev->gnttabdev, usbback_req->buffer, -+ usbback_req->nr_buffer_segs); -+ usbback_req->buffer = NULL; -+ } -+ -+ if (usbback_req->isoc_buffer) { -+ xengnttab_unmap(xendev->gnttabdev, usbback_req->isoc_buffer, -+ usbback_req->nr_extra_segs); -+ usbback_req->isoc_buffer = NULL; -+ } -+ -+ res = RING_GET_RESPONSE(&usbif->urb_ring, usbif->urb_ring.rsp_prod_pvt); -+ res->id = usbback_req->req.id; -+ res->status = status; -+ res->actual_length = actual_length; -+ res->error_count = error_count; -+ res->start_frame = 0; -+ usbif->urb_ring.rsp_prod_pvt++; -+ RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&usbif->urb_ring, notify); -+ -+ if (notify) { -+ xen_be_send_notify(xendev); -+ } -+ -+ usbback_put_req(usbback_req); -+} -+ -+static void usbback_do_response_ret(struct usbback_req *usbback_req, -+ int32_t status) -+{ -+ usbback_do_response(usbback_req, status, 0, 0); -+} -+ -+static int32_t usbback_xlat_status(int status) -+{ -+ switch (status) { -+ case USB_RET_SUCCESS: -+ return 0; -+ case USB_RET_NODEV: -+ return -ENODEV; -+ case USB_RET_STALL: -+ return -EPIPE; -+ case USB_RET_BABBLE: -+ return -EOVERFLOW; -+ case USB_RET_IOERROR: -+ return -EPROTO; -+ } -+ -+ return -ESHUTDOWN; -+} -+ -+static void usbback_packet_complete(USBPacket *packet) -+{ -+ struct usbback_req *usbback_req; -+ int32_t status; -+ -+ usbback_req = container_of(packet, struct usbback_req, packet); -+ -+ QTAILQ_REMOVE(&usbback_req->stub->submit_q, usbback_req, q); -+ -+ status = usbback_xlat_status(packet->status); -+ usbback_do_response(usbback_req, status, packet->actual_length, 0); -+} -+ -+static void usbback_set_address(struct usbback_info *usbif, -+ struct usbback_stub *stub, -+ unsigned int cur_addr, unsigned int new_addr) -+{ -+ if (cur_addr) { -+ usbif->addr_table[cur_addr] = NULL; -+ } -+ if (new_addr) { -+ usbif->addr_table[new_addr] = stub; -+ } -+} -+ -+static bool usbback_cancel_req(struct usbback_req *usbback_req) -+{ -+ bool ret = false; -+ -+ if (usb_packet_is_inflight(&usbback_req->packet)) { -+ usb_cancel_packet(&usbback_req->packet); -+ ret = true; -+ } -+ return ret; -+} -+ -+static void usbback_process_unlink_req(struct usbback_req *usbback_req) -+{ -+ struct usbback_info *usbif; -+ struct usbback_req *unlink_req; -+ unsigned int id, devnum; -+ int ret; -+ -+ usbif = usbback_req->usbif; -+ ret = 0; -+ id = usbback_req->req.u.unlink.unlink_id; -+ TR_REQ(&usbif->xendev, "unlink id %d\n", id); -+ devnum = usbif_pipedevice(usbback_req->req.pipe); -+ if (unlikely(devnum == 0)) { -+ usbback_req->stub = usbif->ports + -+ usbif_pipeportnum(usbback_req->req.pipe); -+ if (unlikely(!usbback_req->stub)) { -+ ret = -ENODEV; -+ goto fail_response; -+ } -+ } else { -+ if (unlikely(!usbif->addr_table[devnum])) { -+ ret = -ENODEV; -+ goto fail_response; -+ } -+ usbback_req->stub = usbif->addr_table[devnum]; -+ } -+ -+ QTAILQ_FOREACH(unlink_req, &usbback_req->stub->submit_q, q) { -+ if (unlink_req->req.id == id) { -+ if (usbback_cancel_req(unlink_req)) { -+ usbback_do_response_ret(unlink_req, -EPROTO); -+ } -+ break; -+ } -+ } -+ -+fail_response: -+ usbback_do_response_ret(usbback_req, ret); -+} -+ -+/* -+ * Checks whether a request can be handled at once or should be forwarded -+ * to the usb framework. -+ * Return value is: -+ * 0 in case of usb framework is needed -+ * 1 in case of local handling (no error) -+ * The request response has been queued already if return value not 0. -+ */ -+static int usbback_check_and_submit(struct usbback_req *usbback_req) -+{ -+ struct usbback_info *usbif; -+ unsigned int devnum; -+ struct usbback_stub *stub; -+ struct usbif_ctrlrequest *ctrl; -+ int ret; -+ uint16_t wValue; -+ -+ usbif = usbback_req->usbif; -+ stub = NULL; -+ devnum = usbif_pipedevice(usbback_req->req.pipe); -+ ctrl = (struct usbif_ctrlrequest *)usbback_req->req.u.ctrl; -+ wValue = le16_to_cpu(ctrl->wValue); -+ -+ /* -+ * When the device is first connected or resetted, USB device has no -+ * address. In this initial state, following requests are sent to device -+ * address (#0), -+ * -+ * 1. GET_DESCRIPTOR (with Descriptor Type is "DEVICE") is sent, -+ * and OS knows what device is connected to. -+ * -+ * 2. SET_ADDRESS is sent, and then device has its address. -+ * -+ * In the next step, SET_CONFIGURATION is sent to addressed device, and -+ * then the device is finally ready to use. -+ */ -+ if (unlikely(devnum == 0)) { -+ stub = usbif->ports + usbif_pipeportnum(usbback_req->req.pipe) - 1; -+ if (!stub->dev || !stub->attached) { -+ ret = -ENODEV; -+ goto do_response; -+ } -+ -+ switch (ctrl->bRequest) { -+ case USB_REQ_GET_DESCRIPTOR: -+ /* -+ * GET_DESCRIPTOR request to device #0. -+ * through normal transfer. -+ */ -+ TR_REQ(&usbif->xendev, "devnum 0 GET_DESCRIPTOR\n"); -+ usbback_req->stub = stub; -+ return 0; -+ case USB_REQ_SET_ADDRESS: -+ /* -+ * SET_ADDRESS request to device #0. -+ * add attached device to addr_table. -+ */ -+ TR_REQ(&usbif->xendev, "devnum 0 SET_ADDRESS\n"); -+ usbback_set_address(usbif, stub, 0, wValue); -+ ret = 0; -+ break; -+ default: -+ ret = -EINVAL; -+ break; -+ } -+ goto do_response; -+ } -+ -+ if (unlikely(!usbif->addr_table[devnum])) { -+ ret = -ENODEV; -+ goto do_response; -+ } -+ usbback_req->stub = usbif->addr_table[devnum]; -+ -+ /* -+ * Check special request -+ */ -+ if (ctrl->bRequest != USB_REQ_SET_ADDRESS) { -+ return 0; -+ } -+ -+ /* -+ * SET_ADDRESS request to addressed device. -+ * change addr or remove from addr_table. -+ */ -+ usbback_set_address(usbif, usbback_req->stub, devnum, wValue); -+ ret = 0; -+ -+do_response: -+ usbback_do_response_ret(usbback_req, ret); -+ return 1; -+} -+ -+static void usbback_dispatch(struct usbback_req *usbback_req) -+{ -+ int ret; -+ unsigned int devnum; -+ struct usbback_info *usbif; -+ -+ usbif = usbback_req->usbif; -+ -+ TR_REQ(&usbif->xendev, "start req_id %d pipe %08x\n", usbback_req->req.id, -+ usbback_req->req.pipe); -+ -+ /* unlink request */ -+ if (unlikely(usbif_pipeunlink(usbback_req->req.pipe))) { -+ usbback_process_unlink_req(usbback_req); -+ return; -+ } -+ -+ if (usbif_pipectrl(usbback_req->req.pipe)) { -+ if (usbback_check_and_submit(usbback_req)) { -+ return; -+ } -+ } else { -+ devnum = usbif_pipedevice(usbback_req->req.pipe); -+ usbback_req->stub = usbif->addr_table[devnum]; -+ -+ if (!usbback_req->stub || !usbback_req->stub->attached) { -+ ret = -ENODEV; -+ goto fail_response; -+ } -+ } -+ -+ QTAILQ_INSERT_TAIL(&usbback_req->stub->submit_q, usbback_req, q); -+ -+ usbback_req->nr_buffer_segs = usbback_req->req.nr_buffer_segs; -+ usbback_req->nr_extra_segs = usbif_pipeisoc(usbback_req->req.pipe) ? -+ usbback_req->req.u.isoc.nr_frame_desc_segs : 0; -+ -+ ret = usbback_init_packet(usbback_req); -+ if (ret) { -+ xen_be_printf(&usbif->xendev, 0, "invalid request\n"); -+ ret = -ESHUTDOWN; -+ goto fail_free_urb; -+ } -+ -+ ret = usbback_gnttab_map(usbback_req); -+ if (ret) { -+ xen_be_printf(&usbif->xendev, 0, "invalid buffer, ret=%d\n", ret); -+ ret = -ESHUTDOWN; -+ goto fail_free_urb; -+ } -+ -+ usb_handle_packet(usbback_req->stub->dev, &usbback_req->packet); -+ if (usbback_req->packet.status != USB_RET_ASYNC) { -+ usbback_packet_complete(&usbback_req->packet); -+ } -+ return; -+ -+fail_free_urb: -+ QTAILQ_REMOVE(&usbback_req->stub->submit_q, usbback_req, q); -+ -+fail_response: -+ usbback_do_response_ret(usbback_req, ret); -+} -+ -+static void usbback_hotplug_notify(struct usbback_info *usbif) -+{ -+ struct usbif_conn_back_ring *ring = &usbif->conn_ring; -+ struct usbif_conn_request req; -+ struct usbif_conn_response *res; -+ struct usbback_hotplug *usb_hp; -+ unsigned int notify; -+ -+ if (!usbif->conn_sring) { -+ return; -+ } -+ -+ /* Check for full ring. */ -+ if ((RING_SIZE(ring) - ring->rsp_prod_pvt - ring->req_cons) == 0) { -+ xen_be_send_notify(&usbif->xendev); -+ return; -+ } -+ -+ usb_hp = QSIMPLEQ_FIRST(&usbif->hotplug_q); -+ QSIMPLEQ_REMOVE_HEAD(&usbif->hotplug_q, q); -+ -+ RING_COPY_REQUEST(ring, ring->req_cons, &req); -+ ring->req_cons++; -+ ring->sring->req_event = ring->req_cons + 1; -+ -+ res = RING_GET_RESPONSE(ring, ring->rsp_prod_pvt); -+ res->id = req.id; -+ res->portnum = usb_hp->port; -+ res->speed = usbif->ports[usb_hp->port - 1].speed; -+ ring->rsp_prod_pvt++; -+ RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(ring, notify); -+ -+ if (notify) { -+ xen_be_send_notify(&usbif->xendev); -+ } -+ -+ TR_BUS(&usbif->xendev, "hotplug port %d speed %d\n", usb_hp->port, -+ res->speed); -+ -+ g_free(usb_hp); -+ -+ if (!QSIMPLEQ_EMPTY(&usbif->hotplug_q)) { -+ qemu_bh_schedule(usbif->bh); -+ } -+} -+ -+static void usbback_bh(void *opaque) -+{ -+ struct usbback_info *usbif; -+ struct usbif_urb_back_ring *urb_ring; -+ struct usbback_req *usbback_req; -+ RING_IDX rc, rp; -+ unsigned int more_to_do; -+ -+ usbif = opaque; -+ if (usbif->ring_error) { -+ return; -+ } -+ -+ if (!QSIMPLEQ_EMPTY(&usbif->hotplug_q)) { -+ usbback_hotplug_notify(usbif); -+ } -+ -+ urb_ring = &usbif->urb_ring; -+ rc = urb_ring->req_cons; -+ rp = urb_ring->sring->req_prod; -+ xen_rmb(); /* Ensure we see queued requests up to 'rp'. */ -+ -+ if (RING_REQUEST_PROD_OVERFLOW(urb_ring, rp)) { -+ rc = urb_ring->rsp_prod_pvt; -+ xen_be_printf(&usbif->xendev, 0, "domU provided bogus ring requests " -+ "(%#x - %#x = %u). Halting ring processing.\n", -+ rp, rc, rp - rc); -+ usbif->ring_error = true; -+ return; -+ } -+ -+ while (rc != rp) { -+ if (RING_REQUEST_CONS_OVERFLOW(urb_ring, rc)) { -+ break; -+ } -+ usbback_req = usbback_get_req(usbif); -+ -+ RING_COPY_REQUEST(urb_ring, rc, &usbback_req->req); -+ usbback_req->usbif = usbif; -+ -+ usbback_dispatch(usbback_req); -+ -+ urb_ring->req_cons = ++rc; -+ } -+ -+ RING_FINAL_CHECK_FOR_REQUESTS(urb_ring, more_to_do); -+ if (more_to_do) { -+ qemu_bh_schedule(usbif->bh); -+ } -+} -+ -+static void usbback_hotplug_enq(struct usbback_info *usbif, unsigned port) -+{ -+ struct usbback_hotplug *usb_hp; -+ -+ usb_hp = g_new0(struct usbback_hotplug, 1); -+ usb_hp->port = port; -+ QSIMPLEQ_INSERT_TAIL(&usbif->hotplug_q, usb_hp, q); -+ usbback_hotplug_notify(usbif); -+} -+ -+static void usbback_portid_remove(struct usbback_info *usbif, unsigned port) -+{ -+ USBPort *p; -+ -+ if (!usbif->ports[port - 1].dev) { -+ return; -+ } -+ -+ p = &(usbif->ports[port - 1].port); -+ snprintf(p->path, sizeof(p->path), "%d", 99); -+ -+ object_unparent(OBJECT(usbif->ports[port - 1].dev)); -+ usbif->ports[port - 1].dev = NULL; -+ usbif->ports[port - 1].speed = USBIF_SPEED_NONE; -+ usbif->ports[port - 1].attached = false; -+ usbback_hotplug_enq(usbif, port); -+ -+ TR_BUS(&usbif->xendev, "port %d removed\n", port); -+} -+ -+static void usbback_portid_add(struct usbback_info *usbif, unsigned port, -+ char *busid) -+{ -+ unsigned speed; -+ char *portname; -+ USBPort *p; -+ Error *local_err = NULL; -+ QDict *qdict; -+ QemuOpts *opts; -+ -+ if (usbif->ports[port - 1].dev) { -+ return; -+ } -+ -+ portname = strchr(busid, '-'); -+ if (!portname) { -+ xen_be_printf(&usbif->xendev, 0, "device %s illegal specification\n", -+ busid); -+ return; -+ } -+ portname++; -+ p = &(usbif->ports[port - 1].port); -+ snprintf(p->path, sizeof(p->path), "%s", portname); -+ -+ qdict = qdict_new(); -+ qdict_put(qdict, "driver", qstring_from_str("usb-host")); -+ qdict_put(qdict, "hostbus", qint_from_int(atoi(busid))); -+ qdict_put(qdict, "hostport", qstring_from_str(portname)); -+ opts = qemu_opts_from_qdict(qemu_find_opts("device"), qdict, &local_err); -+ if (local_err) { -+ goto err; -+ } -+ usbif->ports[port - 1].dev = USB_DEVICE(qdev_device_add(opts, &local_err)); -+ if (!usbif->ports[port - 1].dev) { -+ goto err; -+ } -+ QDECREF(qdict); -+ snprintf(p->path, sizeof(p->path), "%d", port); -+ speed = usbif->ports[port - 1].dev->speed; -+ switch (speed) { -+ case USB_SPEED_LOW: -+ speed = USBIF_SPEED_LOW; -+ break; -+ case USB_SPEED_FULL: -+ speed = USBIF_SPEED_FULL; -+ break; -+ case USB_SPEED_HIGH: -+ speed = (usbif->usb_ver < USB_VER_USB20) ? -+ USBIF_SPEED_NONE : USBIF_SPEED_HIGH; -+ break; -+ default: -+ speed = USBIF_SPEED_NONE; -+ break; -+ } -+ if (speed == USBIF_SPEED_NONE) { -+ xen_be_printf(&usbif->xendev, 0, "device %s wrong speed\n", busid); -+ object_unparent(OBJECT(usbif->ports[port - 1].dev)); -+ usbif->ports[port - 1].dev = NULL; -+ return; -+ } -+ usb_device_reset(usbif->ports[port - 1].dev); -+ usbif->ports[port - 1].speed = speed; -+ usbif->ports[port - 1].attached = true; -+ QTAILQ_INIT(&usbif->ports[port - 1].submit_q); -+ usbback_hotplug_enq(usbif, port); -+ -+ TR_BUS(&usbif->xendev, "port %d attached\n", port); -+ return; -+ -+err: -+ QDECREF(qdict); -+ snprintf(p->path, sizeof(p->path), "%d", 99); -+ xen_be_printf(&usbif->xendev, 0, "device %s could not be opened\n", busid); -+} -+ -+static void usbback_process_port(struct usbback_info *usbif, unsigned port) -+{ -+ char node[8]; -+ char *busid; -+ -+ snprintf(node, sizeof(node), "port/%d", port); -+ busid = xenstore_read_be_str(&usbif->xendev, node); -+ if (busid == NULL) { -+ xen_be_printf(&usbif->xendev, 0, "xenstore_read %s failed\n", node); -+ return; -+ } -+ -+ /* Remove portid, if the port is not connected. */ -+ if (strlen(busid) == 0) { -+ usbback_portid_remove(usbif, port); -+ } else { -+ usbback_portid_add(usbif, port, busid); -+ } -+ -+ g_free(busid); -+} -+ -+static void usbback_disconnect(struct XenDevice *xendev) -+{ -+ struct usbback_info *usbif; -+ struct usbback_req *req, *tmp; -+ unsigned int i; -+ -+ TR_BUS(xendev, "start\n"); -+ -+ usbif = container_of(xendev, struct usbback_info, xendev); -+ -+ xen_be_unbind_evtchn(xendev); -+ -+ if (usbif->urb_sring) { -+ xengnttab_unmap(xendev->gnttabdev, usbif->urb_sring, 1); -+ usbif->urb_sring = NULL; -+ } -+ if (usbif->conn_sring) { -+ xengnttab_unmap(xendev->gnttabdev, usbif->conn_sring, 1); -+ usbif->conn_sring = NULL; -+ } -+ -+ for (i = 0; i < usbif->num_ports; i++) { -+ if (!usbif->ports[i].dev) { -+ continue; -+ } -+ QTAILQ_FOREACH_SAFE(req, &usbif->ports[i].submit_q, q, tmp) { -+ usbback_cancel_req(req); -+ } -+ } -+ -+ TR_BUS(xendev, "finished\n"); -+} -+ -+static int usbback_connect(struct XenDevice *xendev) -+{ -+ struct usbback_info *usbif; -+ struct usbif_urb_sring *urb_sring; -+ struct usbif_conn_sring *conn_sring; -+ int urb_ring_ref; -+ int conn_ring_ref; -+ unsigned int i; -+ -+ TR_BUS(xendev, "start\n"); -+ -+ usbif = container_of(xendev, struct usbback_info, xendev); -+ -+ if (xenstore_read_fe_int(xendev, "urb-ring-ref", &urb_ring_ref)) { -+ xen_be_printf(xendev, 0, "error reading urb-ring-ref\n"); -+ return -1; -+ } -+ if (xenstore_read_fe_int(xendev, "conn-ring-ref", &conn_ring_ref)) { -+ xen_be_printf(xendev, 0, "error reading conn-ring-ref\n"); -+ return -1; -+ } -+ if (xenstore_read_fe_int(xendev, "event-channel", &xendev->remote_port)) { -+ xen_be_printf(xendev, 0, "error reading event-channel\n"); -+ return -1; -+ } -+ -+ usbif->urb_sring = xengnttab_map_grant_ref(xendev->gnttabdev, xendev->dom, -+ urb_ring_ref, -+ PROT_READ | PROT_WRITE); -+ usbif->conn_sring = xengnttab_map_grant_ref(xendev->gnttabdev, xendev->dom, -+ conn_ring_ref, -+ PROT_READ | PROT_WRITE); -+ if (!usbif->urb_sring || !usbif->conn_sring) { -+ xen_be_printf(xendev, 0, "error mapping rings\n"); -+ usbback_disconnect(xendev); -+ return -1; -+ } -+ -+ urb_sring = usbif->urb_sring; -+ conn_sring = usbif->conn_sring; -+ BACK_RING_INIT(&usbif->urb_ring, urb_sring, XC_PAGE_SIZE); -+ BACK_RING_INIT(&usbif->conn_ring, conn_sring, XC_PAGE_SIZE); -+ -+ xen_be_bind_evtchn(xendev); -+ -+ xen_be_printf(xendev, 1, "urb-ring-ref %d, conn-ring-ref %d, " -+ "remote port %d, local port %d\n", urb_ring_ref, -+ conn_ring_ref, xendev->remote_port, xendev->local_port); -+ -+ for (i = 1; i <= usbif->num_ports; i++) { -+ if (usbif->ports[i - 1].dev) { -+ usbback_hotplug_enq(usbif, i); -+ } -+ } -+ -+ return 0; -+} -+ -+static void usbback_backend_changed(struct XenDevice *xendev, const char *node) -+{ -+ struct usbback_info *usbif; -+ unsigned int i; -+ -+ TR_BUS(xendev, "path %s\n", node); -+ -+ usbif = container_of(xendev, struct usbback_info, xendev); -+ for (i = 1; i <= usbif->num_ports; i++) { -+ usbback_process_port(usbif, i); -+ } -+} -+ -+static int usbback_init(struct XenDevice *xendev) -+{ -+ struct usbback_info *usbif; -+ -+ TR_BUS(xendev, "start\n"); -+ -+ usbif = container_of(xendev, struct usbback_info, xendev); -+ -+ if (xenstore_read_be_int(xendev, "num-ports", &usbif->num_ports) || -+ usbif->num_ports < 1 || usbif->num_ports > USBBACK_MAXPORTS) { -+ xen_be_printf(xendev, 0, "num-ports not readable or out of bounds\n"); -+ return -1; -+ } -+ if (xenstore_read_be_int(xendev, "usb-ver", &usbif->usb_ver) || -+ (usbif->usb_ver != USB_VER_USB11 && usbif->usb_ver != USB_VER_USB20)) { -+ xen_be_printf(xendev, 0, "usb-ver not readable or out of bounds\n"); -+ return -1; -+ } -+ -+ usbback_backend_changed(xendev, "port"); -+ -+ TR_BUS(xendev, "finished\n"); -+ -+ return 0; -+} -+ -+static void xen_bus_attach(USBPort *port) -+{ -+ struct usbback_info *usbif; -+ -+ usbif = port->opaque; -+ TR_BUS(&usbif->xendev, "\n"); -+ usbif->ports[port->index].attached = true; -+ usbback_hotplug_enq(usbif, port->index + 1); -+} -+ -+static void xen_bus_detach(USBPort *port) -+{ -+ struct usbback_info *usbif; -+ -+ usbif = port->opaque; -+ TR_BUS(&usbif->xendev, "\n"); -+ usbif->ports[port->index].attached = false; -+ usbback_hotplug_enq(usbif, port->index + 1); -+} -+ -+static void xen_bus_child_detach(USBPort *port, USBDevice *child) -+{ -+ struct usbback_info *usbif; -+ -+ usbif = port->opaque; -+ TR_BUS(&usbif->xendev, "\n"); -+} -+ -+static void xen_bus_complete(USBPort *port, USBPacket *packet) -+{ -+ struct usbback_info *usbif; -+ -+ usbif = port->opaque; -+ TR_REQ(&usbif->xendev, "\n"); -+ usbback_packet_complete(packet); -+} -+ -+static USBPortOps xen_usb_port_ops = { -+ .attach = xen_bus_attach, -+ .detach = xen_bus_detach, -+ .child_detach = xen_bus_child_detach, -+ .complete = xen_bus_complete, -+}; -+ -+static USBBusOps xen_usb_bus_ops = { -+}; -+ -+static void usbback_alloc(struct XenDevice *xendev) -+{ -+ struct usbback_info *usbif; -+ USBPort *p; -+ unsigned int i, max_grants; -+ -+ usbif = container_of(xendev, struct usbback_info, xendev); -+ -+ usb_bus_new(&usbif->bus, sizeof(usbif->bus), &xen_usb_bus_ops, xen_sysdev); -+ for (i = 0; i < USBBACK_MAXPORTS; i++) { -+ p = &(usbif->ports[i].port); -+ usb_register_port(&usbif->bus, p, usbif, i, &xen_usb_port_ops, -+ USB_SPEED_MASK_LOW | USB_SPEED_MASK_FULL | -+ USB_SPEED_MASK_HIGH); -+ snprintf(p->path, sizeof(p->path), "%d", 99); -+ } -+ -+ QTAILQ_INIT(&usbif->req_free_q); -+ QSIMPLEQ_INIT(&usbif->hotplug_q); -+ usbif->bh = qemu_bh_new(usbback_bh, usbif); -+ -+ /* max_grants: for each request and for the rings (request and connect). */ -+ max_grants = USBIF_MAX_SEGMENTS_PER_REQUEST * USB_URB_RING_SIZE + 2; -+ if (xengnttab_set_max_grants(xendev->gnttabdev, max_grants) < 0) { -+ xen_be_printf(xendev, 0, "xengnttab_set_max_grants failed: %s\n", -+ strerror(errno)); -+ } -+} -+ -+static int usbback_free(struct XenDevice *xendev) -+{ -+ struct usbback_info *usbif; -+ struct usbback_req *usbback_req; -+ struct usbback_hotplug *usb_hp; -+ unsigned int i; -+ -+ TR_BUS(xendev, "start\n"); -+ -+ usbback_disconnect(xendev); -+ usbif = container_of(xendev, struct usbback_info, xendev); -+ for (i = 1; i <= usbif->num_ports; i++) { -+ usbback_portid_remove(usbif, i); -+ } -+ -+ while (!QTAILQ_EMPTY(&usbif->req_free_q)) { -+ usbback_req = QTAILQ_FIRST(&usbif->req_free_q); -+ QTAILQ_REMOVE(&usbif->req_free_q, usbback_req, q); -+ g_free(usbback_req); -+ } -+ while (!QSIMPLEQ_EMPTY(&usbif->hotplug_q)) { -+ usb_hp = QSIMPLEQ_FIRST(&usbif->hotplug_q); -+ QSIMPLEQ_REMOVE_HEAD(&usbif->hotplug_q, q); -+ g_free(usb_hp); -+ } -+ -+ qemu_bh_delete(usbif->bh); -+ -+ for (i = 0; i < USBBACK_MAXPORTS; i++) { -+ usb_unregister_port(&usbif->bus, &(usbif->ports[i].port)); -+ } -+ -+ usb_bus_release(&usbif->bus); -+ -+ TR_BUS(xendev, "finished\n"); -+ -+ return 0; -+} -+ -+static void usbback_event(struct XenDevice *xendev) -+{ -+ struct usbback_info *usbif; -+ -+ usbif = container_of(xendev, struct usbback_info, xendev); -+ qemu_bh_schedule(usbif->bh); -+} -+ -+struct XenDevOps xen_usb_ops = { -+ .size = sizeof(struct usbback_info), -+ .flags = DEVOPS_FLAG_NEED_GNTDEV, -+ .init = usbback_init, -+ .alloc = usbback_alloc, -+ .free = usbback_free, -+ .backend_changed = usbback_backend_changed, -+ .initialise = usbback_connect, -+ .disconnect = usbback_disconnect, -+ .event = usbback_event, -+}; -+ -+#else /* USBIF_SHORT_NOT_OK */ -+ -+static int usbback_not_supported(void) -+{ -+ return -EINVAL; -+} -+ -+struct XenDevOps xen_usb_ops = { -+ .backend_register = usbback_not_supported, -+}; -+ -+#endif -diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c -index 48d5bc6..f68cf48 100644 ---- a/hw/xenpv/xen_machine_pv.c -+++ b/hw/xenpv/xen_machine_pv.c -@@ -80,6 +80,9 @@ static void xen_init_pv(MachineState *machine) - xen_be_register("vfb", &xen_framebuffer_ops); - xen_be_register("qdisk", &xen_blkdev_ops); - xen_be_register("qnic", &xen_netdev_ops); -+#ifdef CONFIG_USB_LIBUSB -+ xen_be_register("qusb", &xen_usb_ops); -+#endif - - /* configure framebuffer */ - if (xenfb_enabled) { -diff --git a/include/hw/xen/xen_backend.h b/include/hw/xen/xen_backend.h -index 63364f7..6e18a46 100644 ---- a/include/hw/xen/xen_backend.h -+++ b/include/hw/xen/xen_backend.h -@@ -101,6 +101,9 @@ extern struct XenDevOps xen_kbdmouse_ops; /* xen_framebuffer.c */ - extern struct XenDevOps xen_framebuffer_ops; /* xen_framebuffer.c */ - extern struct XenDevOps xen_blkdev_ops; /* xen_disk.c */ - extern struct XenDevOps xen_netdev_ops; /* xen_nic.c */ -+#ifdef CONFIG_USB_LIBUSB -+extern struct XenDevOps xen_usb_ops; /* xen-usb.c */ -+#endif - - void xen_init_display(int domid); - -diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h -index 7b52e8f..5eabf37 100644 ---- a/include/hw/xen/xen_common.h -+++ b/include/hw/xen/xen_common.h -@@ -49,6 +49,8 @@ typedef xc_gnttab xengnttab_handle; - #define xengnttab_unmap(h, a, n) xc_gnttab_munmap(h, a, n) - #define xengnttab_map_grant_refs(h, c, d, r, p) \ - xc_gnttab_map_grant_refs(h, c, d, r, p) -+#define xengnttab_map_domain_grant_refs(h, c, d, r, p) \ -+ xc_gnttab_map_domain_grant_refs(h, c, d, r, p) - - #define xenforeignmemory_open(l, f) xen_xc - diff --git a/0044-xen-move-xen_sysdev-to-xen_backend..patch b/0044-xen-move-xen_sysdev-to-xen_backend..patch deleted file mode 100644 index 7d2e5208..00000000 --- a/0044-xen-move-xen_sysdev-to-xen_backend..patch +++ /dev/null @@ -1,161 +0,0 @@ -From 87e73bcc23fedcaa89776810dfcf4c6ef8ad39b1 Mon Sep 17 00:00:00 2001 -From: Juergen Gross -Date: Mon, 13 Jun 2016 11:12:21 +0200 -Subject: [PATCH] xen: move xen_sysdev to xen_backend.c - -Commit 9432e53a5bc88681b2d3aec4dac9db07c5476d1b added xen_sysdev as a -system device to serve as an anchor for removable virtual buses. This -introduced a build failure for non-x86 builds with CONFIG_XEN_BACKEND -set, as xen_sysdev was defined in a x86 specific file while being -consumed in an architecture independent source. - -Move the xen_sysdev definition and initialization to xen_backend.c to -avoid the build failure. - -Signed-off-by: Juergen Gross -Reviewed-by: Anthony PERARD -Acked-by: Stefano Stabellini -Signed-off-by: Stefano Stabellini ---- - hw/xen/xen_backend.c | 41 +++++++++++++++++++++++++++++++++++++++++ - hw/xenpv/xen_machine_pv.c | 40 ---------------------------------------- - 2 files changed, 41 insertions(+), 40 deletions(-) - -diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c -index c63f9df..6e52474 100644 ---- a/hw/xen/xen_backend.c -+++ b/hw/xen/xen_backend.c -@@ -27,12 +27,17 @@ - #include - - #include "hw/hw.h" -+#include "hw/sysbus.h" - #include "sysemu/char.h" - #include "qemu/log.h" - #include "hw/xen/xen_backend.h" - - #include - -+#define TYPE_XENSYSDEV "xensysdev" -+ -+DeviceState *xen_sysdev; -+ - /* ------------------------------------------------------------- */ - - /* public */ -@@ -763,6 +768,10 @@ int xen_be_init(void) - /* Check if xen_init() have been called */ - goto err; - } -+ -+ xen_sysdev = qdev_create(NULL, TYPE_XENSYSDEV); -+ qdev_init_nofail(xen_sysdev); -+ - return 0; - - err: -@@ -863,3 +872,35 @@ void xen_be_printf(struct XenDevice *xendev, int msg_level, const char *fmt, ... - } - qemu_log_flush(); - } -+ -+static int xen_sysdev_init(SysBusDevice *dev) -+{ -+ return 0; -+} -+ -+static Property xen_sysdev_properties[] = { -+ {/* end of property list */}, -+}; -+ -+static void xen_sysdev_class_init(ObjectClass *klass, void *data) -+{ -+ DeviceClass *dc = DEVICE_CLASS(klass); -+ SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); -+ -+ k->init = xen_sysdev_init; -+ dc->props = xen_sysdev_properties; -+} -+ -+static const TypeInfo xensysdev_info = { -+ .name = TYPE_XENSYSDEV, -+ .parent = TYPE_SYS_BUS_DEVICE, -+ .instance_size = sizeof(SysBusDevice), -+ .class_init = xen_sysdev_class_init, -+}; -+ -+static void xenbe_register_types(void) -+{ -+ type_register_static(&xensysdev_info); -+} -+ -+type_init(xenbe_register_types); -diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c -index f68cf48..48f725c 100644 ---- a/hw/xenpv/xen_machine_pv.c -+++ b/hw/xenpv/xen_machine_pv.c -@@ -25,15 +25,10 @@ - #include "qemu/osdep.h" - #include "hw/hw.h" - #include "hw/boards.h" --#include "hw/sysbus.h" - #include "hw/xen/xen_backend.h" - #include "xen_domainbuild.h" - #include "sysemu/block-backend.h" - --#define TYPE_XENSYSDEV "xensysdev" -- --DeviceState *xen_sysdev; -- - static void xen_init_pv(MachineState *machine) - { - DriveInfo *dinfo; -@@ -72,9 +67,6 @@ static void xen_init_pv(MachineState *machine) - break; - } - -- xen_sysdev = qdev_create(NULL, TYPE_XENSYSDEV); -- qdev_init_nofail(xen_sysdev); -- - xen_be_register("console", &xen_console_ops); - xen_be_register("vkbd", &xen_kbdmouse_ops); - xen_be_register("vfb", &xen_framebuffer_ops); -@@ -112,38 +104,6 @@ static void xen_init_pv(MachineState *machine) - xen_init_display(xen_domid); - } - --static int xen_sysdev_init(SysBusDevice *dev) --{ -- return 0; --} -- --static Property xen_sysdev_properties[] = { -- {/* end of property list */}, --}; -- --static void xen_sysdev_class_init(ObjectClass *klass, void *data) --{ -- DeviceClass *dc = DEVICE_CLASS(klass); -- SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); -- -- k->init = xen_sysdev_init; -- dc->props = xen_sysdev_properties; --} -- --static const TypeInfo xensysdev_info = { -- .name = TYPE_XENSYSDEV, -- .parent = TYPE_SYS_BUS_DEVICE, -- .instance_size = sizeof(SysBusDevice), -- .class_init = xen_sysdev_class_init, --}; -- --static void xenpv_register_types(void) --{ -- type_register_static(&xensysdev_info); --} -- --type_init(xenpv_register_types); -- - static void xenpv_machine_init(MachineClass *mc) - { - mc->desc = "Xen Para-virtualized PC"; diff --git a/0045-vnc-add-configurable-keyboard-delay.patch b/0045-vnc-add-configurable-keyboard-delay.patch deleted file mode 100644 index 648f35cf..00000000 --- a/0045-vnc-add-configurable-keyboard-delay.patch +++ /dev/null @@ -1,129 +0,0 @@ -From a77aa218a1ae490d8b4594a77492353c4ebf235f Mon Sep 17 00:00:00 2001 -From: Gerd Hoffmann -Date: Wed, 1 Jun 2016 08:22:30 +0200 -Subject: [PATCH] vnc: add configurable keyboard delay - -Limits the rate kbd events from the vnc server are forwarded to the -guest, so input devices which are typically low-bandwidth can keep -up even on bulky input. - -v2: update documentation too. -v3: spell fixes. - -Signed-off-by: Gerd Hoffmann -Tested-by: Yang Hongyang -Message-id: 1464762150-25817-1-git-send-email-kraxel@redhat.com -(cherry picked from commit c5ce83334465ee5acb6789a2f22d125273761c9e) -[BR: BSC#974914] -Signed-off-by: Bruce Rogers ---- - qemu-options.hx | 8 ++++++++ - ui/vnc.c | 13 +++++++++++-- - ui/vnc.h | 1 + - 3 files changed, 20 insertions(+), 2 deletions(-) - -diff --git a/qemu-options.hx b/qemu-options.hx -index 32b25a5..3bcd98f 100644 ---- a/qemu-options.hx -+++ b/qemu-options.hx -@@ -1410,6 +1410,14 @@ everybody else. 'ignore' completely ignores the shared flag and - allows everybody connect unconditionally. Doesn't conform to the rfb - spec but is traditional QEMU behavior. - -+@item key-delay-ms -+ -+Set keyboard delay, for key down and key up events, in milliseconds. -+Default is 1. Keyboards are low-bandwidth devices, so this slowdown -+can help the device and guest to keep up and not lose events in case -+events are arriving in bulk. Possible causes for the latter are flaky -+network connections, or scripts for automated testing. -+ - @end table - ETEXI - -diff --git a/ui/vnc.c b/ui/vnc.c -index e7946ba..f78c8c3 100644 ---- a/ui/vnc.c -+++ b/ui/vnc.c -@@ -1639,6 +1639,7 @@ static void reset_keys(VncState *vs) - for(i = 0; i < 256; i++) { - if (vs->modifiers_state[i]) { - qemu_input_event_send_key_number(vs->vd->dcl.con, i, false); -+ qemu_input_event_send_key_delay(vs->vd->key_delay_ms); - vs->modifiers_state[i] = 0; - } - } -@@ -1648,9 +1649,9 @@ static void press_key(VncState *vs, int keysym) - { - int keycode = keysym2scancode(vs->vd->kbd_layout, keysym) & SCANCODE_KEYMASK; - qemu_input_event_send_key_number(vs->vd->dcl.con, keycode, true); -- qemu_input_event_send_key_delay(0); -+ qemu_input_event_send_key_delay(vs->vd->key_delay_ms); - qemu_input_event_send_key_number(vs->vd->dcl.con, keycode, false); -- qemu_input_event_send_key_delay(0); -+ qemu_input_event_send_key_delay(vs->vd->key_delay_ms); - } - - static int current_led_state(VncState *vs) -@@ -1802,6 +1803,7 @@ static void do_key_event(VncState *vs, int down, int keycode, int sym) - - if (qemu_console_is_graphic(NULL)) { - qemu_input_event_send_key_number(vs->vd->dcl.con, keycode, down); -+ qemu_input_event_send_key_delay(vs->vd->key_delay_ms); - } else { - bool numlock = vs->modifiers_state[0x45]; - bool control = (vs->modifiers_state[0x1d] || -@@ -1923,6 +1925,7 @@ static void vnc_release_modifiers(VncState *vs) - continue; - } - qemu_input_event_send_key_number(vs->vd->dcl.con, keycode, false); -+ qemu_input_event_send_key_delay(vs->vd->key_delay_ms); - } - } - -@@ -3298,6 +3301,9 @@ static QemuOptsList qemu_vnc_opts = { - .name = "lock-key-sync", - .type = QEMU_OPT_BOOL, - },{ -+ .name = "key-delay-ms", -+ .type = QEMU_OPT_NUMBER, -+ },{ - .name = "sasl", - .type = QEMU_OPT_BOOL, - },{ -@@ -3536,6 +3542,7 @@ void vnc_display_open(const char *id, Error **errp) - #endif - int acl = 0; - int lock_key_sync = 1; -+ int key_delay_ms; - - if (!vs) { - error_setg(errp, "VNC display not active"); -@@ -3658,6 +3665,7 @@ void vnc_display_open(const char *id, Error **errp) - - reverse = qemu_opt_get_bool(opts, "reverse", false); - lock_key_sync = qemu_opt_get_bool(opts, "lock-key-sync", true); -+ key_delay_ms = qemu_opt_get_number(opts, "key-delay-ms", 1); - sasl = qemu_opt_get_bool(opts, "sasl", false); - #ifndef CONFIG_VNC_SASL - if (sasl) { -@@ -3790,6 +3798,7 @@ void vnc_display_open(const char *id, Error **errp) - } - #endif - vs->lock_key_sync = lock_key_sync; -+ vs->key_delay_ms = key_delay_ms; - - device_id = qemu_opt_get(opts, "display"); - if (device_id) { -diff --git a/ui/vnc.h b/ui/vnc.h -index 81a3261..6568bca 100644 ---- a/ui/vnc.h -+++ b/ui/vnc.h -@@ -155,6 +155,7 @@ struct VncDisplay - DisplayChangeListener dcl; - kbd_layout_t *kbd_layout; - int lock_key_sync; -+ int key_delay_ms; - QemuMutex mutex; - - QEMUCursor *cursor; diff --git a/0046-configure-add-echo_version-helper.patch b/0046-configure-add-echo_version-helper.patch deleted file mode 100644 index 073772a3..00000000 --- a/0046-configure-add-echo_version-helper.patch +++ /dev/null @@ -1,61 +0,0 @@ -From c4fc507e8d321e3ad3df335b6c4ab84d8fd6bae7 Mon Sep 17 00:00:00 2001 -From: Cole Robinson -Date: Fri, 6 May 2016 14:03:09 -0400 -Subject: [PATCH] configure: add echo_version helper - -Simplifies printing library versions, dependent on if the library -was even found - -Signed-off-by: Cole Robinson -Message-id: 3c9ab16123e06bb4109771ef6ee8acd82d449ba0.1462557436.git.crobinso@redhat.com -Signed-off-by: Gerd Hoffmann -(cherry picked from commit 02d34f62fdecb54637e5a66d254bd68fcbfa397f) -[BR: BSC#988855] -Signed-off-by: Bruce Rogers ---- - configure | 18 ++++++++---------- - 1 file changed, 8 insertions(+), 10 deletions(-) - -diff --git a/configure b/configure -index 8892b36..51dc704 100755 ---- a/configure -+++ b/configure -@@ -4749,6 +4749,12 @@ EOF - fi - fi - -+echo_version() { -+ if test "$1" = "yes" ; then -+ echo "($2)" -+ fi -+} -+ - # prepend pixman and ftd flags after all config tests are done - QEMU_CFLAGS="$pixman_cflags $fdt_cflags $QEMU_CFLAGS" - libs_softmmu="$pixman_libs $libs_softmmu" -@@ -4806,11 +4812,7 @@ echo "GNUTLS hash $gnutls_hash" - echo "GNUTLS rnd $gnutls_rnd" - echo "libgcrypt $gcrypt" - echo "libgcrypt kdf $gcrypt_kdf" --if test "$nettle" = "yes"; then -- echo "nettle $nettle ($nettle_version)" --else -- echo "nettle $nettle" --fi -+echo "nettle $nettle `echo_version $nettle $nettle_version`" - echo "nettle kdf $nettle_kdf" - echo "libtasn1 $tasn1" - echo "VTE support $vte" -@@ -4862,11 +4864,7 @@ echo "Trace backends $trace_backends" - if have_backend "simple"; then - echo "Trace output file $trace_file-" - fi --if test "$spice" = "yes"; then --echo "spice support $spice ($spice_protocol_version/$spice_server_version)" --else --echo "spice support $spice" --fi -+echo "spice support $spice `echo_version $spice $spice_protocol_version/$spice_server_version`" - echo "rbd support $rbd" - echo "xfsctl support $xfs" - echo "smartcard support $smartcard" diff --git a/0047-configure-support-vte-2.91.patch b/0047-configure-support-vte-2.91.patch deleted file mode 100644 index ce6ab8db..00000000 --- a/0047-configure-support-vte-2.91.patch +++ /dev/null @@ -1,70 +0,0 @@ -From eeb106a711b51266bf05f3895e01575357414ec6 Mon Sep 17 00:00:00 2001 -From: Cole Robinson -Date: Fri, 6 May 2016 14:03:12 -0400 -Subject: [PATCH] configure: support vte-2.91 - -vte >= 0.37 expores API version 2.91, which is where all the active -development is. qemu builds and runs fine with that version, so use it -if it's available. - -Signed-off-by: Cole Robinson -Message-id: b4f0375647f7b368d3dbd3834aee58cb0253566a.1462557436.git.crobinso@redhat.com -Signed-off-by: Gerd Hoffmann -(cherry picked from commit c6feff9e09aa999b77a37f532adbb89682ecb1b6) -[BR: BSC#988855] -Signed-off-by: Bruce Rogers ---- - configure | 17 +++++++++++------ - 1 file changed, 11 insertions(+), 6 deletions(-) - -diff --git a/configure b/configure -index 51dc704..8f1948c 100755 ---- a/configure -+++ b/configure -@@ -2396,20 +2396,25 @@ fi - - if test "$vte" != "no"; then - if test "$gtkabi" = "3.0"; then -- vtepackage="vte-2.90" -- vteversion="0.32.0" -+ vteminversion="0.32.0" -+ if $pkg_config --exists "vte-2.91"; then -+ vtepackage="vte-2.91" -+ else -+ vtepackage="vte-2.90" -+ fi - else - vtepackage="vte" -- vteversion="0.24.0" -+ vteminversion="0.24.0" - fi -- if $pkg_config --exists "$vtepackage >= $vteversion"; then -+ if $pkg_config --exists "$vtepackage >= $vteminversion"; then - vte_cflags=`$pkg_config --cflags $vtepackage` - vte_libs=`$pkg_config --libs $vtepackage` -+ vteversion=`$pkg_config --modversion $vtepackage` - libs_softmmu="$vte_libs $libs_softmmu" - vte="yes" - elif test "$vte" = "yes"; then - if test "$gtkabi" = "3.0"; then -- feature_not_found "vte" "Install libvte-2.90 devel" -+ feature_not_found "vte" "Install libvte-2.90/2.91 devel" - else - feature_not_found "vte" "Install libvte devel" - fi -@@ -4807,6 +4812,7 @@ echo "pixman $pixman" - echo "SDL support $sdl" - echo "GTK support $gtk" - echo "GTK GL support $gtk_gl" -+echo "VTE support $vte `echo_version $vte $vteversion`" - echo "GNUTLS support $gnutls" - echo "GNUTLS hash $gnutls_hash" - echo "GNUTLS rnd $gnutls_rnd" -@@ -4815,7 +4821,6 @@ echo "libgcrypt kdf $gcrypt_kdf" - echo "nettle $nettle `echo_version $nettle $nettle_version`" - echo "nettle kdf $nettle_kdf" - echo "libtasn1 $tasn1" --echo "VTE support $vte" - echo "curses support $curses" - echo "virgl support $virglrenderer" - echo "curl support $curl" diff --git a/0048-hw-arm-virt-mark-the-PCIe-host-cont.patch b/0048-hw-arm-virt-mark-the-PCIe-host-cont.patch deleted file mode 100644 index a31c0bfd..00000000 --- a/0048-hw-arm-virt-mark-the-PCIe-host-cont.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 8b1a852589b2693dd384680d761e617a34ba2f9e Mon Sep 17 00:00:00 2001 -From: Ard Biesheuvel -Date: Mon, 4 Jul 2016 13:06:36 +0100 -Subject: [PATCH] hw/arm/virt: mark the PCIe host controller as DMA coherent in - the DT - -Since QEMU performs cacheable accesses to guest memory when doing DMA -as part of the implementation of emulated PCI devices, guest drivers -should use cacheable accesses as well when running under KVM. Since this -essentially means that emulated PCI devices are DMA coherent, set the -'dma-coherent' DT property on the PCIe host controller DT node. - -This brings the DT description into line with the ACPI description, -which already marks the PCI bridge as cache coherent (see commit -bc64b96c984abf). - -Signed-off-by: Ard Biesheuvel -Message-id: 1467134090-5099-1-git-send-email-ard.biesheuvel@linaro.org -Reviewed-by: Peter Maydell -Signed-off-by: Peter Maydell -(cherry picked from commit 5d636e21c44ecf982a22a7bc4ca89186079ac283) -Signed-off-by: Alexander Graf ---- - hw/arm/virt.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/hw/arm/virt.c b/hw/arm/virt.c -index a535285..30841de 100644 ---- a/hw/arm/virt.c -+++ b/hw/arm/virt.c -@@ -950,6 +950,7 @@ static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic, - qemu_fdt_setprop_cell(vbi->fdt, nodename, "#size-cells", 2); - qemu_fdt_setprop_cells(vbi->fdt, nodename, "bus-range", 0, - nr_pcie_buses - 1); -+ qemu_fdt_setprop(vbi->fdt, nodename, "dma-coherent", NULL, 0); - - if (vbi->v2m_phandle) { - qemu_fdt_setprop_cells(vbi->fdt, nodename, "msi-parent", diff --git a/0050-scsi-esp-fix-migration.patch b/0050-scsi-esp-fix-migration.patch deleted file mode 100644 index 48767361..00000000 --- a/0050-scsi-esp-fix-migration.patch +++ /dev/null @@ -1,58 +0,0 @@ -From ef7fe72329d837ac78895a6b287bc6d7cb2a6889 Mon Sep 17 00:00:00 2001 -From: Paolo Bonzini -Date: Mon, 20 Jun 2016 16:32:39 +0200 -Subject: [PATCH] scsi: esp: fix migration - -Commit 926cde5 ("scsi: esp: make cmdbuf big enough for maximum CDB size", -2016-06-16) changed the size of a migrated field. Split it in two -parts, and only migrate the second part in a new vmstate version. - -Signed-off-by: Paolo Bonzini -(cherry picked from commit cc96677469388bad3d66479379735cf75db069e3) -[BR: CVE-2016-6351 BSC#990835] -Signed-off-by: Bruce Rogers ---- - hw/scsi/esp.c | 5 +++-- - include/migration/vmstate.h | 5 ++++- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c -index baa0a2c..1f2f2d3 100644 ---- a/hw/scsi/esp.c -+++ b/hw/scsi/esp.c -@@ -574,7 +574,7 @@ static bool esp_mem_accepts(void *opaque, hwaddr addr, - - const VMStateDescription vmstate_esp = { - .name ="esp", -- .version_id = 3, -+ .version_id = 4, - .minimum_version_id = 3, - .fields = (VMStateField[]) { - VMSTATE_BUFFER(rregs, ESPState), -@@ -585,7 +585,8 @@ const VMStateDescription vmstate_esp = { - VMSTATE_BUFFER(ti_buf, ESPState), - VMSTATE_UINT32(status, ESPState), - VMSTATE_UINT32(dma, ESPState), -- VMSTATE_BUFFER(cmdbuf, ESPState), -+ VMSTATE_PARTIAL_BUFFER(cmdbuf, ESPState, 16), -+ VMSTATE_BUFFER_START_MIDDLE_V(cmdbuf, ESPState, 16, 4), - VMSTATE_UINT32(cmdlen, ESPState), - VMSTATE_UINT32(do_cmd, ESPState), - VMSTATE_UINT32(dma_left, ESPState), -diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h -index 84ee355..853a2bd 100644 ---- a/include/migration/vmstate.h -+++ b/include/migration/vmstate.h -@@ -888,8 +888,11 @@ extern const VMStateInfo vmstate_info_bitmap; - #define VMSTATE_PARTIAL_BUFFER(_f, _s, _size) \ - VMSTATE_STATIC_BUFFER(_f, _s, 0, NULL, 0, _size) - -+#define VMSTATE_BUFFER_START_MIDDLE_V(_f, _s, _start, _v) \ -+ VMSTATE_STATIC_BUFFER(_f, _s, _v, NULL, _start, sizeof(typeof_field(_s, _f))) -+ - #define VMSTATE_BUFFER_START_MIDDLE(_f, _s, _start) \ -- VMSTATE_STATIC_BUFFER(_f, _s, 0, NULL, _start, sizeof(typeof_field(_s, _f))) -+ VMSTATE_BUFFER_START_MIDDLE_V(_f, _s, _start, 0) - - #define VMSTATE_PARTIAL_VBUFFER(_f, _s, _size) \ - VMSTATE_VBUFFER(_f, _s, 0, NULL, 0, _size) diff --git a/0051-xen-when-removing-a-backend-don-t-r.patch b/0051-xen-when-removing-a-backend-don-t-r.patch deleted file mode 100644 index 87da5694..00000000 --- a/0051-xen-when-removing-a-backend-don-t-r.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 57e6b7c9e33686c070e6b5bce203e1a4a01b821d Mon Sep 17 00:00:00 2001 -From: Juergen Gross -Date: Fri, 29 Jul 2016 12:51:53 +0200 -Subject: [PATCH] xen: when removing a backend don't remove many of them - -When a Xenstore watch fires indicating a backend has to be removed -don't remove all backends for that domain with the specified device -index, but just the one which has the correct type. - -The easiest way to achieve this is to use the already determined -xendev as parameter for xen_be_del_xendev() instead of only the domid -and device index. - -This at once removes the open coded QTAILQ_FOREACH_SAVE() in -xen_be_del_xendev() as there is no need to search for the correct -xendev any longer. - -Signed-off-by: Juergen Gross -Signed-off-by: Bruce Rogers ---- - hw/xen/xen_backend.c | 58 +++++++++++++++++----------------------------------- - 1 file changed, 19 insertions(+), 39 deletions(-) - -diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c -index 6e52474..8f347da 100644 ---- a/hw/xen/xen_backend.c -+++ b/hw/xen/xen_backend.c -@@ -322,48 +322,28 @@ static struct XenDevice *xen_be_get_xendev(const char *type, int dom, int dev, - /* - * release xen backend device. - */ --static struct XenDevice *xen_be_del_xendev(int dom, int dev) -+static void xen_be_del_xendev(struct XenDevice *xendev) - { -- struct XenDevice *xendev, *xnext; -- -- /* -- * This is pretty much like QTAILQ_FOREACH(xendev, &xendevs, next) but -- * we save the next pointer in xnext because we might free xendev. -- */ -- xnext = xendevs.tqh_first; -- while (xnext) { -- xendev = xnext; -- xnext = xendev->next.tqe_next; -- -- if (xendev->dom != dom) { -- continue; -- } -- if (xendev->dev != dev && dev != -1) { -- continue; -- } -- -- if (xendev->ops->free) { -- xendev->ops->free(xendev); -- } -- -- if (xendev->fe) { -- char token[XEN_BUFSIZE]; -- snprintf(token, sizeof(token), "fe:%p", xendev); -- xs_unwatch(xenstore, xendev->fe, token); -- g_free(xendev->fe); -- } -+ if (xendev->ops->free) { -+ xendev->ops->free(xendev); -+ } - -- if (xendev->evtchndev != NULL) { -- xenevtchn_close(xendev->evtchndev); -- } -- if (xendev->gnttabdev != NULL) { -- xengnttab_close(xendev->gnttabdev); -- } -+ if (xendev->fe) { -+ char token[XEN_BUFSIZE]; -+ snprintf(token, sizeof(token), "fe:%p", xendev); -+ xs_unwatch(xenstore, xendev->fe, token); -+ g_free(xendev->fe); -+ } - -- QTAILQ_REMOVE(&xendevs, xendev, next); -- g_free(xendev); -+ if (xendev->evtchndev != NULL) { -+ xenevtchn_close(xendev->evtchndev); - } -- return NULL; -+ if (xendev->gnttabdev != NULL) { -+ xengnttab_close(xendev->gnttabdev); -+ } -+ -+ QTAILQ_REMOVE(&xendevs, xendev, next); -+ g_free(xendev); - } - - /* -@@ -683,7 +663,7 @@ static void xenstore_update_be(char *watch, char *type, int dom, - if (xendev != NULL) { - bepath = xs_read(xenstore, 0, xendev->be, &len); - if (bepath == NULL) { -- xen_be_del_xendev(dom, dev); -+ xen_be_del_xendev(xendev); - } else { - free(bepath); - xen_be_backend_changed(xendev, path); diff --git a/0052-xen-drain-submit-queue-in-xen-usb-b.patch b/0052-xen-drain-submit-queue-in-xen-usb-b.patch deleted file mode 100644 index a77f3984..00000000 --- a/0052-xen-drain-submit-queue-in-xen-usb-b.patch +++ /dev/null @@ -1,210 +0,0 @@ -From 559d8ccdb0a5e92b6a0a42f2850caa7a8c57ae76 Mon Sep 17 00:00:00 2001 -From: Juergen Gross -Date: Wed, 27 Jul 2016 08:17:41 +0200 -Subject: [PATCH] xen: drain submit queue in xen-usb before removing device - -When unplugging a device in the Xen pvusb backend drain the submit -queue before deallocation of the control structures. Otherwise there -will be bogus memory accesses when I/O contracts are finished. - -Correlated to this issue is the handling of cancel requests: a packet -cancelled will still lead to the call of complete, so add a flag -to the request indicating it should be just dropped on complete. - -Signed-off-by: Juergen Gross -Signed-off-by: Bruce Rogers ---- - hw/usb/xen-usb.c | 95 ++++++++++++++++++++++++++++++++++++-------------------- - 1 file changed, 61 insertions(+), 34 deletions(-) - -diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c -index 664df04..6f4b99d 100644 ---- a/hw/usb/xen-usb.c -+++ b/hw/usb/xen-usb.c -@@ -94,6 +94,8 @@ struct usbback_req { - void *buffer; - void *isoc_buffer; - struct libusb_transfer *xfer; -+ -+ bool cancelled; - }; - - struct usbback_hotplug { -@@ -304,20 +306,23 @@ static void usbback_do_response(struct usbback_req *usbback_req, int32_t status, - usbback_req->isoc_buffer = NULL; - } - -- res = RING_GET_RESPONSE(&usbif->urb_ring, usbif->urb_ring.rsp_prod_pvt); -- res->id = usbback_req->req.id; -- res->status = status; -- res->actual_length = actual_length; -- res->error_count = error_count; -- res->start_frame = 0; -- usbif->urb_ring.rsp_prod_pvt++; -- RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&usbif->urb_ring, notify); -- -- if (notify) { -- xen_be_send_notify(xendev); -+ if (usbif->urb_sring) { -+ res = RING_GET_RESPONSE(&usbif->urb_ring, usbif->urb_ring.rsp_prod_pvt); -+ res->id = usbback_req->req.id; -+ res->status = status; -+ res->actual_length = actual_length; -+ res->error_count = error_count; -+ res->start_frame = 0; -+ usbif->urb_ring.rsp_prod_pvt++; -+ RING_PUSH_RESPONSES_AND_CHECK_NOTIFY(&usbif->urb_ring, notify); -+ -+ if (notify) { -+ xen_be_send_notify(xendev); -+ } - } - -- usbback_put_req(usbback_req); -+ if (!usbback_req->cancelled) -+ usbback_put_req(usbback_req); - } - - static void usbback_do_response_ret(struct usbback_req *usbback_req, -@@ -369,15 +374,14 @@ static void usbback_set_address(struct usbback_info *usbif, - } - } - --static bool usbback_cancel_req(struct usbback_req *usbback_req) -+static void usbback_cancel_req(struct usbback_req *usbback_req) - { -- bool ret = false; -- - if (usb_packet_is_inflight(&usbback_req->packet)) { - usb_cancel_packet(&usbback_req->packet); -- ret = true; -+ QTAILQ_REMOVE(&usbback_req->stub->submit_q, usbback_req, q); -+ usbback_req->cancelled = true; -+ usbback_do_response_ret(usbback_req, -EPROTO); - } -- return ret; - } - - static void usbback_process_unlink_req(struct usbback_req *usbback_req) -@@ -394,7 +398,7 @@ static void usbback_process_unlink_req(struct usbback_req *usbback_req) - devnum = usbif_pipedevice(usbback_req->req.pipe); - if (unlikely(devnum == 0)) { - usbback_req->stub = usbif->ports + -- usbif_pipeportnum(usbback_req->req.pipe); -+ usbif_pipeportnum(usbback_req->req.pipe) - 1; - if (unlikely(!usbback_req->stub)) { - ret = -ENODEV; - goto fail_response; -@@ -409,9 +413,7 @@ static void usbback_process_unlink_req(struct usbback_req *usbback_req) - - QTAILQ_FOREACH(unlink_req, &usbback_req->stub->submit_q, q) { - if (unlink_req->req.id == id) { -- if (usbback_cancel_req(unlink_req)) { -- usbback_do_response_ret(unlink_req, -EPROTO); -- } -+ usbback_cancel_req(unlink_req); - break; - } - } -@@ -684,6 +686,31 @@ static void usbback_hotplug_enq(struct usbback_info *usbif, unsigned port) - usbback_hotplug_notify(usbif); - } - -+static void usbback_portid_drain(struct usbback_info *usbif, unsigned port) -+{ -+ struct usbback_req *req, *tmp; -+ bool sched = false; -+ -+ QTAILQ_FOREACH_SAFE(req, &usbif->ports[port - 1].submit_q, q, tmp) { -+ usbback_cancel_req(req); -+ sched = true; -+ } -+ -+ if (sched) -+ qemu_bh_schedule(usbif->bh); -+} -+ -+static void usbback_portid_detach(struct usbback_info *usbif, unsigned port) -+{ -+ if (!usbif->ports[port - 1].attached) -+ return; -+ -+ usbif->ports[port - 1].speed = USBIF_SPEED_NONE; -+ usbif->ports[port - 1].attached = false; -+ usbback_portid_drain(usbif, port); -+ usbback_hotplug_enq(usbif, port); -+} -+ - static void usbback_portid_remove(struct usbback_info *usbif, unsigned port) - { - USBPort *p; -@@ -697,9 +724,7 @@ static void usbback_portid_remove(struct usbback_info *usbif, unsigned port) - - object_unparent(OBJECT(usbif->ports[port - 1].dev)); - usbif->ports[port - 1].dev = NULL; -- usbif->ports[port - 1].speed = USBIF_SPEED_NONE; -- usbif->ports[port - 1].attached = false; -- usbback_hotplug_enq(usbif, port); -+ usbback_portid_detach(usbif, port); - - TR_BUS(&usbif->xendev, "port %d removed\n", port); - } -@@ -804,7 +829,6 @@ static void usbback_process_port(struct usbback_info *usbif, unsigned port) - static void usbback_disconnect(struct XenDevice *xendev) - { - struct usbback_info *usbif; -- struct usbback_req *req, *tmp; - unsigned int i; - - TR_BUS(xendev, "start\n"); -@@ -823,12 +847,8 @@ static void usbback_disconnect(struct XenDevice *xendev) - } - - for (i = 0; i < usbif->num_ports; i++) { -- if (!usbif->ports[i].dev) { -- continue; -- } -- QTAILQ_FOREACH_SAFE(req, &usbif->ports[i].submit_q, q, tmp) { -- usbback_cancel_req(req); -- } -+ if (usbif->ports[i].dev) -+ usbback_portid_drain(usbif, i + 1); - } - - TR_BUS(xendev, "finished\n"); -@@ -947,8 +967,7 @@ static void xen_bus_detach(USBPort *port) - - usbif = port->opaque; - TR_BUS(&usbif->xendev, "\n"); -- usbif->ports[port->index].attached = false; -- usbback_hotplug_enq(usbif, port->index + 1); -+ usbback_portid_detach(usbif, port->index + 1); - } - - static void xen_bus_child_detach(USBPort *port, USBDevice *child) -@@ -961,9 +980,16 @@ static void xen_bus_child_detach(USBPort *port, USBDevice *child) - - static void xen_bus_complete(USBPort *port, USBPacket *packet) - { -+ struct usbback_req *usbback_req; - struct usbback_info *usbif; - -- usbif = port->opaque; -+ usbback_req = container_of(packet, struct usbback_req, packet); -+ if (usbback_req->cancelled) { -+ g_free(usbback_req); -+ return; -+ } -+ -+ usbif = usbback_req->usbif; - TR_REQ(&usbif->xendev, "\n"); - usbback_packet_complete(packet); - } -@@ -1040,6 +1066,7 @@ static int usbback_free(struct XenDevice *xendev) - } - - usb_bus_release(&usbif->bus); -+ object_unparent(OBJECT(&usbif->bus)); - - TR_BUS(xendev, "finished\n"); - diff --git a/0053-qcow2-avoid-extra-flushes-in-qcow2.patch b/0053-qcow2-avoid-extra-flushes-in-qcow2.patch deleted file mode 100644 index 8b7a14a7..00000000 --- a/0053-qcow2-avoid-extra-flushes-in-qcow2.patch +++ /dev/null @@ -1,104 +0,0 @@ -From c9f5c5004b9fb97398c8dc0003303493904c986c Mon Sep 17 00:00:00 2001 -From: "Denis V. Lunev" -Date: Thu, 2 Jun 2016 18:58:15 +0300 -Subject: [PATCH] qcow2: avoid extra flushes in qcow2 - -The problem with excessive flushing was found by a couple of performance -tests: - - parallel directory tree creation (from 2 processes) - - 32 cached writes + fsync at the end in a loop - -For the first one results improved from 2.6 loops/sec to 3.5 loops/sec. -Each loop creates 10^3 directories with 10 files in each. - -For the second one results improved from ~600 fsync/sec to ~1100 -fsync/sec. Though, it was run on SSD so it probably won't show such -performance gain on rotational media. - -qcow2_cache_flush() calls bdrv_flush() unconditionally after writing -cache entries of a particular cache. This can lead to as many as -2 additional fdatasyncs inside bdrv_flush. - -We can simply skip all fdatasync calls inside qcow2_co_flush_to_os -as bdrv_flush for sure will do the job. These flushes are necessary to -keep the right order of writes to the different caches. Though this is -not necessary in the current code base as this ordering is ensured through -the flush in qcow2_cache_flush_dependency(). - -Signed-off-by: Denis V. Lunev -CC: Pavel Borzenkov -CC: Kevin Wolf -CC: Max Reitz -Signed-off-by: Kevin Wolf -(cherry picked from commit f3c3b87dae44ac6c82246ceb3953793951800a9a) -[BR: BSC#991296] -Signed-off-by: Bruce Rogers ---- - block/qcow2-cache.c | 11 +++++++++-- - block/qcow2.c | 4 ++-- - block/qcow2.h | 1 + - 3 files changed, 12 insertions(+), 4 deletions(-) - -diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c -index 0fe8eda..208a060 100644 ---- a/block/qcow2-cache.c -+++ b/block/qcow2-cache.c -@@ -226,7 +226,7 @@ static int qcow2_cache_entry_flush(BlockDriverState *bs, Qcow2Cache *c, int i) - return 0; - } - --int qcow2_cache_flush(BlockDriverState *bs, Qcow2Cache *c) -+int qcow2_cache_write(BlockDriverState *bs, Qcow2Cache *c) - { - BDRVQcow2State *s = bs->opaque; - int result = 0; -@@ -242,8 +242,15 @@ int qcow2_cache_flush(BlockDriverState *bs, Qcow2Cache *c) - } - } - -+ return result; -+} -+ -+int qcow2_cache_flush(BlockDriverState *bs, Qcow2Cache *c) -+{ -+ int result = qcow2_cache_write(bs, c); -+ - if (result == 0) { -- ret = bdrv_flush(bs->file->bs); -+ int ret = bdrv_flush(bs->file->bs); - if (ret < 0) { - result = ret; - } -diff --git a/block/qcow2.c b/block/qcow2.c -index 470734b..dc609a1 100644 ---- a/block/qcow2.c -+++ b/block/qcow2.c -@@ -2774,14 +2774,14 @@ static coroutine_fn int qcow2_co_flush_to_os(BlockDriverState *bs) - int ret; - - qemu_co_mutex_lock(&s->lock); -- ret = qcow2_cache_flush(bs, s->l2_table_cache); -+ ret = qcow2_cache_write(bs, s->l2_table_cache); - if (ret < 0) { - qemu_co_mutex_unlock(&s->lock); - return ret; - } - - if (qcow2_need_accurate_refcounts(s)) { -- ret = qcow2_cache_flush(bs, s->refcount_block_cache); -+ ret = qcow2_cache_write(bs, s->refcount_block_cache); - if (ret < 0) { - qemu_co_mutex_unlock(&s->lock); - return ret; -diff --git a/block/qcow2.h b/block/qcow2.h -index a063a3c..7db9795 100644 ---- a/block/qcow2.h -+++ b/block/qcow2.h -@@ -583,6 +583,7 @@ int qcow2_cache_destroy(BlockDriverState* bs, Qcow2Cache *c); - void qcow2_cache_entry_mark_dirty(BlockDriverState *bs, Qcow2Cache *c, - void *table); - int qcow2_cache_flush(BlockDriverState *bs, Qcow2Cache *c); -+int qcow2_cache_write(BlockDriverState *bs, Qcow2Cache *c); - int qcow2_cache_set_dependency(BlockDriverState *bs, Qcow2Cache *c, - Qcow2Cache *dependency); - void qcow2_cache_depends_on_flush(Qcow2Cache *c); diff --git a/0055-xen-use-a-common-function-for-pv-an.patch b/0055-xen-use-a-common-function-for-pv-an.patch deleted file mode 100644 index 2823a4bb..00000000 --- a/0055-xen-use-a-common-function-for-pv-an.patch +++ /dev/null @@ -1,95 +0,0 @@ -From fceaaa771845a1fa7379539e77390b833dc9de3b Mon Sep 17 00:00:00 2001 -From: Juergen Gross -Date: Tue, 2 Aug 2016 08:32:32 +0200 -Subject: [PATCH] xen: use a common function for pv and hvm guest backend - register calls - -Instead of calling xen_be_register() for each supported backend type -for hvm and pv guests in their machine init functions use a common -function in order not to have to add new backends twice. - -This at once fixes the error that hvm domains couldn't use the qusb -backend. - -Signed-off-by: Juergen Gross -Acked-by: Anthony PERARD -Message-id: 1470119552-16170-1-git-send-email-jgross@suse.com -Signed-off-by: Gerd Hoffmann -(cherry picked from commit 0e39bb022b5fa8c11964968885f3263c02ce42b0) -[BR: BSC#991785] -Signed-off-by: Bruce Rogers ---- - hw/xen/xen_backend.c | 10 ++++++++++ - hw/xenpv/xen_machine_pv.c | 7 +------ - include/hw/xen/xen_backend.h | 1 + - xen-hvm.c | 4 +--- - 4 files changed, 13 insertions(+), 9 deletions(-) - -diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c -index 8f347da..f4d302d 100644 ---- a/hw/xen/xen_backend.c -+++ b/hw/xen/xen_backend.c -@@ -781,6 +781,16 @@ int xen_be_register(const char *type, struct XenDevOps *ops) - return xenstore_scan(type, xen_domid, ops); - } - -+void xen_be_register_common(void) -+{ -+ xen_be_register("console", &xen_console_ops); -+ xen_be_register("vkbd", &xen_kbdmouse_ops); -+ xen_be_register("qdisk", &xen_blkdev_ops); -+#ifdef CONFIG_USB_LIBUSB -+ xen_be_register("qusb", &xen_usb_ops); -+#endif -+} -+ - int xen_be_bind_evtchn(struct XenDevice *xendev) - { - if (xendev->local_port != -1) { -diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c -index 48f725c..79aef4e 100644 ---- a/hw/xenpv/xen_machine_pv.c -+++ b/hw/xenpv/xen_machine_pv.c -@@ -67,14 +67,9 @@ static void xen_init_pv(MachineState *machine) - break; - } - -- xen_be_register("console", &xen_console_ops); -- xen_be_register("vkbd", &xen_kbdmouse_ops); -+ xen_be_register_common(); - xen_be_register("vfb", &xen_framebuffer_ops); -- xen_be_register("qdisk", &xen_blkdev_ops); - xen_be_register("qnic", &xen_netdev_ops); --#ifdef CONFIG_USB_LIBUSB -- xen_be_register("qusb", &xen_usb_ops); --#endif - - /* configure framebuffer */ - if (xenfb_enabled) { -diff --git a/include/hw/xen/xen_backend.h b/include/hw/xen/xen_backend.h -index 6e18a46..0e9af28 100644 ---- a/include/hw/xen/xen_backend.h -+++ b/include/hw/xen/xen_backend.h -@@ -87,6 +87,7 @@ void xen_be_check_state(struct XenDevice *xendev); - - /* xen backend driver bits */ - int xen_be_init(void); -+void xen_be_register_common(void); - int xen_be_register(const char *type, struct XenDevOps *ops); - int xen_be_set_state(struct XenDevice *xendev, enum xenbus_state state); - int xen_be_bind_evtchn(struct XenDevice *xendev); -diff --git a/xen-hvm.c b/xen-hvm.c -index 039680a..93c958a 100644 ---- a/xen-hvm.c -+++ b/xen-hvm.c -@@ -1305,9 +1305,7 @@ void xen_hvm_init(PCMachineState *pcms, MemoryRegion **ram_memory) - error_report("xen backend core setup failed"); - goto err; - } -- xen_be_register("console", &xen_console_ops); -- xen_be_register("vkbd", &xen_kbdmouse_ops); -- xen_be_register("qdisk", &xen_blkdev_ops); -+ xen_be_register_common(); - xen_read_physmap(state); - return; - diff --git a/ipxe-ath-Fix-building-with-GCC-6.patch b/ipxe-ath-Fix-building-with-GCC-6.patch deleted file mode 100644 index d2f1accd..00000000 --- a/ipxe-ath-Fix-building-with-GCC-6.patch +++ /dev/null @@ -1,1003 +0,0 @@ -From 63037bdce4a325e5e1da85ffcdf27b77ac670c01 Mon Sep 17 00:00:00 2001 -From: Michael Brown -Date: Wed, 4 May 2016 15:57:44 +0100 -Subject: [PATCH] [ath] Fix building with GCC 6 - -Signed-off-by: Michael Brown -Signed-off-by: Bruce Rogers ---- - src/drivers/net/ath/ath.h | 2 - - src/drivers/net/ath/ath5k/ath5k.c | 40 -------------- - src/drivers/net/ath/ath5k/ath5k_phy.c | 6 +-- - src/drivers/net/ath/ath5k/ath5k_reset.c | 8 --- - src/drivers/net/ath/ath9k/ar9002_initvals.h | 72 ++++++++++++------------- - src/drivers/net/ath/ath9k/ar9003_2p2_initvals.h | 40 +++++++------- - src/drivers/net/ath/ath9k/ar9340_initvals.h | 36 ++++++------- - src/drivers/net/ath/ath9k/ar9485_initvals.h | 44 +++++++-------- - src/drivers/net/ath/ath9k/ath9k_init.c | 3 +- - 9 files changed, 101 insertions(+), 150 deletions(-) - -diff --git a/src/drivers/net/ath/ath.h b/src/drivers/net/ath/ath.h -index 65b97f6..d6a0373 100644 ---- a/src/drivers/net/ath/ath.h -+++ b/src/drivers/net/ath/ath.h -@@ -101,8 +101,6 @@ static inline u32 get_unaligned_le32(const void *p) - */ - #define ATH_KEYMAX 128 /* max key cache size we handle */ - --static const u8 ath_bcast_mac[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; -- - struct ath_ani { - int caldone; - unsigned int longcal_timer; -diff --git a/src/drivers/net/ath/ath5k/ath5k.c b/src/drivers/net/ath/ath5k/ath5k.c -index 92c4ffd..a6a65a2 100644 ---- a/src/drivers/net/ath/ath5k/ath5k.c -+++ b/src/drivers/net/ath/ath5k/ath5k.c -@@ -85,46 +85,6 @@ static struct pci_device_id ath5k_nics[] = { - PCI_ROM(0x168c, 0x001d, "ath2417", "Atheros 2417 Nala", AR5K_AR5212), - }; - --/* Known SREVs */ --static const struct ath5k_srev_name srev_names[] = { -- { "5210", AR5K_VERSION_MAC, AR5K_SREV_AR5210 }, -- { "5311", AR5K_VERSION_MAC, AR5K_SREV_AR5311 }, -- { "5311A", AR5K_VERSION_MAC, AR5K_SREV_AR5311A }, -- { "5311B", AR5K_VERSION_MAC, AR5K_SREV_AR5311B }, -- { "5211", AR5K_VERSION_MAC, AR5K_SREV_AR5211 }, -- { "5212", AR5K_VERSION_MAC, AR5K_SREV_AR5212 }, -- { "5213", AR5K_VERSION_MAC, AR5K_SREV_AR5213 }, -- { "5213A", AR5K_VERSION_MAC, AR5K_SREV_AR5213A }, -- { "2413", AR5K_VERSION_MAC, AR5K_SREV_AR2413 }, -- { "2414", AR5K_VERSION_MAC, AR5K_SREV_AR2414 }, -- { "5424", AR5K_VERSION_MAC, AR5K_SREV_AR5424 }, -- { "5413", AR5K_VERSION_MAC, AR5K_SREV_AR5413 }, -- { "5414", AR5K_VERSION_MAC, AR5K_SREV_AR5414 }, -- { "2415", AR5K_VERSION_MAC, AR5K_SREV_AR2415 }, -- { "5416", AR5K_VERSION_MAC, AR5K_SREV_AR5416 }, -- { "5418", AR5K_VERSION_MAC, AR5K_SREV_AR5418 }, -- { "2425", AR5K_VERSION_MAC, AR5K_SREV_AR2425 }, -- { "2417", AR5K_VERSION_MAC, AR5K_SREV_AR2417 }, -- { "xxxxx", AR5K_VERSION_MAC, AR5K_SREV_UNKNOWN }, -- { "5110", AR5K_VERSION_RAD, AR5K_SREV_RAD_5110 }, -- { "5111", AR5K_VERSION_RAD, AR5K_SREV_RAD_5111 }, -- { "5111A", AR5K_VERSION_RAD, AR5K_SREV_RAD_5111A }, -- { "2111", AR5K_VERSION_RAD, AR5K_SREV_RAD_2111 }, -- { "5112", AR5K_VERSION_RAD, AR5K_SREV_RAD_5112 }, -- { "5112A", AR5K_VERSION_RAD, AR5K_SREV_RAD_5112A }, -- { "5112B", AR5K_VERSION_RAD, AR5K_SREV_RAD_5112B }, -- { "2112", AR5K_VERSION_RAD, AR5K_SREV_RAD_2112 }, -- { "2112A", AR5K_VERSION_RAD, AR5K_SREV_RAD_2112A }, -- { "2112B", AR5K_VERSION_RAD, AR5K_SREV_RAD_2112B }, -- { "2413", AR5K_VERSION_RAD, AR5K_SREV_RAD_2413 }, -- { "5413", AR5K_VERSION_RAD, AR5K_SREV_RAD_5413 }, -- { "2316", AR5K_VERSION_RAD, AR5K_SREV_RAD_2316 }, -- { "2317", AR5K_VERSION_RAD, AR5K_SREV_RAD_2317 }, -- { "5424", AR5K_VERSION_RAD, AR5K_SREV_RAD_5424 }, -- { "5133", AR5K_VERSION_RAD, AR5K_SREV_RAD_5133 }, -- { "xxxxx", AR5K_VERSION_RAD, AR5K_SREV_UNKNOWN }, --}; -- - #define ATH5K_SPMBL_NO 1 - #define ATH5K_SPMBL_YES 2 - #define ATH5K_SPMBL_BOTH 3 -diff --git a/src/drivers/net/ath/ath5k/ath5k_phy.c b/src/drivers/net/ath/ath5k/ath5k_phy.c -index 7891d39..c2a66a4 100644 ---- a/src/drivers/net/ath/ath5k/ath5k_phy.c -+++ b/src/drivers/net/ath/ath5k/ath5k_phy.c -@@ -1219,12 +1219,12 @@ static int ath5k_hw_rf5110_calibrate(struct ath5k_hw *ah, - - /* Update radio registers */ - ath5k_hw_reg_write(ah, (phy_sig & ~(AR5K_PHY_SIG_FIRPWR)) | -- AR5K_REG_SM(-1, AR5K_PHY_SIG_FIRPWR), AR5K_PHY_SIG); -+ AR5K_REG_SM(-1U, AR5K_PHY_SIG_FIRPWR), AR5K_PHY_SIG); - - ath5k_hw_reg_write(ah, (phy_agc & ~(AR5K_PHY_AGCCOARSE_HI | - AR5K_PHY_AGCCOARSE_LO)) | -- AR5K_REG_SM(-1, AR5K_PHY_AGCCOARSE_HI) | -- AR5K_REG_SM(-127, AR5K_PHY_AGCCOARSE_LO), AR5K_PHY_AGCCOARSE); -+ AR5K_REG_SM(-1U, AR5K_PHY_AGCCOARSE_HI) | -+ AR5K_REG_SM(-127U, AR5K_PHY_AGCCOARSE_LO), AR5K_PHY_AGCCOARSE); - - ath5k_hw_reg_write(ah, (phy_sat & ~(AR5K_PHY_ADCSAT_ICNT | - AR5K_PHY_ADCSAT_THR)) | -diff --git a/src/drivers/net/ath/ath5k/ath5k_reset.c b/src/drivers/net/ath/ath5k/ath5k_reset.c -index 2f36a4e..73765a7 100644 ---- a/src/drivers/net/ath/ath5k/ath5k_reset.c -+++ b/src/drivers/net/ath/ath5k/ath5k_reset.c -@@ -134,14 +134,6 @@ static int ath5k_hw_write_ofdm_timings(struct ath5k_hw *ah, - return 0; - } - -- --/* -- * index into rates for control rates, we can set it up like this because -- * this is only used for AR5212 and we know it supports G mode -- */ --static const unsigned int control_rates[] = -- { 0, 1, 1, 1, 4, 4, 6, 6, 8, 8, 8, 8 }; -- - /** - * ath5k_hw_write_rate_duration - fill rate code to duration table - * -diff --git a/src/drivers/net/ath/ath9k/ar9002_initvals.h b/src/drivers/net/ath/ath9k/ar9002_initvals.h -index d7a5ac0..f9a92c9 100644 ---- a/src/drivers/net/ath/ath9k/ar9002_initvals.h -+++ b/src/drivers/net/ath/ath9k/ar9002_initvals.h -@@ -16,7 +16,7 @@ - - FILE_LICENCE ( BSD2 ); - --static const u32 ar9280Modes_9280_2[][6] = { -+static __unused const u32 ar9280Modes_9280_2[][6] = { - {0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160, 0x000001e0}, - {0x00001070, 0x00000168, 0x000002d0, 0x00000318, 0x0000018c, 0x000001e0}, - {0x000010b0, 0x00000e60, 0x00001cc0, 0x00007c70, 0x00003e38, 0x00001180}, -@@ -65,7 +65,7 @@ static const u32 ar9280Modes_9280_2[][6] = { - {0x00007894, 0x5a508000, 0x5a508000, 0x5a508000, 0x5a508000, 0x5a508000}, - }; - --static const u32 ar9280Common_9280_2[][2] = { -+static __unused const u32 ar9280Common_9280_2[][2] = { - /* Addr allmodes */ - {0x0000000c, 0x00000000}, - {0x00000030, 0x00020015}, -@@ -409,7 +409,7 @@ static const u32 ar9280Common_9280_2[][2] = { - {0x00007898, 0x2a850160}, - }; - --static const u32 ar9280Modes_fast_clock_9280_2[][3] = { -+static __unused const u32 ar9280Modes_fast_clock_9280_2[][3] = { - /* Addr 5G_HT20 5G_HT40 */ - {0x00001030, 0x00000268, 0x000004d0}, - {0x00001070, 0x0000018c, 0x00000318}, -@@ -426,7 +426,7 @@ static const u32 ar9280Modes_fast_clock_9280_2[][3] = { - {0x00009918, 0x0000000b, 0x00000016}, - }; - --static const u32 ar9280Modes_backoff_23db_rxgain_9280_2[][6] = { -+static __unused const u32 ar9280Modes_backoff_23db_rxgain_9280_2[][6] = { - {0x00009a00, 0x00008184, 0x00008184, 0x00000290, 0x00000290, 0x00000290}, - {0x00009a04, 0x00008188, 0x00008188, 0x00000300, 0x00000300, 0x00000300}, - {0x00009a08, 0x0000818c, 0x0000818c, 0x00000304, 0x00000304, 0x00000304}, -@@ -559,7 +559,7 @@ static const u32 ar9280Modes_backoff_23db_rxgain_9280_2[][6] = { - {0x0000a848, 0x00001066, 0x00001066, 0x00001055, 0x00001055, 0x00001055}, - }; - --static const u32 ar9280Modes_original_rxgain_9280_2[][6] = { -+static __unused const u32 ar9280Modes_original_rxgain_9280_2[][6] = { - {0x00009a00, 0x00008184, 0x00008184, 0x00008000, 0x00008000, 0x00008000}, - {0x00009a04, 0x00008188, 0x00008188, 0x00008000, 0x00008000, 0x00008000}, - {0x00009a08, 0x0000818c, 0x0000818c, 0x00008000, 0x00008000, 0x00008000}, -@@ -692,7 +692,7 @@ static const u32 ar9280Modes_original_rxgain_9280_2[][6] = { - {0x0000a848, 0x00001066, 0x00001066, 0x00001063, 0x00001063, 0x00001063}, - }; - --static const u32 ar9280Modes_backoff_13db_rxgain_9280_2[][6] = { -+static __unused const u32 ar9280Modes_backoff_13db_rxgain_9280_2[][6] = { - {0x00009a00, 0x00008184, 0x00008184, 0x00000290, 0x00000290, 0x00000290}, - {0x00009a04, 0x00008188, 0x00008188, 0x00000300, 0x00000300, 0x00000300}, - {0x00009a08, 0x0000818c, 0x0000818c, 0x00000304, 0x00000304, 0x00000304}, -@@ -825,7 +825,7 @@ static const u32 ar9280Modes_backoff_13db_rxgain_9280_2[][6] = { - {0x0000a848, 0x00001066, 0x00001066, 0x0000105a, 0x0000105a, 0x0000105a}, - }; - --static const u32 ar9280Modes_high_power_tx_gain_9280_2[][6] = { -+static __unused const u32 ar9280Modes_high_power_tx_gain_9280_2[][6] = { - {0x0000a274, 0x0a19e652, 0x0a19e652, 0x0a1aa652, 0x0a1aa652, 0x0a1aa652}, - {0x0000a27c, 0x050739ce, 0x050739ce, 0x050739ce, 0x050739ce, 0x050739ce}, - {0x0000a300, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, -@@ -859,7 +859,7 @@ static const u32 ar9280Modes_high_power_tx_gain_9280_2[][6] = { - {0x00007844, 0xf258a480, 0xf258a480, 0xf258a480, 0xf258a480, 0xf258a480}, - }; - --static const u32 ar9280Modes_original_tx_gain_9280_2[][6] = { -+static __unused const u32 ar9280Modes_original_tx_gain_9280_2[][6] = { - {0x0000a274, 0x0a19c652, 0x0a19c652, 0x0a1aa652, 0x0a1aa652, 0x0a1aa652}, - {0x0000a27c, 0x050701ce, 0x050701ce, 0x050701ce, 0x050701ce, 0x050701ce}, - {0x0000a300, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, -@@ -893,7 +893,7 @@ static const u32 ar9280Modes_original_tx_gain_9280_2[][6] = { - {0x00007844, 0x92592480, 0x92592480, 0x92592480, 0x92592480, 0x92592480}, - }; - --static const u32 ar9280PciePhy_clkreq_off_L1_9280[][2] = { -+static __unused const u32 ar9280PciePhy_clkreq_off_L1_9280[][2] = { - /* Addr allmodes */ - {0x00004040, 0x9248fd00}, - {0x00004040, 0x24924924}, -@@ -907,7 +907,7 @@ static const u32 ar9280PciePhy_clkreq_off_L1_9280[][2] = { - {0x00004044, 0x00000000}, - }; - --static const u32 ar9280PciePhy_clkreq_always_on_L1_9280[][2] = { -+static __unused const u32 ar9280PciePhy_clkreq_always_on_L1_9280[][2] = { - /* Addr allmodes */ - {0x00004040, 0x9248fd00}, - {0x00004040, 0x24924924}, -@@ -921,7 +921,7 @@ static const u32 ar9280PciePhy_clkreq_always_on_L1_9280[][2] = { - {0x00004044, 0x00000000}, - }; - --static const u32 ar9285PciePhy_clkreq_always_on_L1_9285[][2] = { -+static __unused const u32 ar9285PciePhy_clkreq_always_on_L1_9285[][2] = { - /* Addr allmodes */ - {0x00004040, 0x9248fd00}, - {0x00004040, 0x24924924}, -@@ -935,7 +935,7 @@ static const u32 ar9285PciePhy_clkreq_always_on_L1_9285[][2] = { - {0x00004044, 0x00000000}, - }; - --static const u32 ar9285PciePhy_clkreq_off_L1_9285[][2] = { -+static __unused const u32 ar9285PciePhy_clkreq_off_L1_9285[][2] = { - /* Addr allmodes */ - {0x00004040, 0x9248fd00}, - {0x00004040, 0x24924924}, -@@ -949,7 +949,7 @@ static const u32 ar9285PciePhy_clkreq_off_L1_9285[][2] = { - {0x00004044, 0x00000000}, - }; - --static const u32 ar9285Modes_9285_1_2[][6] = { -+static __unused const u32 ar9285Modes_9285_1_2[][6] = { - {0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160, 0x000001e0}, - {0x00001070, 0x00000168, 0x000002d0, 0x00000318, 0x0000018c, 0x000001e0}, - {0x000010b0, 0x00000e60, 0x00001cc0, 0x00007c70, 0x00003e38, 0x00001180}, -@@ -1254,7 +1254,7 @@ static const u32 ar9285Modes_9285_1_2[][6] = { - {0x0000a358, 0x7999aa02, 0x7999aa02, 0x7999aa0e, 0x7999aa0e, 0x7999aa0e}, - }; - --static const u32 ar9285Common_9285_1_2[][2] = { -+static __unused const u32 ar9285Common_9285_1_2[][2] = { - /* Addr allmodes */ - {0x0000000c, 0x00000000}, - {0x00000030, 0x00020045}, -@@ -1574,7 +1574,7 @@ static const u32 ar9285Common_9285_1_2[][2] = { - {0x00007870, 0x10142c00}, - }; - --static const u32 ar9285Modes_high_power_tx_gain_9285_1_2[][6] = { -+static __unused const u32 ar9285Modes_high_power_tx_gain_9285_1_2[][6] = { - {0x0000a300, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x0000a304, 0x00000000, 0x00000000, 0x00006200, 0x00006200, 0x00000000}, - {0x0000a308, 0x00000000, 0x00000000, 0x00008201, 0x00008201, 0x00000000}, -@@ -1614,7 +1614,7 @@ static const u32 ar9285Modes_high_power_tx_gain_9285_1_2[][6] = { - {0x0000a3e0, 0x000000e7, 0x000000e7, 0x000000e7, 0x000000e7, 0x000000e7}, - }; - --static const u32 ar9285Modes_original_tx_gain_9285_1_2[][6] = { -+static __unused const u32 ar9285Modes_original_tx_gain_9285_1_2[][6] = { - {0x0000a300, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x0000a304, 0x00000000, 0x00000000, 0x00009200, 0x00009200, 0x00000000}, - {0x0000a308, 0x00000000, 0x00000000, 0x00010208, 0x00010208, 0x00000000}, -@@ -1654,7 +1654,7 @@ static const u32 ar9285Modes_original_tx_gain_9285_1_2[][6] = { - {0x0000a3e0, 0x0000039c, 0x0000039c, 0x0000039c, 0x0000039c, 0x0000039c}, - }; - --static const u32 ar9285Modes_XE2_0_normal_power[][6] = { -+static __unused const u32 ar9285Modes_XE2_0_normal_power[][6] = { - {0x0000a300, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x0000a304, 0x00000000, 0x00000000, 0x00009200, 0x00009200, 0x00000000}, - {0x0000a308, 0x00000000, 0x00000000, 0x00010208, 0x00010208, 0x00000000}, -@@ -1694,7 +1694,7 @@ static const u32 ar9285Modes_XE2_0_normal_power[][6] = { - {0x0000a3e0, 0x0000039c, 0x0000039c, 0x0000039c, 0x0000039c, 0x0000039c}, - }; - --static const u32 ar9285Modes_XE2_0_high_power[][6] = { -+static __unused const u32 ar9285Modes_XE2_0_high_power[][6] = { - {0x0000a300, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x0000a304, 0x00000000, 0x00000000, 0x00006200, 0x00006200, 0x00000000}, - {0x0000a308, 0x00000000, 0x00000000, 0x00008201, 0x00008201, 0x00000000}, -@@ -1734,7 +1734,7 @@ static const u32 ar9285Modes_XE2_0_high_power[][6] = { - {0x0000a3e0, 0x000000e7, 0x000000e7, 0x000000e7, 0x000000e7, 0x000000e7}, - }; - --static const u32 ar9285PciePhy_clkreq_always_on_L1_9285_1_2[][2] = { -+static __unused const u32 ar9285PciePhy_clkreq_always_on_L1_9285_1_2[][2] = { - /* Addr allmodes */ - {0x00004040, 0x9248fd00}, - {0x00004040, 0x24924924}, -@@ -1748,7 +1748,7 @@ static const u32 ar9285PciePhy_clkreq_always_on_L1_9285_1_2[][2] = { - {0x00004044, 0x00000000}, - }; - --static const u32 ar9285PciePhy_clkreq_off_L1_9285_1_2[][2] = { -+static __unused const u32 ar9285PciePhy_clkreq_off_L1_9285_1_2[][2] = { - /* Addr allmodes */ - {0x00004040, 0x9248fd00}, - {0x00004040, 0x24924924}, -@@ -1762,7 +1762,7 @@ static const u32 ar9285PciePhy_clkreq_off_L1_9285_1_2[][2] = { - {0x00004044, 0x00000000}, - }; - --static const u32 ar9287Modes_9287_1_1[][6] = { -+static __unused const u32 ar9287Modes_9287_1_1[][6] = { - {0x00001030, 0x00000000, 0x00000000, 0x000002c0, 0x00000160, 0x000001e0}, - {0x00001070, 0x00000000, 0x00000000, 0x00000318, 0x0000018c, 0x000001e0}, - {0x000010b0, 0x00000000, 0x00000000, 0x00007c70, 0x00003e38, 0x00001180}, -@@ -1808,7 +1808,7 @@ static const u32 ar9287Modes_9287_1_1[][6] = { - {0x0000a3d8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, - }; - --static const u32 ar9287Common_9287_1_1[][2] = { -+static __unused const u32 ar9287Common_9287_1_1[][2] = { - /* Addr allmodes */ - {0x0000000c, 0x00000000}, - {0x00000030, 0x00020015}, -@@ -2177,21 +2177,21 @@ static const u32 ar9287Common_9287_1_1[][2] = { - {0x000078b8, 0x2a850160}, - }; - --static const u32 ar9287Common_normal_cck_fir_coeff_9287_1_1[][2] = { -+static __unused const u32 ar9287Common_normal_cck_fir_coeff_9287_1_1[][2] = { - /* Addr allmodes */ - {0x0000a1f4, 0x00fffeff}, - {0x0000a1f8, 0x00f5f9ff}, - {0x0000a1fc, 0xb79f6427}, - }; - --static const u32 ar9287Common_japan_2484_cck_fir_coeff_9287_1_1[][2] = { -+static __unused const u32 ar9287Common_japan_2484_cck_fir_coeff_9287_1_1[][2] = { - /* Addr allmodes */ - {0x0000a1f4, 0x00000000}, - {0x0000a1f8, 0xefff0301}, - {0x0000a1fc, 0xca9228ee}, - }; - --static const u32 ar9287Modes_tx_gain_9287_1_1[][6] = { -+static __unused const u32 ar9287Modes_tx_gain_9287_1_1[][6] = { - {0x0000a300, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x0000a304, 0x00000000, 0x00000000, 0x00004002, 0x00004002, 0x00004002}, - {0x0000a308, 0x00000000, 0x00000000, 0x00008004, 0x00008004, 0x00008004}, -@@ -2239,7 +2239,7 @@ static const u32 ar9287Modes_tx_gain_9287_1_1[][6] = { - {0x0000a274, 0x0a180000, 0x0a180000, 0x0a1aa000, 0x0a1aa000, 0x0a1aa000}, - }; - --static const u32 ar9287Modes_rx_gain_9287_1_1[][6] = { -+static __unused const u32 ar9287Modes_rx_gain_9287_1_1[][6] = { - {0x00009a00, 0x00000000, 0x00000000, 0x0000a120, 0x0000a120, 0x0000a120}, - {0x00009a04, 0x00000000, 0x00000000, 0x0000a124, 0x0000a124, 0x0000a124}, - {0x00009a08, 0x00000000, 0x00000000, 0x0000a128, 0x0000a128, 0x0000a128}, -@@ -2500,7 +2500,7 @@ static const u32 ar9287Modes_rx_gain_9287_1_1[][6] = { - {0x0000a848, 0x00000000, 0x00000000, 0x00001067, 0x00001067, 0x00001067}, - }; - --static const u32 ar9287PciePhy_clkreq_always_on_L1_9287_1_1[][2] = { -+static __unused const u32 ar9287PciePhy_clkreq_always_on_L1_9287_1_1[][2] = { - /* Addr allmodes */ - {0x00004040, 0x9248fd00}, - {0x00004040, 0x24924924}, -@@ -2514,7 +2514,7 @@ static const u32 ar9287PciePhy_clkreq_always_on_L1_9287_1_1[][2] = { - {0x00004044, 0x00000000}, - }; - --static const u32 ar9287PciePhy_clkreq_off_L1_9287_1_1[][2] = { -+static __unused const u32 ar9287PciePhy_clkreq_off_L1_9287_1_1[][2] = { - /* Addr allmodes */ - {0x00004040, 0x9248fd00}, - {0x00004040, 0x24924924}, -@@ -2528,7 +2528,7 @@ static const u32 ar9287PciePhy_clkreq_off_L1_9287_1_1[][2] = { - {0x00004044, 0x00000000}, - }; - --static const u32 ar9271Modes_9271[][6] = { -+static __unused const u32 ar9271Modes_9271[][6] = { - {0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160, 0x000001e0}, - {0x00001070, 0x00000168, 0x000002d0, 0x00000318, 0x0000018c, 0x000001e0}, - {0x000010b0, 0x00000e60, 0x00001cc0, 0x00007c70, 0x00003e38, 0x00001180}, -@@ -2834,7 +2834,7 @@ static const u32 ar9271Modes_9271[][6] = { - {0x0000a358, 0x7999aa02, 0x7999aa02, 0x7999aa0e, 0x7999aa0e, 0x7999aa0e}, - }; - --static const u32 ar9271Common_9271[][2] = { -+static __unused const u32 ar9271Common_9271[][2] = { - /* Addr allmodes */ - {0x0000000c, 0x00000000}, - {0x00000030, 0x00020045}, -@@ -3163,26 +3163,26 @@ static const u32 ar9271Common_9271[][2] = { - {0x0000d384, 0xf3307ff0}, - }; - --static const u32 ar9271Common_normal_cck_fir_coeff_9271[][2] = { -+static __unused const u32 ar9271Common_normal_cck_fir_coeff_9271[][2] = { - /* Addr allmodes */ - {0x0000a1f4, 0x00fffeff}, - {0x0000a1f8, 0x00f5f9ff}, - {0x0000a1fc, 0xb79f6427}, - }; - --static const u32 ar9271Common_japan_2484_cck_fir_coeff_9271[][2] = { -+static __unused const u32 ar9271Common_japan_2484_cck_fir_coeff_9271[][2] = { - /* Addr allmodes */ - {0x0000a1f4, 0x00000000}, - {0x0000a1f8, 0xefff0301}, - {0x0000a1fc, 0xca9228ee}, - }; - --static const u32 ar9271Modes_9271_1_0_only[][6] = { -+static __unused const u32 ar9271Modes_9271_1_0_only[][6] = { - {0x00009910, 0x30002311, 0x30002311, 0x30002311, 0x30002311, 0x30002311}, - {0x00009828, 0x0a020001, 0x0a020001, 0x0a020001, 0x0a020001, 0x0a020001}, - }; - --static const u32 ar9271Modes_9271_ANI_reg[][6] = { -+static __unused const u32 ar9271Modes_9271_ANI_reg[][6] = { - {0x00009850, 0x6d4000e2, 0x6d4000e2, 0x6d4000e2, 0x6d4000e2, 0x6d4000e2}, - {0x0000985c, 0x3139605e, 0x3139605e, 0x3137605e, 0x3137605e, 0x3139605e}, - {0x00009858, 0x7ec84d2e, 0x7ec84d2e, 0x7ec84d2e, 0x7ec84d2e, 0x7ec84d2e}, -@@ -3193,7 +3193,7 @@ static const u32 ar9271Modes_9271_ANI_reg[][6] = { - {0x000099c0, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4}, - }; - --static const u32 ar9271Modes_normal_power_tx_gain_9271[][6] = { -+static __unused const u32 ar9271Modes_normal_power_tx_gain_9271[][6] = { - {0x0000a300, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, - {0x0000a304, 0x00000000, 0x00000000, 0x00009200, 0x00009200, 0x00000000}, - {0x0000a308, 0x00000000, 0x00000000, 0x00010208, 0x00010208, 0x00000000}, -@@ -3229,7 +3229,7 @@ static const u32 ar9271Modes_normal_power_tx_gain_9271[][6] = { - {0x0000a3e0, 0x000003bd, 0x000003bd, 0x000003bd, 0x000003bd, 0x000003bd}, - }; - --static const u32 ar9271Modes_high_power_tx_gain_9271[][6] = { -+static __unused const u32 ar9271Modes_high_power_tx_gain_9271[][6] = { - {0x0000a300, 0x00000000, 0x00000000, 0x00010000, 0x00010000, 0x00000000}, - {0x0000a304, 0x00000000, 0x00000000, 0x00016200, 0x00016200, 0x00000000}, - {0x0000a308, 0x00000000, 0x00000000, 0x00018201, 0x00018201, 0x00000000}, -diff --git a/src/drivers/net/ath/ath9k/ar9003_2p2_initvals.h b/src/drivers/net/ath/ath9k/ar9003_2p2_initvals.h -index e8ac70d..b1303bb 100644 ---- a/src/drivers/net/ath/ath9k/ar9003_2p2_initvals.h -+++ b/src/drivers/net/ath/ath9k/ar9003_2p2_initvals.h -@@ -19,7 +19,7 @@ - - /* AR9003 2.2 */ - --static const u32 ar9300_2p2_radio_postamble[][5] = { -+static __unused const u32 ar9300_2p2_radio_postamble[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x0001609c, 0x0dd08f29, 0x0dd08f29, 0x0b283f31, 0x0b283f31}, - {0x000160ac, 0xa4653c00, 0xa4653c00, 0x24652800, 0x24652800}, -@@ -32,7 +32,7 @@ static const u32 ar9300_2p2_radio_postamble[][5] = { - {0x00016940, 0x10804008, 0x10804008, 0x50804008, 0x50804008}, - }; - --static const u32 ar9300Modes_lowest_ob_db_tx_gain_table_2p2[][5] = { -+static __unused const u32 ar9300Modes_lowest_ob_db_tx_gain_table_2p2[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x0000a2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352}, - {0x0000a2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584}, -@@ -138,7 +138,7 @@ static const u32 ar9300Modes_lowest_ob_db_tx_gain_table_2p2[][5] = { - {0x00016868, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c}, - }; - --static const u32 ar9300Modes_fast_clock_2p2[][3] = { -+static __unused const u32 ar9300Modes_fast_clock_2p2[][3] = { - /* Addr 5G_HT20 5G_HT40 */ - {0x00001030, 0x00000268, 0x000004d0}, - {0x00001070, 0x0000018c, 0x00000318}, -@@ -151,7 +151,7 @@ static const u32 ar9300Modes_fast_clock_2p2[][3] = { - {0x0000a254, 0x00000898, 0x00001130}, - }; - --static const u32 ar9300_2p2_radio_core[][2] = { -+static __unused const u32 ar9300_2p2_radio_core[][2] = { - /* Addr allmodes */ - {0x00016000, 0x36db6db6}, - {0x00016004, 0x6db6db40}, -@@ -295,7 +295,7 @@ static const u32 ar9300_2p2_radio_core[][2] = { - {0x00016bd4, 0x00000000}, - }; - --static const u32 ar9300Common_rx_gain_table_merlin_2p2[][2] = { -+static __unused const u32 ar9300Common_rx_gain_table_merlin_2p2[][2] = { - /* Addr allmodes */ - {0x0000a000, 0x02000101}, - {0x0000a004, 0x02000102}, -@@ -555,7 +555,7 @@ static const u32 ar9300Common_rx_gain_table_merlin_2p2[][2] = { - {0x0000b1fc, 0x00000776}, - }; - --static const u32 ar9300_2p2_mac_postamble[][5] = { -+static __unused const u32 ar9300_2p2_mac_postamble[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160}, - {0x00001070, 0x00000168, 0x000002d0, 0x00000318, 0x0000018c}, -@@ -567,12 +567,12 @@ static const u32 ar9300_2p2_mac_postamble[][5] = { - {0x00008318, 0x00003e80, 0x00007d00, 0x00006880, 0x00003440}, - }; - --static const u32 ar9300_2p2_soc_postamble[][5] = { -+static __unused const u32 ar9300_2p2_soc_postamble[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x00007010, 0x00000023, 0x00000023, 0x00000023, 0x00000023}, - }; - --static const u32 ar9200_merlin_2p2_radio_core[][2] = { -+static __unused const u32 ar9200_merlin_2p2_radio_core[][2] = { - /* Addr allmodes */ - {0x00007800, 0x00040000}, - {0x00007804, 0xdb005012}, -@@ -614,7 +614,7 @@ static const u32 ar9200_merlin_2p2_radio_core[][2] = { - {0x00007894, 0x5a108000}, - }; - --static const u32 ar9300_2p2_baseband_postamble[][5] = { -+static __unused const u32 ar9300_2p2_baseband_postamble[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8011, 0xd00a8011}, - {0x00009820, 0x206a022e, 0x206a022e, 0x206a012e, 0x206a012e}, -@@ -670,7 +670,7 @@ static const u32 ar9300_2p2_baseband_postamble[][5] = { - {0x0000c284, 0x00000000, 0x00000000, 0x00000150, 0x00000150}, - }; - --static const u32 ar9300_2p2_baseband_core[][2] = { -+static __unused const u32 ar9300_2p2_baseband_core[][2] = { - /* Addr allmodes */ - {0x00009800, 0xafe68e30}, - {0x00009804, 0xfd14e000}, -@@ -833,7 +833,7 @@ static const u32 ar9300_2p2_baseband_core[][2] = { - {0x0000c420, 0x00000000}, - }; - --static const u32 ar9300Modes_high_power_tx_gain_table_2p2[][5] = { -+static __unused const u32 ar9300Modes_high_power_tx_gain_table_2p2[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x0000a2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352}, - {0x0000a2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584}, -@@ -939,7 +939,7 @@ static const u32 ar9300Modes_high_power_tx_gain_table_2p2[][5] = { - {0x00016868, 0x6eb6db6c, 0x6eb6db6c, 0x6eb6db6c, 0x6eb6db6c}, - }; - --static const u32 ar9300Modes_high_ob_db_tx_gain_table_2p2[][5] = { -+static __unused const u32 ar9300Modes_high_ob_db_tx_gain_table_2p2[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x0000a2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352}, - {0x0000a2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584}, -@@ -1045,7 +1045,7 @@ static const u32 ar9300Modes_high_ob_db_tx_gain_table_2p2[][5] = { - {0x00016868, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c}, - }; - --static const u32 ar9300Common_rx_gain_table_2p2[][2] = { -+static __unused const u32 ar9300Common_rx_gain_table_2p2[][2] = { - /* Addr allmodes */ - {0x0000a000, 0x00010000}, - {0x0000a004, 0x00030002}, -@@ -1305,7 +1305,7 @@ static const u32 ar9300Common_rx_gain_table_2p2[][2] = { - {0x0000b1fc, 0x00000196}, - }; - --static const u32 ar9300Modes_low_ob_db_tx_gain_table_2p2[][5] = { -+static __unused const u32 ar9300Modes_low_ob_db_tx_gain_table_2p2[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x0000a2dc, 0x00033800, 0x00033800, 0x03aaa352, 0x03aaa352}, - {0x0000a2e0, 0x0003c000, 0x0003c000, 0x03ccc584, 0x03ccc584}, -@@ -1411,7 +1411,7 @@ static const u32 ar9300Modes_low_ob_db_tx_gain_table_2p2[][5] = { - {0x00016868, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c}, - }; - --static const u32 ar9300_2p2_mac_core[][2] = { -+static __unused const u32 ar9300_2p2_mac_core[][2] = { - /* Addr allmodes */ - {0x00000008, 0x00000000}, - {0x00000030, 0x00020085}, -@@ -1570,7 +1570,7 @@ static const u32 ar9300_2p2_mac_core[][2] = { - {0x000083d0, 0x000301ff}, - }; - --static const u32 ar9300Common_wo_xlna_rx_gain_table_2p2[][2] = { -+static __unused const u32 ar9300Common_wo_xlna_rx_gain_table_2p2[][2] = { - /* Addr allmodes */ - {0x0000a000, 0x00010000}, - {0x0000a004, 0x00030002}, -@@ -1830,7 +1830,7 @@ static const u32 ar9300Common_wo_xlna_rx_gain_table_2p2[][2] = { - {0x0000b1fc, 0x00000196}, - }; - --static const u32 ar9300_2p2_soc_preamble[][2] = { -+static __unused const u32 ar9300_2p2_soc_preamble[][2] = { - /* Addr allmodes */ - {0x000040a4, 0x00a0c1c9}, - {0x00007008, 0x00000000}, -@@ -1840,21 +1840,21 @@ static const u32 ar9300_2p2_soc_preamble[][2] = { - {0x00007048, 0x00000008}, - }; - --static const u32 ar9300PciePhy_pll_on_clkreq_disable_L1_2p2[][2] = { -+static __unused const u32 ar9300PciePhy_pll_on_clkreq_disable_L1_2p2[][2] = { - /* Addr allmodes */ - {0x00004040, 0x0821265e}, - {0x00004040, 0x0008003b}, - {0x00004044, 0x00000000}, - }; - --static const u32 ar9300PciePhy_clkreq_enable_L1_2p2[][2] = { -+static __unused const u32 ar9300PciePhy_clkreq_enable_L1_2p2[][2] = { - /* Addr allmodes */ - {0x00004040, 0x08253e5e}, - {0x00004040, 0x0008003b}, - {0x00004044, 0x00000000}, - }; - --static const u32 ar9300PciePhy_clkreq_disable_L1_2p2[][2] = { -+static __unused const u32 ar9300PciePhy_clkreq_disable_L1_2p2[][2] = { - /* Addr allmodes */ - {0x00004040, 0x08213e5e}, - {0x00004040, 0x0008003b}, -diff --git a/src/drivers/net/ath/ath9k/ar9340_initvals.h b/src/drivers/net/ath/ath9k/ar9340_initvals.h -index 815a8af..784080b 100644 ---- a/src/drivers/net/ath/ath9k/ar9340_initvals.h -+++ b/src/drivers/net/ath/ath9k/ar9340_initvals.h -@@ -17,7 +17,7 @@ - #ifndef INITVALS_9340_H - #define INITVALS_9340_H - --static const u32 ar9340_1p0_radio_postamble[][5] = { -+static __unused const u32 ar9340_1p0_radio_postamble[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x000160ac, 0xa4646800, 0xa4646800, 0xa4646800, 0xa4646800}, - {0x0001610c, 0x08000000, 0x08000000, 0x00000000, 0x00000000}, -@@ -26,7 +26,7 @@ static const u32 ar9340_1p0_radio_postamble[][5] = { - {0x00016540, 0x10804000, 0x10804000, 0x50804000, 0x50804000}, - }; - --static const u32 ar9340Modes_lowest_ob_db_tx_gain_table_1p0[][5] = { -+static __unused const u32 ar9340Modes_lowest_ob_db_tx_gain_table_1p0[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9}, - {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, -@@ -99,7 +99,7 @@ static const u32 ar9340Modes_lowest_ob_db_tx_gain_table_1p0[][5] = { - {0x00016448, 0x24925266, 0x24925266, 0x24925266, 0x24925266}, - }; - --static const u32 ar9340Modes_fast_clock_1p0[][3] = { -+static __unused const u32 ar9340Modes_fast_clock_1p0[][3] = { - /* Addr 5G_HT20 5G_HT40 */ - {0x00001030, 0x00000268, 0x000004d0}, - {0x00001070, 0x0000018c, 0x00000318}, -@@ -112,7 +112,7 @@ static const u32 ar9340Modes_fast_clock_1p0[][3] = { - {0x0000a254, 0x00000898, 0x00001130}, - }; - --static const u32 ar9340_1p0_radio_core[][2] = { -+static __unused const u32 ar9340_1p0_radio_core[][2] = { - /* Addr allmodes */ - {0x00016000, 0x36db6db6}, - {0x00016004, 0x6db6db40}, -@@ -218,13 +218,13 @@ static const u32 ar9340_1p0_radio_core[][2] = { - {0x000167d4, 0x00000000}, - }; - --static const u32 ar9340_1p0_radio_core_40M[][2] = { -+static __unused const u32 ar9340_1p0_radio_core_40M[][2] = { - {0x0001609c, 0x02566f3a}, - {0x000160ac, 0xa4647c00}, - {0x000160b0, 0x01885f5a}, - }; - --static const u32 ar9340_1p0_mac_postamble[][5] = { -+static __unused const u32 ar9340_1p0_mac_postamble[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160}, - {0x00001070, 0x00000168, 0x000002d0, 0x00000318, 0x0000018c}, -@@ -236,12 +236,12 @@ static const u32 ar9340_1p0_mac_postamble[][5] = { - {0x00008318, 0x00003e80, 0x00007d00, 0x00006880, 0x00003440}, - }; - --static const u32 ar9340_1p0_soc_postamble[][5] = { -+static __unused const u32 ar9340_1p0_soc_postamble[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x00007010, 0x00000023, 0x00000023, 0x00000023, 0x00000023}, - }; - --static const u32 ar9340_1p0_baseband_postamble[][5] = { -+static __unused const u32 ar9340_1p0_baseband_postamble[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8011, 0xd00a8011}, - {0x00009820, 0x206a022e, 0x206a022e, 0x206a022e, 0x206a022e}, -@@ -288,7 +288,7 @@ static const u32 ar9340_1p0_baseband_postamble[][5] = { - {0x0000b284, 0x00000000, 0x00000000, 0x00000150, 0x00000150}, - }; - --static const u32 ar9340_1p0_baseband_core[][2] = { -+static __unused const u32 ar9340_1p0_baseband_core[][2] = { - /* Addr allmodes */ - {0x00009800, 0xafe68e30}, - {0x00009804, 0xfd14e000}, -@@ -464,7 +464,7 @@ static const u32 ar9340_1p0_baseband_core[][2] = { - {0x0000b420, 0x00000000}, - }; - --static const u32 ar9340Modes_high_power_tx_gain_table_1p0[][5] = { -+static __unused const u32 ar9340Modes_high_power_tx_gain_table_1p0[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x0000a410, 0x000050d8, 0x000050d8, 0x000050d9, 0x000050d9}, - {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000}, -@@ -537,7 +537,7 @@ static const u32 ar9340Modes_high_power_tx_gain_table_1p0[][5] = { - {0x00016448, 0x24925266, 0x24925266, 0x24925266, 0x24925266}, - }; - --static const u32 ar9340Modes_high_ob_db_tx_gain_table_1p0[][5] = { -+static __unused const u32 ar9340Modes_high_ob_db_tx_gain_table_1p0[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x0000a410, 0x000050d8, 0x000050d8, 0x000050d9, 0x000050d9}, - {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000}, -@@ -609,7 +609,7 @@ static const u32 ar9340Modes_high_ob_db_tx_gain_table_1p0[][5] = { - {0x00016444, 0x03b6d2e4, 0x03b6d2e4, 0x03b6d2e4, 0x03b6d2e4}, - {0x00016448, 0x8e481266, 0x8e481266, 0x8e481266, 0x8e481266}, - }; --static const u32 ar9340Modes_ub124_tx_gain_table_1p0[][5] = { -+static __unused const u32 ar9340Modes_ub124_tx_gain_table_1p0[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x0000a410, 0x000050d8, 0x000050d8, 0x000050d9, 0x000050d9}, - {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000}, -@@ -683,7 +683,7 @@ static const u32 ar9340Modes_ub124_tx_gain_table_1p0[][5] = { - }; - - --static const u32 ar9340Common_rx_gain_table_1p0[][2] = { -+static __unused const u32 ar9340Common_rx_gain_table_1p0[][2] = { - /* Addr allmodes */ - {0x0000a000, 0x00010000}, - {0x0000a004, 0x00030002}, -@@ -943,7 +943,7 @@ static const u32 ar9340Common_rx_gain_table_1p0[][2] = { - {0x0000b1fc, 0x00000196}, - }; - --static const u32 ar9340Modes_low_ob_db_tx_gain_table_1p0[][5] = { -+static __unused const u32 ar9340Modes_low_ob_db_tx_gain_table_1p0[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9}, - {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, -@@ -1016,7 +1016,7 @@ static const u32 ar9340Modes_low_ob_db_tx_gain_table_1p0[][5] = { - {0x00016448, 0x24925266, 0x24925266, 0x24925266, 0x24925266}, - }; - --static const u32 ar9340Modes_mixed_ob_db_tx_gain_table_1p0[][5] = { -+static __unused const u32 ar9340Modes_mixed_ob_db_tx_gain_table_1p0[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9}, - {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, -@@ -1089,7 +1089,7 @@ static const u32 ar9340Modes_mixed_ob_db_tx_gain_table_1p0[][5] = { - {0x00016448, 0x24927266, 0x24927266, 0x8e482266, 0x8e482266}, - }; - --static const u32 ar9340_1p0_mac_core[][2] = { -+static __unused const u32 ar9340_1p0_mac_core[][2] = { - /* Addr allmodes */ - {0x00000008, 0x00000000}, - {0x00000030, 0x00020085}, -@@ -1253,7 +1253,7 @@ static const u32 ar9340_1p0_mac_core[][2] = { - {0x000083d0, 0x000301ff}, - }; - --static const u32 ar9340Common_wo_xlna_rx_gain_table_1p0[][2] = { -+static __unused const u32 ar9340Common_wo_xlna_rx_gain_table_1p0[][2] = { - /* Addr allmodes */ - {0x0000a000, 0x00010000}, - {0x0000a004, 0x00030002}, -@@ -1513,7 +1513,7 @@ static const u32 ar9340Common_wo_xlna_rx_gain_table_1p0[][2] = { - {0x0000b1fc, 0x00000196}, - }; - --static const u32 ar9340_1p0_soc_preamble[][2] = { -+static __unused const u32 ar9340_1p0_soc_preamble[][2] = { - /* Addr allmodes */ - {0x000040a4, 0x00a0c1c9}, - {0x00007008, 0x00000000}, -diff --git a/src/drivers/net/ath/ath9k/ar9485_initvals.h b/src/drivers/net/ath/ath9k/ar9485_initvals.h -index 611ea6c..c854398 100644 ---- a/src/drivers/net/ath/ath9k/ar9485_initvals.h -+++ b/src/drivers/net/ath/ath9k/ar9485_initvals.h -@@ -17,7 +17,7 @@ - #ifndef INITVALS_9485_H - #define INITVALS_9485_H - --static const u32 ar9485_1_1_mac_core[][2] = { -+static __unused const u32 ar9485_1_1_mac_core[][2] = { - /* Addr allmodes */ - {0x00000008, 0x00000000}, - {0x00000030, 0x00020085}, -@@ -179,7 +179,7 @@ static const u32 ar9485_1_1_mac_core[][2] = { - {0x000083d0, 0x000301ff}, - }; - --static const u32 ar9485_1_1_baseband_core[][2] = { -+static __unused const u32 ar9485_1_1_baseband_core[][2] = { - /* Addr allmodes */ - {0x00009800, 0xafe68e30}, - {0x00009804, 0xfd14e000}, -@@ -316,7 +316,7 @@ static const u32 ar9485_1_1_baseband_core[][2] = { - {0x0000a7dc, 0x00000000}, - }; - --static const u32 ar9485Common_1_1[][2] = { -+static __unused const u32 ar9485Common_1_1[][2] = { - /* Addr allmodes */ - {0x00007010, 0x00000022}, - {0x00007020, 0x00000000}, -@@ -324,7 +324,7 @@ static const u32 ar9485Common_1_1[][2] = { - {0x00007038, 0x000004c2}, - }; - --static const u32 ar9485_1_1_baseband_postamble[][5] = { -+static __unused const u32 ar9485_1_1_baseband_postamble[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8005, 0xd00a8005}, - {0x00009820, 0x206a002e, 0x206a002e, 0x206a002e, 0x206a002e}, -@@ -369,7 +369,7 @@ static const u32 ar9485_1_1_baseband_postamble[][5] = { - {0x0000be18, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, - }; - --static const u32 ar9485Modes_high_ob_db_tx_gain_1_1[][5] = { -+static __unused const u32 ar9485Modes_high_ob_db_tx_gain_1_1[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x000098bc, 0x00000002, 0x00000002, 0x00000002, 0x00000002}, - {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d8, 0x000050d8}, -@@ -442,7 +442,7 @@ static const u32 ar9485Modes_high_ob_db_tx_gain_1_1[][5] = { - {0x00016048, 0x6c924260, 0x6c924260, 0x6c924260, 0x6c924260}, - }; - --static const u32 ar9485_modes_lowest_ob_db_tx_gain_1_1[][5] = { -+static __unused const u32 ar9485_modes_lowest_ob_db_tx_gain_1_1[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x000098bc, 0x00000002, 0x00000002, 0x00000002, 0x00000002}, - {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d8, 0x000050d8}, -@@ -515,7 +515,7 @@ static const u32 ar9485_modes_lowest_ob_db_tx_gain_1_1[][5] = { - {0x00016048, 0x6c924260, 0x6c924260, 0x6c924260, 0x6c924260}, - }; - --static const u32 ar9485_1_1_radio_postamble[][2] = { -+static __unused const u32 ar9485_1_1_radio_postamble[][2] = { - /* Addr allmodes */ - {0x0001609c, 0x0b283f31}, - {0x000160ac, 0x24611800}, -@@ -524,7 +524,7 @@ static const u32 ar9485_1_1_radio_postamble[][2] = { - {0x00016140, 0x10804008}, - }; - --static const u32 ar9485_1_1_mac_postamble[][5] = { -+static __unused const u32 ar9485_1_1_mac_postamble[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160}, - {0x00001070, 0x00000168, 0x000002d0, 0x00000318, 0x0000018c}, -@@ -536,7 +536,7 @@ static const u32 ar9485_1_1_mac_postamble[][5] = { - {0x00008318, 0x00003e80, 0x00007d00, 0x00006880, 0x00003440}, - }; - --static const u32 ar9485_1_1_radio_core[][2] = { -+static __unused const u32 ar9485_1_1_radio_core[][2] = { - /* Addr allmodes */ - {0x00016000, 0x36db6db6}, - {0x00016004, 0x6db6db40}, -@@ -601,14 +601,14 @@ static const u32 ar9485_1_1_radio_core[][2] = { - {0x00016c44, 0x12000000}, - }; - --static const u32 ar9485_1_1_pcie_phy_pll_on_clkreq_enable_L1[][2] = { -+static __unused const u32 ar9485_1_1_pcie_phy_pll_on_clkreq_enable_L1[][2] = { - /* Addr allmodes */ - {0x00018c00, 0x10052e5e}, - {0x00018c04, 0x000801d8}, - {0x00018c08, 0x0000080c}, - }; - --static const u32 ar9485Modes_high_power_tx_gain_1_1[][5] = { -+static __unused const u32 ar9485Modes_high_power_tx_gain_1_1[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x000098bc, 0x00000002, 0x00000002, 0x00000002, 0x00000002}, - {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d8, 0x000050d8}, -@@ -681,7 +681,7 @@ static const u32 ar9485Modes_high_power_tx_gain_1_1[][5] = { - {0x00016048, 0x6c924260, 0x6c924260, 0x6c924260, 0x6c924260}, - }; - --static const u32 ar9485_1_1[][2] = { -+static __unused const u32 ar9485_1_1[][2] = { - /* Addr allmodes */ - {0x0000a580, 0x00000000}, - {0x0000a584, 0x00000000}, -@@ -701,7 +701,7 @@ static const u32 ar9485_1_1[][2] = { - {0x0000a5bc, 0x00000000}, - }; - --static const u32 ar9485_modes_green_ob_db_tx_gain_1_1[][5] = { -+static __unused const u32 ar9485_modes_green_ob_db_tx_gain_1_1[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x000098bc, 0x00000003, 0x00000003, 0x00000003, 0x00000003}, - {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d8, 0x000050d8}, -@@ -774,14 +774,14 @@ static const u32 ar9485_modes_green_ob_db_tx_gain_1_1[][5] = { - {0x00016048, 0x6c924260, 0x6c924260, 0x6c924260, 0x6c924260}, - }; - --static const u32 ar9485_1_1_pcie_phy_clkreq_disable_L1[][2] = { -+static __unused const u32 ar9485_1_1_pcie_phy_clkreq_disable_L1[][2] = { - /* Addr allmodes */ - {0x00018c00, 0x10013e5e}, - {0x00018c04, 0x000801d8}, - {0x00018c08, 0x0000080c}, - }; - --static const u32 ar9485_1_1_soc_preamble[][2] = { -+static __unused const u32 ar9485_1_1_soc_preamble[][2] = { - /* Addr allmodes */ - {0x00004014, 0xba280400}, - {0x00004090, 0x00aa10aa}, -@@ -793,14 +793,14 @@ static const u32 ar9485_1_1_soc_preamble[][2] = { - {0x00007048, 0x00000002}, - }; - --static const u32 ar9485_1_1_baseband_core_txfir_coeff_japan_2484[][2] = { -+static __unused const u32 ar9485_1_1_baseband_core_txfir_coeff_japan_2484[][2] = { - /* Addr allmodes */ - {0x0000a398, 0x00000000}, - {0x0000a39c, 0x6f7f0301}, - {0x0000a3a0, 0xca9228ee}, - }; - --static const u32 ar9485Modes_low_ob_db_tx_gain_1_1[][5] = { -+static __unused const u32 ar9485Modes_low_ob_db_tx_gain_1_1[][5] = { - /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ - {0x000098bc, 0x00000002, 0x00000002, 0x00000002, 0x00000002}, - {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d8, 0x000050d8}, -@@ -873,21 +873,21 @@ static const u32 ar9485Modes_low_ob_db_tx_gain_1_1[][5] = { - {0x00016048, 0x6c924260, 0x6c924260, 0x6c924260, 0x6c924260}, - }; - --static const u32 ar9485_fast_clock_1_1_baseband_postamble[][3] = { -+static __unused const u32 ar9485_fast_clock_1_1_baseband_postamble[][3] = { - /* Addr 5G_HT2 5G_HT40 */ - {0x00009e00, 0x03721821, 0x03721821}, - {0x0000a230, 0x0000400b, 0x00004016}, - {0x0000a254, 0x00000898, 0x00001130}, - }; - --static const u32 ar9485_1_1_pcie_phy_pll_on_clkreq_disable_L1[][2] = { -+static __unused const u32 ar9485_1_1_pcie_phy_pll_on_clkreq_disable_L1[][2] = { - /* Addr allmodes */ - {0x00018c00, 0x10012e5e}, - {0x00018c04, 0x000801d8}, - {0x00018c08, 0x0000080c}, - }; - --static const u32 ar9485_common_rx_gain_1_1[][2] = { -+static __unused const u32 ar9485_common_rx_gain_1_1[][2] = { - /* Addr allmodes */ - {0x0000a000, 0x00010000}, - {0x0000a004, 0x00030002}, -@@ -1019,14 +1019,14 @@ static const u32 ar9485_common_rx_gain_1_1[][2] = { - {0x0000a1fc, 0x00000296}, - }; - --static const u32 ar9485_1_1_pcie_phy_clkreq_enable_L1[][2] = { -+static __unused const u32 ar9485_1_1_pcie_phy_clkreq_enable_L1[][2] = { - /* Addr allmodes */ - {0x00018c00, 0x10053e5e}, - {0x00018c04, 0x000801d8}, - {0x00018c08, 0x0000080c}, - }; - --static const u32 ar9485Common_wo_xlna_rx_gain_1_1[][2] = { -+static __unused const u32 ar9485Common_wo_xlna_rx_gain_1_1[][2] = { - /* Addr allmodes */ - {0x0000a000, 0x00060005}, - {0x0000a004, 0x00810080}, -diff --git a/src/drivers/net/ath/ath9k/ath9k_init.c b/src/drivers/net/ath/ath9k/ath9k_init.c -index 03de770..98a0d6d 100644 ---- a/src/drivers/net/ath/ath9k/ath9k_init.c -+++ b/src/drivers/net/ath/ath9k/ath9k_init.c -@@ -22,6 +22,7 @@ FILE_LICENCE ( BSD2 ); - #include - #include - #include -+#include - - #include "ath9k.h" - -@@ -349,7 +350,7 @@ static void ath9k_init_misc(struct ath_softc *sc) - ath9k_hw_set_diversity(sc->sc_ah, 1); - sc->rx.defant = ath9k_hw_getdefantenna(sc->sc_ah); - -- memcpy(common->bssidmask, ath_bcast_mac, ETH_ALEN); -+ memcpy(common->bssidmask, eth_broadcast, ETH_ALEN); - } - - static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid, --- -1.9.0 - diff --git a/ipxe-ath9k-Fix-buffer-overrun-for-ar9287.patch b/ipxe-ath9k-Fix-buffer-overrun-for-ar9287.patch deleted file mode 100644 index 5b104d5f..00000000 --- a/ipxe-ath9k-Fix-buffer-overrun-for-ar9287.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 858f56e68b7089a3dc8473bb94dd198554a24eeb Mon Sep 17 00:00:00 2001 -From: Christian Hesse -Date: Sat, 7 May 2016 21:20:37 +0200 -Subject: [PATCH] [ath9k] Fix buffer overrun for ar9287 - -This backport is from linux kernel upstream commit 83d6f1f ("ath9k: -fix buffer overrun for ar9287"). - -Signed-off-by: Christian Hesse -Signed-off-by: Michael Brown -Signed-off-by: Bruce Rogers ---- - src/drivers/net/ath/ath9k/ath9k_eeprom.c | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -diff --git a/src/drivers/net/ath/ath9k/ath9k_eeprom.c b/src/drivers/net/ath/ath9k/ath9k_eeprom.c -index f552aca..a204237 100644 ---- a/src/drivers/net/ath/ath9k/ath9k_eeprom.c -+++ b/src/drivers/net/ath/ath9k/ath9k_eeprom.c -@@ -368,10 +368,9 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah, - - if (match) { - if (AR_SREV_9287(ah)) { -- /* FIXME: array overrun? */ - for (i = 0; i < numXpdGains; i++) { - minPwrT4[i] = data_9287[idxL].pwrPdg[i][0]; -- maxPwrT4[i] = data_9287[idxL].pwrPdg[i][4]; -+ maxPwrT4[i] = data_9287[idxL].pwrPdg[i][intercepts - 1]; - ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i], - data_9287[idxL].pwrPdg[i], - data_9287[idxL].vpdPdg[i], -@@ -381,7 +380,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah, - } else if (eeprom_4k) { - for (i = 0; i < numXpdGains; i++) { - minPwrT4[i] = data_4k[idxL].pwrPdg[i][0]; -- maxPwrT4[i] = data_4k[idxL].pwrPdg[i][4]; -+ maxPwrT4[i] = data_4k[idxL].pwrPdg[i][intercepts - 1]; - ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i], - data_4k[idxL].pwrPdg[i], - data_4k[idxL].vpdPdg[i], -@@ -391,7 +390,7 @@ void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah, - } else { - for (i = 0; i < numXpdGains; i++) { - minPwrT4[i] = data_def[idxL].pwrPdg[i][0]; -- maxPwrT4[i] = data_def[idxL].pwrPdg[i][4]; -+ maxPwrT4[i] = data_def[idxL].pwrPdg[i][intercepts - 1]; - ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i], - data_def[idxL].pwrPdg[i], - data_def[idxL].vpdPdg[i], --- -1.9.0 - diff --git a/ipxe-efi-fix-garbage-bytes-in-device-path.patch b/ipxe-efi-fix-garbage-bytes-in-device-path.patch deleted file mode 100644 index af746f0e..00000000 --- a/ipxe-efi-fix-garbage-bytes-in-device-path.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 632e57f0f36d9b48f574db273a19e26bf592fc99 Mon Sep 17 00:00:00 2001 -From: Michael Brown -Date: Wed, 22 Jun 2016 09:07:20 +0100 -Subject: [PATCH] [efi] Do not copy garbage bytes into SNP device path MAC - address - -The SNP device path includes the network device's MAC address within -the MAC_ADDR_DEVICE_PATH.MacAddress field. We check that the -link-layer address will fit within this field, and then perform the -copy using the length of the destination buffer. - -At 32 bytes, the MacAddress field is actually larger than the current -maximum iPXE link-layer address. The copy therefore overflows the -source buffer, resulting in trailing garbage bytes being appended to -the device path's MacAddress. This is invisible in debug messages, -since the DevicePathToText protocol will render only the length -implied by the interface type. - -Fix by copying only the actual length of the link-layer address (which -we have already verified will not overflow the destination buffer). - -Debugged-by: Laszlo Ersek -Signed-off-by: Michael Brown ---- - src/interface/efi/efi_snp.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: ipxe/src/interface/efi/efi_snp.c -=================================================================== ---- ipxe.orig/src/interface/efi/efi_snp.c -+++ ipxe/src/interface/efi/efi_snp.c -@@ -1049,7 +1049,7 @@ static int efi_snp_probe ( struct net_de - macpath->Header.SubType = MSG_MAC_ADDR_DP; - macpath->Header.Length[0] = sizeof ( *macpath ); - memcpy ( &macpath->MacAddress, netdev->ll_addr, -- sizeof ( macpath->MacAddress ) ); -+ netdev->ll_protocol->ll_addr_len ); - macpath->IfType = ntohs ( netdev->ll_protocol->ll_proto ); - memset ( path_end, 0, sizeof ( *path_end ) ); - path_end->Type = END_DEVICE_PATH_TYPE; diff --git a/ipxe-efi-fix-uninitialised-data-in-HII.patch b/ipxe-efi-fix-uninitialised-data-in-HII.patch deleted file mode 100644 index 6c118112..00000000 --- a/ipxe-efi-fix-uninitialised-data-in-HII.patch +++ /dev/null @@ -1,35 +0,0 @@ -From c9f6a8605955926017cdbe2fa99a4b72fd0985a2 Mon Sep 17 00:00:00 2001 -From: Michael Brown -Date: Wed, 29 Jun 2016 15:13:35 +0100 -Subject: [PATCH] [efi] Fix uninitialised data in HII IFR structures - -The HII IFR structures are allocated via realloc() rather than -zalloc(), and so are not automatically zeroed. This results in the -presence of uninitialised and invalid data, causing crashes elsewhere -in the UEFI firmware. - -Fix by explicitly zeroing the newly allocated portion of any IFR -structure in efi_ifr_op(). - -Debugged-by: Laszlo Ersek -Debugged-by: Gary Lin -Signed-off-by: Michael Brown ---- - src/interface/efi/efi_hii.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/interface/efi/efi_hii.c b/src/interface/efi/efi_hii.c -index 0ea970e..506fc88 100644 ---- a/src/interface/efi/efi_hii.c -+++ b/src/interface/efi/efi_hii.c -@@ -117,6 +117,7 @@ static void * efi_ifr_op ( struct efi_ifr_builder *ifr, unsigned int opcode, - ifr->ops_len = new_ops_len; - - /* Fill in opcode header */ -+ memset ( op, 0, len ); - op->OpCode = opcode; - op->Length = len; - --- -2.8.4 - diff --git a/ipxe-legacy-Fix-building-with-GCC-6.patch b/ipxe-legacy-Fix-building-with-GCC-6.patch deleted file mode 100644 index 4bb07f0a..00000000 --- a/ipxe-legacy-Fix-building-with-GCC-6.patch +++ /dev/null @@ -1,28 +0,0 @@ -From a5885fbc19c4b60dc1a21624d1a9d1b77a93504e Mon Sep 17 00:00:00 2001 -From: Michael Brown -Date: Wed, 4 May 2016 15:58:14 +0100 -Subject: [PATCH] [legacy] Fix building with GCC 6 - -Signed-off-by: Michael Brown -Signed-off-by: Bruce Rogers ---- - src/include/nic.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/include/nic.h b/src/include/nic.h -index 4c91f57..8b06e88 100644 ---- a/src/include/nic.h -+++ b/src/include/nic.h -@@ -209,7 +209,8 @@ static inline void * legacy_isa_get_drvdata ( void *hwdev ) { - - #undef DRIVER - #define DRIVER(_name_text,_unused2,_unused3,_name,_probe,_disable) \ -- static const char _name ## _text[] = _name_text; \ -+ static __attribute__ (( unused )) const char \ -+ _name ## _text[] = _name_text; \ - static inline int \ - _name ## _probe ( struct nic *nic, void *hwdev ) { \ - return _probe ( nic, hwdev ); \ --- -1.9.0 - diff --git a/ipxe-mucurses-Fix-GCC-6-nonnull-compare-errors.patch b/ipxe-mucurses-Fix-GCC-6-nonnull-compare-errors.patch deleted file mode 100644 index bca88a50..00000000 --- a/ipxe-mucurses-Fix-GCC-6-nonnull-compare-errors.patch +++ /dev/null @@ -1,67 +0,0 @@ -From e2f14c2f8c10674dbbd4f1228d79dc4c9be213b5 Mon Sep 17 00:00:00 2001 -From: Vinson Lee -Date: Fri, 15 Apr 2016 22:38:35 +0000 -Subject: [PATCH] [mucurses] Fix GCC 6 nonnull-compare errors - -Remove null checks for arguments declared as nonnull. - -Signed-off-by: Vinson Lee -Signed-off-by: Michael Brown -Signed-off-by: Bruce Rogers ---- - src/hci/mucurses/windows.c | 11 ----------- - 1 file changed, 11 deletions(-) - -diff --git a/src/hci/mucurses/windows.c b/src/hci/mucurses/windows.c -index 7f39bde..5f5d1f4 100644 ---- a/src/hci/mucurses/windows.c -+++ b/src/hci/mucurses/windows.c -@@ -18,9 +18,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); - * @ret rc return status code - */ - int delwin ( WINDOW *win ) { -- if ( win == NULL ) -- return ERR; -- - /* I think we should blank the region covered by the window - - ncurses doesn't do this, but they have a buffer, so they - may just be deleting from an offscreen context whereas we -@@ -51,8 +48,6 @@ int delwin ( WINDOW *win ) { - WINDOW *derwin ( WINDOW *parent, int nlines, int ncols, - int begin_y, int begin_x ) { - WINDOW *child; -- if ( parent == NULL ) -- return NULL; - if ( ( child = malloc( sizeof( WINDOW ) ) ) == NULL ) - return NULL; - if ( ( (unsigned)ncols > parent->width ) || -@@ -75,8 +70,6 @@ WINDOW *derwin ( WINDOW *parent, int nlines, int ncols, - */ - WINDOW *dupwin ( WINDOW *orig ) { - WINDOW *copy; -- if ( orig == NULL ) -- return NULL; - if ( ( copy = malloc( sizeof( WINDOW ) ) ) == NULL ) - return NULL; - copy->scr = orig->scr; -@@ -99,8 +92,6 @@ WINDOW *dupwin ( WINDOW *orig ) { - * @ret rc return status code - */ - int mvwin ( WINDOW *win, int y, int x ) { -- if ( win == NULL ) -- return ERR; - if ( ( ( (unsigned)y + win->height ) > LINES ) || - ( ( (unsigned)x + win->width ) > COLS ) ) - return ERR; -@@ -149,8 +140,6 @@ WINDOW *newwin ( int nlines, int ncols, int begin_y, int begin_x ) { - WINDOW *subwin ( WINDOW *parent, int nlines, int ncols, - int begin_y, int begin_x ) { - WINDOW *child; -- if ( parent == NULL ) -- return NULL; - if ( ( child = malloc( sizeof( WINDOW ) ) ) == NULL ) - return NULL; - child = newwin( nlines, ncols, begin_y, begin_x ); --- -1.9.0 - diff --git a/ipxe-sis190-Fix-building-with-GCC-6.patch b/ipxe-sis190-Fix-building-with-GCC-6.patch deleted file mode 100644 index 693d0b42..00000000 --- a/ipxe-sis190-Fix-building-with-GCC-6.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 65b32a0b7000f70a5bb1d33190d40f9b04c93172 Mon Sep 17 00:00:00 2001 -From: Michael Brown -Date: Wed, 4 May 2016 15:53:52 +0100 -Subject: [PATCH] [sis190] Fix building with GCC 6 - -Signed-off-by: Michael Brown -Signed-off-by: Bruce Rogers ---- - src/drivers/net/sis190.c | 6 ------ - src/drivers/net/sis190.h | 7 ------- - 2 files changed, 13 deletions(-) - -diff --git a/src/drivers/net/sis190.c b/src/drivers/net/sis190.c -index 991c30f..81f3d98 100644 ---- a/src/drivers/net/sis190.c -+++ b/src/drivers/net/sis190.c -@@ -72,12 +72,6 @@ struct pci_driver sis190_isa_bridge_driver __pci_driver = { - static const u32 sis190_intr_mask = - RxQEmpty | RxQInt | TxQ1Int | TxQ0Int | RxHalt | TxHalt | LinkChange; - --/* -- * Maximum number of multicast addresses to filter (vs. Rx-all-multicast). -- * The chips use a 64 element hash table based on the Ethernet CRC. -- */ --static const int multicast_filter_limit = 32; -- - static void __mdio_cmd(void *ioaddr, u32 ctl) - { - unsigned int i; -diff --git a/src/drivers/net/sis190.h b/src/drivers/net/sis190.h -index 0551333..79f94d2 100644 ---- a/src/drivers/net/sis190.h -+++ b/src/drivers/net/sis190.h -@@ -297,13 +297,6 @@ static struct mii_chip_info { - { NULL, { 0x00, 0x00 }, 0, 0 } - }; - --static const struct { -- const char *name; --} sis_chip_info[] = { -- { "SiS 190 PCI Fast Ethernet adapter" }, -- { "SiS 191 PCI Gigabit Ethernet adapter" }, --}; -- - static void sis190_phy_task(struct sis190_private *tp); - static void sis190_free(struct net_device *dev); - static inline void sis190_init_rxfilter(struct net_device *dev); --- -1.9.0 - diff --git a/ipxe-skge-Fix-building-with-GCC-6.patch b/ipxe-skge-Fix-building-with-GCC-6.patch deleted file mode 100644 index 130dc7e8..00000000 --- a/ipxe-skge-Fix-building-with-GCC-6.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 76ec2a0540b25dbd183b9ce185583a4b24278cf1 Mon Sep 17 00:00:00 2001 -From: Michael Brown -Date: Wed, 4 May 2016 15:54:10 +0100 -Subject: [PATCH] [skge] Fix building with GCC 6 - -Signed-off-by: Michael Brown -Signed-off-by: Bruce Rogers ---- - src/drivers/net/skge.c | 5 ----- - 1 file changed, 5 deletions(-) - -diff --git a/src/drivers/net/skge.c b/src/drivers/net/skge.c -index 6384e76..c326422 100755 ---- a/src/drivers/net/skge.c -+++ b/src/drivers/net/skge.c -@@ -84,9 +84,6 @@ static struct net_device_operations skge_operations = { - /* Avoid conditionals by using array */ - static const int txqaddr[] = { Q_XA1, Q_XA2 }; - static const int rxqaddr[] = { Q_R1, Q_R2 }; --static const u32 rxirqmask[] = { IS_R1_F, IS_R2_F }; --static const u32 txirqmask[] = { IS_XA1_F, IS_XA2_F }; --static const u32 napimask[] = { IS_R1_F|IS_XA1_F, IS_R2_F|IS_XA2_F }; - static const u32 portmask[] = { IS_PORT_1, IS_PORT_2 }; - - /* Determine supported/advertised modes based on hardware. -@@ -1922,8 +1919,6 @@ static void skge_tx_clean(struct net_device *dev) - skge->tx_ring.to_clean = e; - } - --static const u8 pause_mc_addr[ETH_ALEN] = { 0x1, 0x80, 0xc2, 0x0, 0x0, 0x1 }; -- - static inline u16 phy_length(const struct skge_hw *hw, u32 status) - { - if (hw->chip_id == CHIP_ID_GENESIS) --- -1.9.0 - diff --git a/ipxe-util-v5.24-perl-errors-on-redeclare.patch b/ipxe-util-v5.24-perl-errors-on-redeclare.patch deleted file mode 100644 index 42f20262..00000000 --- a/ipxe-util-v5.24-perl-errors-on-redeclare.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 8eed6cfa2540976fab0e6ce93c82f413cf3f4e5e Mon Sep 17 00:00:00 2001 -From: Bruce Rogers -Date: Wed, 1 Jun 2016 13:00:46 -0600 -Subject: [PATCH] util: v5.24 perl errors on redeclare - -I get this error using perl v5.24: -Can't redeclare "my" in "my" at ./util/parserom.pl -line 160, near ", " - -From what I can gather, we don't need those additional -"my"'s in the statement. - -Signed-off-by: Bruce Rogers ---- - src/util/parserom.pl | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/util/parserom.pl b/src/util/parserom.pl -index 28df606..5a849a5 100755 ---- a/src/util/parserom.pl -+++ b/src/util/parserom.pl -@@ -157,7 +157,7 @@ sub process_isa_rom { - - # Output Makefile rules for the specified ROM declarations - sub print_make_rules { -- my ( $state, my $image, my $desc, my $vendor, my $device, my $dup ) = @_; -+ my ( $state, $image, $desc, $vendor, $device, $dup ) = @_; - unless ( $state->{'is_header_printed'} ) { - print "# NIC\t\n"; - print "# NIC\tfamily\t$state->{family}\n"; --- -1.9.0 - diff --git a/kvm_stat b/kvm_stat index ff636441..c54057df 100644 --- a/kvm_stat +++ b/kvm_stat @@ -12,193 +12,315 @@ # the COPYING file in the top-level directory. import curses -import sys, os, time, optparse +import sys +import os +import time +import optparse +import ctypes +import fcntl +import resource +import struct +import re +from collections import defaultdict +from time import sleep -class DebugfsProvider(object): +VMX_EXIT_REASONS = { + 'EXCEPTION_NMI': 0, + 'EXTERNAL_INTERRUPT': 1, + 'TRIPLE_FAULT': 2, + 'PENDING_INTERRUPT': 7, + 'NMI_WINDOW': 8, + 'TASK_SWITCH': 9, + 'CPUID': 10, + 'HLT': 12, + 'INVLPG': 14, + 'RDPMC': 15, + 'RDTSC': 16, + 'VMCALL': 18, + 'VMCLEAR': 19, + 'VMLAUNCH': 20, + 'VMPTRLD': 21, + 'VMPTRST': 22, + 'VMREAD': 23, + 'VMRESUME': 24, + 'VMWRITE': 25, + 'VMOFF': 26, + 'VMON': 27, + 'CR_ACCESS': 28, + 'DR_ACCESS': 29, + 'IO_INSTRUCTION': 30, + 'MSR_READ': 31, + 'MSR_WRITE': 32, + 'INVALID_STATE': 33, + 'MWAIT_INSTRUCTION': 36, + 'MONITOR_INSTRUCTION': 39, + 'PAUSE_INSTRUCTION': 40, + 'MCE_DURING_VMENTRY': 41, + 'TPR_BELOW_THRESHOLD': 43, + 'APIC_ACCESS': 44, + 'EPT_VIOLATION': 48, + 'EPT_MISCONFIG': 49, + 'WBINVD': 54, + 'XSETBV': 55, + 'APIC_WRITE': 56, + 'INVPCID': 58, +} + +SVM_EXIT_REASONS = { + 'READ_CR0': 0x000, + 'READ_CR3': 0x003, + 'READ_CR4': 0x004, + 'READ_CR8': 0x008, + 'WRITE_CR0': 0x010, + 'WRITE_CR3': 0x013, + 'WRITE_CR4': 0x014, + 'WRITE_CR8': 0x018, + 'READ_DR0': 0x020, + 'READ_DR1': 0x021, + 'READ_DR2': 0x022, + 'READ_DR3': 0x023, + 'READ_DR4': 0x024, + 'READ_DR5': 0x025, + 'READ_DR6': 0x026, + 'READ_DR7': 0x027, + 'WRITE_DR0': 0x030, + 'WRITE_DR1': 0x031, + 'WRITE_DR2': 0x032, + 'WRITE_DR3': 0x033, + 'WRITE_DR4': 0x034, + 'WRITE_DR5': 0x035, + 'WRITE_DR6': 0x036, + 'WRITE_DR7': 0x037, + 'EXCP_BASE': 0x040, + 'INTR': 0x060, + 'NMI': 0x061, + 'SMI': 0x062, + 'INIT': 0x063, + 'VINTR': 0x064, + 'CR0_SEL_WRITE': 0x065, + 'IDTR_READ': 0x066, + 'GDTR_READ': 0x067, + 'LDTR_READ': 0x068, + 'TR_READ': 0x069, + 'IDTR_WRITE': 0x06a, + 'GDTR_WRITE': 0x06b, + 'LDTR_WRITE': 0x06c, + 'TR_WRITE': 0x06d, + 'RDTSC': 0x06e, + 'RDPMC': 0x06f, + 'PUSHF': 0x070, + 'POPF': 0x071, + 'CPUID': 0x072, + 'RSM': 0x073, + 'IRET': 0x074, + 'SWINT': 0x075, + 'INVD': 0x076, + 'PAUSE': 0x077, + 'HLT': 0x078, + 'INVLPG': 0x079, + 'INVLPGA': 0x07a, + 'IOIO': 0x07b, + 'MSR': 0x07c, + 'TASK_SWITCH': 0x07d, + 'FERR_FREEZE': 0x07e, + 'SHUTDOWN': 0x07f, + 'VMRUN': 0x080, + 'VMMCALL': 0x081, + 'VMLOAD': 0x082, + 'VMSAVE': 0x083, + 'STGI': 0x084, + 'CLGI': 0x085, + 'SKINIT': 0x086, + 'RDTSCP': 0x087, + 'ICEBP': 0x088, + 'WBINVD': 0x089, + 'MONITOR': 0x08a, + 'MWAIT': 0x08b, + 'MWAIT_COND': 0x08c, + 'XSETBV': 0x08d, + 'NPF': 0x400, +} + +# EC definition of HSR (from arch/arm64/include/asm/kvm_arm.h) +AARCH64_EXIT_REASONS = { + 'UNKNOWN': 0x00, + 'WFI': 0x01, + 'CP15_32': 0x03, + 'CP15_64': 0x04, + 'CP14_MR': 0x05, + 'CP14_LS': 0x06, + 'FP_ASIMD': 0x07, + 'CP10_ID': 0x08, + 'CP14_64': 0x0C, + 'ILL_ISS': 0x0E, + 'SVC32': 0x11, + 'HVC32': 0x12, + 'SMC32': 0x13, + 'SVC64': 0x15, + 'HVC64': 0x16, + 'SMC64': 0x17, + 'SYS64': 0x18, + 'IABT': 0x20, + 'IABT_HYP': 0x21, + 'PC_ALIGN': 0x22, + 'DABT': 0x24, + 'DABT_HYP': 0x25, + 'SP_ALIGN': 0x26, + 'FP_EXC32': 0x28, + 'FP_EXC64': 0x2C, + 'SERROR': 0x2F, + 'BREAKPT': 0x30, + 'BREAKPT_HYP': 0x31, + 'SOFTSTP': 0x32, + 'SOFTSTP_HYP': 0x33, + 'WATCHPT': 0x34, + 'WATCHPT_HYP': 0x35, + 'BKPT32': 0x38, + 'VECTOR32': 0x3A, + 'BRK64': 0x3C, +} + +# From include/uapi/linux/kvm.h, KVM_EXIT_xxx +USERSPACE_EXIT_REASONS = { + 'UNKNOWN': 0, + 'EXCEPTION': 1, + 'IO': 2, + 'HYPERCALL': 3, + 'DEBUG': 4, + 'HLT': 5, + 'MMIO': 6, + 'IRQ_WINDOW_OPEN': 7, + 'SHUTDOWN': 8, + 'FAIL_ENTRY': 9, + 'INTR': 10, + 'SET_TPR': 11, + 'TPR_ACCESS': 12, + 'S390_SIEIC': 13, + 'S390_RESET': 14, + 'DCR': 15, + 'NMI': 16, + 'INTERNAL_ERROR': 17, + 'OSI': 18, + 'PAPR_HCALL': 19, + 'S390_UCONTROL': 20, + 'WATCHDOG': 21, + 'S390_TSCH': 22, + 'EPR': 23, + 'SYSTEM_EVENT': 24, +} + +IOCTL_NUMBERS = { + 'SET_FILTER': 0x40082406, + 'ENABLE': 0x00002400, + 'DISABLE': 0x00002401, + 'RESET': 0x00002403, +} + +class Arch(object): + """Class that encapsulates global architecture specific data like + syscall and ioctl numbers. + + """ + @staticmethod + def get_arch(): + machine = os.uname()[4] + + if machine.startswith('ppc'): + return ArchPPC() + elif machine.startswith('aarch64'): + return ArchA64() + elif machine.startswith('s390'): + return ArchS390() + else: + # X86_64 + for line in open('/proc/cpuinfo'): + if not line.startswith('flags'): + continue + + flags = line.split() + if 'vmx' in flags: + return ArchX86(VMX_EXIT_REASONS) + if 'svm' in flags: + return ArchX86(SVM_EXIT_REASONS) + return + +class ArchX86(Arch): + def __init__(self, exit_reasons): + self.sc_perf_evt_open = 298 + self.ioctl_numbers = IOCTL_NUMBERS + self.exit_reasons = exit_reasons + +class ArchPPC(Arch): def __init__(self): - self.base = '/sys/kernel/debug/kvm' - self._fields = os.listdir(self.base) - def fields(self): - return self._fields - def select(self, fields): - self._fields = fields - def read(self): - def val(key): - return int(file(self.base + '/' + key).read()) - return dict([(key, val(key)) for key in self._fields]) + self.sc_perf_evt_open = 319 + self.ioctl_numbers = IOCTL_NUMBERS + self.ioctl_numbers['ENABLE'] = 0x20002400 + self.ioctl_numbers['DISABLE'] = 0x20002401 + self.ioctl_numbers['RESET'] = 0x20002403 -vmx_exit_reasons = { - 0: 'EXCEPTION_NMI', - 1: 'EXTERNAL_INTERRUPT', - 2: 'TRIPLE_FAULT', - 7: 'PENDING_INTERRUPT', - 8: 'NMI_WINDOW', - 9: 'TASK_SWITCH', - 10: 'CPUID', - 12: 'HLT', - 14: 'INVLPG', - 15: 'RDPMC', - 16: 'RDTSC', - 18: 'VMCALL', - 19: 'VMCLEAR', - 20: 'VMLAUNCH', - 21: 'VMPTRLD', - 22: 'VMPTRST', - 23: 'VMREAD', - 24: 'VMRESUME', - 25: 'VMWRITE', - 26: 'VMOFF', - 27: 'VMON', - 28: 'CR_ACCESS', - 29: 'DR_ACCESS', - 30: 'IO_INSTRUCTION', - 31: 'MSR_READ', - 32: 'MSR_WRITE', - 33: 'INVALID_STATE', - 36: 'MWAIT_INSTRUCTION', - 39: 'MONITOR_INSTRUCTION', - 40: 'PAUSE_INSTRUCTION', - 41: 'MCE_DURING_VMENTRY', - 43: 'TPR_BELOW_THRESHOLD', - 44: 'APIC_ACCESS', - 48: 'EPT_VIOLATION', - 49: 'EPT_MISCONFIG', - 54: 'WBINVD', - 55: 'XSETBV', -} + # PPC comes in 32 and 64 bit and some generated ioctl + # numbers depend on the wordsize. + char_ptr_size = ctypes.sizeof(ctypes.c_char_p) + self.ioctl_numbers['SET_FILTER'] = 0x80002406 | char_ptr_size << 16 + self.exit_reasons = {} -svm_exit_reasons = { - 0x000: 'READ_CR0', - 0x003: 'READ_CR3', - 0x004: 'READ_CR4', - 0x008: 'READ_CR8', - 0x010: 'WRITE_CR0', - 0x013: 'WRITE_CR3', - 0x014: 'WRITE_CR4', - 0x018: 'WRITE_CR8', - 0x020: 'READ_DR0', - 0x021: 'READ_DR1', - 0x022: 'READ_DR2', - 0x023: 'READ_DR3', - 0x024: 'READ_DR4', - 0x025: 'READ_DR5', - 0x026: 'READ_DR6', - 0x027: 'READ_DR7', - 0x030: 'WRITE_DR0', - 0x031: 'WRITE_DR1', - 0x032: 'WRITE_DR2', - 0x033: 'WRITE_DR3', - 0x034: 'WRITE_DR4', - 0x035: 'WRITE_DR5', - 0x036: 'WRITE_DR6', - 0x037: 'WRITE_DR7', - 0x040: 'EXCP_BASE', - 0x060: 'INTR', - 0x061: 'NMI', - 0x062: 'SMI', - 0x063: 'INIT', - 0x064: 'VINTR', - 0x065: 'CR0_SEL_WRITE', - 0x066: 'IDTR_READ', - 0x067: 'GDTR_READ', - 0x068: 'LDTR_READ', - 0x069: 'TR_READ', - 0x06a: 'IDTR_WRITE', - 0x06b: 'GDTR_WRITE', - 0x06c: 'LDTR_WRITE', - 0x06d: 'TR_WRITE', - 0x06e: 'RDTSC', - 0x06f: 'RDPMC', - 0x070: 'PUSHF', - 0x071: 'POPF', - 0x072: 'CPUID', - 0x073: 'RSM', - 0x074: 'IRET', - 0x075: 'SWINT', - 0x076: 'INVD', - 0x077: 'PAUSE', - 0x078: 'HLT', - 0x079: 'INVLPG', - 0x07a: 'INVLPGA', - 0x07b: 'IOIO', - 0x07c: 'MSR', - 0x07d: 'TASK_SWITCH', - 0x07e: 'FERR_FREEZE', - 0x07f: 'SHUTDOWN', - 0x080: 'VMRUN', - 0x081: 'VMMCALL', - 0x082: 'VMLOAD', - 0x083: 'VMSAVE', - 0x084: 'STGI', - 0x085: 'CLGI', - 0x086: 'SKINIT', - 0x087: 'RDTSCP', - 0x088: 'ICEBP', - 0x089: 'WBINVD', - 0x08a: 'MONITOR', - 0x08b: 'MWAIT', - 0x08c: 'MWAIT_COND', - 0x400: 'NPF', -} +class ArchA64(Arch): + def __init__(self): + self.sc_perf_evt_open = 241 + self.ioctl_numbers = IOCTL_NUMBERS + self.exit_reasons = AARCH64_EXIT_REASONS -s390_exit_reasons = { - 0x000: 'UNKNOWN', - 0x001: 'EXCEPTION', - 0x002: 'IO', - 0x003: 'HYPERCALL', - 0x004: 'DEBUG', - 0x005: 'HLT', - 0x006: 'MMIO', - 0x007: 'IRQ_WINDOW_OPEN', - 0x008: 'SHUTDOWN', - 0x009: 'FAIL_ENTRY', - 0x010: 'INTR', - 0x011: 'SET_TPR', - 0x012: 'TPR_ACCESS', - 0x013: 'S390_SIEIC', - 0x014: 'S390_RESET', - 0x015: 'DCR', - 0x016: 'NMI', - 0x017: 'INTERNAL_ERROR', - 0x018: 'OSI', - 0x019: 'PAPR_HCALL', -} +class ArchS390(Arch): + def __init__(self): + self.sc_perf_evt_open = 331 + self.ioctl_numbers = IOCTL_NUMBERS + self.exit_reasons = None -vendor_exit_reasons = { - 'vmx': vmx_exit_reasons, - 'svm': svm_exit_reasons, - 'IBM/S390': s390_exit_reasons, -} +ARCH = Arch.get_arch() -syscall_numbers = { - 'IBM/S390': 331, -} -sc_perf_evt_open = 298 +def walkdir(path): + """Returns os.walk() data for specified directory. -exit_reasons = None + As it is only a wrapper it returns the same 3-tuple of (dirpath, + dirnames, filenames). + """ + return next(os.walk(path)) -for line in file('/proc/cpuinfo').readlines(): - if line.startswith('flags') or line.startswith('vendor_id'): - for flag in line.split(): - if flag in vendor_exit_reasons: - exit_reasons = vendor_exit_reasons[flag] - if flag in syscall_numbers: - sc_perf_evt_open = syscall_numbers[flag] -filters = { - 'kvm_exit': ('exit_reason', exit_reasons) -} -def invert(d): - return dict((x[1], x[0]) for x in d.iteritems()) +def parse_int_list(list_string): + """Returns an int list from a string of comma separated integers and + integer ranges.""" + integers = [] + members = list_string.split(',') -for f in filters: - filters[f] = (filters[f][0], invert(filters[f][1])) + for member in members: + if '-' not in member: + integers.append(int(member)) + else: + int_range = member.split('-') + integers.extend(range(int(int_range[0]), + int(int_range[1]) + 1)) -import ctypes, struct, array + return integers -libc = ctypes.CDLL('libc.so.6') + +def get_online_cpus(): + with open('/sys/devices/system/cpu/online') as cpu_list: + cpu_string = cpu_list.readline() + return parse_int_list(cpu_string) + + +def get_filters(): + filters = {} + filters['kvm_userspace_exit'] = ('reason', USERSPACE_EXIT_REASONS) + if ARCH.exit_reasons: + filters['kvm_exit'] = ('exit_reason', ARCH.exit_reasons) + return filters + +libc = ctypes.CDLL('libc.so.6', use_errno=True) syscall = libc.syscall + class perf_event_attr(ctypes.Structure): _fields_ = [('type', ctypes.c_uint32), ('size', ctypes.c_uint32), @@ -212,239 +334,350 @@ class perf_event_attr(ctypes.Structure): ('bp_addr', ctypes.c_uint64), ('bp_len', ctypes.c_uint64), ] -def _perf_event_open(attr, pid, cpu, group_fd, flags): - return syscall(sc_perf_evt_open, ctypes.pointer(attr), ctypes.c_int(pid), - ctypes.c_int(cpu), ctypes.c_int(group_fd), - ctypes.c_long(flags)) -PERF_TYPE_HARDWARE = 0 -PERF_TYPE_SOFTWARE = 1 -PERF_TYPE_TRACEPOINT = 2 -PERF_TYPE_HW_CACHE = 3 -PERF_TYPE_RAW = 4 -PERF_TYPE_BREAKPOINT = 5 + def __init__(self): + super(self.__class__, self).__init__() + self.type = PERF_TYPE_TRACEPOINT + self.size = ctypes.sizeof(self) + self.read_format = PERF_FORMAT_GROUP -PERF_SAMPLE_IP = 1 << 0 -PERF_SAMPLE_TID = 1 << 1 -PERF_SAMPLE_TIME = 1 << 2 -PERF_SAMPLE_ADDR = 1 << 3 -PERF_SAMPLE_READ = 1 << 4 -PERF_SAMPLE_CALLCHAIN = 1 << 5 -PERF_SAMPLE_ID = 1 << 6 -PERF_SAMPLE_CPU = 1 << 7 -PERF_SAMPLE_PERIOD = 1 << 8 -PERF_SAMPLE_STREAM_ID = 1 << 9 -PERF_SAMPLE_RAW = 1 << 10 +def perf_event_open(attr, pid, cpu, group_fd, flags): + return syscall(ARCH.sc_perf_evt_open, ctypes.pointer(attr), + ctypes.c_int(pid), ctypes.c_int(cpu), + ctypes.c_int(group_fd), ctypes.c_long(flags)) -PERF_FORMAT_TOTAL_TIME_ENABLED = 1 << 0 -PERF_FORMAT_TOTAL_TIME_RUNNING = 1 << 1 -PERF_FORMAT_ID = 1 << 2 -PERF_FORMAT_GROUP = 1 << 3 +PERF_TYPE_TRACEPOINT = 2 +PERF_FORMAT_GROUP = 1 << 3 -import re - -sys_tracing = '/sys/kernel/debug/tracing' +PATH_DEBUGFS_TRACING = '/sys/kernel/debug/tracing' +PATH_DEBUGFS_KVM = '/sys/kernel/debug/kvm' class Group(object): - def __init__(self, cpu): + def __init__(self): self.events = [] - self.group_leader = None - self.cpu = cpu - def add_event(self, name, event_set, tracepoint, filter = None): - self.events.append(Event(group = self, - name = name, event_set = event_set, - tracepoint = tracepoint, filter = filter)) - if len(self.events) == 1: - self.file = os.fdopen(self.events[0].fd) + + def add_event(self, event): + self.events.append(event) + def read(self): - bytes = 8 * (1 + len(self.events)) - fmt = 'xxxxxxxx' + 'q' * len(self.events) + length = 8 * (1 + len(self.events)) + read_format = 'xxxxxxxx' + 'Q' * len(self.events) return dict(zip([event.name for event in self.events], - struct.unpack(fmt, self.file.read(bytes)))) + struct.unpack(read_format, + os.read(self.events[0].fd, length)))) class Event(object): - def __init__(self, group, name, event_set, tracepoint, filter = None): + def __init__(self, name, group, trace_cpu, trace_point, trace_filter, + trace_set='kvm'): self.name = name - attr = perf_event_attr() - attr.type = PERF_TYPE_TRACEPOINT - attr.size = ctypes.sizeof(attr) - id_path = os.path.join(sys_tracing, 'events', event_set, - tracepoint, 'id') - id = int(file(id_path).read()) - attr.config = id - attr.sample_type = (PERF_SAMPLE_RAW - | PERF_SAMPLE_TIME - | PERF_SAMPLE_CPU) - attr.sample_period = 1 - attr.read_format = PERF_FORMAT_GROUP + self.fd = None + self.setup_event(group, trace_cpu, trace_point, trace_filter, + trace_set) + + def setup_event_attribute(self, trace_set, trace_point): + id_path = os.path.join(PATH_DEBUGFS_TRACING, 'events', trace_set, + trace_point, 'id') + + event_attr = perf_event_attr() + event_attr.config = int(open(id_path).read()) + return event_attr + + def setup_event(self, group, trace_cpu, trace_point, trace_filter, + trace_set): + event_attr = self.setup_event_attribute(trace_set, trace_point) + group_leader = -1 if group.events: group_leader = group.events[0].fd - fd = _perf_event_open(attr, -1, group.cpu, group_leader, 0) + + fd = perf_event_open(event_attr, -1, trace_cpu, + group_leader, 0) if fd == -1: - raise Exception('perf_event_open failed') - if filter: - import fcntl - fcntl.ioctl(fd, 0x40082406, filter) + err = ctypes.get_errno() + raise OSError(err, os.strerror(err), + 'while calling sys_perf_event_open().') + + if trace_filter: + fcntl.ioctl(fd, ARCH.ioctl_numbers['SET_FILTER'], + trace_filter) + self.fd = fd + def enable(self): - import fcntl - fcntl.ioctl(self.fd, 0x00002400, 0) + fcntl.ioctl(self.fd, ARCH.ioctl_numbers['ENABLE'], 0) + def disable(self): - import fcntl - fcntl.ioctl(self.fd, 0x00002401, 0) + fcntl.ioctl(self.fd, ARCH.ioctl_numbers['DISABLE'], 0) + + def reset(self): + fcntl.ioctl(self.fd, ARCH.ioctl_numbers['RESET'], 0) class TracepointProvider(object): def __init__(self): - path = os.path.join(sys_tracing, 'events', 'kvm') - fields = [f - for f in os.listdir(path) - if os.path.isdir(os.path.join(path, f))] + self.group_leaders = [] + self.filters = get_filters() + self._fields = self.get_available_fields() + self.setup_traces() + self.fields = self._fields + + def get_available_fields(self): + path = os.path.join(PATH_DEBUGFS_TRACING, 'events', 'kvm') + fields = walkdir(path)[1] extra = [] - for f in fields: - if f in filters: - subfield, values = filters[f] - for name, number in values.iteritems(): - extra.append(f + '(' + name + ')') + for field in fields: + if field in self.filters: + filter_name_, filter_dicts = self.filters[field] + for name in filter_dicts: + extra.append(field + '(' + name + ')') fields += extra - self._setup(fields) - self.select(fields) + return fields + + def setup_traces(self): + cpus = get_online_cpus() + + # The constant is needed as a buffer for python libs, std + # streams and other files that the script opens. + newlim = len(cpus) * len(self._fields) + 50 + try: + softlim_, hardlim = resource.getrlimit(resource.RLIMIT_NOFILE) + + if hardlim < newlim: + # Now we need CAP_SYS_RESOURCE, to increase the hard limit. + resource.setrlimit(resource.RLIMIT_NOFILE, (newlim, newlim)) + else: + # Raising the soft limit is sufficient. + resource.setrlimit(resource.RLIMIT_NOFILE, (newlim, hardlim)) + + except ValueError: + sys.exit("NOFILE rlimit could not be raised to {0}".format(newlim)) + + for cpu in cpus: + group = Group() + for name in self._fields: + tracepoint = name + tracefilter = None + match = re.match(r'(.*)\((.*)\)', name) + if match: + tracepoint, sub = match.groups() + tracefilter = ('%s==%d\0' % + (self.filters[tracepoint][0], + self.filters[tracepoint][1][sub])) + + group.add_event(Event(name=name, + group=group, + trace_cpu=cpu, + trace_point=tracepoint, + trace_filter=tracefilter)) + self.group_leaders.append(group) + + def available_fields(self): + return self.get_available_fields() + + @property def fields(self): return self._fields - def _setup(self, _fields): - self._fields = _fields - cpure = r'cpu([0-9]+)' - self.cpus = [int(re.match(cpure, x).group(1)) - for x in os.listdir('/sys/devices/system/cpu') - if re.match(cpure, x)] - import resource - nfiles = len(self.cpus) * 1000 - resource.setrlimit(resource.RLIMIT_NOFILE, (nfiles, nfiles)) - events = [] - self.group_leaders = [] - for cpu in self.cpus: - group = Group(cpu) - for name in _fields: - tracepoint = name - filter = None - m = re.match(r'(.*)\((.*)\)', name) - if m: - tracepoint, sub = m.groups() - filter = '%s==%d\0' % (filters[tracepoint][0], - filters[tracepoint][1][sub]) - event = group.add_event(name, event_set = 'kvm', - tracepoint = tracepoint, - filter = filter) - self.group_leaders.append(group) - def select(self, fields): + + @fields.setter + def fields(self, fields): + self._fields = fields for group in self.group_leaders: - for event in group.events: + for index, event in enumerate(group.events): if event.name in fields: + event.reset() event.enable() else: - event.disable() + # Do not disable the group leader. + # It would disable all of its events. + if index != 0: + event.disable() + def read(self): - from collections import defaultdict ret = defaultdict(int) for group in self.group_leaders: for name, val in group.read().iteritems(): - ret[name] += val + if name in self._fields: + ret[name] += val return ret -class Stats: - def __init__(self, provider, fields = None): - self.provider = provider - self.fields_filter = fields - self._update() - def _update(self): +class DebugfsProvider(object): + def __init__(self): + self._fields = self.get_available_fields() + + def get_available_fields(self): + return walkdir(PATH_DEBUGFS_KVM)[2] + + @property + def fields(self): + return self._fields + + @fields.setter + def fields(self, fields): + self._fields = fields + + def read(self): + def val(key): + return int(file(PATH_DEBUGFS_KVM + '/' + key).read()) + return dict([(key, val(key)) for key in self._fields]) + +class Stats(object): + def __init__(self, providers, fields=None): + self.providers = providers + self._fields_filter = fields + self.values = {} + self.update_provider_filters() + + def update_provider_filters(self): def wanted(key): - import re - if not self.fields_filter: + if not self._fields_filter: return True - return re.match(self.fields_filter, key) is not None - self.values = dict([(key, None) - for key in provider.fields() - if wanted(key)]) - self.provider.select(self.values.keys()) - def set_fields_filter(self, fields_filter): - self.fields_filter = fields_filter - self._update() + return re.match(self._fields_filter, key) is not None + + # As we reset the counters when updating the fields we can + # also clear the cache of old values. + self.values = {} + for provider in self.providers: + provider_fields = [key for key in provider.get_available_fields() + if wanted(key)] + provider.fields = provider_fields + + @property + def fields_filter(self): + return self._fields_filter + + @fields_filter.setter + def fields_filter(self, fields_filter): + self._fields_filter = fields_filter + self.update_provider_filters() + def get(self): - new = self.provider.read() - for key in self.provider.fields(): - oldval = self.values.get(key, (0, 0)) - newval = new[key] - newdelta = None - if oldval is not None: - newdelta = newval - oldval[0] - self.values[key] = (newval, newdelta) + for provider in self.providers: + new = provider.read() + for key in provider.fields: + oldval = self.values.get(key, (0, 0)) + newval = new.get(key, 0) + newdelta = None + if oldval is not None: + newdelta = newval - oldval[0] + self.values[key] = (newval, newdelta) return self.values -if not os.access('/sys/kernel/debug', os.F_OK): - print 'Please enable CONFIG_DEBUG_FS in your kernel' - sys.exit(1) -if not os.access('/sys/kernel/debug/kvm', os.F_OK): - print "Please mount debugfs ('mount -t debugfs debugfs /sys/kernel/debug')" - print "and ensure the kvm modules are loaded" - sys.exit(1) +LABEL_WIDTH = 40 +NUMBER_WIDTH = 10 -label_width = 40 -number_width = 10 +class Tui(object): + def __init__(self, stats): + self.stats = stats + self.screen = None + self.drilldown = False + self.update_drilldown() -def tui(screen, stats): - curses.use_default_colors() - curses.noecho() - drilldown = False - fields_filter = stats.fields_filter - def update_drilldown(): - if not fields_filter: - if drilldown: - stats.set_fields_filter(None) - else: - stats.set_fields_filter(r'^[^\(]*$') - update_drilldown() - def refresh(sleeptime): - screen.erase() - screen.addstr(0, 0, 'kvm statistics') - row = 2 - s = stats.get() + def __enter__(self): + """Initialises curses for later use. Based on curses.wrapper + implementation from the Python standard library.""" + self.screen = curses.initscr() + curses.noecho() + curses.cbreak() + + # The try/catch works around a minor bit of + # over-conscientiousness in the curses module, the error + # return from C start_color() is ignorable. + try: + curses.start_color() + except: + pass + + curses.use_default_colors() + return self + + def __exit__(self, *exception): + """Resets the terminal to its normal state. Based on curses.wrappre + implementation from the Python standard library.""" + if self.screen: + self.screen.keypad(0) + curses.echo() + curses.nocbreak() + curses.endwin() + + def update_drilldown(self): + if not self.stats.fields_filter: + self.stats.fields_filter = r'^[^\(]*$' + + elif self.stats.fields_filter == r'^[^\(]*$': + self.stats.fields_filter = None + + def refresh(self, sleeptime): + self.screen.erase() + self.screen.addstr(0, 0, 'kvm statistics - summary', curses.A_BOLD) + self.screen.addstr(2, 1, 'Event') + self.screen.addstr(2, 1 + LABEL_WIDTH + NUMBER_WIDTH - + len('Total'), 'Total') + self.screen.addstr(2, 1 + LABEL_WIDTH + NUMBER_WIDTH + 8 - + len('Current'), 'Current') + row = 3 + stats = self.stats.get() def sortkey(x): - if s[x][1]: - return (-s[x][1], -s[x][0]) + if stats[x][1]: + return (-stats[x][1], -stats[x][0]) else: - return (0, -s[x][0]) - for key in sorted(s.keys(), key = sortkey): - if row >= screen.getmaxyx()[0]: + return (0, -stats[x][0]) + for key in sorted(stats.keys(), key=sortkey): + + if row >= self.screen.getmaxyx()[0]: break - values = s[key] + values = stats[key] if not values[0] and not values[1]: break col = 1 - screen.addstr(row, col, key) - col += label_width - screen.addstr(row, col, '%10d' % (values[0],)) - col += number_width + self.screen.addstr(row, col, key) + col += LABEL_WIDTH + self.screen.addstr(row, col, '%10d' % (values[0],)) + col += NUMBER_WIDTH if values[1] is not None: - screen.addstr(row, col, '%8d' % (values[1] / sleeptime,)) + self.screen.addstr(row, col, '%8d' % (values[1] / sleeptime,)) row += 1 - screen.refresh() + self.screen.refresh() - sleeptime = 0.25 - while True: - refresh(sleeptime) - curses.halfdelay(int(sleeptime * 10)) - sleeptime = 3 - try: - c = screen.getkey() - if c == 'x': - drilldown = not drilldown - update_drilldown() - if c == 'q': + def show_filter_selection(self): + while True: + self.screen.erase() + self.screen.addstr(0, 0, + "Show statistics for events matching a regex.", + curses.A_BOLD) + self.screen.addstr(2, 0, + "Current regex: {0}" + .format(self.stats.fields_filter)) + self.screen.addstr(3, 0, "New regex: ") + curses.echo() + regex = self.screen.getstr() + curses.noecho() + if len(regex) == 0: + return + try: + re.compile(regex) + self.stats.fields_filter = regex + return + except re.error: + continue + + def show_stats(self): + sleeptime = 0.25 + while True: + self.refresh(sleeptime) + curses.halfdelay(int(sleeptime * 10)) + sleeptime = 3 + try: + char = self.screen.getkey() + if char == 'x': + self.drilldown = not self.drilldown + self.update_drilldown() + if char == 'q': + break + if char == 'f': + self.show_filter_selection() + except KeyboardInterrupt: break - except KeyboardInterrupt: - break - except curses.error: - continue + except curses.error: + continue def batch(stats): s = stats.get() @@ -452,13 +685,13 @@ def batch(stats): s = stats.get() for key in sorted(s.keys()): values = s[key] - print '%-22s%10d%10d' % (key, values[0], values[1]) + print '%-42s%10d%10d' % (key, values[0], values[1]) def log(stats): keys = sorted(stats.get().iterkeys()) def banner(): for k in keys: - print '%10s' % k[0:9], + print '%s' % k, print def statline(): s = stats.get() @@ -474,38 +707,121 @@ def log(stats): statline() line += 1 -options = optparse.OptionParser() -options.add_option('-1', '--once', '--batch', - action = 'store_true', - default = False, - dest = 'once', - help = 'run in batch mode for one second', - ) -options.add_option('-l', '--log', - action = 'store_true', - default = False, - dest = 'log', - help = 'run in logging mode (like vmstat)', - ) -options.add_option('-f', '--fields', - action = 'store', - default = None, - dest = 'fields', - help = 'fields to display (regex)', - ) -(options, args) = options.parse_args(sys.argv) +def get_options(): + description_text = """ +This script displays various statistics about VMs running under KVM. +The statistics are gathered from the KVM debugfs entries and / or the +currently available perf traces. -try: - provider = TracepointProvider() -except: - provider = DebugfsProvider() +The monitoring takes additional cpu cycles and might affect the VM's +performance. -stats = Stats(provider, fields = options.fields) +Requirements: +- Access to: + /sys/kernel/debug/kvm + /sys/kernel/debug/trace/events/* + /proc/pid/task +- /proc/sys/kernel/perf_event_paranoid < 1 if user has no + CAP_SYS_ADMIN and perf events are used. +- CAP_SYS_RESOURCE if the hard limit is not high enough to allow + the large number of files that are possibly opened. +""" -if options.log: - log(stats) -elif not options.once: - import curses.wrapper - curses.wrapper(tui, stats) -else: - batch(stats) + class PlainHelpFormatter(optparse.IndentedHelpFormatter): + def format_description(self, description): + if description: + return description + "\n" + else: + return "" + + optparser = optparse.OptionParser(description=description_text, + formatter=PlainHelpFormatter()) + optparser.add_option('-1', '--once', '--batch', + action='store_true', + default=False, + dest='once', + help='run in batch mode for one second', + ) + optparser.add_option('-l', '--log', + action='store_true', + default=False, + dest='log', + help='run in logging mode (like vmstat)', + ) + optparser.add_option('-t', '--tracepoints', + action='store_true', + default=False, + dest='tracepoints', + help='retrieve statistics from tracepoints', + ) + optparser.add_option('-d', '--debugfs', + action='store_true', + default=False, + dest='debugfs', + help='retrieve statistics from debugfs', + ) + optparser.add_option('-f', '--fields', + action='store', + default=None, + dest='fields', + help='fields to display (regex)', + ) + (options, _) = optparser.parse_args(sys.argv) + return options + +def get_providers(options): + providers = [] + + if options.tracepoints: + providers.append(TracepointProvider()) + if options.debugfs: + providers.append(DebugfsProvider()) + if len(providers) == 0: + providers.append(TracepointProvider()) + + return providers + +def check_access(options): + if not os.path.exists('/sys/kernel/debug'): + sys.stderr.write('Please enable CONFIG_DEBUG_FS in your kernel.') + sys.exit(1) + + if not os.path.exists(PATH_DEBUGFS_KVM): + sys.stderr.write("Please make sure, that debugfs is mounted and " + "readable by the current user:\n" + "('mount -t debugfs debugfs /sys/kernel/debug')\n" + "Also ensure, that the kvm modules are loaded.\n") + sys.exit(1) + + if not os.path.exists(PATH_DEBUGFS_TRACING) and (options.tracepoints + or not options.debugfs): + sys.stderr.write("Please enable CONFIG_TRACING in your kernel " + "when using the option -t (default).\n" + "If it is enabled, make {0} readable by the " + "current user.\n" + .format(PATH_DEBUGFS_TRACING)) + if options.tracepoints: + sys.exit(1) + + sys.stderr.write("Falling back to debugfs statistics!\n") + options.debugfs = True + sleep(5) + + return options + +def main(): + options = get_options() + options = check_access(options) + providers = get_providers(options) + stats = Stats(providers, fields=options.fields) + + if options.log: + log(stats) + elif not options.once: + with Tui(stats) as tui: + tui.show_stats() + else: + batch(stats) + +if __name__ == "__main__": + main() diff --git a/qemu-2.6.1.tar.bz2 b/qemu-2.6.1.tar.bz2 deleted file mode 100644 index 2f515f64..00000000 --- a/qemu-2.6.1.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4942fd1b6ee31f2f55ffc2201dd7397e6b9c55a2ef332e6d660c730d268e08d1 -size 25762855 diff --git a/qemu-2.6.1.tar.bz2.sig b/qemu-2.6.1.tar.bz2.sig deleted file mode 100644 index fe4219b8..00000000 Binary files a/qemu-2.6.1.tar.bz2.sig and /dev/null differ diff --git a/qemu-2.7.0.tar.bz2 b/qemu-2.7.0.tar.bz2 new file mode 100644 index 00000000..5ce76f93 --- /dev/null +++ b/qemu-2.7.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:326e739506ba690daf69fc17bd3913a6c313d9928d743bd8eddb82f403f81e53 +size 26867760 diff --git a/qemu-2.7.0.tar.bz2.sig b/qemu-2.7.0.tar.bz2.sig new file mode 100644 index 00000000..aa7db39c Binary files /dev/null and b/qemu-2.7.0.tar.bz2.sig differ diff --git a/qemu-linux-user.changes b/qemu-linux-user.changes index c2f915ae..bd52e8be 100644 --- a/qemu-linux-user.changes +++ b/qemu-linux-user.changes @@ -1,3 +1,100 @@ +------------------------------------------------------------------- +Sat Sep 10 09:27:57 UTC 2016 - afaerber@suse.de + +- Updated to v2.7.0: See http://wiki.qemu-project.org/ChangeLog/2.7 +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.7 +- Properly test for infinite timeout in poll (schwab) + 0039-linux-user-properly-test-for-infini.patch + +------------------------------------------------------------------- +Wed Aug 31 13:40:20 UTC 2016 - afaerber@suse.de + +- Update to v2.7.0-rc5: See http://wiki.qemu-project.org/ChangeLog/2.7 + +------------------------------------------------------------------- +Tue Aug 23 16:04:11 UTC 2016 - afaerber@suse.de + +- Updated to v2.7.0-rc2: See http://wiki.qemu-project.org/ChangeLog/2.7 +* Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.7 +* Patches dropped: + 0002-qemu-0.9.0.cvs-binfmt.patch (script rewritten upstream) + 0009-block-vmdk-Support-creation-of-SCSI.patch (deprecated) + 0014-linux-user-Ignore-broken-loop-ioctl.patch (implemented upstream) + 0024-linux-user-add-more-blk-ioctls.patch (more implemented upstream) + 0034-qtest-Increase-socket-timeout.patch (increased further upstream) + 0036-configure-Enable-libseccomp-for-ppc.patch (enabled upstream) + 0038-block-split-large-discard-requests-.patch + 0041-net-mipsnet-check-packet-length-aga.patch + 0042-i386-kvmvapic-initialise-imm32-vari.patch + 0043-esp-check-command-buffer-length-bef.patch + 0044-esp-check-dma-length-before-reading.patch + 0045-scsi-pvscsi-check-command-descripto.patch + 0046-scsi-mptsas-infinite-loop-while-fet.patch + 0047-vga-add-sr_vbe-register-set.patch + 0048-scsi-megasas-use-appropriate-proper.patch + 0049-scsi-megasas-check-read_queue_head-.patch + 0050-scsi-megasas-null-terminate-bios-ve.patch + 0051-vmsvga-move-fifo-sanity-checks-to-v.patch + 0052-vmsvga-don-t-process-more-than-1024.patch + 0053-block-iscsi-avoid-potential-overflo.patch + 0054-scsi-esp-check-TI-buffer-index-befo.patch + 0055-xen-introduce-dummy-system-device.patch + 0056-xen-write-information-about-support.patch + 0057-xen-add-pvUSB-backend.patch + 0058-xen-move-xen_sysdev-to-xen_backend..patch + 0059-vnc-add-configurable-keyboard-delay.patch + 0060-scsi-megasas-initialise-local-confi.patch + 0061-configure-add-echo_version-helper.patch + 0062-configure-support-vte-2.91.patch + 0063-hw-arm-virt-mark-the-PCIe-host-cont.patch + 0065-scsi-esp-check-buffer-length-before.patch + 0066-scsi-esp-respect-FIFO-invariant-aft.patch + 0067-pci-assign-Move-Invalid-ROM-error-m.patch + 0068-Xen-PCI-passthrough-fix-passthrough.patch + 0069-scsi-esp-make-cmdbuf-big-enough-for.patch + 0070-scsi-esp-fix-migration.patch + 0071-virtio-error-out-if-guest-exceeds-v.patch + 0072-xen-when-removing-a-backend-don-t-r.patch + 0073-xen-drain-submit-queue-in-xen-usb-b.patch + 0074-qcow2-avoid-extra-flushes-in-qcow2.patch + 0076-xen-use-a-common-function-for-pv-an.patch +* Patches renamed: + 0010-linux-user-add-binfmt-wrapper-for-a.patch -> 0009-linux-user-add-binfmt-wrapper-for-a.patch + 0011-PPC-KVM-Disable-mmu-notifier-check.patch -> 0010-PPC-KVM-Disable-mmu-notifier-check.patch + 0012-linux-user-fix-segfault-deadlock.patch -> 0011-linux-user-fix-segfault-deadlock.patch + 0013-linux-user-binfmt-support-host-bina.patch -> 0012-linux-user-binfmt-support-host-bina.patch + 0015-linux-user-lock-tcg.patch -> 0013-linux-user-lock-tcg.patch + 0016-linux-user-Run-multi-threaded-code-.patch -> 0014-linux-user-Run-multi-threaded-code-.patch + 0017-linux-user-lock-tb-flushing-too.patch -> 0015-linux-user-lock-tb-flushing-too.patch + 0018-linux-user-Fake-proc-cpuinfo.patch -> 0016-linux-user-Fake-proc-cpuinfo.patch + 0019-linux-user-implement-FS_IOC_GETFLAG.patch -> 0017-linux-user-implement-FS_IOC_GETFLAG.patch + 0020-linux-user-implement-FS_IOC_SETFLAG.patch -> 0018-linux-user-implement-FS_IOC_SETFLAG.patch + 0021-linux-user-XXX-disable-fiemap.patch -> 0019-linux-user-XXX-disable-fiemap.patch + 0022-slirp-nooutgoing.patch -> 0020-slirp-nooutgoing.patch + 0023-vnc-password-file-and-incoming-conn.patch -> 0021-vnc-password-file-and-incoming-conn.patch + 0025-linux-user-use-target_ulong.patch -> 0022-linux-user-use-target_ulong.patch + 0026-block-Add-support-for-DictZip-enabl.patch -> 0023-block-Add-support-for-DictZip-enabl.patch + 0027-block-Add-tar-container-format.patch -> 0024-block-Add-tar-container-format.patch + 0028-Legacy-Patch-kvm-qemu-preXX-dictzip.patch -> 0025-Legacy-Patch-kvm-qemu-preXX-dictzip.patch + 0029-console-add-question-mark-escape-op.patch -> 0026-console-add-question-mark-escape-op.patch + 0030-Make-char-muxer-more-robust-wrt-sma.patch -> 0027-Make-char-muxer-more-robust-wrt-sma.patch + 0031-linux-user-lseek-explicitly-cast-no.patch -> 0028-linux-user-lseek-explicitly-cast-no.patch + 0032-virtfs-proxy-helper-Provide-__u64-f.patch -> 0029-virtfs-proxy-helper-Provide-__u64-f.patch + 0033-configure-Enable-PIE-for-ppc-and-pp.patch -> 0030-configure-Enable-PIE-for-ppc-and-pp.patch + 0035-AIO-Reduce-number-of-threads-for-32.patch -> 0031-AIO-Reduce-number-of-threads-for-32.patch + 0037-dictzip-Fix-on-big-endian-systems.patch -> 0032-dictzip-Fix-on-big-endian-systems.patch + 0039-xen_disk-Add-suse-specific-flush-di.patch -> 0033-xen_disk-Add-suse-specific-flush-di.patch + 0040-build-link-with-libatomic-on-powerp.patch -> 0034-build-link-with-libatomic-on-powerp.patch + 0064-xen-SUSE-xenlinux-unplug-for-emulat.patch -> 0035-xen-SUSE-xenlinux-unplug-for-emulat.patch + 0075-qemu-bridge-helper-reduce-security-.patch -> 0036-qemu-bridge-helper-reduce-security-.patch +* Patches added: + 0002-qemu-binfmt-conf-Modify-default-pat.patch +* Drop renamed trace-events-all file +* Use qemu-ARCH-binfmt again with the new qemu-binfmt-conf.sh (schwab) + 0037-qemu-binfmt-conf-use-qemu-ARCH-binf.patch +* Patches added: + 0038-configure-Fix-detection-of-seccomp-.patch + ------------------------------------------------------------------- Wed Aug 17 20:25:13 UTC 2016 - brogers@suse.com diff --git a/qemu-linux-user.spec b/qemu-linux-user.spec index 43465188..bd704834 100644 --- a/qemu-linux-user.spec +++ b/qemu-linux-user.spec @@ -21,65 +21,49 @@ Url: http://www.qemu.org/ Summary: Universal CPU emulator License: BSD-3-Clause and GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and MIT Group: System/Emulators/PC -Version: 2.6.1 +Version: 2.7.0 Release: 0 -Source: http://wiki.qemu.org/download/qemu-2.6.1.tar.bz2 +Source: http://wiki.qemu.org/download/qemu-2.7.0.tar.bz2 # This patch queue is auto-generated from https://github.com/openSUSE/qemu Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patch -Patch0002: 0002-qemu-0.9.0.cvs-binfmt.patch +Patch0002: 0002-qemu-binfmt-conf-Modify-default-pat.patch Patch0003: 0003-qemu-cvs-alsa_bitfield.patch Patch0004: 0004-qemu-cvs-alsa_ioctl.patch Patch0005: 0005-qemu-cvs-alsa_mmap.patch Patch0006: 0006-qemu-cvs-gettimeofday.patch Patch0007: 0007-qemu-cvs-ioctl_debug.patch Patch0008: 0008-qemu-cvs-ioctl_nodirection.patch -Patch0009: 0009-block-vmdk-Support-creation-of-SCSI.patch -Patch0010: 0010-linux-user-add-binfmt-wrapper-for-a.patch -Patch0011: 0011-PPC-KVM-Disable-mmu-notifier-check.patch -Patch0012: 0012-linux-user-fix-segfault-deadlock.patch -Patch0013: 0013-linux-user-binfmt-support-host-bina.patch -Patch0014: 0014-linux-user-Ignore-broken-loop-ioctl.patch -Patch0015: 0015-linux-user-lock-tcg.patch -Patch0016: 0016-linux-user-Run-multi-threaded-code-.patch -Patch0017: 0017-linux-user-lock-tb-flushing-too.patch -Patch0018: 0018-linux-user-Fake-proc-cpuinfo.patch -Patch0019: 0019-linux-user-implement-FS_IOC_GETFLAG.patch -Patch0020: 0020-linux-user-implement-FS_IOC_SETFLAG.patch -Patch0021: 0021-linux-user-XXX-disable-fiemap.patch -Patch0022: 0022-slirp-nooutgoing.patch -Patch0023: 0023-vnc-password-file-and-incoming-conn.patch -Patch0024: 0024-linux-user-add-more-blk-ioctls.patch -Patch0025: 0025-linux-user-use-target_ulong.patch -Patch0026: 0026-block-Add-support-for-DictZip-enabl.patch -Patch0027: 0027-block-Add-tar-container-format.patch -Patch0028: 0028-Legacy-Patch-kvm-qemu-preXX-dictzip.patch -Patch0029: 0029-console-add-question-mark-escape-op.patch -Patch0030: 0030-Make-char-muxer-more-robust-wrt-sma.patch -Patch0031: 0031-linux-user-lseek-explicitly-cast-no.patch -Patch0032: 0032-virtfs-proxy-helper-Provide-__u64-f.patch -Patch0033: 0033-configure-Enable-PIE-for-ppc-and-pp.patch -Patch0034: 0034-qtest-Increase-socket-timeout.patch -Patch0035: 0035-AIO-Reduce-number-of-threads-for-32.patch -Patch0036: 0036-configure-Enable-libseccomp-for-ppc.patch -Patch0037: 0037-dictzip-Fix-on-big-endian-systems.patch -Patch0038: 0038-block-split-large-discard-requests-.patch -Patch0039: 0039-xen_disk-Add-suse-specific-flush-di.patch -Patch0040: 0040-build-link-with-libatomic-on-powerp.patch -Patch0041: 0041-xen-introduce-dummy-system-device.patch -Patch0042: 0042-xen-write-information-about-support.patch -Patch0043: 0043-xen-add-pvUSB-backend.patch -Patch0044: 0044-xen-move-xen_sysdev-to-xen_backend..patch -Patch0045: 0045-vnc-add-configurable-keyboard-delay.patch -Patch0046: 0046-configure-add-echo_version-helper.patch -Patch0047: 0047-configure-support-vte-2.91.patch -Patch0048: 0048-hw-arm-virt-mark-the-PCIe-host-cont.patch -Patch0049: 0049-xen-SUSE-xenlinux-unplug-for-emulat.patch -Patch0050: 0050-scsi-esp-fix-migration.patch -Patch0051: 0051-xen-when-removing-a-backend-don-t-r.patch -Patch0052: 0052-xen-drain-submit-queue-in-xen-usb-b.patch -Patch0053: 0053-qcow2-avoid-extra-flushes-in-qcow2.patch -Patch0054: 0054-qemu-bridge-helper-reduce-security-.patch -Patch0055: 0055-xen-use-a-common-function-for-pv-an.patch +Patch0009: 0009-linux-user-add-binfmt-wrapper-for-a.patch +Patch0010: 0010-PPC-KVM-Disable-mmu-notifier-check.patch +Patch0011: 0011-linux-user-fix-segfault-deadlock.patch +Patch0012: 0012-linux-user-binfmt-support-host-bina.patch +Patch0013: 0013-linux-user-lock-tcg.patch +Patch0014: 0014-linux-user-Run-multi-threaded-code-.patch +Patch0015: 0015-linux-user-lock-tb-flushing-too.patch +Patch0016: 0016-linux-user-Fake-proc-cpuinfo.patch +Patch0017: 0017-linux-user-implement-FS_IOC_GETFLAG.patch +Patch0018: 0018-linux-user-implement-FS_IOC_SETFLAG.patch +Patch0019: 0019-linux-user-XXX-disable-fiemap.patch +Patch0020: 0020-slirp-nooutgoing.patch +Patch0021: 0021-vnc-password-file-and-incoming-conn.patch +Patch0022: 0022-linux-user-use-target_ulong.patch +Patch0023: 0023-block-Add-support-for-DictZip-enabl.patch +Patch0024: 0024-block-Add-tar-container-format.patch +Patch0025: 0025-Legacy-Patch-kvm-qemu-preXX-dictzip.patch +Patch0026: 0026-console-add-question-mark-escape-op.patch +Patch0027: 0027-Make-char-muxer-more-robust-wrt-sma.patch +Patch0028: 0028-linux-user-lseek-explicitly-cast-no.patch +Patch0029: 0029-virtfs-proxy-helper-Provide-__u64-f.patch +Patch0030: 0030-configure-Enable-PIE-for-ppc-and-pp.patch +Patch0031: 0031-AIO-Reduce-number-of-threads-for-32.patch +Patch0032: 0032-dictzip-Fix-on-big-endian-systems.patch +Patch0033: 0033-xen_disk-Add-suse-specific-flush-di.patch +Patch0034: 0034-build-link-with-libatomic-on-powerp.patch +Patch0035: 0035-xen-SUSE-xenlinux-unplug-for-emulat.patch +Patch0036: 0036-qemu-bridge-helper-reduce-security-.patch +Patch0037: 0037-qemu-binfmt-conf-use-qemu-ARCH-binf.patch +Patch0038: 0038-configure-Fix-detection-of-seccomp-.patch +Patch0039: 0039-linux-user-properly-test-for-infini.patch # Please do not add patches manually here, run update_git.sh. # this is to make lint happy Source300: qemu-rpmlintrc @@ -132,7 +116,7 @@ emulations. This can be used together with the OBS build script to run cross-architecture builds. %prep -%setup -q -n qemu-2.6.1 +%setup -q -n qemu-2.7.0 %patch0001 -p1 %patch0002 -p1 %patch0003 -p1 @@ -172,22 +156,6 @@ run cross-architecture builds. %patch0037 -p1 %patch0038 -p1 %patch0039 -p1 -%patch0040 -p1 -%patch0041 -p1 -%patch0042 -p1 -%patch0043 -p1 -%patch0044 -p1 -%patch0045 -p1 -%patch0046 -p1 -%patch0047 -p1 -%patch0048 -p1 -%patch0049 -p1 -%patch0050 -p1 -%patch0051 -p1 -%patch0052 -p1 -%patch0053 -p1 -%patch0054 -p1 -%patch0055 -p1 %build ./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \ @@ -243,13 +211,13 @@ make %{?_smp_mflags} V=1 %install make install DESTDIR=$RPM_BUILD_ROOT rm -fr $RPM_BUILD_ROOT/%_datadir/doc -rm -rf $RPM_BUILD_ROOT/%_mandir/man1/qemu.1 -rm -rf $RPM_BUILD_ROOT/%_mandir/man1/qemu-img.1 -rm -rf $RPM_BUILD_ROOT/%_mandir/man8/qemu-nbd.8 +rm -f $RPM_BUILD_ROOT/%_mandir/man1/qemu.1 +rm -f $RPM_BUILD_ROOT/%_mandir/man1/qemu-img.1 +rm -f $RPM_BUILD_ROOT/%_mandir/man8/qemu-nbd.8 rm -rf $RPM_BUILD_ROOT/%_datadir/qemu/keymaps -rm -rf $RPM_BUILD_ROOT/%_datadir/qemu/trace-events -rm -rf $RPM_BUILD_ROOT/%_sysconfdir/qemu/target-x86_64.conf -rm -rf $RPM_BUILD_ROOT/%_libexecdir/qemu-bridge-helper +rm -f $RPM_BUILD_ROOT/%_datadir/qemu/trace-events-all +rm -f $RPM_BUILD_ROOT/%_sysconfdir/qemu/target-x86_64.conf +rm -f $RPM_BUILD_ROOT/%_libexecdir/qemu-bridge-helper install -d -m 755 $RPM_BUILD_ROOT/%_sbindir install -m 755 scripts/qemu-binfmt-conf.sh $RPM_BUILD_ROOT/%_sbindir %ifnarch %ix86 x86_64 diff --git a/qemu-linux-user.spec.in b/qemu-linux-user.spec.in index 1dd178bc..3fd87482 100644 --- a/qemu-linux-user.spec.in +++ b/qemu-linux-user.spec.in @@ -23,7 +23,7 @@ License: BSD-3-Clause and GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and MIT Group: System/Emulators/PC QEMU_VERSION Release: 0 -Source: http://wiki.qemu.org/download/qemu-2.6.1.tar.bz2 +Source: http://wiki.qemu.org/download/qemu-2.7.0.tar.bz2 # This patch queue is auto-generated from https://github.com/openSUSE/qemu PATCH_FILES # Please do not add patches manually here, run update_git.sh. @@ -78,7 +78,7 @@ emulations. This can be used together with the OBS build script to run cross-architecture builds. %prep -%setup -q -n qemu-2.6.1 +%setup -q -n qemu-2.7.0 PATCH_EXEC %build @@ -135,13 +135,13 @@ make %{?_smp_mflags} V=1 %install make install DESTDIR=$RPM_BUILD_ROOT rm -fr $RPM_BUILD_ROOT/%_datadir/doc -rm -rf $RPM_BUILD_ROOT/%_mandir/man1/qemu.1 -rm -rf $RPM_BUILD_ROOT/%_mandir/man1/qemu-img.1 -rm -rf $RPM_BUILD_ROOT/%_mandir/man8/qemu-nbd.8 +rm -f $RPM_BUILD_ROOT/%_mandir/man1/qemu.1 +rm -f $RPM_BUILD_ROOT/%_mandir/man1/qemu-img.1 +rm -f $RPM_BUILD_ROOT/%_mandir/man8/qemu-nbd.8 rm -rf $RPM_BUILD_ROOT/%_datadir/qemu/keymaps -rm -rf $RPM_BUILD_ROOT/%_datadir/qemu/trace-events -rm -rf $RPM_BUILD_ROOT/%_sysconfdir/qemu/target-x86_64.conf -rm -rf $RPM_BUILD_ROOT/%_libexecdir/qemu-bridge-helper +rm -f $RPM_BUILD_ROOT/%_datadir/qemu/trace-events-all +rm -f $RPM_BUILD_ROOT/%_sysconfdir/qemu/target-x86_64.conf +rm -f $RPM_BUILD_ROOT/%_libexecdir/qemu-bridge-helper install -d -m 755 $RPM_BUILD_ROOT/%_sbindir install -m 755 scripts/qemu-binfmt-conf.sh $RPM_BUILD_ROOT/%_sbindir %ifnarch %ix86 x86_64 diff --git a/qemu-testsuite.changes b/qemu-testsuite.changes index 4773d6fe..04ff6d73 100644 --- a/qemu-testsuite.changes +++ b/qemu-testsuite.changes @@ -1,3 +1,116 @@ +------------------------------------------------------------------- +Sat Sep 10 09:27:57 UTC 2016 - afaerber@suse.de + +- Updated to v2.7.0: See http://wiki.qemu-project.org/ChangeLog/2.7 +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.7 +* Patches added: + 0039-linux-user-properly-test-for-infini.patch + +------------------------------------------------------------------- +Tue Sep 6 17:05:06 UTC 2016 - brogers@suse.com + +- Use new kvm_stat package where available, else provide updated + kvm_stat script. + +------------------------------------------------------------------- +Wed Aug 31 13:40:20 UTC 2016 - afaerber@suse.de + +- Update to v2.7.0-rc5: See http://wiki.qemu-project.org/ChangeLog/2.7 + +------------------------------------------------------------------- +Tue Aug 23 16:04:11 UTC 2016 - afaerber@suse.de + +- Updated to v2.7.0-rc2: See http://wiki.qemu-project.org/ChangeLog/2.7 +* Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.7 +* Patches dropped: + 0002-qemu-0.9.0.cvs-binfmt.patch (script rewritten upstream) + 0009-block-vmdk-Support-creation-of-SCSI.patch (deprecated) + 0014-linux-user-Ignore-broken-loop-ioctl.patch (implemented upstream) + 0024-linux-user-add-more-blk-ioctls.patch (more implemented upstream) + 0034-qtest-Increase-socket-timeout.patch (increased further upstream) + 0036-configure-Enable-libseccomp-for-ppc.patch (enabled upstream) + 0038-block-split-large-discard-requests-.patch + 0041-net-mipsnet-check-packet-length-aga.patch + 0042-i386-kvmvapic-initialise-imm32-vari.patch + 0043-esp-check-command-buffer-length-bef.patch + 0044-esp-check-dma-length-before-reading.patch + 0045-scsi-pvscsi-check-command-descripto.patch + 0046-scsi-mptsas-infinite-loop-while-fet.patch + 0047-vga-add-sr_vbe-register-set.patch + 0048-scsi-megasas-use-appropriate-proper.patch + 0049-scsi-megasas-check-read_queue_head-.patch + 0050-scsi-megasas-null-terminate-bios-ve.patch + 0051-vmsvga-move-fifo-sanity-checks-to-v.patch + 0052-vmsvga-don-t-process-more-than-1024.patch + 0053-block-iscsi-avoid-potential-overflo.patch + 0054-scsi-esp-check-TI-buffer-index-befo.patch + 0055-xen-introduce-dummy-system-device.patch + 0056-xen-write-information-about-support.patch + 0057-xen-add-pvUSB-backend.patch + 0058-xen-move-xen_sysdev-to-xen_backend..patch + 0059-vnc-add-configurable-keyboard-delay.patch + 0060-scsi-megasas-initialise-local-confi.patch + 0061-configure-add-echo_version-helper.patch + 0062-configure-support-vte-2.91.patch + 0063-hw-arm-virt-mark-the-PCIe-host-cont.patch + 0065-scsi-esp-check-buffer-length-before.patch + 0066-scsi-esp-respect-FIFO-invariant-aft.patch + 0067-pci-assign-Move-Invalid-ROM-error-m.patch + 0068-Xen-PCI-passthrough-fix-passthrough.patch + 0069-scsi-esp-make-cmdbuf-big-enough-for.patch + 0070-scsi-esp-fix-migration.patch + 0071-virtio-error-out-if-guest-exceeds-v.patch + 0072-xen-when-removing-a-backend-don-t-r.patch + 0073-xen-drain-submit-queue-in-xen-usb-b.patch + 0074-qcow2-avoid-extra-flushes-in-qcow2.patch + 0076-xen-use-a-common-function-for-pv-an.patch + ipxe-ath9k-Fix-buffer-overrun-for-ar9287.patch + ipxe-mucurses-Fix-GCC-6-nonnull-compare-errors.patch + ipxe-sis190-Fix-building-with-GCC-6.patch + ipxe-skge-Fix-building-with-GCC-6.patch + ipxe-ath-Fix-building-with-GCC-6.patch + ipxe-legacy-Fix-building-with-GCC-6.patch + ipxe-util-v5.24-perl-errors-on-redeclare.patch + ipxe-efi-fix-garbage-bytes-in-device-path.patch + ipxe-efi-fix-uninitialised-data-in-HII.patch +* Patches renamed: + 0010-linux-user-add-binfmt-wrapper-for-a.patch -> 0009-linux-user-add-binfmt-wrapper-for-a.patch + 0011-PPC-KVM-Disable-mmu-notifier-check.patch -> 0010-PPC-KVM-Disable-mmu-notifier-check.patch + 0012-linux-user-fix-segfault-deadlock.patch -> 0011-linux-user-fix-segfault-deadlock.patch + 0013-linux-user-binfmt-support-host-bina.patch -> 0012-linux-user-binfmt-support-host-bina.patch + 0015-linux-user-lock-tcg.patch -> 0013-linux-user-lock-tcg.patch + 0016-linux-user-Run-multi-threaded-code-.patch -> 0014-linux-user-Run-multi-threaded-code-.patch + 0017-linux-user-lock-tb-flushing-too.patch -> 0015-linux-user-lock-tb-flushing-too.patch + 0018-linux-user-Fake-proc-cpuinfo.patch -> 0016-linux-user-Fake-proc-cpuinfo.patch + 0019-linux-user-implement-FS_IOC_GETFLAG.patch -> 0017-linux-user-implement-FS_IOC_GETFLAG.patch + 0020-linux-user-implement-FS_IOC_SETFLAG.patch -> 0018-linux-user-implement-FS_IOC_SETFLAG.patch + 0021-linux-user-XXX-disable-fiemap.patch -> 0019-linux-user-XXX-disable-fiemap.patch + 0022-slirp-nooutgoing.patch -> 0020-slirp-nooutgoing.patch + 0023-vnc-password-file-and-incoming-conn.patch -> 0021-vnc-password-file-and-incoming-conn.patch + 0025-linux-user-use-target_ulong.patch -> 0022-linux-user-use-target_ulong.patch + 0026-block-Add-support-for-DictZip-enabl.patch -> 0023-block-Add-support-for-DictZip-enabl.patch + 0027-block-Add-tar-container-format.patch -> 0024-block-Add-tar-container-format.patch + 0028-Legacy-Patch-kvm-qemu-preXX-dictzip.patch -> 0025-Legacy-Patch-kvm-qemu-preXX-dictzip.patch + 0029-console-add-question-mark-escape-op.patch -> 0026-console-add-question-mark-escape-op.patch + 0030-Make-char-muxer-more-robust-wrt-sma.patch -> 0027-Make-char-muxer-more-robust-wrt-sma.patch + 0031-linux-user-lseek-explicitly-cast-no.patch -> 0028-linux-user-lseek-explicitly-cast-no.patch + 0032-virtfs-proxy-helper-Provide-__u64-f.patch -> 0029-virtfs-proxy-helper-Provide-__u64-f.patch + 0033-configure-Enable-PIE-for-ppc-and-pp.patch -> 0030-configure-Enable-PIE-for-ppc-and-pp.patch + 0035-AIO-Reduce-number-of-threads-for-32.patch -> 0031-AIO-Reduce-number-of-threads-for-32.patch + 0037-dictzip-Fix-on-big-endian-systems.patch -> 0032-dictzip-Fix-on-big-endian-systems.patch + 0039-xen_disk-Add-suse-specific-flush-di.patch -> 0033-xen_disk-Add-suse-specific-flush-di.patch + 0040-build-link-with-libatomic-on-powerp.patch -> 0034-build-link-with-libatomic-on-powerp.patch + 0064-xen-SUSE-xenlinux-unplug-for-emulat.patch -> 0035-xen-SUSE-xenlinux-unplug-for-emulat.patch + 0075-qemu-bridge-helper-reduce-security-.patch -> 0036-qemu-bridge-helper-reduce-security-.patch +* Patches added: + 0002-qemu-binfmt-conf-Modify-default-pat.patch + 0037-qemu-binfmt-conf-use-qemu-ARCH-binf.patch +* Package renamed trace-events-all file and linuxboot_dma.bin +* Handle building and packaging roms for e1000e and vmxnet3 (Bruce) +* Remove ipxe patches which are now enabled upstream (Bruce) +* Enable seccomp for s390x (Mark Post): + 0038-configure-Fix-detection-of-seccomp-.patch + ------------------------------------------------------------------- Wed Aug 17 20:25:13 UTC 2016 - brogers@suse.com diff --git a/qemu-testsuite.spec b/qemu-testsuite.spec index 7a7cd1dd..d9a380ca 100644 --- a/qemu-testsuite.spec +++ b/qemu-testsuite.spec @@ -71,10 +71,10 @@ Url: http://www.qemu.org/ Summary: Universal CPU emulator License: BSD-3-Clause and GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and MIT Group: System/Emulators/PC -Version: 2.6.1 +Version: 2.7.0 Release: 0 -Source: http://wiki.qemu.org/download/qemu-2.6.1.tar.bz2 -Source99: http://wiki.qemu.org/download/qemu-2.6.1.tar.bz2.sig +Source: http://wiki.qemu.org/download/qemu-2.7.0.tar.bz2 +Source99: http://wiki.qemu.org/download/qemu-2.7.0.tar.bz2.sig Source1: 80-kvm.rules Source2: qemu-ifup Source3: kvm_stat @@ -88,60 +88,44 @@ Source10: kvm.conf # Upstream First -- http://wiki.qemu-project.org/Contribute/SubmitAPatch # This patch queue is auto-generated from https://github.com/openSUSE/qemu Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patch -Patch0002: 0002-qemu-0.9.0.cvs-binfmt.patch +Patch0002: 0002-qemu-binfmt-conf-Modify-default-pat.patch Patch0003: 0003-qemu-cvs-alsa_bitfield.patch Patch0004: 0004-qemu-cvs-alsa_ioctl.patch Patch0005: 0005-qemu-cvs-alsa_mmap.patch Patch0006: 0006-qemu-cvs-gettimeofday.patch Patch0007: 0007-qemu-cvs-ioctl_debug.patch Patch0008: 0008-qemu-cvs-ioctl_nodirection.patch -Patch0009: 0009-block-vmdk-Support-creation-of-SCSI.patch -Patch0010: 0010-linux-user-add-binfmt-wrapper-for-a.patch -Patch0011: 0011-PPC-KVM-Disable-mmu-notifier-check.patch -Patch0012: 0012-linux-user-fix-segfault-deadlock.patch -Patch0013: 0013-linux-user-binfmt-support-host-bina.patch -Patch0014: 0014-linux-user-Ignore-broken-loop-ioctl.patch -Patch0015: 0015-linux-user-lock-tcg.patch -Patch0016: 0016-linux-user-Run-multi-threaded-code-.patch -Patch0017: 0017-linux-user-lock-tb-flushing-too.patch -Patch0018: 0018-linux-user-Fake-proc-cpuinfo.patch -Patch0019: 0019-linux-user-implement-FS_IOC_GETFLAG.patch -Patch0020: 0020-linux-user-implement-FS_IOC_SETFLAG.patch -Patch0021: 0021-linux-user-XXX-disable-fiemap.patch -Patch0022: 0022-slirp-nooutgoing.patch -Patch0023: 0023-vnc-password-file-and-incoming-conn.patch -Patch0024: 0024-linux-user-add-more-blk-ioctls.patch -Patch0025: 0025-linux-user-use-target_ulong.patch -Patch0026: 0026-block-Add-support-for-DictZip-enabl.patch -Patch0027: 0027-block-Add-tar-container-format.patch -Patch0028: 0028-Legacy-Patch-kvm-qemu-preXX-dictzip.patch -Patch0029: 0029-console-add-question-mark-escape-op.patch -Patch0030: 0030-Make-char-muxer-more-robust-wrt-sma.patch -Patch0031: 0031-linux-user-lseek-explicitly-cast-no.patch -Patch0032: 0032-virtfs-proxy-helper-Provide-__u64-f.patch -Patch0033: 0033-configure-Enable-PIE-for-ppc-and-pp.patch -Patch0034: 0034-qtest-Increase-socket-timeout.patch -Patch0035: 0035-AIO-Reduce-number-of-threads-for-32.patch -Patch0036: 0036-configure-Enable-libseccomp-for-ppc.patch -Patch0037: 0037-dictzip-Fix-on-big-endian-systems.patch -Patch0038: 0038-block-split-large-discard-requests-.patch -Patch0039: 0039-xen_disk-Add-suse-specific-flush-di.patch -Patch0040: 0040-build-link-with-libatomic-on-powerp.patch -Patch0041: 0041-xen-introduce-dummy-system-device.patch -Patch0042: 0042-xen-write-information-about-support.patch -Patch0043: 0043-xen-add-pvUSB-backend.patch -Patch0044: 0044-xen-move-xen_sysdev-to-xen_backend..patch -Patch0045: 0045-vnc-add-configurable-keyboard-delay.patch -Patch0046: 0046-configure-add-echo_version-helper.patch -Patch0047: 0047-configure-support-vte-2.91.patch -Patch0048: 0048-hw-arm-virt-mark-the-PCIe-host-cont.patch -Patch0049: 0049-xen-SUSE-xenlinux-unplug-for-emulat.patch -Patch0050: 0050-scsi-esp-fix-migration.patch -Patch0051: 0051-xen-when-removing-a-backend-don-t-r.patch -Patch0052: 0052-xen-drain-submit-queue-in-xen-usb-b.patch -Patch0053: 0053-qcow2-avoid-extra-flushes-in-qcow2.patch -Patch0054: 0054-qemu-bridge-helper-reduce-security-.patch -Patch0055: 0055-xen-use-a-common-function-for-pv-an.patch +Patch0009: 0009-linux-user-add-binfmt-wrapper-for-a.patch +Patch0010: 0010-PPC-KVM-Disable-mmu-notifier-check.patch +Patch0011: 0011-linux-user-fix-segfault-deadlock.patch +Patch0012: 0012-linux-user-binfmt-support-host-bina.patch +Patch0013: 0013-linux-user-lock-tcg.patch +Patch0014: 0014-linux-user-Run-multi-threaded-code-.patch +Patch0015: 0015-linux-user-lock-tb-flushing-too.patch +Patch0016: 0016-linux-user-Fake-proc-cpuinfo.patch +Patch0017: 0017-linux-user-implement-FS_IOC_GETFLAG.patch +Patch0018: 0018-linux-user-implement-FS_IOC_SETFLAG.patch +Patch0019: 0019-linux-user-XXX-disable-fiemap.patch +Patch0020: 0020-slirp-nooutgoing.patch +Patch0021: 0021-vnc-password-file-and-incoming-conn.patch +Patch0022: 0022-linux-user-use-target_ulong.patch +Patch0023: 0023-block-Add-support-for-DictZip-enabl.patch +Patch0024: 0024-block-Add-tar-container-format.patch +Patch0025: 0025-Legacy-Patch-kvm-qemu-preXX-dictzip.patch +Patch0026: 0026-console-add-question-mark-escape-op.patch +Patch0027: 0027-Make-char-muxer-more-robust-wrt-sma.patch +Patch0028: 0028-linux-user-lseek-explicitly-cast-no.patch +Patch0029: 0029-virtfs-proxy-helper-Provide-__u64-f.patch +Patch0030: 0030-configure-Enable-PIE-for-ppc-and-pp.patch +Patch0031: 0031-AIO-Reduce-number-of-threads-for-32.patch +Patch0032: 0032-dictzip-Fix-on-big-endian-systems.patch +Patch0033: 0033-xen_disk-Add-suse-specific-flush-di.patch +Patch0034: 0034-build-link-with-libatomic-on-powerp.patch +Patch0035: 0035-xen-SUSE-xenlinux-unplug-for-emulat.patch +Patch0036: 0036-qemu-bridge-helper-reduce-security-.patch +Patch0037: 0037-qemu-binfmt-conf-use-qemu-ARCH-binf.patch +Patch0038: 0038-configure-Fix-detection-of-seccomp-.patch +Patch0039: 0039-linux-user-properly-test-for-infini.patch # Please do not add QEMU patches manually here. # Run update_git.sh to regenerate this queue. @@ -151,15 +135,7 @@ Patch0055: 0055-xen-use-a-common-function-for-pv-an.patch Patch1000: seabios_128kb.patch # ipxe -Patch1100: ipxe-ath9k-Fix-buffer-overrun-for-ar9287.patch -Patch1101: ipxe-mucurses-Fix-GCC-6-nonnull-compare-errors.patch -Patch1102: ipxe-sis190-Fix-building-with-GCC-6.patch -Patch1103: ipxe-skge-Fix-building-with-GCC-6.patch -Patch1104: ipxe-ath-Fix-building-with-GCC-6.patch -Patch1105: ipxe-legacy-Fix-building-with-GCC-6.patch -Patch1106: ipxe-util-v5.24-perl-errors-on-redeclare.patch -Patch1107: ipxe-efi-fix-garbage-bytes-in-device-path.patch -Patch1108: ipxe-efi-fix-uninitialised-data-in-HII.patch +# (currently no patches) %endif # this is to make lint happy @@ -331,6 +307,11 @@ Requires(post): udev %ifarch s390x Requires(post): procps %endif +%if ! %{legacy_qemu_kvm} +%if 0%{?suse_version} > 1320 +Recommends: kvm_stat +%endif +%endif %endif Recommends: qemu-block-curl Recommends: qemu-tools @@ -370,8 +351,8 @@ Recommends: qemu-ksm = %{version} %endif %ifarch x86_64 -%define x86_64_only_b_f_f {efi-e1000.rom efi-eepro100.rom \ -efi-pcnet.rom efi-ne2k_pci.rom efi-rtl8139.rom efi-virtio.rom} +%define x86_64_only_b_f_f {efi-e1000.rom efi-e1000e.rom efi-eepro100.rom \ +efi-pcnet.rom efi-ne2k_pci.rom efi-rtl8139.rom efi-virtio.rom efi-vmxnet3.rom} %endif %define built_firmware_files {bios.bin bios-256k.bin sgabios.bin vgabios.bin \ vgabios-cirrus.bin vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin \ @@ -475,6 +456,9 @@ Requires: qemu-s390 = %version %endif Provides: kvm = %version Obsoletes: kvm < %version +%if 0%{?suse_version} > 1320 +Requires: kvm_stat +%endif Recommends: python-curses %description kvm @@ -650,7 +634,7 @@ This sub-package contains the guest agent. %package seabios Summary: X86 BIOS for QEMU Group: System/Emulators/PC -Version: 1.9.1 +Version: 1.9.3 Release: 0 %if 0%{?suse_version} > %{noarch_supported} BuildArch: noarch @@ -664,7 +648,7 @@ is the default BIOS for QEMU. %package vgabios Summary: VGA BIOSes for QEMU Group: System/Emulators/PC -Version: 1.9.1 +Version: 1.9.3 Release: 0 %if 0%{?suse_version} > %{noarch_supported} BuildArch: noarch @@ -721,7 +705,7 @@ This package provides a service file for starting and stopping KSM. %endif # !qemu-testsuite %prep -%setup -q -n qemu-2.6.1 +%setup -q -n qemu-2.7.0 %patch0001 -p1 %patch0002 -p1 %patch0003 -p1 @@ -761,37 +745,13 @@ This package provides a service file for starting and stopping KSM. %patch0037 -p1 %patch0038 -p1 %patch0039 -p1 -%patch0040 -p1 -%patch0041 -p1 -%patch0042 -p1 -%patch0043 -p1 -%patch0044 -p1 -%patch0045 -p1 -%patch0046 -p1 -%patch0047 -p1 -%patch0048 -p1 -%patch0049 -p1 -%patch0050 -p1 -%patch0051 -p1 -%patch0052 -p1 -%patch0053 -p1 -%patch0054 -p1 -%patch0055 -p1 %if %{build_x86_fw_from_source} pushd roms/seabios %patch1000 -p1 popd pushd roms/ipxe -%patch1100 -p1 -%patch1101 -p1 -%patch1102 -p1 -%patch1103 -p1 -%patch1104 -p1 -%patch1105 -p1 -%patch1106 -p1 -%patch1107 -p1 -%patch1108 -p1 +# (currently no patches) popd # as a safeguard, delete the firmware files that we intend to build @@ -1080,7 +1040,9 @@ EOF chmod 644 %{buildroot}%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x %endif install -D -m 755 %{SOURCE2} %{buildroot}/usr/share/qemu/qemu-ifup +%if 0%{?suse_version} <= 1320 install -D -m 755 %{SOURCE3} %{buildroot}%{_bindir}/kvm_stat +%endif install -D -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1/qemu-kvm.1.gz %endif %if %{kvm_available} @@ -1188,7 +1150,7 @@ fi %doc %_mandir/man1/qemu.1.gz %dir %_datadir/%name %_datadir/%name/keymaps -%_datadir/%name/trace-events +%_datadir/%name/trace-events-all %_datadir/%name/qemu-icon.bmp %_datadir/%name/qemu_logo_no_text.svg %dir %_sysconfdir/%name @@ -1213,6 +1175,7 @@ fi %_bindir/qemu-system-x86_64 %_datadir/%name/kvmvapic.bin %_datadir/%name/linuxboot.bin +%_datadir/%name/linuxboot_dma.bin %_datadir/%name/multiboot.bin %files ppc @@ -1271,7 +1234,9 @@ fi %files kvm %defattr(-,root,root) %_bindir/qemu-kvm +%if 0%{?suse_version} <= 1320 %_bindir/kvm_stat +%endif %_datadir/qemu/qemu-ifup %_mandir/man1/qemu-kvm.1.gz %endif @@ -1341,11 +1306,13 @@ fi %_datadir/%name/pxe-rtl8139.rom %_datadir/%name/pxe-virtio.rom %_datadir/%name/efi-e1000.rom +%_datadir/%name/efi-e1000e.rom %_datadir/%name/efi-eepro100.rom %_datadir/%name/efi-pcnet.rom %_datadir/%name/efi-ne2k_pci.rom %_datadir/%name/efi-rtl8139.rom %_datadir/%name/efi-virtio.rom +%_datadir/%name/efi-vmxnet3.rom %endif %files tools diff --git a/qemu.changes b/qemu.changes index 4773d6fe..04ff6d73 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,116 @@ +------------------------------------------------------------------- +Sat Sep 10 09:27:57 UTC 2016 - afaerber@suse.de + +- Updated to v2.7.0: See http://wiki.qemu-project.org/ChangeLog/2.7 +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.7 +* Patches added: + 0039-linux-user-properly-test-for-infini.patch + +------------------------------------------------------------------- +Tue Sep 6 17:05:06 UTC 2016 - brogers@suse.com + +- Use new kvm_stat package where available, else provide updated + kvm_stat script. + +------------------------------------------------------------------- +Wed Aug 31 13:40:20 UTC 2016 - afaerber@suse.de + +- Update to v2.7.0-rc5: See http://wiki.qemu-project.org/ChangeLog/2.7 + +------------------------------------------------------------------- +Tue Aug 23 16:04:11 UTC 2016 - afaerber@suse.de + +- Updated to v2.7.0-rc2: See http://wiki.qemu-project.org/ChangeLog/2.7 +* Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.7 +* Patches dropped: + 0002-qemu-0.9.0.cvs-binfmt.patch (script rewritten upstream) + 0009-block-vmdk-Support-creation-of-SCSI.patch (deprecated) + 0014-linux-user-Ignore-broken-loop-ioctl.patch (implemented upstream) + 0024-linux-user-add-more-blk-ioctls.patch (more implemented upstream) + 0034-qtest-Increase-socket-timeout.patch (increased further upstream) + 0036-configure-Enable-libseccomp-for-ppc.patch (enabled upstream) + 0038-block-split-large-discard-requests-.patch + 0041-net-mipsnet-check-packet-length-aga.patch + 0042-i386-kvmvapic-initialise-imm32-vari.patch + 0043-esp-check-command-buffer-length-bef.patch + 0044-esp-check-dma-length-before-reading.patch + 0045-scsi-pvscsi-check-command-descripto.patch + 0046-scsi-mptsas-infinite-loop-while-fet.patch + 0047-vga-add-sr_vbe-register-set.patch + 0048-scsi-megasas-use-appropriate-proper.patch + 0049-scsi-megasas-check-read_queue_head-.patch + 0050-scsi-megasas-null-terminate-bios-ve.patch + 0051-vmsvga-move-fifo-sanity-checks-to-v.patch + 0052-vmsvga-don-t-process-more-than-1024.patch + 0053-block-iscsi-avoid-potential-overflo.patch + 0054-scsi-esp-check-TI-buffer-index-befo.patch + 0055-xen-introduce-dummy-system-device.patch + 0056-xen-write-information-about-support.patch + 0057-xen-add-pvUSB-backend.patch + 0058-xen-move-xen_sysdev-to-xen_backend..patch + 0059-vnc-add-configurable-keyboard-delay.patch + 0060-scsi-megasas-initialise-local-confi.patch + 0061-configure-add-echo_version-helper.patch + 0062-configure-support-vte-2.91.patch + 0063-hw-arm-virt-mark-the-PCIe-host-cont.patch + 0065-scsi-esp-check-buffer-length-before.patch + 0066-scsi-esp-respect-FIFO-invariant-aft.patch + 0067-pci-assign-Move-Invalid-ROM-error-m.patch + 0068-Xen-PCI-passthrough-fix-passthrough.patch + 0069-scsi-esp-make-cmdbuf-big-enough-for.patch + 0070-scsi-esp-fix-migration.patch + 0071-virtio-error-out-if-guest-exceeds-v.patch + 0072-xen-when-removing-a-backend-don-t-r.patch + 0073-xen-drain-submit-queue-in-xen-usb-b.patch + 0074-qcow2-avoid-extra-flushes-in-qcow2.patch + 0076-xen-use-a-common-function-for-pv-an.patch + ipxe-ath9k-Fix-buffer-overrun-for-ar9287.patch + ipxe-mucurses-Fix-GCC-6-nonnull-compare-errors.patch + ipxe-sis190-Fix-building-with-GCC-6.patch + ipxe-skge-Fix-building-with-GCC-6.patch + ipxe-ath-Fix-building-with-GCC-6.patch + ipxe-legacy-Fix-building-with-GCC-6.patch + ipxe-util-v5.24-perl-errors-on-redeclare.patch + ipxe-efi-fix-garbage-bytes-in-device-path.patch + ipxe-efi-fix-uninitialised-data-in-HII.patch +* Patches renamed: + 0010-linux-user-add-binfmt-wrapper-for-a.patch -> 0009-linux-user-add-binfmt-wrapper-for-a.patch + 0011-PPC-KVM-Disable-mmu-notifier-check.patch -> 0010-PPC-KVM-Disable-mmu-notifier-check.patch + 0012-linux-user-fix-segfault-deadlock.patch -> 0011-linux-user-fix-segfault-deadlock.patch + 0013-linux-user-binfmt-support-host-bina.patch -> 0012-linux-user-binfmt-support-host-bina.patch + 0015-linux-user-lock-tcg.patch -> 0013-linux-user-lock-tcg.patch + 0016-linux-user-Run-multi-threaded-code-.patch -> 0014-linux-user-Run-multi-threaded-code-.patch + 0017-linux-user-lock-tb-flushing-too.patch -> 0015-linux-user-lock-tb-flushing-too.patch + 0018-linux-user-Fake-proc-cpuinfo.patch -> 0016-linux-user-Fake-proc-cpuinfo.patch + 0019-linux-user-implement-FS_IOC_GETFLAG.patch -> 0017-linux-user-implement-FS_IOC_GETFLAG.patch + 0020-linux-user-implement-FS_IOC_SETFLAG.patch -> 0018-linux-user-implement-FS_IOC_SETFLAG.patch + 0021-linux-user-XXX-disable-fiemap.patch -> 0019-linux-user-XXX-disable-fiemap.patch + 0022-slirp-nooutgoing.patch -> 0020-slirp-nooutgoing.patch + 0023-vnc-password-file-and-incoming-conn.patch -> 0021-vnc-password-file-and-incoming-conn.patch + 0025-linux-user-use-target_ulong.patch -> 0022-linux-user-use-target_ulong.patch + 0026-block-Add-support-for-DictZip-enabl.patch -> 0023-block-Add-support-for-DictZip-enabl.patch + 0027-block-Add-tar-container-format.patch -> 0024-block-Add-tar-container-format.patch + 0028-Legacy-Patch-kvm-qemu-preXX-dictzip.patch -> 0025-Legacy-Patch-kvm-qemu-preXX-dictzip.patch + 0029-console-add-question-mark-escape-op.patch -> 0026-console-add-question-mark-escape-op.patch + 0030-Make-char-muxer-more-robust-wrt-sma.patch -> 0027-Make-char-muxer-more-robust-wrt-sma.patch + 0031-linux-user-lseek-explicitly-cast-no.patch -> 0028-linux-user-lseek-explicitly-cast-no.patch + 0032-virtfs-proxy-helper-Provide-__u64-f.patch -> 0029-virtfs-proxy-helper-Provide-__u64-f.patch + 0033-configure-Enable-PIE-for-ppc-and-pp.patch -> 0030-configure-Enable-PIE-for-ppc-and-pp.patch + 0035-AIO-Reduce-number-of-threads-for-32.patch -> 0031-AIO-Reduce-number-of-threads-for-32.patch + 0037-dictzip-Fix-on-big-endian-systems.patch -> 0032-dictzip-Fix-on-big-endian-systems.patch + 0039-xen_disk-Add-suse-specific-flush-di.patch -> 0033-xen_disk-Add-suse-specific-flush-di.patch + 0040-build-link-with-libatomic-on-powerp.patch -> 0034-build-link-with-libatomic-on-powerp.patch + 0064-xen-SUSE-xenlinux-unplug-for-emulat.patch -> 0035-xen-SUSE-xenlinux-unplug-for-emulat.patch + 0075-qemu-bridge-helper-reduce-security-.patch -> 0036-qemu-bridge-helper-reduce-security-.patch +* Patches added: + 0002-qemu-binfmt-conf-Modify-default-pat.patch + 0037-qemu-binfmt-conf-use-qemu-ARCH-binf.patch +* Package renamed trace-events-all file and linuxboot_dma.bin +* Handle building and packaging roms for e1000e and vmxnet3 (Bruce) +* Remove ipxe patches which are now enabled upstream (Bruce) +* Enable seccomp for s390x (Mark Post): + 0038-configure-Fix-detection-of-seccomp-.patch + ------------------------------------------------------------------- Wed Aug 17 20:25:13 UTC 2016 - brogers@suse.com diff --git a/qemu.spec b/qemu.spec index 75b03a5e..cd63a10c 100644 --- a/qemu.spec +++ b/qemu.spec @@ -71,10 +71,10 @@ Url: http://www.qemu.org/ Summary: Universal CPU emulator License: BSD-3-Clause and GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and MIT Group: System/Emulators/PC -Version: 2.6.1 +Version: 2.7.0 Release: 0 -Source: http://wiki.qemu.org/download/qemu-2.6.1.tar.bz2 -Source99: http://wiki.qemu.org/download/qemu-2.6.1.tar.bz2.sig +Source: http://wiki.qemu.org/download/qemu-2.7.0.tar.bz2 +Source99: http://wiki.qemu.org/download/qemu-2.7.0.tar.bz2.sig Source1: 80-kvm.rules Source2: qemu-ifup Source3: kvm_stat @@ -88,60 +88,44 @@ Source10: kvm.conf # Upstream First -- http://wiki.qemu-project.org/Contribute/SubmitAPatch # This patch queue is auto-generated from https://github.com/openSUSE/qemu Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patch -Patch0002: 0002-qemu-0.9.0.cvs-binfmt.patch +Patch0002: 0002-qemu-binfmt-conf-Modify-default-pat.patch Patch0003: 0003-qemu-cvs-alsa_bitfield.patch Patch0004: 0004-qemu-cvs-alsa_ioctl.patch Patch0005: 0005-qemu-cvs-alsa_mmap.patch Patch0006: 0006-qemu-cvs-gettimeofday.patch Patch0007: 0007-qemu-cvs-ioctl_debug.patch Patch0008: 0008-qemu-cvs-ioctl_nodirection.patch -Patch0009: 0009-block-vmdk-Support-creation-of-SCSI.patch -Patch0010: 0010-linux-user-add-binfmt-wrapper-for-a.patch -Patch0011: 0011-PPC-KVM-Disable-mmu-notifier-check.patch -Patch0012: 0012-linux-user-fix-segfault-deadlock.patch -Patch0013: 0013-linux-user-binfmt-support-host-bina.patch -Patch0014: 0014-linux-user-Ignore-broken-loop-ioctl.patch -Patch0015: 0015-linux-user-lock-tcg.patch -Patch0016: 0016-linux-user-Run-multi-threaded-code-.patch -Patch0017: 0017-linux-user-lock-tb-flushing-too.patch -Patch0018: 0018-linux-user-Fake-proc-cpuinfo.patch -Patch0019: 0019-linux-user-implement-FS_IOC_GETFLAG.patch -Patch0020: 0020-linux-user-implement-FS_IOC_SETFLAG.patch -Patch0021: 0021-linux-user-XXX-disable-fiemap.patch -Patch0022: 0022-slirp-nooutgoing.patch -Patch0023: 0023-vnc-password-file-and-incoming-conn.patch -Patch0024: 0024-linux-user-add-more-blk-ioctls.patch -Patch0025: 0025-linux-user-use-target_ulong.patch -Patch0026: 0026-block-Add-support-for-DictZip-enabl.patch -Patch0027: 0027-block-Add-tar-container-format.patch -Patch0028: 0028-Legacy-Patch-kvm-qemu-preXX-dictzip.patch -Patch0029: 0029-console-add-question-mark-escape-op.patch -Patch0030: 0030-Make-char-muxer-more-robust-wrt-sma.patch -Patch0031: 0031-linux-user-lseek-explicitly-cast-no.patch -Patch0032: 0032-virtfs-proxy-helper-Provide-__u64-f.patch -Patch0033: 0033-configure-Enable-PIE-for-ppc-and-pp.patch -Patch0034: 0034-qtest-Increase-socket-timeout.patch -Patch0035: 0035-AIO-Reduce-number-of-threads-for-32.patch -Patch0036: 0036-configure-Enable-libseccomp-for-ppc.patch -Patch0037: 0037-dictzip-Fix-on-big-endian-systems.patch -Patch0038: 0038-block-split-large-discard-requests-.patch -Patch0039: 0039-xen_disk-Add-suse-specific-flush-di.patch -Patch0040: 0040-build-link-with-libatomic-on-powerp.patch -Patch0041: 0041-xen-introduce-dummy-system-device.patch -Patch0042: 0042-xen-write-information-about-support.patch -Patch0043: 0043-xen-add-pvUSB-backend.patch -Patch0044: 0044-xen-move-xen_sysdev-to-xen_backend..patch -Patch0045: 0045-vnc-add-configurable-keyboard-delay.patch -Patch0046: 0046-configure-add-echo_version-helper.patch -Patch0047: 0047-configure-support-vte-2.91.patch -Patch0048: 0048-hw-arm-virt-mark-the-PCIe-host-cont.patch -Patch0049: 0049-xen-SUSE-xenlinux-unplug-for-emulat.patch -Patch0050: 0050-scsi-esp-fix-migration.patch -Patch0051: 0051-xen-when-removing-a-backend-don-t-r.patch -Patch0052: 0052-xen-drain-submit-queue-in-xen-usb-b.patch -Patch0053: 0053-qcow2-avoid-extra-flushes-in-qcow2.patch -Patch0054: 0054-qemu-bridge-helper-reduce-security-.patch -Patch0055: 0055-xen-use-a-common-function-for-pv-an.patch +Patch0009: 0009-linux-user-add-binfmt-wrapper-for-a.patch +Patch0010: 0010-PPC-KVM-Disable-mmu-notifier-check.patch +Patch0011: 0011-linux-user-fix-segfault-deadlock.patch +Patch0012: 0012-linux-user-binfmt-support-host-bina.patch +Patch0013: 0013-linux-user-lock-tcg.patch +Patch0014: 0014-linux-user-Run-multi-threaded-code-.patch +Patch0015: 0015-linux-user-lock-tb-flushing-too.patch +Patch0016: 0016-linux-user-Fake-proc-cpuinfo.patch +Patch0017: 0017-linux-user-implement-FS_IOC_GETFLAG.patch +Patch0018: 0018-linux-user-implement-FS_IOC_SETFLAG.patch +Patch0019: 0019-linux-user-XXX-disable-fiemap.patch +Patch0020: 0020-slirp-nooutgoing.patch +Patch0021: 0021-vnc-password-file-and-incoming-conn.patch +Patch0022: 0022-linux-user-use-target_ulong.patch +Patch0023: 0023-block-Add-support-for-DictZip-enabl.patch +Patch0024: 0024-block-Add-tar-container-format.patch +Patch0025: 0025-Legacy-Patch-kvm-qemu-preXX-dictzip.patch +Patch0026: 0026-console-add-question-mark-escape-op.patch +Patch0027: 0027-Make-char-muxer-more-robust-wrt-sma.patch +Patch0028: 0028-linux-user-lseek-explicitly-cast-no.patch +Patch0029: 0029-virtfs-proxy-helper-Provide-__u64-f.patch +Patch0030: 0030-configure-Enable-PIE-for-ppc-and-pp.patch +Patch0031: 0031-AIO-Reduce-number-of-threads-for-32.patch +Patch0032: 0032-dictzip-Fix-on-big-endian-systems.patch +Patch0033: 0033-xen_disk-Add-suse-specific-flush-di.patch +Patch0034: 0034-build-link-with-libatomic-on-powerp.patch +Patch0035: 0035-xen-SUSE-xenlinux-unplug-for-emulat.patch +Patch0036: 0036-qemu-bridge-helper-reduce-security-.patch +Patch0037: 0037-qemu-binfmt-conf-use-qemu-ARCH-binf.patch +Patch0038: 0038-configure-Fix-detection-of-seccomp-.patch +Patch0039: 0039-linux-user-properly-test-for-infini.patch # Please do not add QEMU patches manually here. # Run update_git.sh to regenerate this queue. @@ -151,15 +135,7 @@ Patch0055: 0055-xen-use-a-common-function-for-pv-an.patch Patch1000: seabios_128kb.patch # ipxe -Patch1100: ipxe-ath9k-Fix-buffer-overrun-for-ar9287.patch -Patch1101: ipxe-mucurses-Fix-GCC-6-nonnull-compare-errors.patch -Patch1102: ipxe-sis190-Fix-building-with-GCC-6.patch -Patch1103: ipxe-skge-Fix-building-with-GCC-6.patch -Patch1104: ipxe-ath-Fix-building-with-GCC-6.patch -Patch1105: ipxe-legacy-Fix-building-with-GCC-6.patch -Patch1106: ipxe-util-v5.24-perl-errors-on-redeclare.patch -Patch1107: ipxe-efi-fix-garbage-bytes-in-device-path.patch -Patch1108: ipxe-efi-fix-uninitialised-data-in-HII.patch +# (currently no patches) %endif # this is to make lint happy @@ -331,6 +307,11 @@ Requires(post): udev %ifarch s390x Requires(post): procps %endif +%if ! %{legacy_qemu_kvm} +%if 0%{?suse_version} > 1320 +Recommends: kvm_stat +%endif +%endif %endif Recommends: qemu-block-curl Recommends: qemu-tools @@ -370,8 +351,8 @@ Recommends: qemu-ksm = %{version} %endif %ifarch x86_64 -%define x86_64_only_b_f_f {efi-e1000.rom efi-eepro100.rom \ -efi-pcnet.rom efi-ne2k_pci.rom efi-rtl8139.rom efi-virtio.rom} +%define x86_64_only_b_f_f {efi-e1000.rom efi-e1000e.rom efi-eepro100.rom \ +efi-pcnet.rom efi-ne2k_pci.rom efi-rtl8139.rom efi-virtio.rom efi-vmxnet3.rom} %endif %define built_firmware_files {bios.bin bios-256k.bin sgabios.bin vgabios.bin \ vgabios-cirrus.bin vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin \ @@ -475,6 +456,9 @@ Requires: qemu-s390 = %version %endif Provides: kvm = %version Obsoletes: kvm < %version +%if 0%{?suse_version} > 1320 +Requires: kvm_stat +%endif Recommends: python-curses %description kvm @@ -650,7 +634,7 @@ This sub-package contains the guest agent. %package seabios Summary: X86 BIOS for QEMU Group: System/Emulators/PC -Version: 1.9.1 +Version: 1.9.3 Release: 0 %if 0%{?suse_version} > %{noarch_supported} BuildArch: noarch @@ -664,7 +648,7 @@ is the default BIOS for QEMU. %package vgabios Summary: VGA BIOSes for QEMU Group: System/Emulators/PC -Version: 1.9.1 +Version: 1.9.3 Release: 0 %if 0%{?suse_version} > %{noarch_supported} BuildArch: noarch @@ -721,7 +705,7 @@ This package provides a service file for starting and stopping KSM. %endif # !qemu-testsuite %prep -%setup -q -n qemu-2.6.1 +%setup -q -n qemu-2.7.0 %patch0001 -p1 %patch0002 -p1 %patch0003 -p1 @@ -761,37 +745,13 @@ This package provides a service file for starting and stopping KSM. %patch0037 -p1 %patch0038 -p1 %patch0039 -p1 -%patch0040 -p1 -%patch0041 -p1 -%patch0042 -p1 -%patch0043 -p1 -%patch0044 -p1 -%patch0045 -p1 -%patch0046 -p1 -%patch0047 -p1 -%patch0048 -p1 -%patch0049 -p1 -%patch0050 -p1 -%patch0051 -p1 -%patch0052 -p1 -%patch0053 -p1 -%patch0054 -p1 -%patch0055 -p1 %if %{build_x86_fw_from_source} pushd roms/seabios %patch1000 -p1 popd pushd roms/ipxe -%patch1100 -p1 -%patch1101 -p1 -%patch1102 -p1 -%patch1103 -p1 -%patch1104 -p1 -%patch1105 -p1 -%patch1106 -p1 -%patch1107 -p1 -%patch1108 -p1 +# (currently no patches) popd # as a safeguard, delete the firmware files that we intend to build @@ -1080,7 +1040,9 @@ EOF chmod 644 %{buildroot}%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x %endif install -D -m 755 %{SOURCE2} %{buildroot}/usr/share/qemu/qemu-ifup +%if 0%{?suse_version} <= 1320 install -D -m 755 %{SOURCE3} %{buildroot}%{_bindir}/kvm_stat +%endif install -D -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1/qemu-kvm.1.gz %endif %if %{kvm_available} @@ -1188,7 +1150,7 @@ fi %doc %_mandir/man1/qemu.1.gz %dir %_datadir/%name %_datadir/%name/keymaps -%_datadir/%name/trace-events +%_datadir/%name/trace-events-all %_datadir/%name/qemu-icon.bmp %_datadir/%name/qemu_logo_no_text.svg %dir %_sysconfdir/%name @@ -1213,6 +1175,7 @@ fi %_bindir/qemu-system-x86_64 %_datadir/%name/kvmvapic.bin %_datadir/%name/linuxboot.bin +%_datadir/%name/linuxboot_dma.bin %_datadir/%name/multiboot.bin %files ppc @@ -1271,7 +1234,9 @@ fi %files kvm %defattr(-,root,root) %_bindir/qemu-kvm +%if 0%{?suse_version} <= 1320 %_bindir/kvm_stat +%endif %_datadir/qemu/qemu-ifup %_mandir/man1/qemu-kvm.1.gz %endif @@ -1341,11 +1306,13 @@ fi %_datadir/%name/pxe-rtl8139.rom %_datadir/%name/pxe-virtio.rom %_datadir/%name/efi-e1000.rom +%_datadir/%name/efi-e1000e.rom %_datadir/%name/efi-eepro100.rom %_datadir/%name/efi-pcnet.rom %_datadir/%name/efi-ne2k_pci.rom %_datadir/%name/efi-rtl8139.rom %_datadir/%name/efi-virtio.rom +%_datadir/%name/efi-vmxnet3.rom %endif %files tools diff --git a/qemu.spec.in b/qemu.spec.in index fcbd2daa..7e0434b4 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -73,8 +73,8 @@ License: BSD-3-Clause and GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and MIT Group: System/Emulators/PC QEMU_VERSION Release: 0 -Source: http://wiki.qemu.org/download/qemu-2.6.1.tar.bz2 -Source99: http://wiki.qemu.org/download/qemu-2.6.1.tar.bz2.sig +Source: http://wiki.qemu.org/download/qemu-2.7.0.tar.bz2 +Source99: http://wiki.qemu.org/download/qemu-2.7.0.tar.bz2.sig Source1: 80-kvm.rules Source2: qemu-ifup Source3: kvm_stat @@ -97,15 +97,7 @@ PATCH_FILES Patch1000: seabios_128kb.patch # ipxe -Patch1100: ipxe-ath9k-Fix-buffer-overrun-for-ar9287.patch -Patch1101: ipxe-mucurses-Fix-GCC-6-nonnull-compare-errors.patch -Patch1102: ipxe-sis190-Fix-building-with-GCC-6.patch -Patch1103: ipxe-skge-Fix-building-with-GCC-6.patch -Patch1104: ipxe-ath-Fix-building-with-GCC-6.patch -Patch1105: ipxe-legacy-Fix-building-with-GCC-6.patch -Patch1106: ipxe-util-v5.24-perl-errors-on-redeclare.patch -Patch1107: ipxe-efi-fix-garbage-bytes-in-device-path.patch -Patch1108: ipxe-efi-fix-uninitialised-data-in-HII.patch +# (currently no patches) %endif # this is to make lint happy @@ -277,6 +269,11 @@ Requires(post): udev %ifarch s390x Requires(post): procps %endif +%if ! %{legacy_qemu_kvm} +%if 0%{?suse_version} > 1320 +Recommends: kvm_stat +%endif +%endif %endif Recommends: qemu-block-curl Recommends: qemu-tools @@ -316,8 +313,8 @@ Recommends: qemu-ksm = %{version} %endif %ifarch x86_64 -%define x86_64_only_b_f_f {efi-e1000.rom efi-eepro100.rom \ -efi-pcnet.rom efi-ne2k_pci.rom efi-rtl8139.rom efi-virtio.rom} +%define x86_64_only_b_f_f {efi-e1000.rom efi-e1000e.rom efi-eepro100.rom \ +efi-pcnet.rom efi-ne2k_pci.rom efi-rtl8139.rom efi-virtio.rom efi-vmxnet3.rom} %endif %define built_firmware_files {bios.bin bios-256k.bin sgabios.bin vgabios.bin \ vgabios-cirrus.bin vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin \ @@ -421,6 +418,9 @@ Requires: qemu-s390 = %version %endif Provides: kvm = %version Obsoletes: kvm < %version +%if 0%{?suse_version} > 1320 +Requires: kvm_stat +%endif Recommends: python-curses %description kvm @@ -667,7 +667,7 @@ This package provides a service file for starting and stopping KSM. %endif # !qemu-testsuite %prep -%setup -q -n qemu-2.6.1 +%setup -q -n qemu-2.7.0 PATCH_EXEC %if %{build_x86_fw_from_source} @@ -675,15 +675,7 @@ pushd roms/seabios %patch1000 -p1 popd pushd roms/ipxe -%patch1100 -p1 -%patch1101 -p1 -%patch1102 -p1 -%patch1103 -p1 -%patch1104 -p1 -%patch1105 -p1 -%patch1106 -p1 -%patch1107 -p1 -%patch1108 -p1 +# (currently no patches) popd @@ -974,7 +966,9 @@ EOF chmod 644 %{buildroot}%{_sysconfdir}/sysctl.d/50-allow-kvm-on-s390x %endif install -D -m 755 %{SOURCE2} %{buildroot}/usr/share/qemu/qemu-ifup +%if 0%{?suse_version} <= 1320 install -D -m 755 %{SOURCE3} %{buildroot}%{_bindir}/kvm_stat +%endif install -D -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1/qemu-kvm.1.gz %endif %if %{kvm_available} @@ -1083,7 +1077,7 @@ fi %doc %_mandir/man1/qemu.1.gz %dir %_datadir/%name %_datadir/%name/keymaps -%_datadir/%name/trace-events +%_datadir/%name/trace-events-all %_datadir/%name/qemu-icon.bmp %_datadir/%name/qemu_logo_no_text.svg %dir %_sysconfdir/%name @@ -1108,6 +1102,7 @@ fi %_bindir/qemu-system-x86_64 %_datadir/%name/kvmvapic.bin %_datadir/%name/linuxboot.bin +%_datadir/%name/linuxboot_dma.bin %_datadir/%name/multiboot.bin %files ppc @@ -1166,7 +1161,9 @@ fi %files kvm %defattr(-,root,root) %_bindir/qemu-kvm +%if 0%{?suse_version} <= 1320 %_bindir/kvm_stat +%endif %_datadir/qemu/qemu-ifup %_mandir/man1/qemu-kvm.1.gz %endif @@ -1236,11 +1233,13 @@ fi %_datadir/%name/pxe-rtl8139.rom %_datadir/%name/pxe-virtio.rom %_datadir/%name/efi-e1000.rom +%_datadir/%name/efi-e1000e.rom %_datadir/%name/efi-eepro100.rom %_datadir/%name/efi-pcnet.rom %_datadir/%name/efi-ne2k_pci.rom %_datadir/%name/efi-rtl8139.rom %_datadir/%name/efi-virtio.rom +%_datadir/%name/efi-vmxnet3.rom %endif %files tools diff --git a/update_git.sh b/update_git.sh index ee2b49b4..c27f0104 100644 --- a/update_git.sh +++ b/update_git.sh @@ -13,8 +13,8 @@ set -e GIT_TREE=git://github.com/openSUSE/qemu.git GIT_LOCAL_TREE=~/git/qemu-opensuse -GIT_BRANCH=opensuse-2.6 -GIT_UPSTREAM_TAG=v2.6.1 +GIT_BRANCH=opensuse-2.7 +GIT_UPSTREAM_TAG=v2.7.0 GIT_DIR=/dev/shm/qemu-factory-git-dir CMP_DIR=/dev/shm/qemu-factory-cmp-dir