From patchwork Tue Mar 22 18:42:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Bowman, Casey G" X-Patchwork-Id: 12788947 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 917F7C433F5 for ; Tue, 22 Mar 2022 18:42:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B1DB410E10B; Tue, 22 Mar 2022 18:42:56 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 13FCA10E10B for ; Tue, 22 Mar 2022 18:42:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1647974575; x=1679510575; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wmE4GEz8fPvoL4G2t4lnWvYlCcmn5HIFScStmdIqJSM=; b=XmWIsr9zs2zAfVsoxYz5kLTi6pypCLrvc8NLN75Hb3en/H4aY8MyWXH5 kzp3wfhw2km7meggCH723+Z6OuIlwdxoncd7DPhiTpcA9s6Tli/nHcGZ6 8q+Scp+5mCpVC6hor3yUADUiIlAaL6G48kSjcajoI1t4ypAaSzFgSm0hv JUcPTsxqqsxaEDADxKkkQyh82BayKpYJxvpx6ZpgbG1h2k112spI5fJee 31ttdIRVw8Y0HSIJHzUQzUXC63De+fLQF8KDEO7Qv4Mpe1dFHLPrEGMVn x4prkOmxMJJVKaIMfjQFpjcDpFY2ThNXmvpp1oFNP68wH4MlVZHRRPtLO A==; X-IronPort-AV: E=McAfee;i="6200,9189,10294"; a="245390205" X-IronPort-AV: E=Sophos;i="5.90,202,1643702400"; d="scan'208";a="245390205" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2022 11:42:54 -0700 X-IronPort-AV: E=Sophos;i="5.90,202,1643702400"; d="scan'208";a="583392672" Received: from nsajadpo-mobl.amr.corp.intel.com (HELO cgbowman-desk1.amr.corp.intel.com) ([10.251.14.169]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2022 11:42:54 -0700 From: Casey Bowman To: intel-gfx@lists.freedesktop.org Date: Tue, 22 Mar 2022 11:42:37 -0700 Message-Id: <20220322184237.397484-2-casey.g.bowman@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220322184237.397484-1-casey.g.bowman@intel.com> References: <20220322184237.397484-1-casey.g.bowman@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v4 1/1] i915/drm: Split run_as_guest into x86 and non-x86 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lucas.demarchi@intel.com, daniel.vetter@intel.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Splitting run_as_guest into a more arch-friendly function as non-x86 builds do not support this functionality. Signed-off-by: Casey Bowman --- drivers/gpu/drm/i915/i915_drv.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 3c85dc8c1f04..76f0e47e3186 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1366,7 +1366,12 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915, static inline bool run_as_guest(void) { +#if IS_ENABLED(CONFIG_X86) return !hypervisor_is_type(X86_HYPER_NATIVE); +#else + /* Not supported yet */ + return false; +#endif } #define HAS_D12_PLANE_MINIMIZATION(dev_priv) (IS_ROCKETLAKE(dev_priv) || \