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 5760DC369A2 for ; Fri, 11 Apr 2025 09:27:32 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.946909.1344638 (Exim 4.92) (envelope-from ) id 1u3AfL-0007Ee-Fr; Fri, 11 Apr 2025 09:27:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 946909.1344638; Fri, 11 Apr 2025 09:27:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u3AfL-0007EX-DO; Fri, 11 Apr 2025 09:27:15 +0000 Received: by outflank-mailman (input) for mailman id 946909; Fri, 11 Apr 2025 09:27:14 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1u3AfK-0007ER-Ry for xen-devel@lists.xenproject.org; Fri, 11 Apr 2025 09:27:14 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [2604:1380:4641:c500::1]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 263ea4fb-16b7-11f0-9ead-5ba50f476ded; Fri, 11 Apr 2025 11:27:13 +0200 (CEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 731395C6709; Fri, 11 Apr 2025 09:24:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6769EC4CEE2; Fri, 11 Apr 2025 09:27:08 +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: 263ea4fb-16b7-11f0-9ead-5ba50f476ded DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744363631; bh=wlS7DhN8y20vqXzQwNKbHgzXCRcEYtr0nbb6yGv9GHo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UgrgmilFZ0kvC1CHpR++RB+QquxA4fnfn1/IAgk6OvywpTWhNHi7HpJZohxvmUT8u C0oC+pqEz5aR3HPSZlu8JSH1KtNL5uwZHzVB/SKM8M69LXBPn+B54ySqXALWGqDElO v1XWRUqmp1+5Nm5OwEajeiVhVtZ4iR1roK6UU8ZPzeAQEzgUWX6kuxm4fVoS3JmlA7 exmpFUCrm8aTO0v4o9mMLquv5UEkjnPrxb+ny+Jul5UFbuuZ4bmHXcg/G/Yf8F0qle o0fxRZh9RYD8eOye9IK9CeiAdHFQnM5Sr6gABJ8OgK7XyEmInBJFc8p6nnhvs46vjQ PT0uP2zPdIa+g== Date: Fri, 11 Apr 2025 11:27:06 +0200 From: Ingo Molnar To: Juergen Gross 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=us-ascii Content-Disposition: inline In-Reply-To: <3c3115a6-f516-4f5f-8998-dafc343c829e@suse.com> * 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. If you'll merge it: Acked-by: Ingo Molnar Thanks, Ingo