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