[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/6] xen: Delete xen_available() function
From: |
Eduardo Habkost |
Subject: |
[PATCH v2 4/6] xen: Delete xen_available() function |
Date: |
Wed, 25 Nov 2020 15:56:34 -0500 |
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
Re: [PATCH v2 2/6] accel: accel_available() function, Cornelia Huck, 2020/11/27
[PATCH v2 3/6] kvm: Remove kvm_available() function, Eduardo Habkost, 2020/11/25
[PATCH v2 1/6] arch_init: Move QEMU_ARCH definitions to cpu.h, Eduardo Habkost, 2020/11/25
[PATCH v2 4/6] xen: Delete xen_available() function,
Eduardo Habkost <=
[PATCH v2 6/6] Rename arch_init.h to arch_type.h, Eduardo Habkost, 2020/11/25
[PATCH v2 5/6] Remove unnecessary usage of arch_init.h, Eduardo Habkost, 2020/11/25
Re: [PATCH v2 0/6] arch_init.c cleanup, Roman Bolshakov, 2020/11/25