Date: Wed, 4 Jun 2008 21:03:59 -0400 From: Todd Wasson <tsw5@duke.edu> To: Juergen Lock <nox@jelal.kn-bremen.de> Cc: freebsd-emulation@freebsd.org Subject: Re: kqemu locking my machine hard on amd64 smp, with most recent patches Message-ID: <A337297C-186B-48A5-A85D-109258EF9A40@duke.edu> In-Reply-To: <20080603205245.GA13843@saturn.kn-bremen.de> References: <20080515080948.3B1F15B47@mail.bitblocks.com> <200805152323.m4FNNO7H017348@saturn.kn-bremen.de> <E5773BA5-1BE8-4847-A581-43F035E9DA3B@duke.edu> <20080518142427.GA20876@saturn.kn-bremen.de> <F1739BAD-038D-4D7D-96D0-FD1E84A9E72B@duke.edu> <20080603205245.GA13843@saturn.kn-bremen.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Wow, it worked! Thanks a ton. I've successfully booted a linux and windows xp image now on my machine with the 7.0-RELEASE kernel. Thanks for all of your hard work! Todd On Jun 3, 2008, at 4:52 PM, Juergen Lock wrote: > On Sun, May 18, 2008 at 06:16:21PM -0400, Todd Wasson wrote: >> Hi Juergen. That patch seems to have fixed the problem for me, as >> verified >> with both kqemu-kmod-1.3.0.p11_6 and kqemu-kmod-1.3.0.p11_7. >> However, I'm >> somewhat uneasy about using this patch on my system long-term, >> since it >> hasn't been rigorously tested. Are there putative implications of >> this >> patch with other software that I should be aware of? Is this >> kernel patch >> considered to be the final fix, or just a band-aid until the >> underlying >> cause can be addressed from within kqemu alone? > > I just noticed the new fixup code should better be called before > entering the monitor not after, maybe that was what caused your > problem. > Can you please try the following patch (without the kernel patch)? > > Thanx, > Juergen > > Index: Makefile > =================================================================== > RCS file: /home/pcvs/ports/emulators/kqemu-kmod/Makefile,v > retrieving revision 1.26 > diff -u -p -r1.26 Makefile > --- Makefile 18 May 2008 20:23:40 -0000 1.26 > +++ Makefile 3 Jun 2008 20:45:07 -0000 > @@ -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/ \ > Index: files/patch-tssworkaround > =================================================================== > RCS file: /home/pcvs/ports/emulators/kqemu-kmod/files/patch- > tssworkaround,v > retrieving revision 1.4 > diff -u -p -r1.4 patch-tssworkaround > --- files/patch-tssworkaround 18 May 2008 20:23:40 -0000 1.4 > +++ files/patch-tssworkaround 3 Jun 2008 20:08:24 -0000 > @@ -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 @@ >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A337297C-186B-48A5-A85D-109258EF9A40>