qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] The reason behind block linking constraint?


From: 陳韋任
Subject: Re: [Qemu-devel] The reason behind block linking constraint?
Date: Tue, 27 Sep 2011 11:13:53 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

Hi, Rob

> >>  Is it just because we cannot optimize block linking which crosses page
> >> boundary, or there are some correctness/safety issues should be considered?
> > 
> > If we link a TB with another TB from the different page, then the
> > second TB may disappear when the memory mapping changes and the
> > subsequent direct jump from the first TB will crash qemu.
> > 
> > I guess that this usually does not happen in usermode, because the
> > guest would not modify executable code memory mapping. However I
> > suppose that this is also possible.
> 
> Dynamic linking modifies guest code, requiring the page to be
> retranslated.  With lazy binding this can happen at any time, and
> without PIE executables this can happen to just about any executable page.

  Max and I have some discussion about the page boundary constraint
of block linking. Maybe it's not worth to track cross-page block
linking, for latter possible block unchaining. So there is a page
boundary constraint.

  You said dynamic linking requires the page to be retranslated.
Does that imply if there is NO page boundary constraint, user
mode might crash? If so, does it occur frequently? Maybe small program
just works fine without such constraint, I have to run something
big to make QEMU crash?

  Thanks!

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667



reply via email to

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