qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Host API escape


From: Derek Fawcus
Subject: [Qemu-devel] Host API escape
Date: Mon, 13 Sep 2004 23:45:07 +0100

On Mon, Sep 13, 2004 at 11:16:14PM +0200, Fabrice Bellard wrote:
> Derek Fawcus wrote:
> > I was adding a fake instruction

So will you at all interested in this bit,  want to wait for it to
cook some more first,  or not interested?

It's basically a "new" instruction,  using opcodes that should normally
generate undefined/illegal opcode traps,  hence it should still be usable
(in some form) if/when doing fast/native x86-on-x86.  The point being to
provide a a controlled escape to talk with the host - therefore it's
called "hostapi"...

At the moment I've defined a hidden "address register" which can be loaded
with an immediate value 16/32 bit offset from a specified segment register,
the address register getting the equivalent linear address and causing the
emulation to break ala a trap/debug.

>From there I then treat the address as a pointer to an argument block in
memory specifying what the request is;  service the request and return.

No real target registers are altered,  but arbitrary modifications to
target memory can be performed.  What I suspect I'll want at somepoint
is the ability to convert a set of virtual region descriptions into
scatter-gather physical descriptions,  such that they can be passed
to an external process which happens to mmap the target physical memory
file.

I've got it going well enought that I'm now working on the target and host
code which are communicating,  and seeing what if anything needs to alter
in the hostapi stuff.

I said I was working on a more complex form of file access...

My plan at the moment is DOS REDIR access (8.3 filenames) which should be
usable in all DOS derivatives (inc Win 3.1/WFW 3.11/w95/w98/wMe).

Other stuff,  say cut through video/mouse/kbd support,  LFN support,
virtual network (winsocks) can be done later,  but maybe not by me :-)
Once I started on this I realised that the ultimate progression is
effectivly the same as Win4Lin.  Hmm...

DF




reply via email to

[Prev in Thread] Current Thread [Next in Thread]