diff options
author | nox <nox@FreeBSD.org> | 2010-01-31 01:04:34 +0800 |
---|---|---|
committer | nox <nox@FreeBSD.org> | 2010-01-31 01:04:34 +0800 |
commit | 049332aafa8576f2069a34726079d83daabf424a (patch) | |
tree | d3c05fac902eb287bb0d08dcfd26e49a2fb12282 /emulators | |
parent | c58a3fa70968e679e6ca21597e7f2cb7f24cf8de (diff) | |
download | freebsd-ports-gnome-049332aafa8576f2069a34726079d83daabf424a.tar.gz freebsd-ports-gnome-049332aafa8576f2069a34726079d83daabf424a.tar.zst freebsd-ports-gnome-049332aafa8576f2069a34726079d83daabf424a.zip |
Add workaround for Linux guest startup hangs seen with -kernel-kqemu
on stable/8 amd64.
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/kqemu-kmod-devel/Makefile | 2 | ||||
-rw-r--r-- | emulators/kqemu-kmod-devel/files/patch-kqemu-timeout | 25 |
2 files changed, 26 insertions, 1 deletions
diff --git a/emulators/kqemu-kmod-devel/Makefile b/emulators/kqemu-kmod-devel/Makefile index 8f9873a3dcdb..3eb03947eb41 100644 --- a/emulators/kqemu-kmod-devel/Makefile +++ b/emulators/kqemu-kmod-devel/Makefile @@ -7,7 +7,7 @@ PORTNAME= kqemu PORTVERSION= 1.4.0.p1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= emulators kld MASTER_SITES= http://bellard.org/qemu/ \ http://qemu.org/ \ diff --git a/emulators/kqemu-kmod-devel/files/patch-kqemu-timeout b/emulators/kqemu-kmod-devel/files/patch-kqemu-timeout new file mode 100644 index 000000000000..ed53e1a18b69 --- /dev/null +++ b/emulators/kqemu-kmod-devel/files/patch-kqemu-timeout @@ -0,0 +1,25 @@ +Index: common/kernel.c +@@ -1079,6 +1079,10 @@ long kqemu_exec(struct kqemu_state *s) + uint16_t saved_ds, saved_es; + unsigned long fs_base, gs_base; + #endif ++#if defined(__FreeBSD__) ++ extern int ticks; ++ int tstart = ticks; ++#endif + + #ifdef PROFILE + s->nb_profile_ts = 0; +@@ -1252,7 +1256,11 @@ long kqemu_exec(struct kqemu_state *s) + /* if interrupting user code, we schedule to give time + to the other processes. We can be interrupted by a + signal a that case. */ +- if (kqemu_schedule()) { ++ if (kqemu_schedule() ++#if defined(__FreeBSD__) ++ || ticks - tstart > 1 ++#endif ++ ) { + restore_cpu_state_from_regs(s, r); + ret = KQEMU_RET_INTR; + break; |