Yes, I think it would good to have facilities like this available
in FreeMWare.  I was thinking of having these available to our
own debugger environment.  Never thought about offering them
to a driver running inside the VM if that's what you're saying.
Though, if it helps, sound like a good plan to me.


-Kevin


> Well, I mean this:
> 
> - I/O-based drivers allocate I/O ports
> - Memory-based drivers (i.e., VGA card) allocate physical memory
>   I guess you could even make physical memory itself a driver, dynamically
>   allocating host memory at need (just a wild idea).
> - A real x86 has an INTR pin.  In stead of simulating this, it would be easier
>   just to be able to generate an interrupt by ioctl()ing the driver, that's
>   logical.
>   However, there may be drivers that want to *catch* generated interrupts
>   (software or hardware).  This is especially useful for simulating an ICE,
>   for me that would be one of the most useful aspects of such a system (vICE).
>   Another idea would be that you could potentially speed up emulation of an OS
>   by implementing parts of it outside the VM; an idea would be having WINE
>   collaborate with the VM (solves the VxD problem ?)  You could do this
>   by giving drivers the ability to "hook" interrupts.
> 
> In general, I think every resource that might trigger some driver action should
> be hookable.  However, if such a resource is not hooked you should notice no
> performance decrease from if hooking were not implemented in the first place.
> (for instance, memory-based hooking may be done at page level; I/O hooking
> has fine-grained control through I/O permission bitmaps; interrupts are
> also simple
> to implement).
> 
> Right now, I can think of these kinds of devices:
> 
> - I/O based.  Traditional.
> - DMA based.  Need a DMA driver, and some way to access memory
>   (but not hook it).
> - Memory based I/O.  VGA cards, APIC, etc.  Need memory hooking.
> - Bus snooping.  Intel Paragon NIC, etc.  Memory hooking would be okay I guess.
>   However, it doesn't sound very *efficient*.
> 
> Have I missed any ?
> 
> I think memory hooking should have an "urgent" flag.

Reply via email to