Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jul 2002 00:57:43 -0500 (CDT)
From:      Jonathan Lemon <jlemon@flugsvamp.com>
To:        bsddiy@yahoo.com, current@freebsd.org
Subject:   Re: i386 trap code
Message-ID:  <200207060557.g665vhm16951@prism.flugsvamp.com>
In-Reply-To: <local.mail.freebsd-current/20020706030306.96129.qmail@web20905.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <local.mail.freebsd-current/20020706030306.96129.qmail@web20905.mail.yahoo.com> you write:
>sorry for a bit OT, does anyone see this in_vm86call crazy global variable?
>it prevents two CPUs to trap into VM86 model :(

Um, unfortunately, this is by design.  Most (all?) BIOSen code are
single threaded, and the vm86 code shares the entire ISA hole, including
the read/write BIOS data area.  Allowing more than one CPU to execute
BIOS code at once is asking for trouble, since there is no way to know
what memory locations are being shared.

Now that vm86_lock serves the same function, we could check that lock
instead of of the global flag.


>I have also fixed the problem that VM86 call is preempted by interrupt
>threads and causes system crash. newest patch can always be gotten from :
>http://opensource.zjonline.com.cn/freebsd/vm86patch.tgz

I haven't looked at vm86 for a long time, but the original code worked
by preventing any ASTs from being taken until the BIOS returned.  It's
likely that this needs to be reworked for -current.
-- 
Jonathan

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207060557.g665vhm16951>