From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.173 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796368547; b=H64Tj1Y3Mn9W/O8ePW69yBw8Eks64Bdgr2goiYizFJNYB7wtSfKE+hzJnIYd4/XLslpa wqAwME7YJfz/7XEDM2EpgychzLRUsDJbf/xafP/zDO1R2aMoHvMYUOy9RRB5GMPnEWvpn e4MlWg5Q9h1bRmEfWaLzHYf8BaVEpNml40BFK/3J0WzuZcLXKp2+B1s8qaK6PXpqjCNU0 gciswF4CHQRldp5WWrRuqeDZSMz+nT+V7zT/nD3FCy9/EhXKF4QlKydS7tkJo9pz5D7OJ UCQjziIcMEtCdW8OP2j/2kAx8a2BFV860G7SQnnRsrFiSsrvE1/Y/KGxy6W04dD0hXQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796368547; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=vD9J/b8fpWBtgQ3J9/xOr2318OyrLmkq918PvQF2IjU=; b=iTnCRs4lWMVbxIvnGOmFhoRWqLKu7T7B3m/LaG2D0R/cy+FoZAeVxF/5z/zrotb3lPlv xjKeqYHLiDF/dGpzJet1wL6Ou73Hs1TBXU/8lYuIIfFsWTuXwHi4j8YvFt0bfKfHZUofP rZcWVSAenxPPbUB2Ktemn60F3S1OodEvLB1nuPH8G9lnjPC7wY2aYOUNsTF1XJjYmQ3hd 8xbSkHsZF3Rxz6Kc180dtOH2uVwkfOHzAbSHeiL7/V50zZvzBSbeuyaRmtowU+0lB0Bi6 gAjA2rdNRggicvJ1Au0gJPdnEMYF5hw5quXD3MDZdLnRjb13C21Yk2gCkdOBYYc1pcw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b="zMiV/oP4"; arc=none smtp.remote-ip=74.125.82.173 Received: from mail-dy1-f173.google.com (mail-dy1-f173.google.com [74.125.82.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49DE1606A32D for ; Fri, 4 Dec 2026 07:15:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 49DE1606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=zMiV/oP4 Received: by mail-dy1-f173.google.com with SMTP id 5a478bee46e88-387486ad5abso724312eec.0 for ; Thu, 03 Dec 2026 23:15:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796368546; x=1796973346; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=vD9J/b8fpWBtgQ3J9/xOr2318OyrLmkq918PvQF2IjU=; b=zMiV/oP4/v6h7S1iaEMJrWvIIGLDHdSPnAjNJKmooA80kwE3uM9iGltgEady8XUskt MvZIVmILZ8I+o222f6a5otL11XRTvsSNcntt7+bICSQq5bUvgsGqH3I09rhqe+42bPtT S4D/l049fmKpfiERyOrs1JVXbA9jwyETUbhbXojvhkMTvbt6GNcUfS5ViIqZbHg2S57b 1lZwbY6/T6slNWA6ox1kIrJ1oANKquGCjo1d/0zaZFFjUvdOBGO7itWxiFZ9vVBlAP8b 6RuUGQlAQ0j9PZxgmdzOqTjY4GUPv8wdPWpZxc9xtKGvr4fYPjY/8jtZCVbgf5Pnw2PN x0MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796368546; x=1796973346; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=vD9J/b8fpWBtgQ3J9/xOr2318OyrLmkq918PvQF2IjU=; b=E2AgGNpagL1ofnevtCJBTAkgiK//TPqc6/r5e4giVXCa9rEjMTSlT6kLTg9jK9rsFa ciT2dgA68RzIVesZdW7uRahkxCLW4/Zp6G+1UD+zy/aswZX9JTkQEQL8/H6qvwqwor33 ELo82QpSnAXMs1vQlgunU7t1xiU3n89p7GOcK/mbJd087R1qPse0Wb1wngnUo7NXOtJu 3b97GKyoy/qKjb+TILvC3F0Gm85i94Cknh/Tg1vC7A0lxXDmi6FltQQn5OvPq4tSoSQZ XBnEmdVRlDgqzUpaX35BUMgBTmJphwUV5q1y0kyCg6bWyv+8sknHrU0QXSdW+mJ0sFzY mvSA== X-Forwarded-Encrypted: i=1; AL+hErHvHXCBcDRDTRADmjbpNOglXkVz4i6/DB3e/vcahogP13KcALzzrSuQClPDBx99Hk4eswoqMrlL1XKqc9I=@vger.kernel.org X-Gm-Message-State: APuU4Z/dHyCN9frOwKvjtDU8MbPk06WS3RB0YgjxMKfHsOu+gWmpq0v8 jNtrFli5OHbs1ibqLgAnXRX0NUYTE3gqt1v9qcr0xoY84yVZocBWicjZ X-Gm-Gg: AZFdTZfq+7EdT9htq5DFzohqiryjpD+5D9MXimP/CUgfn9gadCGNQ3SPwtcbabzGfpa zl2qvAWXbP8flH9KRGRIPA0XlVIMPfvyFsTBu9kLJ+7rGcgT1vEsOarOCfZV3W/MpqIESQYB/OZ AQDRqOU15C4f1Gj1T0XUrokCpkO4Z2e//S13KhpT+C+KxKAiLMUOiABYsOWvNkN5VSPgUoWOpw9 t2iFFKOkmDenv6MTfs312efv37+l0ZKv/9/YSFeueTY7AoVmcWSr83XYh9iKlTvA+MgnI2o0Gtq 6grXaOmmjEm7dOUgkB/EeY2sunh6M5vk6kD7nmiEs2p60Kc+AnGJEe3APt9enyYKyy7ziY2g+iD gUV35lscx9iciUe06Ssoab/4qEtcb/A762pQD/ZxXF9WC86VHHlLXKa++NyNmObzeHcY1qYVXgA xj5iC3XX01GwfMeJujUDV/Zl8ZeE6cjzfrRzLWliU2a4VU7Sf31ao15hzzIOg/ZAfG4YwvMJl+M 0FruJ8l26CDc0qVrMlTCIIb57JRQUIQDJiWG9xx+/Bu2M7DKgomXzZ0fQzraGBEAYr7Q2JSNpjZ sVHxiwt3sa6GxySsGVPkkiFcdTCkHYQvoQ== X-Received: by 2002:a05:7301:fe94:b0:36f:551:2bd5 with SMTP id 5a478bee46e88-387521ec3b9mr1290780eec.32.1796368546044; Thu, 03 Dec 2026 23:15:46 -0800 (PST) Received: from fedora ([2409:40e3:543c:415:b336:a754:40be:beaa]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-387521c17a3sm6048703eec.11.2026.12.03.23.15.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Dec 2026 23:15:45 -0800 (PST) From: Farrukh Seyer Hasan To: Mario Limonciello Cc: Huang Rui , "Rafael J . Wysocki" , Viresh Kumar , Perry Yuan , K Prateek Nayak , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Farrukh Seyer Hasan Subject: Re: [PATCH] cpufreq/amd-pstate: Do not cache bios_min_perf from populated CPPC_REQ Date: Fri, 4 Dec 2026 12:45:30 +0530 Message-ID: <20261204071530.21240-1-farrukh13hasan31@gmail.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <1fbd5718-11db-42f0-89e2-6255afc3c5f4@amd.com> References: <20261203130758.38506-1-farrukh13hasan31@gmail.com> <1fbd5718-11db-42f0-89e2-6255afc3c5f4@amd.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit (Resending in plain text so this reaches the mailing lists.) On 12/3/26 20:38, Mario Limonciello wrote: > Can you tell me more about the actual issue that reproduced this? Did > you really see a problem with warm reboots? Or are you having a system > crash? Can you give me some reproduce steps? > > My knee jerk reaction was this doesn't make sense for kexec and the > shutdown sequence both are expecting this flow. Sashiko seems to agree. > > https://sashiko.dev/#/patchset/20261203130758.38506-1-farrukh13hasan31%40gmail.com Hi Mario, Sorry, you and Sashiko are right about v1. It breaks kexec because device_shutdown() -> cpufreq_suspend() -> amd_pstate_suspend() keeps MAX_PERF and DES_PERF non-zero, and commit 0e850278016e dropped the check for that reason. Please drop v1. I had not tested a cold boot before. When I checked a clean cold boot (poweroff -> power on) on stock 7.3.6-200.fc44.x86_64 with dyndbg="file drivers/cpufreq/amd-pstate.c +p", the issue reproduced directly on cold boot: Hardware: ASUS TUF Gaming A17 FA706IC (BIOS FA706IC.302, Ryzen 7 4800H) There is no "Requested CPU Min frequency" option in BIOS. MSR_AMD_CPPC_CAP1 (0xC00102B0): 0xffac4218 lowest=24 (404791 KHz), lownonlin=66 (1113175 KHz), nominal=172 (2901000 KHz), highest=255 (4300902 KHz) On cold boot, dmesg logs on all 16 CPUs show: amd_pstate: Found Requested CPU Min Frequency of 4300902KHz on CPU0 Under balanced (powersave governor, balance_performance EPP): scaling_min_freq: 4300902 scaling_max_freq: 4300902 MSR_AMD_CPPC_REQ (0xC00102B3): 0x8000ffff (max=255 min=255 des=0 epp=0x80) Under powersave (power EPP, max capped at nominal): scaling_min_freq: 2901000 scaling_max_freq: 2901000 MSR_AMD_CPPC_REQ (0xC00102B3): 0xff00acac (max=172 min=172 des=0 epp=0xff) Earlier I observed the 2901000 KHz clamped state while powersave was active, which made me suspect a leftover value across reboot/crash. On cold boot this firmware leaves MSR_AMD_CPPC_REQ at 0xffff (min=max=255), so after 0e850278016e, msr_init_perf() latches bios_min_perf = highest_perf. For v2, which direction would you prefer so that I can prepare and test the patch before sending it? 1. Reject min_perf >= perf.highest_perf in msr_init_perf() (seems least invasive to me as it avoids touching suspend/kexec for lower bios_min_perf values). 2. Restore the check on other CPPC_REQ fields in msr_init_perf() and clear MAX_PERF/DES_PERF in amd_pstate_suspend()/offline. 3. Add a DMI quirk for FA706IC.