qemu dynamic translation (system design) question
Quoted 5 lines
b. Once a block is generated some ID should be assigned to it right ? in which src file it is stored ?
c. The next time a src block with the same signature is encountered the cached host binary is used right ? -- How does qemu detect that is the same guest block ? md5sum or other fingerprinting methods ?
Look in qemu-exec.c/tb_find_fast
Laurent
Hi Laurent,
Thanks for the direction.
I am just thinking. If I run a guest OS once and observe the blocks that are translated and may be reused. Then I again re-run the OS, can I expect the same blocks are translated ? i.e., is qemu consistent on how it partitions the asm into blocks on successive runs or the guest OS ?
Note: in both cases the user doesn't interact with the Guest OS. It is up for, say 1 min and then shutdown in both runs.
regards,
Krishnan
Quoted 17 lines · Laurent DESNOGUES
Quoted 5 lines
b. Once a block is generated some ID should be assigned to it right ? in which src file it is stored ?
c. The next time a src block with the same signature is encountered the cached host binary is used right ? -- How does qemu detect that is the same guest block ? md5sum or other fingerprinting methods ?Look in qemu-exec.c/tb_find_fast
Laurent
_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel
Hello S.P.T.Krishnan,
Quoted 4 lines · you
Hi Laurent,
Thanks for the direction.
Quoted 8 lines
I am just thinking. If I run a guest OS once and observe the blocks that are translated and may be reused. Then I again re-run the OS, can I expect the same blocks are translated ? i.e., is qemu consistent on how it partitions the asm into blocks on successive runs or the guest OS ?
Note: in both cases the user doesn't interact with the Guest OS. It is up for, say 1 min and then shutdown in both runs.
My 2 cents of pure scholastic reasoning:
Let's assume that QEMU uses deterministic rules for block
translation. Then, it just translates what CPU goes thru. Does any contemporary OS leads CPU in deterministic ways? No. It largely depends on various environment parameters, of which user interaction is not the last. There're interrupts occuring in rather random places with respect to mainline execution, I/O delays, etc. As these parameters in guest OS depend on QEMU's interaction with host OS, they are not deterministic in it either. Well, but does QEMU's translation itself deterministic? Not really, as it uses caches, and thus depend on memory parameters in host OS.
Quoted 2 lines
regards,
Krishnan
Signature · 2 lines
Best regards, Paul mailto:[email protected]