From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A52A71F60A for ; Sat, 18 Jan 2025 03:14:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737170074; cv=none; b=aRAqccIC7LwrxIQtqGxvSwCZ5faygLlCAkgfm98c3oCXgDi1yPDXI6HypsXtiXthya6TxMzVpZqTllTZlKyl9gJxiCTubFTxtF2taYu0ak6+jNoWRftYLaGTccLTNT3Rm1993DTLBqKZXathRwrpwXQqzrKcUmSiOKm9DRCtk7c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737170074; c=relaxed/simple; bh=eXfSNufZlgXWjLzWrZgwEv/WEGNpIuNTvj0oSneU0MQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ui5ygtP54Cd8raXlbdaH0o4tUmWA+TAQZXuthpXDmrgGFqrnXN2ykZJ65ONuF0T3FfVsb1Iw1SkjGmFKQPiOU8BeaJjJLgbGdnIqnZRzmeKPWW7MxuGzQE2y/5vEOnLNNSrDhCb9cZkVSk8YoMQkgtT1M5K3l5HxIlCFX82DlUI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=dH/80ZEs; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="dH/80ZEs" Received: from [IPV6:2601:646:8080:c1f1:e386:c572:17d3:6ddc] ([IPv6:2601:646:8080:c1f1:e386:c572:17d3:6ddc]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 50I3DlZD236105 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Fri, 17 Jan 2025 19:13:47 -0800 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 50I3DlZD236105 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2024121701; t=1737170030; bh=3zvfM64yHgXt7E/2B1ABXYob7OlVwmtxEy6aDMAhZqo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=dH/80ZEsHAfZB1Hi2WFV/XBe/0cSVdn6/e2/+PsHLEgIgeN+qIkDqnutzlSS8kjMM bfjT1QOqag1oD/M/2LtfgkCM2L1+DHP1LRJnx05u8KV9xon7mt/U86gAQhQR6KibLQ KTT8nlihXAk0lQA0Qfhz+JyC/a8aTFMdX0w25ufloicl5TgryJPS5F68wPNHJ4qZYO 9LEOJ0B3GsDs05ApXr035C8Is8grd+K7nLubC1Dbg3HWHjbQzZc5LOI11wgZir4DxN yl2FkCl5CMWqAjrUkqmWm1o91MBIaO+LHiuitzhnLJBEMviQNuA8OYWu7+YGwFbWFJ EWJM4LR1qwrHg== Message-ID: <1c2e3700-5663-4e6e-9da9-500b64e778a2@zytor.com> Date: Fri, 17 Jan 2025 19:13:42 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] x86/fpu: Fix the os panic issue caused by the XGETBV instruction To: Sean Christopherson , "Chang S. Bae" Cc: Tony W Wang-oc , tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, aruna.ramakrishna@oracle.com, pbonzini@redhat.com, levymitchell0@gmail.com, attofari@amazon.de, linux-kernel@vger.kernel.org, CobeChen@zhaoxin.com, TimGuo@zhaoxin.com, LeoLiu-oc@zhaoxin.com, Lyle Li References: <20250102075419.2559-1-TonyWWang-oc@zhaoxin.com> Content-Language: en-US From: "H. Peter Anvin" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/17/25 14:10, Sean Christopherson wrote: >> >> Note that XFD is already listed as dependent on XGETBV1. >> >> But I doubt the kernel needs to be resilient to deliberately misconfigured >> or crazy virtual machine setups. > > I don't see anything in the SDM that suggests this is a misconfigured CPU. Intel > might not have plans to ship such CPUs, but AFAICT it's not a violation of the > architecture as defined in the SDM. > > The SDM even explicitly says that protection keys can exist and be used without > PKU state being supported in XSAVE at all, at which point assuming the existence > of XGETBV1 is rather nonsensical. > Whether or not a combination is *possible* at all is totally separate from whether or not it is worth for Linux to support it. The CPUID dependency list exists for exactly that reason -- it defines *Linux policy* with regards to feature dependencies. -hpa