qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] dyngen_code in 16 bit
@ 2008-04-14 16:08 Clemens Kolbitsch
  2008-04-14 16:19 ` Paul Brook
  0 siblings, 1 reply; 3+ messages in thread
From: Clemens Kolbitsch @ 2008-04-14 16:08 UTC (permalink / raw)
  To: qemu-devel

Hi!
For a research project I extended Qemu to include some extra code inside the 
op_XXX instructions that increased the generated TB-code's size to quite some 
extend... 

Now I have a problem when having block chaining enabled (that I don't want to 
disable for performance reasons :-/): The code_gen_buffer sometimes contains 
code areas that span more than 0xffff bytes, however, dyngen and all 
functions related to it use 16 bit pointers, etc. Therefore, e.g. the 
dyngen_code function uses the 16 bit pointers to overwrite certain params and 
of course destroys the TB-code.

When working with x86 hosts and guests (both 32 bit), is there a specific 
reason for all these pointers to be 16 bits or has it just been a safe 
assumption up to now?? I have tried rewriting the code to use 32 bit, but 
keep getting segfaults... however, of course, I might have missed some code 
still.

Any help is - as always - greatly appreciated!!

Cheers,
Clemens

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [Qemu-devel] dyngen_code in 16 bit
@ 2008-04-14 10:16 Clemens Kolbitsch
  0 siblings, 0 replies; 3+ messages in thread
From: Clemens Kolbitsch @ 2008-04-14 10:16 UTC (permalink / raw)
  To: qemu-devel

Hi!
For a research project I extended Qemu to include some extra code inside the 
op_XXX instructions that increased the generated TB-code's size to quite some 
extend... 

Now I have a problem when having block chaining enabled (that I don't want to 
disable for performance reasons :-/): The code_gen_buffer sometimes contains 
code areas that span more than 0xffff bytes, however, dyngen and all 
functions related to it use 16 bit pointers, etc. Therefore, e.g. the 
dyngen_code function uses the 16 bit pointers to overwrite certain params and 
of course destroys the TB-code.

When working with x86 hosts and guests (both 32 bit), is there a specific 
reason for all these pointers to be 16 bits or has it just been a safe 
assumption up to now?? I have tried rewriting the code to use 32 bit, but 
keep getting segfaults... however, of course, I might have missed some code 
still.

Any help is - as always - greatly appreciated!!

Cheers,
Clemens

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

end of thread, other threads:[~2008-04-14 16:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-14 16:08 [Qemu-devel] dyngen_code in 16 bit Clemens Kolbitsch
2008-04-14 16:19 ` Paul Brook
  -- strict thread matches above, loose matches on Subject: below --
2008-04-14 10:16 Clemens Kolbitsch

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).