mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 09:19:15 -04:00
Add workaround for Linux guest startup hangs seen with -kernel-kqemu
on stable/8 amd64.
This commit is contained in:
parent
66d6245dbe
commit
44c9d661ba
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=248850
2 changed files with 26 additions and 1 deletions
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
PORTNAME= kqemu
|
PORTNAME= kqemu
|
||||||
PORTVERSION= 1.4.0.p1
|
PORTVERSION= 1.4.0.p1
|
||||||
PORTREVISION= 3
|
PORTREVISION= 4
|
||||||
CATEGORIES= emulators kld
|
CATEGORIES= emulators kld
|
||||||
MASTER_SITES= http://bellard.org/qemu/ \
|
MASTER_SITES= http://bellard.org/qemu/ \
|
||||||
http://qemu.org/ \
|
http://qemu.org/ \
|
||||||
|
|
25
emulators/kqemu-kmod-devel/files/patch-kqemu-timeout
Normal file
25
emulators/kqemu-kmod-devel/files/patch-kqemu-timeout
Normal file
|
@ -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;
|
Loading…
Add table
Reference in a new issue