diff options
author | nox <nox@FreeBSD.org> | 2008-05-19 04:23:40 +0800 |
---|---|---|
committer | nox <nox@FreeBSD.org> | 2008-05-19 04:23:40 +0800 |
commit | 4a65814670eb49bd7ac36e3b2f021db2625503d0 (patch) | |
tree | 85fbbb9da2db6f5c493e5dbb2c0f21198ebf46c2 /emulators/kqemu-kmod | |
parent | 016087bab623d15bd5a49223d4e0651e3b6d217f (diff) | |
download | freebsd-ports-gnome-4a65814670eb49bd7ac36e3b2f021db2625503d0.tar.gz freebsd-ports-gnome-4a65814670eb49bd7ac36e3b2f021db2625503d0.tar.zst freebsd-ports-gnome-4a65814670eb49bd7ac36e3b2f021db2625503d0.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/Makefile | 2 | ||||
-rw-r--r-- | emulators/kqemu-kmod/files/patch-tssworkaround | 6 |
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); +} |