Skip to content

Tags: githjh/qemu

Tags

r4.1.2

Toggle r4.1.2's commit message
tcg/plugins/oprofile: removed dependency on glib >= 2.22.

Made local version of int64_hash()/int64_equal() in replacement
of g_int64_hash()/g_int64_equal() available only in glib >= 2.22.

r4.1.1

Toggle r4.1.1's commit message
Revert "configure: removed some useless file generation for linux-user"

This reverts commit e8748f3.

r4.1

Toggle r4.1's commit message
We are pleased to announce a new release (r4.1) of QEMU/STM.

Changes
-------

* Improved compatibility with old Linux systems (RH4 for instance)

* SH4 specific fixes (fpscr, delay slot, movcal, multi-threading)

* The syscall gettimeofday(2) can now be hijacked to return the
  instruction counter.

* New plugin "oprofile" (print an oprofile-like execution summary).

Christophe GUILLON, Rémi DURAFFORT, and Antoine MOYNAULT.

r4.0

Toggle r4.0's commit message
We are pleased to announce a new release (r4.0) of QEMU/STM. In a

couple of words, this release is a merge of our custom v0.15 with the
official v1.0.1.  Beside our changes below, it brings support for the
new Cortex-A15 instructions in user-mode.

Changes
-------

* Android binaries are now supported in user-mode.

* syscall "clock_gettime" is now affected by the option -clock-ifetch.

* Fixed a race-condition in SH4 FPU and exception helpers

* Fixed "unordered" floating-point comparisons on SH4 (Laurent ALFONSI)

Work-in-progress (not released yet)
----------------

* Bring the SH4 multi-threading support to the same level as for other
  guest CPUs.

* Merge ST200 guest CPU support (written by Stephen CLARCK, being
  merged by Claire ROBINE)

* Merge the ARM memory checker (written by Christophe LYON)

* Merge with the upcoming official v1.0.1

r3.1

Toggle r3.1's commit message
Merge branch 'plugins' into next

r3.0

Toggle r3.0's commit message
====================

QEMU/STM Release 3.0
====================

:Date: 2011/12/23
:Revision: 1.0

Introduction
============

This release -- based on QEMU v0.15.0 -- is available here:

    http://codex.cro.st.com/file/showfiles.php?group_id=1626

Major Fixes/enhancements:

* Initial support for per-opcode instrumentation with two examples of
  such plugins:

  * the first one provides memory references for Dinero IV (a cache
    simulator); and

  * the second one simulates a IO memory mapped device (mainly
    interesting to prototype things in user-mode).

* new SH4 machine "dummy" used as an example on how to emulate a
  memory-mapped device.

* Support for `Q` packets from the Linux Kernel Debugger

* Initial support for System Trace Module IP

Special thanks to Marc Titinger for his contribution (last two items).

User-Mode Validation
====================

Material
--------

The user-mode emulation validation can be reproduced with the material
available on Codex:

    http://codex.cro.st.com/plugins/git/?group_id=1626

and

    http://codex.cro.st.com/file/showfiles.php?group_id=1626

===================  ==============  ======
item                       revision     tag
===================  ==============  ======
qemu.git                   1550002    r3.0
qemu-validation.git        0de73e2c    r3.0
proot.git                  a7c91155  v0.7.0
STLinux-2.4 ARM      spear-20110128
STLinux-2.4 SH4        sh4-20100401
===================  ==============  ======

Results
-------

================  ================  ============  ============  ============  ============
        .                .             Red Hat       Red Hat       Red Hat       Ubuntu
      test          environment      4.7 32-bit    4.6 64-bit    5.4 64-bit   10.04 64-bit
================  ================  ============  ============  ============  ============
build all target               N/A            OK            OK            OK            OK
arm-neon-tests    semi-hosting ARM            OK            OK            OK            OK
coreutils 5.2.1    STLinux-2.4 ARM            OK            OK            OK            OK
coreutils 5.2.1    STLinux-2.4 SH4            OK            OK            OK            OK
httpd 2.2.11       STLinux-2.4 ARM            OK            OK            OK            OK
httpd 2.2.11       STLinux-2.4 SH4            OK            OK            OK            OK
perl 5.8.8         STLinux-2.4 ARM     99.47% OK     99.36% OK     99.36% OK     99.36% OK
perl 5.8.8         STLinux-2.4 SH4     99.25% OK     99.25% OK     99.25% OK     99.68% OK
plugins smoke      STLinux-2.4 ARM  partially OK            OK            OK            OK
plugins smoke      STLinux-2.4 SH4  partially OK            OK            OK            OK
================  ================  ============  ============  ============  ============

Notes:

* coreutils 5.2.1: "skip-seek" is known to fail on QEMU 64-bit

* httpd 2.2.11: only `./configure` and `make` were tested

* perl 5.8.8: a couple of tests fail, some fail also on a real
  hardware.

* plugins were tested in user-mode only.

* per-opcodes plugins currently work on 64-bit host only.

r2.1

Toggle r2.1's commit message
Fix merge bustage.

Reported-by: christophe.lyon@st.com

r2.0

Toggle r2.0's commit message
====================

QEMU/STM Release 2.0
====================

:Date: 2011/09/07
:Revision: 1.1

Introduction
============

This release -- based on QEMU v0.15.0 -- introduces the support for
system-mode emulation compatible with STLinux-2.4 ARM & SH4, it also
includes some fixes and enhancements regarding TCP plugins, user-mode
emulation and PRoot:

    http://codex.cro.st.com/file/showfiles.php?group_id=1626

Major Fixes/enhancements:

* tcg-plugin/user-mode: the "trace" and "profile" TCG plugins now
  report symbols that also come from shared libraries, this feature is
  actually available to any TCG plugin.

* tcg-plugin/user-mode: a plugin can be loaded *lazily* by setting the
  "TCG_PLUGIN" environment variable, note that the command-line
  interface "-tcg-plugin" is still there.

* tcg-plugin: the API was slightly re-designed to be more consistent
  and less error-prone.

* user-mode: the "brk(2)" emulation was fixed.

System-Mode Activation
======================

ARM
---

Use the following command-line to start STLinux-2.4 ARM in QEMU
system-mode::

    qemu-system-arm -M vexpress-a9 -kernel linux-3.0-arm-vexpress                   \
        -drive index=0,media=disk,if=sd,file=stlinux-2.4-spear-20110128-rootfs.ext3 \
        -append "root=/dev/mmcblk0 rootfs=ext3"

If you wish to use it without graphical support then adjust the
command-line as below::

    -append "... serialtty=ttyAMA0,38400 console=ttyAMA0,38400" -nographic

The Linux kernel (v2.6.35 or later) was built that way::

    make ARCH=arm CROSS_COMPILE=armv7-linux- vexpress_defconfig
    make ARCH=arm CROSS_COMPILE=armv7-linux- zImage

ST40
----

Use the following command-line to start STLinux-2.4 SH4 in QEMU
system-mode::

    qemu-system-sh4 -M r2d -kernel linux-3.0-sh4-r2d                \
        -hda stlinux-2.4-sh4-20100401-rootfs.ext3  -usbdevice mouse \
        -append "root=/dev/sda rootfs=ext3 video=640x480-16"

If you wish to use it without graphical support then adjust the
command-line as below::

    -append "... console=tty0 console=ttySC1,115200" -nographic \
    -nodefaults -serial null -serial stdio

The Linux kernel (v2.6.24 or later) was built that way::

    make ARCH=sh CROSS_COMPILE=sh4-linux- rts7751r2dplus_defconfig

then unset::

    -> Boot options
      -> Kernel command line
        -> Kernel command line (Overwrite bootloader kernel arguments)

and set::

    -> Device Drivers
      -> Input device support
        -> Generic input layer
          -> Mouse interface

Finally::

    make ARCH=sh CROSS_COMPILE=sh4-linux- zImage

User-Mode Validation
====================

Material
---------

The user-mode emulation validation can be reproduced with the material
available on Codex:

    http://codex.cro.st.com/plugins/git/?group_id=1626

and

    http://codex.cro.st.com/file/showfiles.php?group_id=1626

===================  ========================================  ======
item                                revision                      tag
===================  ========================================  ======
qemu.git             068feb0    r2.0
qemu-validation.git  7685bbbe736c238fde80a41ebc43e68e0a94b5a7    r2.0
proot.git            752afb6b1b45ead3e5673c96251d86888bf68b6c  v0.6.2
STLinux-2.4 ARM                                spear-20110128
STLinux-2.4 SH4                                  sh4-20100401
===================  ========================================  ======

Results
-------

================  ================  ============  ============  ============  ============
        .                .             Red Hat       Red Hat       Red Hat       Ubuntu
      test          environment      4.7 32-bit    4.6 64-bit    5.4 64-bit   10.04 64-bit
================  ================  ============  ============  ============  ============
build all target               N/A            OK            OK            OK            OK
arm-neon-tests    semi-hosting ARM            OK            OK            OK            OK
coreutils 5.2.1    STLinux-2.4 ARM            OK            OK            OK            OK
coreutils 5.2.1    STLinux-2.4 SH4            OK            OK            OK            OK
httpd 2.2.11       STLinux-2.4 ARM            OK            OK            OK            OK
httpd 2.2.11       STLinux-2.4 SH4            OK            OK            OK            OK
perl 5.8.8         STLinux-2.4 ARM     99.36% 0K     99.36% OK     99.36% OK     99.25% OK
perl 5.8.8         STLinux-2.4 SH4     99.25% OK     99.25% OK     99.25% OK     99.68% OK
plugins smoke      STLinux-2.4 ARM            OK            OK            OK            OK
plugins smoke      STLinux-2.4 SH4            OK            OK            OK            OK
================  ================  ============  ============  ============  ============

Notes:

* coreutils 5.2.1: "skip-seek" is known to fail on QEMU 64-bit

* httpd 2.2.11: only `./configure` and `make` were tested

* perl 5.8.8: a couple of tests fail, some fail also on a real
  hardware (investigation is on-going for the other).

Thanks
======

I would like to thank, in no particular order: Claire ROBINE, Laurent
ALFONSI, Yves JANIN and all the OKLA crew.

r1.0

Toggle r1.0's commit message
We, CEC people, are proud to announce you this third release of

QEMU/STM which integrates an exclusive plugin mechanism:

    http://codex.cro.st.com/plugins/docman/?group_id=1626&action=show&id=187262

The TCG plugin support introduced in QEMU currently allows an external
shared library to be notified each time a basic block is translated
into the TCG internal representation, in the aim of instrumenting the
emulated code to produce program analysis, à la Valgrind or DynamoRIO
for instance.

There are already five plugins available by default:

icount
    Count the number of executed *guest* instructions per CPU and
    produce a summary report each time CPUs are stopped::

        Number of executed instructions on CPU #0 = 678234533
        Number of executed instructions on CPU cedric-vincent#1 = 36475675

icount-inlined
    Same as the above but this plugin is *not* based on a helper,
    instead it inserts TCG opcodes inlined right at the beginning of
    each basic block, see `How to Write TCG Plugins?`_ for details.
    This method is quite faster [#]_ but the current implementation is
    *not* thread-safe.

.. [#] Christophe GUILLON: Program Instrumentation with QEMU.  In 1st
       International QEMU Users' Forum 2010.

trace
    Print the address/size/name of the current emulated basic block.
    This is quite useful to find where two runs diverge or where a
    segmentation fault occurred::

        [...]
        CPU #0 - 0x00008270 [32]: 8 instruction(s) in 'main'
        CPU #0 - 0x00008230 [48]: 12 instruction(s) in 'test'
        CPU #0 - 0x00010ac0 [12]: 3 instruction(s) in 'memcpy'
        CPU #0 - 0x00010b54 [32]: 8 instruction(s) in 'memcpy'
        Segmentation fault

        $ addr2line -e a.out 0x00008230
        /usr/local/cedric/test.c:13

    Note that this plugin doesn't produce a call trace; for instance
    the function ``memcpy()`` isn't called twice in the previous
    example, there were just two basic blocks executed consecutively.

profile
    Count the number of executed *guest* bytes/instructions per symbol
    and produce a profile report each time CPUs are stopped::

        SYMBOL                       | #BYTES | #INSTR
        -----------------------------------------------
        test                         |     48 |     12
        memcpy                       |    168 |     42
        main                         |     32 |      8
        [...]

dineroIV
    Print the address/size/cpu of the current emulated instruction (in
    a per basic block basis) in a format supported by DineroIV, a
    highly configurable cache simulator::

        i 0x00008254 0x00000004 CPU #0
        i 0x00008258 0x00000004 CPU #0
        i 0x0000825c 0x00000004 CPU #0
        i 0x00010ac0 0x00000004 CPU #0
        i 0x00010ac4 0x00000004 CPU #0
        i 0x00010ac8 0x00000004 CPU #0

    This is a really good alternative to Cachegrind.

For information, I'm writing another plugin that generates a report in
the Callgrind format so as to be visualized with KCachegrind.  Also, I
didn't incorporate all features of the initial TCG plugin support
written by Christophe GUILLON yet.

Binaries versions (STLinux RPMs, tar.gz and /sw) of this release
should come in a couple of weeks.  In the mean time, feel free to
build it from the sources:

    http://codex.cro.st.com/plugins/git/index.php/1626/view/308/

Many thanks to Christophe GUILLON, Christophe LYON, Laurent ALFONSI
and Yves JANIN for their help!

Regards,
Cédric on behalf of CEC people.

r0.1

Toggle r0.1's commit message
We, CEC people, are proud to announce you this second release of QEMU

specifically designed to emulate STLinux v2.4 applications in
user-mode and ARM programs in semi-hosting mode:

    http://codex.cro.st.com/file/showfiles.php?group_id=1626

This release is based on the QEMU/STM R0 and adds the following
features:

    * extend the ARM semi-hosting mode to support: command-line
      arguments, stderr and exit code

    * fix the target heap/brk management

    * add *minimal* implementation of performance counters

    * fix the load of the non-initialized data segment

Please read the previous release note for mode information.

As final words I would like to personally thank the following
contributors for this release: Christophe LYON, Yves JANIN and
official QEMU developers of course.

Regards,
Cédric on behalf of CEC people.