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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A2140C36010 for ; Fri, 11 Apr 2025 09:44:34 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.946936.1344659 (Exim 4.92) (envelope-from ) id 1u3Avs-0006WA-WD; Fri, 11 Apr 2025 09:44:21 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 946936.1344659; Fri, 11 Apr 2025 09:44:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u3Avs-0006W3-Sf; Fri, 11 Apr 2025 09:44:20 +0000 Received: by outflank-mailman (input) for mailman id 946936; Fri, 11 Apr 2025 09:44:19 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u3Avr-0006Vx-Mg for xen-devel@lists.xenproject.org; Fri, 11 Apr 2025 09:44:19 +0000 Received: from sea.source.kernel.org (sea.source.kernel.org [2600:3c0a:e001:78e:0:1991:8:25]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 8741e79d-16b9-11f0-9ffb-bf95429c2676; Fri, 11 Apr 2025 11:44:15 +0200 (CEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 475FF49C50; Fri, 11 Apr 2025 09:44:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48808C4CEE2; Fri, 11 Apr 2025 09:44:10 +0000 (UTC) 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" X-Inumbo-ID: 8741e79d-16b9-11f0-9ffb-bf95429c2676 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744364653; bh=cQlJQWMR1vpM4VqDeSr2vhN4E6SlND+oqKZ9malEpBo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vGgINeP/Iroy+Euc1kql8/6jR3BdcNgJ1T5VquxKF918ZjjBEw0Im09GA2r6OkzAM NkHvG0FrMFcrHIS3+ImuLCigg7VkY6V1E0N8PVvk4iJin55XreYuwnh2QdrePL/v3P Q8VMP9K+bPV7dWE6isttzEUR1gxmDYJqiPpsnvykf4mv0MtrKg2EB5Z4pugaJGYkaC kHHfU2qEzwMBRqS+4HQtc9xxXqGs1ZnHUrbuUjIDnlvJF+D/CbU0vQa3iAW7QjgI+A hpBKUKpFeXYM99vtcrVanAlI6D+bXl5D/7j1JwaeMVrI/IOh/9SaPly7pXe3iSJfKH QbVsY+mUrQUhA== Date: Fri, 11 Apr 2025 11:44:07 +0200 From: Ingo Molnar To: =?iso-8859-1?Q?J=FCrgen_Gro=DF?= Cc: Jason Andryuk , Boris Ostrovsky , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , "Xin Li (Intel)" , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/xen: Fix __xen_hypercall_setfunc Message-ID: References: <20250410193106.16353-1-jason.andryuk@amd.com> <3c3115a6-f516-4f5f-8998-dafc343c829e@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: * Jürgen Groß wrote: > On 11.04.25 11:27, Ingo Molnar wrote: > > > > * Juergen Gross wrote: > > > > > On 10.04.25 21:31, Jason Andryuk wrote: > > > > Hypercall detection is failing with xen_hypercall_intel() chosen even on > > > > an AMD processor. Looking at the disassembly, the call to > > > > xen_get_vendor() was removed. > > > > > > > > The check for boot_cpu_has(X86_FEATURE_CPUID) was used as a proxy for > > > > the x86_vendor having been set. When > > > > CONFIG_X86_REQUIRED_FEATURE_CPUID=y (the default value), DCE eliminates > > > > the call to xen_get_vendor(). An uninitialized value 0 means > > > > X86_VENDOR_INTEL, so the Intel function is always returned. > > > > > > > > Remove the if and always call xen_get_vendor() to avoid this issue. > > > > > > > > Fixes: 3d37d9396eb3 ("x86/cpufeatures: Add {REQUIRED,DISABLED} feature configs") > > > > Suggested-by: Juergen Gross > > > > Signed-off-by: Jason Andryuk > > > > > > Reviewed-by: Juergen Gross > > > > Wanna merge this via the Xen tree, or should it go to x86/urgent? > > > > The bug was *caused* by the x86 tree so we'd be glad to merge, > > but your call. > > x86/urgent is fine for me. Applied, thanks! Ingo