Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9207BC56201 for ; Wed, 25 Nov 2020 20:57:23 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EEC9A206F9 for ; Wed, 25 Nov 2020 20:57:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dIPPZrOk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EEC9A206F9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.38065.70684 (Exim 4.92) (envelope-from ) id 1ki1qb-0008Tx-KU; Wed, 25 Nov 2020 20:57:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 38065.70684; Wed, 25 Nov 2020 20:57:05 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ki1qb-0008Tq-HQ; Wed, 25 Nov 2020 20:57:05 +0000 Received: by outflank-mailman (input) for mailman id 38065; Wed, 25 Nov 2020 20:57:04 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ki1qa-0008Tl-9o for xen-devel@lists.xenproject.org; Wed, 25 Nov 2020 20:57:04 +0000 Received: from us-smtp-delivery-124.mimecast.com (unknown [216.205.24.124]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 38c23258-97bd-4ad7-908c-1465e61840fc; Wed, 25 Nov 2020 20:57:03 +0000 (UTC) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-361-AaIHiFkGOLqrKW3-qBNNqg-1; Wed, 25 Nov 2020 15:56:58 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 938AF1005D62; Wed, 25 Nov 2020 20:56:56 +0000 (UTC) Received: from localhost (unknown [10.10.67.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4230F60854; Wed, 25 Nov 2020 20:56:56 +0000 (UTC) Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ki1qa-0008Tl-9o for xen-devel@lists.xenproject.org; Wed, 25 Nov 2020 20:57:04 +0000 X-Inumbo-ID: 38c23258-97bd-4ad7-908c-1465e61840fc Received: from us-smtp-delivery-124.mimecast.com (unknown [216.205.24.124]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 38c23258-97bd-4ad7-908c-1465e61840fc; Wed, 25 Nov 2020 20:57:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606337822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kcyTO1EndQuMSTqqIVsGvEARRbZE17kEQ/mI/5TZMqc=; b=dIPPZrOk2/l4Uh/CP/fTOkVRa7VJIIQixF7ocsHcarqTk2TvDYFtVPe6Nfcc9juwSxi3Ne ONjAL3u+NctLrS9I7e86U493VeV2XXQgchRbWlXwwACnn8TM+7YfSue5IXgQYUFS1X+yQr ACRNQ+kJZmqAkmpUWZAOrId/F07ftPw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-361-AaIHiFkGOLqrKW3-qBNNqg-1; Wed, 25 Nov 2020 15:56:58 -0500 X-MC-Unique: AaIHiFkGOLqrKW3-qBNNqg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 938AF1005D62; Wed, 25 Nov 2020 20:56:56 +0000 (UTC) Received: from localhost (unknown [10.10.67.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4230F60854; Wed, 25 Nov 2020 20:56:56 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Thomas Huth , Paolo Bonzini , Stefano Stabellini , Anthony Perard , Paul Durrant , xen-devel@lists.xenproject.org, Richard Henderson , Claudio Fontana , Roman Bolshakov Subject: [PATCH v2 4/6] xen: Delete xen_available() function Date: Wed, 25 Nov 2020 15:56:34 -0500 Message-Id: <20201125205636.3305257-5-ehabkost@redhat.com> In-Reply-To: <20201125205636.3305257-1-ehabkost@redhat.com> References: <20201125205636.3305257-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ehabkost@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" The function can be replaced with accel_available("xen"). Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: qemu-devel@nongnu.org Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: xen-devel@lists.xenproject.org Cc: Richard Henderson Cc: Claudio Fontana Cc: Roman Bolshakov --- 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