qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

qtest: Don't compile qtest accel on non-POSIX systems

qtest_available() will always return 0 on non-POSIX systems.
It's simpler to just not compile the accelerator code on those
systems instead of relying on the AccelClass::available function.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20190422210448.2488-3-ehabkost@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> [on mingw64]
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

authored by

Eduardo Habkost and committed by
Thomas Huth
a08052bc 3fe13fe1

+1 -11
+1 -1
accel/Makefile.objs
··· 1 1 obj-$(CONFIG_SOFTMMU) += accel.o 2 - obj-$(CONFIG_SOFTMMU) += qtest.o 2 + obj-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_POSIX)) += qtest.o 3 3 obj-$(CONFIG_KVM) += kvm/ 4 4 obj-$(CONFIG_TCG) += tcg/ 5 5 obj-y += stubs/
-1
accel/qtest.c
··· 34 34 { 35 35 AccelClass *ac = ACCEL_CLASS(oc); 36 36 ac->name = "QTest"; 37 - ac->available = qtest_available; 38 37 ac->init_machine = qtest_init_accel; 39 38 ac->allowed = &qtest_allowed; 40 39 }
-9
include/sysemu/qtest.h
··· 27 27 28 28 void qtest_init(const char *qtest_chrdev, const char *qtest_log, Error **errp); 29 29 30 - static inline int qtest_available(void) 31 - { 32 - #ifdef CONFIG_POSIX 33 - return 1; 34 - #else 35 - return 0; 36 - #endif 37 - } 38 - 39 30 #endif