summaryrefslogtreecommitdiff
path: root/hw/pc-testdev.c
AgeCommit message (Collapse)AuthorFilesLines
2013-01-14pc-testdev: use typedefsGerd Hoffmann1-9/+9
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-10Make all static TypeInfos constAndreas Färber1-1/+1
Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register all types natively through QEMU Object Model), TypeInfo as used in the common, non-iterative pattern is no longer amended with information and should therefore be const. Fix the documented QOM examples: sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h Since frequently the wrong examples are being copied by contributors of new devices, fix all types in the tree: sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c This also avoids to piggy-back these changes onto real functional changes or other refactorings. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-05hw/i386: Fix broken build for non POSIX hostsStefan Weil1-0/+5
pc-testdev.c cannot be compiled with MinGW (and other non POSIX hosts): CC i386-softmmu/hw/i386/../pc-testdev.o qemu/hw/i386/../pc-testdev.c:38:22: warning: sys/mman.h: file not found qemu/hw/i386/../pc-testdev.c: In function ‘test_flush_page’: qemu/hw/i386/../pc-testdev.c:103: warning: implicit declaration of function ‘mprotect’ ... Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-04hw: Add test device for unittests executionLucas Meneghel Rodrigues1-0/+182
Add a test device which supports the kvmctl ioports, so one can run the KVM unittest suite. Intended Usage: qemu-system-x86_64 -nographic \ -device pc-testdev \ -device isa-debug-exit,iobase=0xf4,iosize=0x04 \ -kernel /path/to/kvm/unittests/msr.flat Where msr.flat is one of the KVM unittests, present on a separate repo, git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git [ kraxel: more memory api + qom fixes ] CC: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>