The function can be replaced with accel_available("xen").
Signed-off-by: Eduardo Habkost <[email protected]>
---
Cc: Paolo Bonzini <[email protected]>
Cc: [email protected]
Cc: Stefano Stabellini <[email protected]>
Cc: Anthony Perard <[email protected]>
Cc: Paul Durrant <[email protected]>
Cc: [email protected]
Cc: Richard Henderson <[email protected]>
Cc: Claudio Fontana <[email protected]>
Cc: Roman Bolshakov <[email protected]>
---
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