The function can be replaced with accel_available("xen"). Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: qemu-de...@nongnu.org Cc: Stefano Stabellini <sstabell...@kernel.org> Cc: Anthony Perard <anthony.per...@citrix.com> Cc: Paul Durrant <p...@xen.org> Cc: xen-devel@lists.xenproject.org Cc: Richard Henderson <richard.hender...@linaro.org> Cc: Claudio Fontana <cfont...@suse.de> Cc: Roman Bolshakov <r.bolsha...@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