qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu cpu-all.h cpu-exec.c exec.c target-i386/cp...
@ 2007-09-23 15:28 Thiemo Seufer
  2007-09-23 16:23 ` Fabrice Bellard
  0 siblings, 1 reply; 3+ messages in thread
From: Thiemo Seufer @ 2007-09-23 15:28 UTC (permalink / raw)
  To: qemu-devel

CVSROOT:	/sources/qemu
Module name:	qemu
Changes by:	Thiemo Seufer <ths>	07/09/23 15:28:04

Modified files:
	.              : cpu-all.h cpu-exec.c exec.c 
	target-i386    : cpu.h exec.h helper.c helper2.c op.c 
	                 translate.c 

Log message:
	SVM Support, by Alexander Graf.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/cpu-all.h?cvsroot=qemu&r1=1.75&r2=1.76
http://cvs.savannah.gnu.org/viewcvs/qemu/cpu-exec.c?cvsroot=qemu&r1=1.115&r2=1.116
http://cvs.savannah.gnu.org/viewcvs/qemu/exec.c?cvsroot=qemu&r1=1.105&r2=1.106
http://cvs.savannah.gnu.org/viewcvs/qemu/target-i386/cpu.h?cvsroot=qemu&r1=1.47&r2=1.48
http://cvs.savannah.gnu.org/viewcvs/qemu/target-i386/exec.h?cvsroot=qemu&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/qemu/target-i386/helper.c?cvsroot=qemu&r1=1.87&r2=1.88
http://cvs.savannah.gnu.org/viewcvs/qemu/target-i386/helper2.c?cvsroot=qemu&r1=1.51&r2=1.52
http://cvs.savannah.gnu.org/viewcvs/qemu/target-i386/op.c?cvsroot=qemu&r1=1.50&r2=1.51
http://cvs.savannah.gnu.org/viewcvs/qemu/target-i386/translate.c?cvsroot=qemu&r1=1.70&r2=1.71

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] qemu cpu-all.h cpu-exec.c exec.c target-i386/cp...
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Bellard @ 2007-09-23 16:23 UTC (permalink / raw)
  To: qemu-devel

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. Complicating the translator to handle SVM is 
definitely not the way I would have handled it.

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.

Regards,

Fabrice.

Thiemo Seufer wrote:
> CVSROOT:	/sources/qemu
> Module name:	qemu
> Changes by:	Thiemo Seufer <ths>	07/09/23 15:28:04
> 
> Modified files:
> 	.              : cpu-all.h cpu-exec.c exec.c 
> 	target-i386    : cpu.h exec.h helper.c helper2.c op.c 
> 	                 translate.c 
> 
> Log message:
> 	SVM Support, by Alexander Graf.
> 
> CVSWeb URLs:
> http://cvs.savannah.gnu.org/viewcvs/qemu/cpu-all.h?cvsroot=qemu&r1=1.75&r2=1.76
> http://cvs.savannah.gnu.org/viewcvs/qemu/cpu-exec.c?cvsroot=qemu&r1=1.115&r2=1.116
> http://cvs.savannah.gnu.org/viewcvs/qemu/exec.c?cvsroot=qemu&r1=1.105&r2=1.106
> http://cvs.savannah.gnu.org/viewcvs/qemu/target-i386/cpu.h?cvsroot=qemu&r1=1.47&r2=1.48
> http://cvs.savannah.gnu.org/viewcvs/qemu/target-i386/exec.h?cvsroot=qemu&r1=1.36&r2=1.37
> http://cvs.savannah.gnu.org/viewcvs/qemu/target-i386/helper.c?cvsroot=qemu&r1=1.87&r2=1.88
> http://cvs.savannah.gnu.org/viewcvs/qemu/target-i386/helper2.c?cvsroot=qemu&r1=1.51&r2=1.52
> http://cvs.savannah.gnu.org/viewcvs/qemu/target-i386/op.c?cvsroot=qemu&r1=1.50&r2=1.51
> http://cvs.savannah.gnu.org/viewcvs/qemu/target-i386/translate.c?cvsroot=qemu&r1=1.70&r2=1.71
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] qemu cpu-all.h cpu-exec.c exec.c target-i386/cp...
  2007-09-23 16:23 ` Fabrice Bellard
@ 2007-09-24 11:21   ` Alexander Graf
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Graf @ 2007-09-24 11:21 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-09-24 11:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).