kqemu locking my machine hard on amd64 smp, with most recent
patches
Juergen Lock
nox at jelal.kn-bremen.de
Thu May 15 17:31:33 UTC 2008
On Wed, May 14, 2008 at 10:53:20PM -0400, Todd Wasson wrote:
> Hi Juergen. No, I'm running it in a screen session on a headless machine
> and using VNC as a display device. I run it from the console and it hangs
> before anything useful shows up. Specifically, it spits this out before
> hanging:
>
> oss: Could not initialize DAC
> oss: Failed to open `/dev/dsp'
> oss: Reason: No such file or directory
> oss: Could not initialize DAC
> oss: Failed to open `/dev/dsp'
> oss: Reason: No such file or directory
> audio: Failed to create voice `pcspk'
> pcspk: Could not open voice
>
> So yeah, it's complaining about the sound hardware.
Oh that's _probably_ unrelated.
> Anyway, if I watch it
> in VNC, it hangs immediately when trying to boot the linux kernel; the only
> VM I've tried with it is a kubuntu install. It goes through the BIOS init,
> kicks off grub, and then says "Starting up ..." and then hangs.
>
> I've attached my dmesg. Thanks for whatever time you can put into this.
Thanx. Can you try the folloing patch? (also at
http://people.freebsd.org/~nox/qemu/kqemu-kmod-tss-cpldt2.patch
)
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/emulators/kqemu-kmod/Makefile,v
retrieving revision 1.25
diff -u -p -r1.25 Makefile
--- Makefile 12 May 2008 19:09:52 -0000 1.25
+++ Makefile 15 May 2008 17:07:33 -0000
@@ -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/ \
Index: files/patch-tssworkaround
===================================================================
RCS file: /home/pcvs/ports/emulators/kqemu-kmod/files/patch-tssworkaround,v
retrieving revision 1.3
diff -u -p -r1.3 patch-tssworkaround
--- files/patch-tssworkaround 12 May 2008 19:09:52 -0000 1.3
+++ files/patch-tssworkaround 15 May 2008 17:04:38 -0000
@@ -14,7 +14,7 @@ Index: kqemu-freebsd.c
#include "kqemu-kernel.h"
-@@ -248,6 +256,57 @@
+@@ -248,6 +256,60 @@
va_end(ap);
}
@@ -26,7 +26,7 @@ Index: kqemu-freebsd.c
+extern struct pcpu __pcpu[];
+
+/* called with interrupts disabled */
-+void CDECL kqemu_tss_fixup(unsigned long kerngdtbase)
++void CDECL kqemu_tss_fixup(unsigned long kerngdtbase, uint16_t kernldtsel)
+{
+ int gsel_tss = GSEL(GPROC0_SEL, SEL_KPL);
+ unsigned cpuid = PCPU_GET(cpuid);
@@ -64,6 +64,9 @@ Index: kqemu-freebsd.c
+ wrmsr(MSR_GSBASE, (u_int64_t)&__pcpu[cpuid]);
+ wrmsr(MSR_KGSBASE, curthread->td_pcb->pcb_gsbase);
+ wrmsr(MSR_FSBASE, 0);
++ ssdtosyssd(&gdt_segs[GPROC0_SEL],
++ (struct system_segment_descriptor *)&newgdt[GPROC0_SEL]);
++ lldt(kernldtsel);
+ }
+ ltr(gsel_tss);
+}
@@ -90,7 +93,7 @@ Index: common/kernel.c
+#ifdef __FreeBSD__
+#ifdef __x86_64__
+ spin_lock(&g->lock);
-+ kqemu_tss_fixup(s->kernel_gdt.base);
++ kqemu_tss_fixup(s->kernel_gdt.base, s->kernel_ldt_sel);
+ spin_unlock(&g->lock);
+#endif
+#endif
@@ -104,7 +107,7 @@ Index: kqemu-kernel.h
+#ifdef __FreeBSD__
+#ifdef __x86_64__
-+void CDECL kqemu_tss_fixup(unsigned long kerngdtbase);
++void CDECL kqemu_tss_fixup(unsigned long kerngdtbase, uint16_t kernldtsel);
+#endif
+#endif
+
More information about the freebsd-emulation
mailing list