Subject: Re: VM86 stuff: how faithful to Linux interface?
To: None <mycroft@gnu.ai.mit.edu>
From: Terry Moore <tmm@databook.com>
List: port-i386
Date: 03/13/1995 16:54:57
> Currently we don't use a TSS per process at all.  Doing so would slow
> down context switching significantly.  In fact, the i386 System Software
> Writer's Guide specifically disrecommends using multiple TSSes unless
> you need some feature that you can't get any other way.

Well, that pretty much rules out having separate I/O permissions per
task, unless one were to play games with the page tables -- have one
tss that starts just before a page boundary, so that the I/O permission
bits began page-aligned; reserve 2 pages for the bit map.  Then one
would simply change bit maps by changing the page table at context swap
time.  Obviously, one would normally allocate an 8K byte block of zeros
that would be shared by everyone until it was time to grant special
privileges to some task; then you'd allocate a copy for that task.
Need a per-process flag, I'd guess, saying "process has its own I/O map";
and would also need to manage deallocating when the process exited.  

But probably this won't work either, for reasons having to do with
other aspects of the kernel...

Best regards,
--Terry