From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 CFBB6C433E0 for ; Mon, 3 Aug 2020 16:35:44 +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 9DE67206DA for ; Mon, 3 Aug 2020 16:35:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="R7Y6oWzo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DE67206DA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k2dQr-0006pM-96; Mon, 03 Aug 2020 16:35:25 +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 1k2dQp-0006pF-OL for xen-devel@lists.xenproject.org; Mon, 03 Aug 2020 16:35:23 +0000 X-Inumbo-ID: 53286984-d5a7-11ea-af5d-12813bfff9fa Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 53286984-d5a7-11ea-af5d-12813bfff9fa; Mon, 03 Aug 2020 16:35:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1596472523; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=MNUVdjqhQRP1dXRs4Aum5uFSIWFSBncZmJg7V1idQrI=; b=R7Y6oWzoQzuguTbDhllkB3thaANzbj80mhzDIA/Vhs7A6Pda3Sv5yp+q +oCeKWXyQGsl4NuXhZVR9+MhimoxpdzYNWNAKzrbp53xpSFG9P3Szvs+i XW3fCMQD6DTnSzhD2UXolXlTT6A2yj0Rhr3yVu6Mi2dFH6MG1gi2tzemg k=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: eqxk+0NeEGUCj9KM0nptCEKSlI8fcrI1rJOm9i9MdbTNrJp/02pz/cmIxq3i+fECreBovjI9qA nUceFlwzOFccjUgAF6MnJnCsRZCsB0oy0AIpvGLwjE3tB/h73VNLkzc2W3zjXXpTlFEe9T7et6 X1vpKQR+oOBEETDdXor5t6Nn/7MZZql07QpVvkdWYesPdnrVPQIWDM5Bq4EX2IoBSgpb9N53mQ X/h4V2OAJUKsYDQmm3RhHQdcTitw1SUryXRVpBOpqI7Xzr0i7KXrcSmFuMCnDgX04+9KiQ40HX RI4= X-SBRS: 3.7 X-MesageID: 23748486 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.75,430,1589256000"; d="scan'208";a="23748486" Date: Mon, 3 Aug 2020 17:35:15 +0100 From: Anthony PERARD To: Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= Subject: Re: [PATCH-for-5.1] accel/xen: Fix xen_enabled() behavior on target-agnostic objects Message-ID: <20200803163515.GD2866@perard.uk.xensource.com> References: <20200728100925.10454-1-philmd@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200728100925.10454-1-philmd@redhat.com> X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefano Stabellini , Paul Durrant , Paul Durrant , qemu-devel@nongnu.org, xen-devel@lists.xenproject.org, Paolo Bonzini Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Tue, Jul 28, 2020 at 12:09:25PM +0200, Philippe Mathieu-Daudé wrote: > CONFIG_XEN is generated by configure and stored in "config-target.h", > which is (obviously) only include for target-specific objects. > This is a problem for target-agnostic objects as CONFIG_XEN is never > defined and xen_enabled() is always inlined as 'false'. > > Fix by following the KVM schema, defining CONFIG_XEN_IS_POSSIBLE > when we don't know to force the call of the non-inlined function, > returning the xen_allowed boolean. > > Fixes: da278d58a092 ("accel: Move Xen accelerator code under accel/xen/") > Reported-by: Paul Durrant > Suggested-by: Peter Maydell > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD