- 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
This commit is contained in:
Juergen Lock 2013-05-29 18:01:53 +00:00
parent 2f9e7868f9
commit b179b768b4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=319386
22 changed files with 340 additions and 253 deletions

View file

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= qemu
PORTVERSION= 1.4.1
PORTVERSION= 1.5.0
CATEGORIES= emulators
MASTER_SITES= http://wiki.qemu.org/download/:release \
LOCAL/nox:snapshot
@ -30,8 +30,8 @@ ONLY_FOR_ARCHS= amd64 i386 powerpc # XXX someone wants to debug sparc64 hosts?
CONFLICTS_INSTALL= qemu-[0-9]*
MAKE_JOBS_SAFE= yes
OPTIONS_DEFINE= SAMBA SDL OPENGL GNUTLS SASL JPEG PNG CDROM_DMA PCAP \
USBREDIR GNS3 ADD_AUDIO X86_TARGETS BSD_USER \
OPTIONS_DEFINE= SAMBA X11 OPENGL GNUTLS SASL JPEG PNG CDROM_DMA PCAP \
USBREDIR GNS3 X86_TARGETS BSD_USER \
STATIC_LINK DOCS
SAMBA_DESC= samba dependency (for -smb)
GNUTLS_DESC= gnutls dependency (vnc encryption)
@ -43,11 +43,10 @@ PCAP_DESC= pcap dependency (networking with bpf)
SEABIOS_GIT_DESC= add seabios snapshot (-bios bios.bin-1.6.3.1)
USBREDIR_DESC= usb device network redirection (experimental!)
GNS3_DESC= gns3 patches (promiscuous multicast)
ADD_AUDIO_DESC= Emulate more audio hardware (experimental!)
X86_TARGETS_DESC= Don't build non-x86 system targets
BSD_USER_DESC= Also build bsd-user targets (for testing)
STATIC_LINK_DESC= Statically link the executables
OPTIONS_DEFAULT=SDL OPENGL GNUTLS SASL JPEG PNG CDROM_DMA PCAP
OPTIONS_DEFAULT=X11 OPENGL GNUTLS SASL JPEG PNG CDROM_DMA PCAP
.include <bsd.port.options.mk>
@ -70,7 +69,7 @@ CONFIGURE_ARGS+= --disable-bsd-user
.else
CONFIGURE_ARGS+= --enable-nptl
.if ${ARCH} != "amd64"
CONFIGURE_ARGS+= --target-list=i386-softmmu,x86_64-softmmu,alpha-softmmu,arm-softmmu,cris-softmmu,lm32-softmmu,m68k-softmmu,microblaze-softmmu,microblazeel-softmmu,mips-softmmu,mipsel-softmmu,mips64-softmmu,mips64el-softmmu,or32-softmmu,ppc-softmmu,ppcemb-softmmu,ppc64-softmmu,sh4-softmmu,sh4eb-softmmu,sparc-softmmu,sparc64-softmmu,s390x-softmmu,xtensa-softmmu,xtensaeb-softmmu,unicore32-softmmu,i386-bsd-user,sparc-bsd-user,arm-bsd-user,armeb-bsd-user,mips-bsd-user,mipsel-bsd-user
CONFIGURE_ARGS+= --target-list=i386-softmmu,x86_64-softmmu,alpha-softmmu,arm-softmmu,cris-softmmu,lm32-softmmu,m68k-softmmu,microblaze-softmmu,microblazeel-softmmu,mips-softmmu,mipsel-softmmu,mips64-softmmu,mips64el-softmmu,or32-softmmu,ppc-softmmu,ppcemb-softmmu,ppc64-softmmu,sh4-softmmu,sh4eb-softmmu,sparc-softmmu,sparc64-softmmu,s390x-softmmu,xtensa-softmmu,xtensaeb-softmmu,unicore32-softmmu,moxie-softmmu,i386-bsd-user,sparc-bsd-user,arm-bsd-user,armeb-bsd-user,mips-bsd-user,mipsel-bsd-user
.endif
.endif
.endif
@ -109,10 +108,15 @@ CONFIGURE_ARGS+= --prefix=${PREFIX} --cc=${CC} --enable-docs \
--enable-debug-info \
--extra-cflags=-I${WRKSRC}\ -I${LOCALBASE}/include\ -DPREFIX=\\\"${PREFIX}\\\"
.if empty(PORT_OPTIONS:MSDL)
.if empty(PORT_OPTIONS:MX11)
CONFIGURE_ARGS+= --disable-gtk
CONFIGURE_ARGS+= --disable-sdl
PLIST_SUB+= GTK="@comment "
.else
USE_SDL= sdl
USE_GNOME+= gtk20 vte
USES+= gettext
PLIST_SUB+= GTK=""
.endif
.if empty(PORT_OPTIONS:MGNUTLS)
@ -148,8 +152,8 @@ USE_GL= yes
.if empty(PORT_OPTIONS:MUSBREDIR)
CONFIGURE_ARGS+= --disable-usb-redir
.else
BUILD_DEPENDS+= usbredir>=0.4.3:${PORTSDIR}/net/usbredir
RUN_DEPENDS+= usbredir>=0.4.3:${PORTSDIR}/net/usbredir
BUILD_DEPENDS+= usbredir>=0.6:${PORTSDIR}/net/usbredir
RUN_DEPENDS+= usbredir>=0.6:${PORTSDIR}/net/usbredir
.endif
.if ${PORT_OPTIONS:MPCAP}
@ -160,10 +164,6 @@ CONFIGURE_ARGS+= --enable-pcap
CONFIGURE_ARGS+= --static
.endif
.if ${PORT_OPTIONS:MADD_AUDIO}
CONFIGURE_ARGS+= --audio-card-list=ac97,es1370,sb16,cs4231a,adlib,gus,hda
.endif
.if ${PORT_OPTIONS:MSAMBA}
RUN_DEPENDS+= ${LOCALBASE}/sbin/smbd:${PORTSDIR}/net/samba36
.endif

View file

@ -1,2 +1,2 @@
SHA256 (qemu/1.4.1/qemu-1.4.1.tar.bz2) = 75063a9326221607de3599e89fb5af80f2d8080ddc55ca253fff113843432df1
SIZE (qemu/1.4.1/qemu-1.4.1.tar.bz2) = 10417738
SHA256 (qemu/1.5.0/qemu-1.5.0.tar.bz2) = b22b30ee9712568dfb4eedf76783f4a76546e1cbc41659b909646bcf0b4867bb
SIZE (qemu/1.5.0/qemu-1.5.0.tar.bz2) = 11931067

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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]);

View file

@ -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(),

View file

@ -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.

View file

@ -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>

View file

@ -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 */

View file

@ -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));

View file

@ -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)
+{
+}
+
+static inline void
+end_exclusive(void)
+{
+}
+
+static inline void
+cpu_exec_start(CPUArchState *env)
{
}
-void cpu_list_unlock(void)
+static inline void
+end_exclusive(void)
{
}
+static inline void
+cpu_exec_start(CPUArchState *env)
+{
+}
+
+
+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;

View file

@ -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);
}

View file

@ -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 */

View file

@ -1,2 +0,0 @@
/^ NET_CLIENT_TYPE_DUMP,$/i\
\ NET_CLIENT_TYPE_PCAP,

View file

@ -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

View file

@ -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

View file

@ -1,10 +1,9 @@
FreeBSD host notes
==================
- Needs to run as root in order to use /dev/tap* networking (why?) (actually
RELENG_6 and above now has a sysctl net.link.tap.user_open to allow users to
use it too. Don't forget to adjust device node permissions in
/etc/devfs.rules.)
- Needs to set net.link.tap.user_open sysctl in order to use /dev/tap*
networking as non-root. Don't forget to adjust device node permissions in
/etc/devfs.rules.
- slirp (usermode networking) is fixed now in cvs, on FreeSBIE 1.0 guests you
still have to manually do: echo nameserver 10.0.2.3 >/etc/resolv.conf but
@ -45,19 +44,16 @@ FreeBSD host notes
the same way.
- The -smb option (smb-export local dir to guest using the default
slirp networking) needs the net/samba34 port/package installed
in addition to qemu.
slirp networking) needs the net/samba36 port/package installed
in addition to qemu. (SAMBA knob.)
- If you want to use usb devices connected to the host in the guest
(usb_add host:... monitor command; this doesn't work on FreeBSD 8 and
-current atm because of the new usb stack - help updating the usb-bsd.c code
is more than welcome here!) you need to make sure the host isn't claiming
them, e.g. for umass devices (like memory sticks or external harddrives)
make sure umass isn't in the kernel (you can then still load it as a kld
when needed), also unless you are running qemu as root you then need to fix
permissions for /dev/ugen* device nodes: if you are on 5.x or later (devfs)
put a rule in /etc/devfs.rules, activate it in /etc/rc.conf and run
/etc/rc.d/devfs restart. Example devfs.rules:
yot need either recent 10-current (not tested yet much) or you can
use usbredir over the network (see below); also unless you are
running qemu as root you then need to fix permissions for /dev/ugen*
device nodes: if you are on 5.x or later (devfs) put a rule in
/etc/devfs.rules, activate it in /etc/rc.conf and run /etc/rc.d/devfs
restart. Example devfs.rules:
[ugen_ruleset=20]
add path 'ugen*' mode 660 group operator
@ -93,14 +89,15 @@ FreeBSD host notes
processing error - resetting ehci HC
Assertion failed: (0), function ehci_advance_state, file /data/ports/emulators/qemu-devel/work/qemu-0.15.0/hw/usb-ehci.c, line 2045.
The new qemu version works better, tho usbredirserver still crashes
when qemu exits.]
The new qemu version works better tho.]
- Still usb: since the hub is no longer attached to the uchi controller and
the wakeup mechanism, resume interrupt is not implemented yet linux guests
will suspend the bus, i.e. they wont see devices usb_add'ed after its
(linux') uhci module got loaded. Workaround: either add devices before
linux loads the module or rmmod and modprobe it afterwards.
linux loads the module or rmmod and modprobe it afterwards. [Not sure
if this still applies to the new libusb host code used on recent
10-current.]
- If you get repeated `atapi_poll called!' console messages with FreeBSD
guests or other weird cdrom problems then thats probably because the guest
@ -144,7 +141,8 @@ processing error - resetting ehci HC
also usually faster.) You should be able to migrate existing images to raw
using qemu-img(1)'s convert function; raw doesn't support advanced features
like snapshots tho. [a few important qcow2 bugfixed have been committed in
the meantime so this _might_ be less of an issue now.]
the meantime so this _might_ be less of an issue now; and meanwhile there
also is the new qed format - I don't know how stable that one is.]
- (also not FreeBSD-specific:) It is recommended to pass raw images using the
new -drive syntax, specifying format=raw explicitly in order to avoid

View file

@ -14,6 +14,7 @@ bin/qemu-system-i386
%%NONX86%%bin/qemu-system-mips64
%%NONX86%%bin/qemu-system-mips64el
%%NONX86%%bin/qemu-system-mipsel
%%NONX86%%bin/qemu-system-moxie
%%NONX86%%bin/qemu-system-or32
%%NONX86%%bin/qemu-system-ppc
%%NONX86%%bin/qemu-system-ppc64
@ -49,6 +50,13 @@ etc/qemu/target-x86_64.conf.sample
%%DATADIR%%/acpi-dsdt.aml
%%DATADIR%%/q35-acpi-dsdt.aml
%%DATADIR%%/bios.bin
%%DATADIR%%/efi-e1000.rom
%%DATADIR%%/efi-eepro100.rom
%%DATADIR%%/efi-ne2k_pci.rom
%%DATADIR%%/efi-pcnet.rom
%%DATADIR%%/efi-rtl8139.rom
%%DATADIR%%/efi-virtio.rom
%%DATADIR%%/s390-ccw.img
%%DATADIR%%/vgabios.bin
%%DATADIR%%/vgabios-cirrus.bin
%%DATADIR%%/vgabios-qxl.bin
@ -112,6 +120,12 @@ etc/qemu/target-x86_64.conf.sample
%%DATADIR%%/keymaps/sv
%%DATADIR%%/keymaps/th
%%DATADIR%%/keymaps/tr
%%GTK%%share/locale/de_DE/LC_MESSAGES/qemu.mo
%%GTK%%share/locale/fr_FR/LC_MESSAGES/qemu.mo
%%GTK%%share/locale/it/LC_MESSAGES/qemu.mo
%%GTK%%share/locale/tr/LC_MESSAGES/qemu.mo
@dirrm %%DATADIR%%/keymaps
%%GTK%%@dirrmtry share/locale/de_DE/LC_MESSAGES
%%GTK%%@dirrmtry share/locale/de_DE
@dirrmtry %%DATADIR%%
@dirrmtry %%DOCSDIR%%