[Qemu-devel] qemu dynamic translation (system design) question
Hi, I would like to understand certain aspects of dynamic translation which Qemu employs to run the guest OS. I have read the qemu paper and this query is beyond that. My understanding is as follows: 1. Qemu slices the guest os binary into blocks and then asks the Host OS to execute it and return the result 2. In the above, without the accelerator module, Qemu does dynamic translation of guest_asm - c_func - host_asm. With the accelerator this conversion doesn't happen as the guest_asm and host_asm are the same. 3. Now before a block is executed the cpu_clock_ticks is updated in main_loop_wait and after the block is executed the cpu_clock_ticks is again updated based on the number of ticks that have gone by in the host_os during the execution. Is my understanding correct ? I think the qemu system works like this because qemu is still a process under the host os and hence cannot guarantee to the guest os how long it will take for qemu to execute guest_os instructions. One simple scenario could be the user in the host os suspends the qemu process for a while... 4. The interesting part happens when qemu encourters an already translated block. I understand that for efficiency qemu caches block based on some kind of signature and when the same block appears qemu simply uses the translated binary instead of re-translating it I have two questions here. a. How does qemu slice the guest binary into blocks ? any rational or rule of thumb here ? 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 ? d. Does this caching happen even with accelerator module running ? I understand my questions are deep into the design of qemu itself. Can I request Fabrice or the core team to help me out here ? regards, Krishnan ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] qemu dynamic translation (system design) question
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 Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu/hw fdc.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Fabrice Bellard bellard 06/08/19 11:43:22 Modified files: hw : fdc.c Log message: use bdrv_media_changed() CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/hw/fdc.c?cvsroot=qemur1=1.18r2=1.19 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu/hw ide.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Fabrice Bellard bellard 06/08/19 11:44:22 Modified files: hw : ide.c Log message: better support of removable media CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/hw/ide.c?cvsroot=qemur1=1.47r2=1.48 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu block-raw.c block.c block_int.h qemu-doc.t...
CVSROOT:/sources/qemu Module name:qemu Changes by: Fabrice Bellard bellard 06/08/19 11:45:59 Modified files: . : block-raw.c block.c block_int.h qemu-doc.texi vl.h Log message: better support of host drives CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/block-raw.c?cvsroot=qemur1=1.6r2=1.7 http://cvs.savannah.gnu.org/viewcvs/qemu/block.c?cvsroot=qemur1=1.33r2=1.34 http://cvs.savannah.gnu.org/viewcvs/qemu/block_int.h?cvsroot=qemur1=1.9r2=1.10 http://cvs.savannah.gnu.org/viewcvs/qemu/qemu-doc.texi?cvsroot=qemur1=1.103r2=1.104 http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemur1=1.142r2=1.143 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] Support of host drives
Hi, I just commited some new code to have a better support for host drives. The documentation is updated as well. I have only implemented Linux support. Contributors are welcomed to submit patches for better Windows, Mac OS X or BSD support. On the Linux host side, I am interested by a better detection system for floppy change. Regards, Fabrice. ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu/hw scsi-disk.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Fabrice Bellard bellard 06/08/19 11:58:10 Modified files: hw : scsi-disk.c Log message: no need for bdrv_close() CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/hw/scsi-disk.c?cvsroot=qemur1=1.11r2=1.12 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu Changelog
CVSROOT:/sources/qemu Module name:qemu Changes by: Fabrice Bellard bellard 06/08/19 12:38:38 Modified files: . : Changelog Log message: update CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/Changelog?cvsroot=qemur1=1.123r2=1.124 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] DSC timeouts using all of -hda -hdb -hdc -cdrom
J M Cerqueira Esteves wrote: vdeq qemu-system-x86_64 .. -hda .. -hdb .. -hdd .. -cdrom .. -boot d On many CD reading attempts there were longer-than-normal waits, for which the kernel reported hdc: DSC timeout [...] But it *didn't* happen when I tried the same installation process only using one virtual disk image (-hda ... -cdrom ...). Also: - had DSC timeouts with -hda ... -hdd ... -cdrom - didn't have DSC timeouts with -hda ... -hdb ... -cdrom So the culprit of the cdrom timeouts seems to be -hdd ... but why? -- +351 939838775 Skype:jmcerqueira http://del.icio.us/jmce ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu sdl.c keymaps/ja
CVSROOT:/sources/qemu Module name:qemu Changes by: Fabrice Bellard bellard 06/08/19 14:27:31 Modified files: . : sdl.c keymaps: ja Log message: Japanese keyboard fixes (kazu) CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/sdl.c?cvsroot=qemur1=1.30r2=1.31 http://cvs.savannah.gnu.org/viewcvs/qemu/keymaps/ja?cvsroot=qemur1=1.1r2=1.2 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] LGPL'd VGABIOS 0.6a released
Hi all, Today I have released version 0.5d of the LGPL'd VGABios with Cirrus and Bochs VBE support for Bochs and Qemu. Here is the list of the most important changes: - added minimal support for the video parameter table (VPT) - Cirrus SVGA now supports the no clear bit in Cirrus and VESA mode - Bochs VBE protected mode interface improved - save/restore video state support for Bochs VBE and standard VGA added - generate vbetables.h dynamicly - VBE video memory increased to 8 MB (VBE dispi ID changed to B0C4) - lots of 4bpp VBE fixes (all 4bpp VBE modes now enabled) - VGA compatible setup for VBE modes added -- Volker Ruppert ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu qemu-doc.texi
CVSROOT:/sources/qemu Module name:qemu Changes by: Fabrice Bellard bellard 06/08/19 16:56:18 Modified files: . : qemu-doc.texi Log message: removed outdated info CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/qemu-doc.texi?cvsroot=qemur1=1.104r2=1.105 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] -kernel-kqemu issue? hwclock w/ libc6-i686: segmentation fault on reboot
I submited the attached report to the Debian bug tracking system, but just now I noticed that that segfault of hwclock with libc6-i686 (in a guest Debian testing system) only occurs if the virtual machine is started with -kernel-kqemu. Could this be related to some kqemu bug? Best regards J Esteves -- +351 939838775 Skype:jmcerqueira http://del.icio.us/jmce ---BeginMessage--- Package: util-linux Version: 2.12r-10 Severity: normal Additional system information: This occurred inside a QEMU virtual machine running Debian testing (etch) i386, under the following QEMU HOST SETUP: host CPU: AMD Athlon 64 3500+ host operating system: Ubuntu 6.06 LTS, kernel: Ubuntu 2.6.15-26-amd64-k8 kqemu: 1.3.0pre9 QEMU: 0.8.2, configured with -cc=gcc-3.4 --enable-alsa invoked with qemu-system-x86_64 ... -kernel-kqemu ... In the Debian etch guest system, When libc6-i686 is installed hwclock segfaults on reboots: /etc/rc6.d/K25hwclock.sh: line 58: 3584 Segmentation fault /sbin/hwclock --systohc $GMT $HWCLOCKPARS $BADYEAR This does not occur when libc6-i686 is not installed. -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.16-2-k7 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages util-linux depends on: ii libc6 2.3.6-15 GNU C Library: Shared libraries ii libncurses5 5.5-2 Shared libraries for terminal hand ii libslang2 2.0.6-2The S-Lang programming library - r ii libuuid1 1.39-1 universally unique id library ii lsb-base 3.1-10 Linux Standard Base 3.1 init scrip ii zlib1g1:1.2.3-13 compression library - runtime util-linux recommends no packages. -- no debconf information ---End Message--- ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel