qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Self-modifying test case for mttcg
@ 2015-07-21 10:58 Alexander Spyridakis
  2015-07-22 12:38 ` Andrew Jones
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Spyridakis @ 2015-07-21 10:58 UTC (permalink / raw)
  To: mttcg
  Cc: Claudio Fontana, Mark Burton, Alvise Rigo, QEMU Developers,
	Jani Kokkonen, Alex Bennée, KONRAD Frédéric

Hello all,

You can find a new self-modifying test case in the following branch:
> git clone https://git.virtualopensystems.com/dev/tcg_baremetal_tests.git -b smc_test

For each core, the test will run a small assembly snippet which
increments a variable. Immediately after, the snippet is modified in
memory to increment by 1 or 2 every other loop cycle, then passes
execution to the next core. At the end of the test we calculate the
expected result and compare it to the actual incremented variable. If
all code modifications happened correctly we pass the test.

The test case has been tested with upstream QEMU, MTTCG and KVM with
success. Next version of the test will include more corner cases, such
as changing TBs immediately after code modification, to make sure that
we cover every scenario.

To run it:
> make virt (or virt64/vexpress for other targets)
> ~/mttcg/arm-softmmu/qemu-system-arm -nographic -M virt -cpu cortex-a15 -kernel build-virt/image-virt.axf -smp 8

Also, by popular demand I started a port of the test for kvm-unit-tests:
> git clone https://git.virtualopensystems.com/dev/kvm-unit-tests.git

For the kvm-unit-tests version, I have some troubles with caches and
the MMU (which is disabled for this test). While TCG and MTTCG work,
KVM fails the test with strange results. I will keep looking to find
the exact problem.

Best regards.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-07-23 14:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-21 10:58 [Qemu-devel] Self-modifying test case for mttcg Alexander Spyridakis
2015-07-22 12:38 ` Andrew Jones
2015-07-22 13:06   ` Paolo Bonzini
2015-07-22 13:44     ` Andrew Jones
2015-07-22 15:01   ` Andrew Jones
2015-07-22 23:12   ` Alexander Spyridakis
2015-07-23 10:04     ` Andrew Jones
2015-07-23 14:42       ` Alexander Spyridakis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).