[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 3/8] qtest: Don't compile qtest accel on non-POSIX sy
From: |
Thomas Huth |
Subject: |
[Qemu-devel] [PULL 3/8] qtest: Don't compile qtest accel on non-POSIX systems |
Date: |
Thu, 2 May 2019 18:13:05 +0200 |
From: Eduardo Habkost <address@hidden>
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 <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden> [on mingw64]
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>
---
accel/Makefile.objs | 2 +-
accel/qtest.c | 1 -
include/sysemu/qtest.h | 9 ---------
3 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/accel/Makefile.objs b/accel/Makefile.objs
index 2a5ed46940..8b498d39d8 100644
--- a/accel/Makefile.objs
+++ b/accel/Makefile.objs
@@ -1,5 +1,5 @@
obj-$(CONFIG_SOFTMMU) += accel.o
-obj-$(CONFIG_SOFTMMU) += qtest.o
+obj-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_POSIX)) += qtest.o
obj-$(CONFIG_KVM) += kvm/
obj-$(CONFIG_TCG) += tcg/
obj-y += stubs/
diff --git a/accel/qtest.c b/accel/qtest.c
index a02b3c26c7..5b88f55921 100644
--- a/accel/qtest.c
+++ b/accel/qtest.c
@@ -34,7 +34,6 @@ static void qtest_accel_class_init(ObjectClass *oc, void
*data)
{
AccelClass *ac = ACCEL_CLASS(oc);
ac->name = "QTest";
- ac->available = qtest_available;
ac->init_machine = qtest_init_accel;
ac->allowed = &qtest_allowed;
}
diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h
index 70aa40aa72..096ddfc20c 100644
--- a/include/sysemu/qtest.h
+++ b/include/sysemu/qtest.h
@@ -27,13 +27,4 @@ bool qtest_driver(void);
void qtest_init(const char *qtest_chrdev, const char *qtest_log, Error **errp);
-static inline int qtest_available(void)
-{
-#ifdef CONFIG_POSIX
- return 1;
-#else
- return 0;
-#endif
-}
-
#endif
--
2.21.0
- [Qemu-devel] [PULL 0/8] qtest and misc patches, Thomas Huth, 2019/05/02
- [Qemu-devel] [PULL 1/8] gitlab-ci.yml: Test the TCG interpreter in a CI pipeline, Thomas Huth, 2019/05/02
- [Qemu-devel] [PULL 2/8] qtest: Move accel code to accel/qtest.c, Thomas Huth, 2019/05/02
- [Qemu-devel] [PULL 3/8] qtest: Don't compile qtest accel on non-POSIX systems,
Thomas Huth <=
- [Qemu-devel] [PULL 4/8] accel: Remove unused AccelClass::available field, Thomas Huth, 2019/05/02
- [Qemu-devel] [PULL 5/8] configure: Add -Wno-typedef-redefinition to CFLAGS (for Clang), Thomas Huth, 2019/05/02
- [Qemu-devel] [PULL 6/8] configure: Remove old *-config-devices.mak.d files when running configure, Thomas Huth, 2019/05/02
- [Qemu-devel] [PULL 7/8] configure: Relax check for libseccomp, Thomas Huth, 2019/05/02
- [Qemu-devel] [PULL 8/8] hw/pci-host: Use object_initialize_child for correct reference counting, Thomas Huth, 2019/05/02
- Re: [Qemu-devel] [PULL 0/8] qtest and misc patches, Peter Maydell, 2019/05/03