From: Alexander Graf <agraf@suse.de>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu cpu-all.h cpu-exec.c exec.c target-i386/cp...
Date: Mon, 24 Sep 2007 13:21:40 +0200 [thread overview]
Message-ID: <46F79DC4.9060401@suse.de> (raw)
In-Reply-To: <46F692E6.3070507@bellard.org>
Hi Fabrice,
thank you for commenting on this.
Fabrice Bellard wrote:
> Hi,
>
> The code would be simpler if some intercept tests were done at runtime
> in the corresponding helpers (for crN, drN and MSR registers, I/Os).
> This is especially true when the existing helpers can return an
> exception at runtime.
So basically you mean it would be simpler if all the intercepts that can
occur in helpers are checked for in helpers? Right now I'm quite glad to
have all intercept information in one file (translate.c) and can see if
there is an intercept happening just by taking a look at the opcode
translation code. I don't know about the program flow simplicity though,
so maybe I could change it back to implement all the intercepts that can
be done in helpers in the helpers.
> Complicating the translator to handle SVM is definitely not the way I
> would have handled it.
>
Complicating in which way? Adding extra flags or adding extra
instructions when svm is used? We have to add instructions in cases
where the opcode is not handled by a helper or the order of checks is
different (e.g. an instruction may only run in cpl 3, but the intercept
always occurs).
> For I/Os for example, there was already the necessary support to do
> runtime tests (see gen_check_io()). Adding one bit to return the
> prefix information is all what it needed. The current code is actually
> slower because new ops were added for each I/O instruction.
This looks good. I will take a look at that one.
Thanks,
Alex
prev parent reply other threads:[~2007-09-24 11:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-23 15:28 [Qemu-devel] qemu cpu-all.h cpu-exec.c exec.c target-i386/cp Thiemo Seufer
2007-09-23 16:23 ` Fabrice Bellard
2007-09-24 11:21 ` Alexander Graf [this message]
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=46F79DC4.9060401@suse.de \
--to=agraf@suse.de \
--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).