From: Eduardo Habkost <ehabkost@redhat.com> To: qemu-devel@nongnu.org Cc: Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 2/3] qtest: Don't compile qtest accel on non-POSIX systems Date: Mon, 22 Apr 2019 18:04:47 -0300 [thread overview] Message-ID: <20190422210448.2488-3-ehabkost@redhat.com> (raw) In-Reply-To: <20190422210448.2488-1-ehabkost@redhat.com> 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> --- include/sysemu/qtest.h | 9 --------- accel/qtest.c | 1 - accel/Makefile.objs | 2 +- 3 files changed, 1 insertion(+), 11 deletions(-) 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 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/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/ -- 2.18.0.rc1.1.g3f1ff2140
WARNING: multiple messages have this Message-ID (diff)
From: Eduardo Habkost <ehabkost@redhat.com> To: qemu-devel@nongnu.org Cc: Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Thomas Huth <thuth@redhat.com> Subject: [Qemu-devel] [PATCH 2/3] qtest: Don't compile qtest accel on non-POSIX systems Date: Mon, 22 Apr 2019 18:04:47 -0300 [thread overview] Message-ID: <20190422210448.2488-3-ehabkost@redhat.com> (raw) Message-ID: <20190422210447.Xou9ly3VJ9dxgACOdARJmhOTIM7zCW8qflVjnK69W8U@z> (raw) In-Reply-To: <20190422210448.2488-1-ehabkost@redhat.com> 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> --- include/sysemu/qtest.h | 9 --------- accel/qtest.c | 1 - accel/Makefile.objs | 2 +- 3 files changed, 1 insertion(+), 11 deletions(-) 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 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/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/ -- 2.18.0.rc1.1.g3f1ff2140
next prev parent reply other threads:[~2019-04-22 21:11 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-22 21:04 [Qemu-devel] [PATCH 0/3] Remove AccelClass::available field Eduardo Habkost 2019-04-22 21:04 ` Eduardo Habkost 2019-04-22 21:04 ` [Qemu-devel] [PATCH 1/3] qtest: Move accel code to accel/qtest.c Eduardo Habkost 2019-04-22 21:04 ` Eduardo Habkost 2019-04-22 21:56 ` Philippe Mathieu-Daudé 2019-04-22 21:56 ` Philippe Mathieu-Daudé 2019-04-22 22:08 ` Eduardo Habkost 2019-04-22 22:08 ` Eduardo Habkost 2019-04-22 22:17 ` Philippe Mathieu-Daudé 2019-04-22 22:17 ` Philippe Mathieu-Daudé 2019-04-23 5:07 ` Thomas Huth 2019-04-23 5:07 ` Thomas Huth 2019-04-23 11:08 ` [Qemu-devel] [PATCH] fixup! " Eduardo Habkost 2019-04-23 11:08 ` Eduardo Habkost 2019-04-23 11:29 ` Thomas Huth 2019-04-23 11:29 ` Thomas Huth 2019-04-22 21:04 ` Eduardo Habkost [this message] 2019-04-22 21:04 ` [Qemu-devel] [PATCH 2/3] qtest: Don't compile qtest accel on non-POSIX systems Eduardo Habkost 2019-04-22 22:20 ` Philippe Mathieu-Daudé 2019-04-22 22:20 ` Philippe Mathieu-Daudé 2019-04-23 5:09 ` Thomas Huth 2019-04-23 5:09 ` Thomas Huth 2019-04-22 21:04 ` [Qemu-devel] [PATCH 3/3] accel: Remove unused AccelClass::available field Eduardo Habkost 2019-04-22 21:04 ` Eduardo Habkost 2019-04-22 22:20 ` Philippe Mathieu-Daudé 2019-04-22 22:20 ` Philippe Mathieu-Daudé 2019-04-23 5:09 ` Thomas Huth 2019-04-23 5:09 ` Thomas Huth
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190422210448.2488-3-ehabkost@redhat.com \ --to=ehabkost@redhat.com \ --cc=lvivier@redhat.com \ --cc=pbonzini@redhat.com \ --cc=qemu-devel@nongnu.org \ --cc=thuth@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).