aboutsummaryrefslogtreecommitdiff
path: root/emulators/kqemu-kmod
diff options
context:
space:
mode:
authorJuergen Lock <nox@FreeBSD.org>2008-06-05 18:49:12 +0000
committerJuergen Lock <nox@FreeBSD.org>2008-06-05 18:49:12 +0000
commit7db429fd44827caba2416f0e43a989b31debb253 (patch)
tree2186e77f883f28bb88961168c17f26fb6003a71c /emulators/kqemu-kmod
parent03c43202ed50e4ef5677d84f4f78ba3b899e7995 (diff)
downloadports-7db429fd44827caba2416f0e43a989b31debb253.tar.gz
ports-7db429fd44827caba2416f0e43a989b31debb253.zip
- Call the tss fixup code before entering the monitor instead of after.
(This fixes the problems that one user saw which I couldn't reproduce.) - Bump PORTREVISION
Notes
Notes: svn path=/head/; revision=214365
Diffstat (limited to 'emulators/kqemu-kmod')
-rw-r--r--emulators/kqemu-kmod/Makefile2
-rw-r--r--emulators/kqemu-kmod/files/patch-tssworkaround13
2 files changed, 8 insertions, 7 deletions
diff --git a/emulators/kqemu-kmod/Makefile b/emulators/kqemu-kmod/Makefile
index 36d363b3140b..f2ce4c030afd 100644
--- a/emulators/kqemu-kmod/Makefile
+++ b/emulators/kqemu-kmod/Makefile
@@ -7,7 +7,7 @@
PORTNAME= kqemu
PORTVERSION= 1.3.0.p11
-PORTREVISION= 7
+PORTREVISION= 8
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 e735deb5f1de..922342bb7781 100644
--- a/emulators/kqemu-kmod/files/patch-tssworkaround
+++ b/emulators/kqemu-kmod/files/patch-tssworkaround
@@ -83,20 +83,21 @@ Index: common/kernel.c
#endif
#ifdef PROFILE
-@@ -1188,6 +1191,13 @@
- apic_restore_nmi(s, apic_nmi_mask);
+@@ -1096,6 +1099,14 @@
+ apic_nmi_mask = apic_save_and_disable_nmi(s);
}
- profile_record(s);
+
+#ifdef __FreeBSD__
+#ifdef __x86_64__
+ spin_lock(&g->lock);
++ asm volatile ("sgdt %0" : : "m" (s->kernel_gdt));
+ kqemu_tss_fixup(s->kernel_gdt.base);
+ spin_unlock(&g->lock);
+#endif
+#endif
-
- if (s->mon_req == MON_REQ_IRQ) {
- struct kqemu_exception_regs *r;
+ /* load breakpoint registers and avoid setting them if in the
+ monitor address space. We suppose that no breakpoints are
+ set by the host OS for this process */
Index: kqemu-kernel.h
@@ -48,4 +48,10 @@