summaryrefslogtreecommitdiff
path: root/emulators/qemu-devel/files
diff options
context:
space:
mode:
authorJuergen Lock <nox@FreeBSD.org>2013-05-29 18:01:53 +0000
committerJuergen Lock <nox@FreeBSD.org>2013-05-29 18:01:53 +0000
commitb179b768b455143b32bd626d9ca89da255b9a177 (patch)
treecb219037f0f1b71f4902a7cad4a10363a571c308 /emulators/qemu-devel/files
parentUpdate to 1.7.1 (diff)
- Update to 1.5.0, announce message is here:
https://lists.gnu.org/archive/html/qemu-devel/2013-05/msg02557.html Full changelog: http://wiki.qemu.org/ChangeLog/1.5 The new libusb host code needs recent 10-current; for older releases you can still try the net/usbredir support knob, see pkg-message for details. - Update pkg-message a bit. Thanx to: emaste for some suggestions
Notes
Notes: svn path=/head/; revision=319386
Diffstat (limited to 'emulators/qemu-devel/files')
-rw-r--r--emulators/qemu-devel/files/hw_e1000_c.patch4
-rw-r--r--emulators/qemu-devel/files/patch-0001-target-mips-Fix-accumulator-arguments-to-gen_helper77
-rw-r--r--emulators/qemu-devel/files/patch-90_security11
-rw-r--r--emulators/qemu-devel/files/patch-bsd-user-syscall.c16
-rw-r--r--emulators/qemu-devel/files/patch-configure48
-rw-r--r--emulators/qemu-devel/files/patch-hw-ppc_newworld.c14
-rw-r--r--emulators/qemu-devel/files/patch-hw-ppc_oldworld.c14
-rw-r--r--emulators/qemu-devel/files/patch-hw-usb-host-libusb.c15
-rw-r--r--emulators/qemu-devel/files/patch-include-qemu-common.h30
-rw-r--r--emulators/qemu-devel/files/patch-os-posix.c12
-rw-r--r--emulators/qemu-devel/files/patch-ui-gtk.c14
-rw-r--r--emulators/qemu-devel/files/patch-z-arm-bsd-user-0018
-rw-r--r--emulators/qemu-devel/files/patch-z2c-bsd-user-sson-002c67
-rw-r--r--emulators/qemu-devel/files/patch-zb2-bsd-user-sson004b20
-rw-r--r--emulators/qemu-devel/files/patch-zb4-bsd-user-main.c129
-rw-r--r--emulators/qemu-devel/files/pcap-client-type.sed2
-rw-r--r--emulators/qemu-devel/files/pcap-patch16
-rw-r--r--emulators/qemu-devel/files/revert-fbsd-libmath-patch14
18 files changed, 293 insertions, 218 deletions
diff --git a/emulators/qemu-devel/files/hw_e1000_c.patch b/emulators/qemu-devel/files/hw_e1000_c.patch
index 15b2494f0d40..8cd6ded303d3 100644
--- a/emulators/qemu-devel/files/hw_e1000_c.patch
+++ b/emulators/qemu-devel/files/hw_e1000_c.patch
@@ -1,5 +1,5 @@
---- qemu-0.14.1/hw/e1000.c.orig Thu Jun 23 17:01:19 2011
-+++ qemu-0.14.1/hw/e1000.c Thu Jun 23 17:02:30 2011
+--- qemu-0.14.1/hw/net/e1000.c.orig
++++ qemu-0.14.1/hw/net/e1000.c
@@ -573,7 +573,7 @@
if (rctl & E1000_RCTL_UPE) // promiscuous
return 1;
diff --git a/emulators/qemu-devel/files/patch-0001-target-mips-Fix-accumulator-arguments-to-gen_helper b/emulators/qemu-devel/files/patch-0001-target-mips-Fix-accumulator-arguments-to-gen_helper
deleted file mode 100644
index 0858bd671d59..000000000000
--- a/emulators/qemu-devel/files/patch-0001-target-mips-Fix-accumulator-arguments-to-gen_helper
+++ /dev/null
@@ -1,77 +0,0 @@
->From 61b79e34bc57df0aa0c8086bd86f4c8818618d0e Mon Sep 17 00:00:00 2001
-From: Richard Sandiford <rdsandiford@googlemail.com>
-Date: Sat, 4 May 2013 15:01:31 +0100
-Subject: [PATCH] target-mips: Fix accumulator arguments to gen_helper_dmult(u)
-
-gen_muldiv was passing int accumulator arguments directly
-to gen_helper_dmult(u). This patch fixes it to use TCGs,
-via the gen_helper_0e2i wrapper.
-
-Fixes an --enable-debug-tcg build failure reported by Juergen Lock.
-
-Signed-off-by: Richard Sandiford <rdsandiford@googlemail.com>
----
- target-mips/helper.h | 4 ++--
- target-mips/op_helper.c | 8 ++++----
- target-mips/translate.c | 4 ++--
- 3 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/target-mips/helper.h b/target-mips/helper.h
-index cfe98f1..7aa5f79 100644
---- a/target-mips/helper.h
-+++ b/target-mips/helper.h
-@@ -24,8 +24,8 @@ DEF_HELPER_FLAGS_1(clz, TCG_CALL_NO_RWG_SE, tl, tl)
- #ifdef TARGET_MIPS64
- DEF_HELPER_FLAGS_1(dclo, TCG_CALL_NO_RWG_SE, tl, tl)
- DEF_HELPER_FLAGS_1(dclz, TCG_CALL_NO_RWG_SE, tl, tl)
--DEF_HELPER_4(dmult, void, env, int, tl, tl)
--DEF_HELPER_4(dmultu, void, env, int, tl, tl)
-+DEF_HELPER_4(dmult, void, env, tl, tl, int)
-+DEF_HELPER_4(dmultu, void, env, tl, tl, int)
- #endif
-
- DEF_HELPER_3(muls, tl, env, tl, tl)
-diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c
-index c054300..01df687 100644
---- a/target-mips/op_helper.c
-+++ b/target-mips/op_helper.c
-@@ -268,14 +268,14 @@ target_ulong helper_mulshiu(CPUMIPSState *env, target_ulong arg1,
- }
-
- #ifdef TARGET_MIPS64
--void helper_dmult(CPUMIPSState *env, int acc, target_ulong arg1,
-- target_ulong arg2)
-+void helper_dmult(CPUMIPSState *env, target_ulong arg1,
-+ target_ulong arg2, int acc)
- {
- muls64(&(env->active_tc.LO[acc]), &(env->active_tc.HI[acc]), arg1, arg2);
- }
-
--void helper_dmultu(CPUMIPSState *env, int acc, target_ulong arg1,
-- target_ulong arg2)
-+void helper_dmultu(CPUMIPSState *env, target_ulong arg1,
-+ target_ulong arg2, int acc)
- {
- mulu64(&(env->active_tc.LO[acc]), &(env->active_tc.HI[acc]), arg1, arg2);
- }
-diff --git a/target-mips/translate.c b/target-mips/translate.c
-index 9ed6477..8205456 100644
---- a/target-mips/translate.c
-+++ b/target-mips/translate.c
-@@ -2777,11 +2777,11 @@ static void gen_muldiv(DisasContext *ctx, uint32_t opc,
- opn = "ddivu";
- break;
- case OPC_DMULT:
-- gen_helper_dmult(cpu_env, acc, t0, t1);
-+ gen_helper_0e2i(dmult, t0, t1, acc);
- opn = "dmult";
- break;
- case OPC_DMULTU:
-- gen_helper_dmultu(cpu_env, acc, t0, t1);
-+ gen_helper_0e2i(dmultu, t0, t1, acc);
- opn = "dmultu";
- break;
- #endif
---
-1.8.1.4
-
diff --git a/emulators/qemu-devel/files/patch-90_security b/emulators/qemu-devel/files/patch-90_security
index 6ce41640d374..65c340549de4 100644
--- a/emulators/qemu-devel/files/patch-90_security
+++ b/emulators/qemu-devel/files/patch-90_security
@@ -1,4 +1,4 @@
-Index: qemu/hw/dma.c
+Index: qemu/hw/dma/i8257.c
@@ -344,9 +344,11 @@ static void channel_run (int ncont, int
}
#endif
@@ -14,7 +14,7 @@ Index: qemu/hw/dma.c
ldebug ("dma_pos %d size %d\n", n, (r->base[COUNT] + 1) << ncont);
}
-Index: qemu/hw/fdc.c
+Index: qemu/hw/block/fdc.c
@@ -1445,7 +1445,8 @@ static uint32_t fdctrl_read_data(FDCtrl
fd_sector(cur_drv));
return 0;
@@ -35,10 +35,7 @@ Index: qemu/hw/fdc.c
FLOPPY_DPRINTF("error writing sector %d\n",
fd_sector(cur_drv));
return;
-Index: qemu-0.8.2/hw/sb16.c
-===================================================================
---- qemu-0.8.2.orig/hw/sb16.c 2006-07-22 20:23:34.000000000 +0300
-+++ qemu-0.8.2/hw/sb16.c 2007-04-20 06:05:59.000000000 +0300
+Index: qemu-0.8.2/hw/audio/sb16.c
@@ -1235,8 +1235,10 @@ static int SB_read_DMA (void *opaque, in
s->block_size);
#endif
@@ -52,7 +49,7 @@ Index: qemu-0.8.2/hw/sb16.c
}
return dma_pos;
-Index: qemu/hw/i8259.c
+Index: qemu/hw/intc/i8259.c
@@ -291,7 +291,8 @@ static void pic_ioport_write(void *opaqu
s->init4 = val & 1;
s->single_mode = val & 2;
diff --git a/emulators/qemu-devel/files/patch-bsd-user-syscall.c b/emulators/qemu-devel/files/patch-bsd-user-syscall.c
deleted file mode 100644
index 7bdda67c3c31..000000000000
--- a/emulators/qemu-devel/files/patch-bsd-user-syscall.c
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c
-index eb1cdf2..2c32637 100644
---- a/bsd-user/syscall.c
-+++ b/bsd-user/syscall.c
-@@ -212,7 +212,11 @@ static int sysctl_oldcvt(void *holdp, size_t holdlen, uint32_t kind)
- *(uint64_t *)holdp = tswap64(*(unsigned long *)holdp);
- break;
- #endif
-+#if !defined(__FreeBSD_version) || __FreeBSD_version < 900031
- case CTLTYPE_QUAD:
-+#else
-+ case CTLTYPE_U64:
-+#endif
- *(uint64_t *)holdp = tswap64(*(uint64_t *)holdp);
- break;
- case CTLTYPE_STRING:
diff --git a/emulators/qemu-devel/files/patch-configure b/emulators/qemu-devel/files/patch-configure
index d425d4cfef84..61bffda02f4e 100644
--- a/emulators/qemu-devel/files/patch-configure
+++ b/emulators/qemu-devel/files/patch-configure
@@ -17,6 +17,15 @@
"
fi
+@@ -1756,7 +1756,7 @@ if test "$gtk" != "no"; then
+ gtk_libs=`$pkg_config --libs $gtkpackage 2>/dev/null`
+ vte_cflags=`$pkg_config --cflags $vtepackage 2>/dev/null`
+ vte_libs=`$pkg_config --libs $vtepackage 2>/dev/null`
+- libs_softmmu="$gtk_libs $vte_libs $libs_softmmu"
++ libs_softmmu="$gtk_libs -lintl $vte_libs $libs_softmmu"
+ gtk="yes"
+ else
+ if test "$gtk" = "yes" ; then
@@ -2511,15 +2511,18 @@ if compile_prog "" "" ; then
fi
@@ -44,3 +53,42 @@
fi
# Search for bswap_32 function
+@@ -3134,18 +3134,29 @@ fi
+
+ # check for libusb
+ if test "$libusb" != "no" ; then
+- if $pkg_config --atleast-version=1.0.13 libusb-1.0 >/dev/null 2>&1 ; then
+- libusb="yes"
+- usb="libusb"
+- libusb_cflags=$($pkg_config --cflags libusb-1.0 2>/dev/null)
+- libusb_libs=$($pkg_config --libs libusb-1.0 2>/dev/null)
+- QEMU_CFLAGS="$QEMU_CFLAGS $libusb_cflags"
++ cat > $TMPC << EOF
++#include <libusb.h>
++
++int main(void) { return libusb_get_port_path(NULL, NULL, NULL, 0); }
++EOF
++ if compile_prog "-Werror" "-lusb" ; then
++ libusb_cflags=""
++ libusb_libs=-lusb
+ libs_softmmu="$libs_softmmu $libusb_libs"
+ else
+- if test "$libusb" = "yes"; then
+- feature_not_found "libusb"
++ if $pkg_config --atleast-version=1.0.13 libusb-1.0 >/dev/null 2>&1 ; then
++ libusb="yes"
++ usb="libusb"
++ libusb_cflags=$($pkg_config --cflags libusb-1.0 2>/dev/null)
++ libusb_libs=$($pkg_config --libs libusb-1.0 2>/dev/null)
++ QEMU_CFLAGS="$QEMU_CFLAGS $libusb_cflags"
++ libs_softmmu="$libs_softmmu $libusb_libs"
++ else
++ if test "$libusb" = "yes"; then
++ feature_not_found "libusb"
++ fi
++ libusb="no"
+ fi
+- libusb="no"
+ fi
+ fi
+
diff --git a/emulators/qemu-devel/files/patch-hw-ppc_newworld.c b/emulators/qemu-devel/files/patch-hw-ppc_newworld.c
deleted file mode 100644
index e409d639aecf..000000000000
--- a/emulators/qemu-devel/files/patch-hw-ppc_newworld.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/hw/ppc/mac_newworld.c
-+++ b/hw/ppc/mac_newworld.c
-@@ -68,6 +68,11 @@
- #include "hw/usb.h"
- #include "blockdev.h"
-
-+/* FreeBSD headers define this */
-+#ifdef round_page
-+#undef round_page
-+#endif
-+
- #define MAX_IDE_BUS 2
- #define CFG_ADDR 0xf0000510
-
diff --git a/emulators/qemu-devel/files/patch-hw-ppc_oldworld.c b/emulators/qemu-devel/files/patch-hw-ppc_oldworld.c
deleted file mode 100644
index 57612edd053e..000000000000
--- a/emulators/qemu-devel/files/patch-hw-ppc_oldworld.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/hw/ppc/mac_oldworld.c
-+++ b/hw/ppc/mac_oldworld.c
-@@ -47,6 +47,11 @@
- #define MAX_IDE_BUS 2
- #define CFG_ADDR 0xf0000510
-
-+/* FreeBSD headers define this */
-+#ifdef round_page
-+#undef round_page
-+#endif
-+
- static int fw_cfg_boot_set(void *opaque, const char *boot_device)
- {
- fw_cfg_add_i16(opaque, FW_CFG_BOOT_DEVICE, boot_device[0]);
diff --git a/emulators/qemu-devel/files/patch-hw-usb-host-libusb.c b/emulators/qemu-devel/files/patch-hw-usb-host-libusb.c
new file mode 100644
index 000000000000..2d46b9215dfb
--- /dev/null
+++ b/emulators/qemu-devel/files/patch-hw-usb-host-libusb.c
@@ -0,0 +1,15 @@
+--- a/hw/usb/host-libusb.c
++++ b/hw/usb/host-libusb.c
+@@ -1324,8 +1324,12 @@ static Property usb_host_dev_properties[
+ DEFINE_PROP_UINT32("isobufs", USBHostDevice, iso_urb_count, 4),
+ DEFINE_PROP_UINT32("isobsize", USBHostDevice, iso_urb_frames, 32),
+ DEFINE_PROP_INT32("bootindex", USBHostDevice, bootindex, -1),
++#ifdef LIBUSB_LOG_LEVEL_WARNING
+ DEFINE_PROP_UINT32("loglevel", USBHostDevice, loglevel,
+ LIBUSB_LOG_LEVEL_WARNING),
++#else
++ DEFINE_PROP_UINT32("loglevel", USBHostDevice, loglevel, 0),
++#endif
+ DEFINE_PROP_BIT("pipeline", USBHostDevice, options,
+ USB_HOST_OPT_PIPELINE, true),
+ DEFINE_PROP_END_OF_LIST(),
diff --git a/emulators/qemu-devel/files/patch-include-qemu-common.h b/emulators/qemu-devel/files/patch-include-qemu-common.h
new file mode 100644
index 000000000000..59f2254049df
--- /dev/null
+++ b/emulators/qemu-devel/files/patch-include-qemu-common.h
@@ -0,0 +1,30 @@
+From brad@comstyle.com Tue May 21 22:45:57 CEST 2013
+From: brad@comstyle.com (Brad Smith)
+Subject: [Qemu-devel] [PATCH] ui/gtk.c: Fix *BSD build of Gtk+ UI
+Date: Tue, 21 May 2013 12:14:24 -0400
+Message-ID: <20130521161324.GA29977@rox.home.comstyle.com>
+
+Fix the build of the Gtk+ UI on *BSD systems.
+
+Signed-off-by: Brad Smith <brad@comstyle.com>
+
+diff --git a/include/qemu-common.h b/include/qemu-common.h
+index af769f5..c944bb7 100644
+--- a/include/qemu-common.h
++++ b/include/qemu-common.h
+@@ -45,6 +45,7 @@
+ #if defined(__GLIBC__)
+ # include <pty.h>
+ #elif defined CONFIG_BSD
++# include <termios.h>
+ # if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ # include <libutil.h>
+ # else
+
+--
+This message has been scanned for viruses and
+dangerous content by MailScanner, and is
+believed to be clean.
+
+
+
diff --git a/emulators/qemu-devel/files/patch-os-posix.c b/emulators/qemu-devel/files/patch-os-posix.c
deleted file mode 100644
index 1738650162ea..000000000000
--- a/emulators/qemu-devel/files/patch-os-posix.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/os-posix.c
-+++ b/os-posix.c
-@@ -27,6 +27,9 @@
- #include <fcntl.h>
- #include <signal.h>
- #include <sys/types.h>
-+#ifdef __FreeBSD__
-+#include <sys/sysctl.h>
-+#endif
- #include <sys/wait.h>
- /*needed for MAP_POPULATE before including qemu-options.h */
- #include <sys/mman.h>
diff --git a/emulators/qemu-devel/files/patch-ui-gtk.c b/emulators/qemu-devel/files/patch-ui-gtk.c
new file mode 100644
index 000000000000..b71eb187119c
--- /dev/null
+++ b/emulators/qemu-devel/files/patch-ui-gtk.c
@@ -0,0 +1,14 @@
+--- a/ui/gtk.c
++++ b/ui/gtk.c
+@@ -714,7 +718,11 @@ static gboolean gd_key_event(GtkWidget *
+ } else if (gdk_keycode < 97) {
+ qemu_keycode = gdk_keycode - 8;
+ } else if (gdk_keycode < 158) {
++#if 0
+ qemu_keycode = translate_evdev_keycode(gdk_keycode - 97);
++#else
++ qemu_keycode = translate_xfree86_keycode(gdk_keycode - 97);
++#endif
+ } else if (gdk_keycode == 208) { /* Hiragana_Katakana */
+ qemu_keycode = 0x70;
+ } else if (gdk_keycode == 211) { /* backslash */
diff --git a/emulators/qemu-devel/files/patch-z-arm-bsd-user-001 b/emulators/qemu-devel/files/patch-z-arm-bsd-user-001
index a7fb6ab72b38..bf8bdae26823 100644
--- a/emulators/qemu-devel/files/patch-z-arm-bsd-user-001
+++ b/emulators/qemu-devel/files/patch-z-arm-bsd-user-001
@@ -314,14 +314,6 @@
#ifdef __FreeBSD__
/*
* XXX this uses the undocumented oidfmt interface to find the kind of
-@@ -215,6 +225,7 @@ static int sysctl_oldcvt(void *holdp, si
- case CTLTYPE_QUAD:
- #else
- case CTLTYPE_U64:
-+ case CTLTYPE_S64:
- #endif
- *(uint64_t *)holdp = tswap64(*(uint64_t *)holdp);
- break;
@@ -380,6 +391,9 @@ abi_long do_freebsd_syscall(void *cpu_en
arg5,
arg6));
diff --git a/emulators/qemu-devel/files/patch-z2c-bsd-user-sson-002c b/emulators/qemu-devel/files/patch-z2c-bsd-user-sson-002c
index e0f024151e70..0c1d7720f3bb 100644
--- a/emulators/qemu-devel/files/patch-z2c-bsd-user-sson-002c
+++ b/emulators/qemu-devel/files/patch-z2c-bsd-user-sson-002c
@@ -107,17 +107,17 @@ index 146f022..7a99537 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -34,6 +34,10 @@
- #include "qemu-timer.h"
- #include "envlist.h"
+ #include "qemu/timer.h"
+ #include "qemu/envlist.h"
+#if defined(CONFIG_USE_NPTL) && defined(__FreeBSD__)
+#include <sys/thr.h>
+#endif
+
- #define DEBUG_LOGFILE "/tmp/qemu.log"
-
int singlestep;
-@@ -70,42 +74,186 @@ int cpu_get_pic_interrupt(CPUX86State *env)
+ #if defined(CONFIG_USE_GUEST_BASE)
+ unsigned long mmap_min_addr;
+@@ -68,41 +72,185 @@ int cpu_get_pic_interrupt(CPUX86State *e
}
#endif
@@ -187,7 +187,7 @@ index 146f022..7a99537 100644
+/* Start an exclusive operation. Must only be called outside of cpu_exec. */
+static inline void
+start_exclusive(void)
- {
++{
+ CPUArchState *other;
+
+ pthread_mutex_lock(&exclusive_lock);
@@ -204,19 +204,17 @@ index 146f022..7a99537 100644
+ if (pending_cpus > 1) {
+ pthread_cond_wait(&exclusive_cond, &exclusive_lock);
+ }
- }
-
--void fork_start(void)
++}
++
+/* Finish an exclusive operation. */
+static inline void
+end_exclusive(void)
- {
++{
+ pending_cpus = 0;
+ pthread_cond_broadcast(&exclusive_resume);
+ pthread_mutex_unlock(&exclusive_lock);
- }
-
--void fork_end(int child)
++}
++
+/* Wait for exclusive ops to finish, and begin cpu execution. */
+static inline void
+cpu_exec_start(CPUArchState *env)
@@ -245,16 +243,18 @@ index 146f022..7a99537 100644
+
+void
+cpu_list_lock(void)
-+{
+ {
+ pthread_mutex_lock(&cpu_list_mutex);
-+}
-+
+ }
+
+-void fork_start(void)
+void
+cpu_list_unlock(void)
-+{
+ {
+ pthread_mutex_unlock(&cpu_list_mutex);
-+}
-+
+ }
+
+-void fork_end(int child)
+#else /* ! CONFIG_USE_NPTL */
+
+/* These are no-ops because we are not threadsafe. */
@@ -279,20 +279,20 @@ index 146f022..7a99537 100644
+
+static inline void
+start_exclusive(void)
- {
- }
-
--void cpu_list_unlock(void)
++{
++}
++
+static inline void
+end_exclusive(void)
- {
- }
-
-+static inline void
-+cpu_exec_start(CPUArchState *env)
+{
+}
+
++static inline void
++cpu_exec_start(CPUArchState *env)
+ {
+ }
+
+-void cpu_list_unlock(void)
+
+static inline void
+cpu_exec_end(CPUArchState *env)
@@ -306,14 +306,13 @@ index 146f022..7a99537 100644
+
+void
+cpu_list_unlock(void)
-+{
-+}
+ {
+ }
+#endif /* CONFIG_USE_NPTL */
-+
+
#ifdef TARGET_I386
/***********************************************************/
- /* CPUX86 core interface */
-@@ -740,7 +888,10 @@ void cpu_loop(CPUMIPSState *env)
+@@ -738,7 +886,10 @@ void cpu_loop(CPUMIPSState *env)
for(;;) {
cpu_exec_start(env);
@@ -324,7 +323,7 @@ index 146f022..7a99537 100644
cpu_exec_end(env);
switch(trapnr) {
case EXCP_SYSCALL: /* syscall exception */
-@@ -1206,6 +1357,18 @@ static void usage(void)
+@@ -1204,6 +1355,18 @@ static void usage(void)
THREAD CPUArchState *thread_env;
diff --git a/emulators/qemu-devel/files/patch-zb2-bsd-user-sson004b b/emulators/qemu-devel/files/patch-zb2-bsd-user-sson004b
index fc772caf9c31..3700f5b9c65a 100644
--- a/emulators/qemu-devel/files/patch-zb2-bsd-user-sson004b
+++ b/emulators/qemu-devel/files/patch-zb2-bsd-user-sson004b
@@ -165,7 +165,7 @@ diff --git a/bsd-user/main.c b/bsd-user/main.c
index b248a91..99b94c1 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
-@@ -56,10 +56,15 @@ const char *qemu_uname_release = CONFIG_UNAME_RELEASE;
+@@ -54,10 +54,15 @@ const char *qemu_uname_release = CONFIG_
extern char **environ;
enum BSDType bsd_type;
@@ -182,7 +182,7 @@ index b248a91..99b94c1 100644
static void save_proc_pathname(void);
char qemu_proc_pathname[PATH_MAX];
-@@ -126,7 +131,7 @@ static int pending_cpus;
+@@ -124,7 +129,7 @@ static int pending_cpus;
/* Make sure everything is in a consistent state for calling fork(). */
void fork_start(void)
{
@@ -191,7 +191,7 @@ index b248a91..99b94c1 100644
pthread_mutex_lock(&exclusive_lock);
mmap_fork_start();
}
-@@ -146,11 +151,11 @@ void fork_end(int child)
+@@ -144,11 +149,11 @@ void fork_end(int child)
pthread_mutex_init(&cpu_list_mutex, NULL);
pthread_cond_init(&exclusive_cond, NULL);
pthread_cond_init(&exclusive_resume, NULL);
@@ -205,7 +205,7 @@ index b248a91..99b94c1 100644
}
}
-@@ -1012,10 +1017,7 @@ void cpu_loop(CPUMIPSState *env)
+@@ -1010,10 +1015,7 @@ void cpu_loop(CPUMIPSState *env)
for(;;) {
cpu_exec_start(env);
@@ -216,16 +216,16 @@ index b248a91..99b94c1 100644
cpu_exec_end(env);
switch(trapnr) {
case EXCP_SYSCALL: /* syscall exception */
-@@ -1481,7 +1483,7 @@ static void usage(void)
+@@ -1480,7 +1482,7 @@ static void usage(void)
,
TARGET_ARCH,
interp_prefix,
-- x86_stack_size,
-+ target_dflssiz,
- DEBUG_LOGFILE);
+- x86_stack_size);
++ target_dflssiz);
exit(1);
}
-@@ -1603,13 +1605,15 @@ int main(int argc, char **argv)
+
+@@ -1601,13 +1603,15 @@ int main(int argc, char **argv)
usage();
} else if (!strcmp(r, "s")) {
r = argv[optind++];
@@ -245,7 +245,7 @@ index b248a91..99b94c1 100644
} else if (!strcmp(r, "L")) {
interp_prefix = argv[optind++];
} else if (!strcmp(r, "p")) {
-@@ -1797,7 +1801,7 @@ int main(int argc, char **argv)
+@@ -1791,7 +1795,7 @@ int main(int argc, char **argv)
qemu_log("entry 0x" TARGET_ABI_FMT_lx "\n", info->entry);
}
diff --git a/emulators/qemu-devel/files/patch-zb4-bsd-user-main.c b/emulators/qemu-devel/files/patch-zb4-bsd-user-main.c
new file mode 100644
index 000000000000..037e471efd01
--- /dev/null
+++ b/emulators/qemu-devel/files/patch-zb4-bsd-user-main.c
@@ -0,0 +1,129 @@
+--- a/bsd-user/main.c
++++ b/bsd-user/main.c
+@@ -129,7 +129,7 @@ static int pending_cpus;
+ /* Make sure everything is in a consistent state for calling fork(). */
+ void fork_start(void)
+ {
+- spin_lock(&tb_lock);
++ spin_lock(&tcg_ctx.tb_ctx.tb_lock);
+ pthread_mutex_lock(&exclusive_lock);
+ mmap_fork_start();
+ }
+@@ -149,11 +149,11 @@ void fork_end(int child)
+ pthread_mutex_init(&cpu_list_mutex, NULL);
+ pthread_cond_init(&exclusive_cond, NULL);
+ pthread_cond_init(&exclusive_resume, NULL);
+- spin_lock_init(&tb_lock);
++ spin_lock_init(&tcg_ctx.tb_ctx.tb_lock);
+ gdbserver_fork(thread_env);
+ } else {
+ pthread_mutex_unlock(&exclusive_lock);
+- spin_unlock(&tb_lock);
++ spin_unlock(&tcg_ctx.tb_ctx.tb_lock);
+ }
+ }
+
+@@ -174,6 +174,7 @@ static inline void
+ start_exclusive(void)
+ {
+ CPUArchState *other;
++ CPUState *other_cpu;
+
+ pthread_mutex_lock(&exclusive_lock);
+ exclusive_idle();
+@@ -181,7 +182,8 @@ start_exclusive(void)
+ pending_cpus = 1;
+ /* Make all other cpus stop executing. */
+ for (other = first_cpu; other; other = other->next_cpu) {
+- if (other->running) {
++ other_cpu = ENV_GET_CPU(other);
++ if (other_cpu->running) {
+ pending_cpus++;
+ cpu_exit(other);
+ }
+@@ -202,20 +204,20 @@ end_exclusive(void)
+
+ /* Wait for exclusive ops to finish, and begin cpu execution. */
+ static inline void
+-cpu_exec_start(CPUArchState *env)
++cpu_exec_start(CPUState *cpu)
+ {
+ pthread_mutex_lock(&exclusive_lock);
+ exclusive_idle();
+- env->running = 1;
++ cpu->running = true;
+ pthread_mutex_unlock(&exclusive_lock);
+ }
+
+ /* Mark cpu as not excuting, and release pending exclusive ops. */
+ static inline void
+-cpu_exec_end(CPUArchState *env)
++cpu_exec_end(CPUState *cpu)
+ {
+ pthread_mutex_lock(&exclusive_lock);
+- env->running = 0;
++ cpu->running = false;
+ if (pending_cpus > 1) {
+ pending_cpus--;
+ if (pending_cpus == 1) {
+@@ -270,13 +272,13 @@ end_exclusive(void)
+ }
+
+ static inline void
+-cpu_exec_start(CPUArchState *env)
++cpu_exec_start(CPUState *cpu)
+ {
+ }
+
+
+ static inline void
+-cpu_exec_end(CPUArchState *env)
++cpu_exec_end(CPUState *cpu)
+ {
+ }
+
+@@ -657,6 +659,7 @@ done:
+
+ void cpu_loop(CPUARMState *env)
+ {
++ CPUState *cs = CPU(arm_env_get_cpu(env));
+ int trapnr;
+ unsigned int n, insn;
+ uint32_t addr;
+@@ -665,7 +668,7 @@ void cpu_loop(CPUARMState *env)
+ #ifdef DEBUG_ARM
+ printf("CPU LOOPING\n");
+ #endif
+- cpu_exec_start(env);
++ cpu_exec_start(cs);
+ #ifdef DEBUG_ARM
+ printf("EXECUTING...\n");
+ #endif
+@@ -673,7 +676,7 @@ void cpu_loop(CPUARMState *env)
+ #ifdef DEBUG_ARM
+ printf("trapnr %d\n", trapnr);
+ #endif
+- cpu_exec_end(env);
++ cpu_exec_end(cs);
+ switch(trapnr) {
+ case EXCP_UDEF:
+ {
+@@ -1008,15 +1011,16 @@ static int do_store_exclusive(CPUMIPSSta
+
+ void cpu_loop(CPUMIPSState *env)
+ {
++ CPUState *cs = CPU(mips_env_get_cpu(env));
+ target_siginfo_t info;
+ int trapnr;
+ abi_long ret;
+ unsigned int syscall_num;
+
+ for(;;) {
+- cpu_exec_start(env);
++ cpu_exec_start(cs);
+ trapnr = cpu_mips_exec(env);
+- cpu_exec_end(env);
++ cpu_exec_end(cs);
+ switch(trapnr) {
+ case EXCP_SYSCALL: /* syscall exception */
+ syscall_num = env->active_tc.gpr[2]; /* v0 */
diff --git a/emulators/qemu-devel/files/pcap-client-type.sed b/emulators/qemu-devel/files/pcap-client-type.sed
deleted file mode 100644
index 135de3cdd926..000000000000
--- a/emulators/qemu-devel/files/pcap-client-type.sed
+++ /dev/null
@@ -1,2 +0,0 @@
-/^ NET_CLIENT_TYPE_DUMP,$/i\
-\ NET_CLIENT_TYPE_PCAP,
diff --git a/emulators/qemu-devel/files/pcap-patch b/emulators/qemu-devel/files/pcap-patch
index 279bdce00147..8586052d698c 100644
--- a/emulators/qemu-devel/files/pcap-patch
+++ b/emulators/qemu-devel/files/pcap-patch
@@ -1,16 +1,16 @@
--- configure.orig
+++ configure
-@@ -226,6 +226,9 @@ coroutine=""
- seccomp=""
- glusterfs=""
- virtio_blk_data_plane=""
+@@ -241,6 +241,9 @@ gtk=""
+ gtkabi="2.0"
+ tpm="no"
+ libssh2=""
+pcap="no"
+pcap_create="no"
+bpf="no"
# parse CC options first
for opt do
-@@ -729,6 +732,10 @@ for opt do
+@@ -748,6 +751,10 @@ for opt do
;;
--enable-vnc-ws) vnc_ws="yes"
;;
@@ -21,7 +21,7 @@
--disable-slirp) slirp="no"
;;
--disable-uuid) uuid="no"
-@@ -1730,6 +1737,51 @@ EOF
+@@ -1843,6 +1850,51 @@ EOF
fi
##########################################
@@ -73,7 +73,7 @@
# VNC TLS/WS detection
if test "$vnc" = "yes" -a \( "$vnc_tls" != "no" -o "$vnc_ws" != "no" \) ; then
cat > $TMPC <<EOF
-@@ -3307,6 +3359,7 @@ echo "Extra audio cards $audio_card_list
+@@ -3549,6 +3601,7 @@ echo "Audio drivers $audio_drv_list"
echo "Block whitelist $block_drv_whitelist"
echo "Mixer emulation $mixemu"
echo "VirtFS support $virtfs"
@@ -81,7 +81,7 @@
echo "VNC support $vnc"
if test "$vnc" = "yes" ; then
echo "VNC TLS support $vnc_tls"
-@@ -3445,6 +3498,15 @@ fi
+@@ -3701,6 +3754,15 @@ fi
if test "$profiler" = "yes" ; then
echo "CONFIG_PROFILER=y" >> $config_host_mak
fi
diff --git a/emulators/qemu-devel/files/revert-fbsd-libmath-patch b/emulators/qemu-devel/files/revert-fbsd-libmath-patch
deleted file mode 100644
index d7adf8ddc743..000000000000
--- a/emulators/qemu-devel/files/revert-fbsd-libmath-patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- Makefile.orig 2010-02-06 20:59:24.000000000 +0100
-+++ Makefile 2010-02-06 21:00:17.000000000 +0100
-@@ -62,10 +62,7 @@
-
- -include config-all-devices.mak
-
--build-all: $(DOCS) $(TOOLS) bsd/libmath.a recurse-all
--
--bsd/libmath.a:
-- ( cd bsd ; unset MAKEFLAGS ; $(BSD_MAKE) CC=$(CC) )
-+build-all: $(DOCS) $(TOOLS) recurse-all
-
- config-host.h: config-host.h-timestamp
- config-host.h-timestamp: config-host.mak