All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Paul Durrant <paul@xen.org>,
	Richard Henderson <richard.henderson@linaro.org>,
	Roman Bolshakov <r.bolshakov@yadro.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	xen-devel@lists.xenproject.org,
	Anthony Perard <anthony.perard@citrix.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Claudio Fontana <cfontana@suse.de>
Subject: [PATCH v2 4/6] xen: Delete xen_available() function
Date: Wed, 25 Nov 2020 15:56:34 -0500	[thread overview]
Message-ID: <20201125205636.3305257-5-ehabkost@redhat.com> (raw)
In-Reply-To: <20201125205636.3305257-1-ehabkost@redhat.com>

The function can be replaced with accel_available("xen").

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Paul Durrant <paul@xen.org>
Cc: xen-devel@lists.xenproject.org
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Claudio Fontana <cfontana@suse.de>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
---
 include/sysemu/arch_init.h | 2 --
 softmmu/arch_init.c        | 9 ---------
 softmmu/vl.c               | 6 +++---
 3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h
index b32ce1afa9..40ac8052b7 100644
--- a/include/sysemu/arch_init.h
+++ b/include/sysemu/arch_init.h
@@ -32,6 +32,4 @@ enum {
 
 extern const uint32_t arch_type;
 
-int xen_available(void);
-
 #endif
diff --git a/softmmu/arch_init.c b/softmmu/arch_init.c
index 79383c8db8..f4770931f5 100644
--- a/softmmu/arch_init.c
+++ b/softmmu/arch_init.c
@@ -49,12 +49,3 @@ int graphic_depth = 32;
 
 
 const uint32_t arch_type = QEMU_ARCH;
-
-int xen_available(void)
-{
-#ifdef CONFIG_XEN
-    return 1;
-#else
-    return 0;
-#endif
-}
diff --git a/softmmu/vl.c b/softmmu/vl.c
index e6e0ad5a92..74b6ebf1e4 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3667,21 +3667,21 @@ void qemu_init(int argc, char **argv, char **envp)
                 has_defaults = 0;
                 break;
             case QEMU_OPTION_xen_domid:
-                if (!(xen_available())) {
+                if (!(accel_available("xen"))) {
                     error_report("Option not supported for this target");
                     exit(1);
                 }
                 xen_domid = atoi(optarg);
                 break;
             case QEMU_OPTION_xen_attach:
-                if (!(xen_available())) {
+                if (!(accel_available("xen"))) {
                     error_report("Option not supported for this target");
                     exit(1);
                 }
                 xen_mode = XEN_ATTACH;
                 break;
             case QEMU_OPTION_xen_domid_restrict:
-                if (!(xen_available())) {
+                if (!(accel_available("xen"))) {
                     error_report("Option not supported for this target");
                     exit(1);
                 }
-- 
2.28.0



WARNING: multiple messages have this Message-ID (diff)
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, Thomas Huth <thuth@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Anthony Perard <anthony.perard@citrix.com>,
	Paul Durrant <paul@xen.org>,
	xen-devel@lists.xenproject.org,
	Richard Henderson <richard.henderson@linaro.org>,
	Claudio Fontana <cfontana@suse.de>,
	Roman Bolshakov <r.bolshakov@yadro.com>
Subject: [PATCH v2 4/6] xen: Delete xen_available() function
Date: Wed, 25 Nov 2020 15:56:34 -0500	[thread overview]
Message-ID: <20201125205636.3305257-5-ehabkost@redhat.com> (raw)
In-Reply-To: <20201125205636.3305257-1-ehabkost@redhat.com>

The function can be replaced with accel_available("xen").

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Paul Durrant <paul@xen.org>
Cc: xen-devel@lists.xenproject.org
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Claudio Fontana <cfontana@suse.de>
Cc: Roman Bolshakov <r.bolshakov@yadro.com>
---
 include/sysemu/arch_init.h | 2 --
 softmmu/arch_init.c        | 9 ---------
 softmmu/vl.c               | 6 +++---
 3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h
index b32ce1afa9..40ac8052b7 100644
--- a/include/sysemu/arch_init.h
+++ b/include/sysemu/arch_init.h
@@ -32,6 +32,4 @@ enum {
 
 extern const uint32_t arch_type;
 
-int xen_available(void);
-
 #endif
diff --git a/softmmu/arch_init.c b/softmmu/arch_init.c
index 79383c8db8..f4770931f5 100644
--- a/softmmu/arch_init.c
+++ b/softmmu/arch_init.c
@@ -49,12 +49,3 @@ int graphic_depth = 32;
 
 
 const uint32_t arch_type = QEMU_ARCH;
-
-int xen_available(void)
-{
-#ifdef CONFIG_XEN
-    return 1;
-#else
-    return 0;
-#endif
-}
diff --git a/softmmu/vl.c b/softmmu/vl.c
index e6e0ad5a92..74b6ebf1e4 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3667,21 +3667,21 @@ void qemu_init(int argc, char **argv, char **envp)
                 has_defaults = 0;
                 break;
             case QEMU_OPTION_xen_domid:
-                if (!(xen_available())) {
+                if (!(accel_available("xen"))) {
                     error_report("Option not supported for this target");
                     exit(1);
                 }
                 xen_domid = atoi(optarg);
                 break;
             case QEMU_OPTION_xen_attach:
-                if (!(xen_available())) {
+                if (!(accel_available("xen"))) {
                     error_report("Option not supported for this target");
                     exit(1);
                 }
                 xen_mode = XEN_ATTACH;
                 break;
             case QEMU_OPTION_xen_domid_restrict:
-                if (!(xen_available())) {
+                if (!(accel_available("xen"))) {
                     error_report("Option not supported for this target");
                     exit(1);
                 }
-- 
2.28.0



  parent reply	other threads:[~2020-11-25 21:03 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25 20:56 [PATCH v2 0/6] arch_init.c cleanup Eduardo Habkost
2020-11-25 20:56 ` [PATCH v2 1/6] arch_init: Move QEMU_ARCH definitions to cpu.h Eduardo Habkost
2020-11-25 20:56   ` Eduardo Habkost
2020-11-26 12:31   ` Thomas Huth
2020-11-26 12:31     ` Thomas Huth
2020-11-27 11:35   ` Cornelia Huck
2020-11-27 11:35     ` Cornelia Huck
2020-11-25 20:56 ` [PATCH v2 2/6] accel: accel_available() function Eduardo Habkost
2020-11-26  9:14   ` Claudio Fontana
2020-11-26 13:36     ` Eduardo Habkost
2020-11-26 14:13       ` Claudio Fontana
2020-11-26 14:25         ` Paolo Bonzini
2020-11-26 21:06           ` Claudio Fontana
2020-11-26 21:48             ` Eduardo Habkost
2020-11-27  9:04               ` Claudio Fontana
2020-11-27 14:45                 ` Markus Armbruster
2020-11-27 14:58                   ` Claudio Fontana
2020-11-27 16:47                     ` Markus Armbruster
2020-11-27  5:00             ` Paolo Bonzini
2020-11-27 12:08   ` Cornelia Huck
2020-11-25 20:56 ` [PATCH v2 3/6] kvm: Remove kvm_available() function Eduardo Habkost
2020-11-25 20:56   ` Eduardo Habkost
2020-11-27 12:10   ` Cornelia Huck
2020-11-27 12:10     ` Cornelia Huck
2020-11-25 20:56 ` Eduardo Habkost [this message]
2020-11-25 20:56   ` [PATCH v2 4/6] xen: Delete xen_available() function Eduardo Habkost
2020-11-27 12:11   ` Cornelia Huck
2020-11-27 12:11     ` Cornelia Huck
2020-11-27 14:52   ` Anthony PERARD via
2020-11-27 14:52     ` Anthony PERARD
2020-11-25 20:56 ` [PATCH v2 5/6] Remove unnecessary usage of arch_init.h Eduardo Habkost
2020-11-25 20:56   ` Eduardo Habkost
2020-11-27 12:23   ` Cornelia Huck
2020-11-27 12:23     ` Cornelia Huck
2020-11-25 20:56 ` [PATCH v2 6/6] Rename arch_init.h to arch_type.h Eduardo Habkost
2020-11-27 12:25   ` Cornelia Huck
2020-11-25 22:23 ` [PATCH v2 0/6] arch_init.c cleanup Roman Bolshakov

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=20201125205636.3305257-5-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=anthony.perard@citrix.com \
    --cc=cfontana@suse.de \
    --cc=kraxel@redhat.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=r.bolshakov@yadro.com \
    --cc=richard.henderson@linaro.org \
    --cc=sstabellini@kernel.org \
    --cc=thuth@redhat.com \
    --cc=xen-devel@lists.xenproject.org \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.