qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Derek Fawcus <dfawcus@cisco.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Host API escape
Date: Mon, 13 Sep 2004 23:45:07 +0100	[thread overview]
Message-ID: <20040913234507.A25117@edinburgh.cisco.com> (raw)
In-Reply-To: <41460E1E.8060104@bellard.org>; from fabrice@bellard.org on Mon, Sep 13, 2004 at 11:16:14PM +0200

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	other threads:[~2004-09-13 22:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-12 21:17 [Qemu-devel] Patch: Bugfix in monitor, tidy in translate Derek Fawcus
2004-09-13 21:16 ` Fabrice Bellard
2004-09-13 22:45   ` Derek Fawcus [this message]
2004-09-14  7:54     ` [Qemu-devel] Host API escape Gwenole Beauchesne
2004-09-14  9:49       ` Derek Fawcus
  -- strict thread matches above, loose matches on Subject: below --
2004-09-14  2:43 EricNorthup
2004-09-14  5:07 ` Derek Fawcus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040913234507.A25117@edinburgh.cisco.com \
    --to=dfawcus@cisco.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).