aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/kqemu-kmod
diff options
context:
space:
mode:
authorJuergen Lock <nox@FreeBSD.org>2008-05-19 04:23:40 +0800
committerJuergen Lock <nox@FreeBSD.org>2008-05-19 04:23:40 +0800
commit987566f671a15ea4697ccb990a6aed7547e7f0f5 (patch)
treefc3ab7d728a0ae92a06ff459a58cfb368c7c1cce /emulators/kqemu-kmod
parentf37afdb032efa98e2d14714e80205d4acf657cb2 (diff)
downloadfreebsd-ports-gnome-987566f671a15ea4697ccb990a6aed7547e7f0f5.tar.gz
freebsd-ports-gnome-987566f671a15ea4697ccb990a6aed7547e7f0f5.tar.zst
freebsd-ports-gnome-987566f671a15ea4697ccb990a6aed7547e7f0f5.zip
- Fix wrong userland fsbase load after gdt move that caused qemu to
segfault sometimes on first invocation - Get rid of redundant & in two places - Bump PORTREVISION There still is the unresolved issue of (likely) the gdt move causing the host to hang for one guy, if this happens to you you can try the following kernel patch that sets up seperate gdts at boot so kqemu doesn't have to do the move: http://people.freebsd.org/~nox/qemu/patch-sys-amd64-seperate-gdt.txt Thanx to: Yamagi for testing
Diffstat (limited to 'emulators/kqemu-kmod')
-rw-r--r--emulators/kqemu-kmod/Makefile2
-rw-r--r--emulators/kqemu-kmod/files/patch-tssworkaround6
2 files changed, 4 insertions, 4 deletions
diff --git a/emulators/kqemu-kmod/Makefile b/emulators/kqemu-kmod/Makefile
index a07d18304e19..36d363b3140b 100644
--- a/emulators/kqemu-kmod/Makefile
+++ b/emulators/kqemu-kmod/Makefile
@@ -7,7 +7,7 @@
PORTNAME= kqemu
PORTVERSION= 1.3.0.p11
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= emulators kld
MASTER_SITES= http://fabrice.bellard.free.fr/qemu/ \
http://qemu.org/ \
diff --git a/emulators/kqemu-kmod/files/patch-tssworkaround b/emulators/kqemu-kmod/files/patch-tssworkaround
index bbd594488a8b..e735deb5f1de 100644
--- a/emulators/kqemu-kmod/files/patch-tssworkaround
+++ b/emulators/kqemu-kmod/files/patch-tssworkaround
@@ -32,7 +32,7 @@ Index: kqemu-freebsd.c
+ unsigned cpuid = PCPU_GET(cpuid);
+ struct user_segment_descriptor *newgdt = gdt;
+
-+ if (mp_ncpus <= 1 || kerngdtbase != (unsigned long)&gdt)
++ if (mp_ncpus <= 1 || kerngdtbase != (unsigned long)gdt)
+ /* UP host or gdt already moved, nothing to do */
+ return;
+ if (cpuid) {
@@ -48,7 +48,7 @@ Index: kqemu-freebsd.c
+ kqemu_gdts = &gdt[NGDT];
+ ++kqemu_gdts_used;
+ newgdt = &kqemu_gdts[NGDT * (cpuid - 1)];
-+ bcopy(&gdt, newgdt, NGDT * sizeof(gdt[0]));
++ bcopy(gdt, newgdt, NGDT * sizeof(gdt[0]));
+ kqemu_r_newgdt.rd_limit = NGDT * sizeof(gdt[0]) - 1;
+ kqemu_r_newgdt.rd_base = (long) newgdt;
+ } else {
@@ -63,7 +63,7 @@ Index: kqemu-freebsd.c
+ lgdt(&kqemu_r_newgdt);
+ wrmsr(MSR_GSBASE, (u_int64_t)&__pcpu[cpuid]);
+ wrmsr(MSR_KGSBASE, curthread->td_pcb->pcb_gsbase);
-+ wrmsr(MSR_FSBASE, 0);
++ wrmsr(MSR_FSBASE, curthread->td_pcb->pcb_fsbase);
+ }
+ ltr(gsel_tss);
+}