Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1398664rdb; Sat, 3 Feb 2024 05:01:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHM2HaUM4NzPbkQfSwwn/GhHqe/RJnxaHfoGY13rXJHGbQ5RkAZS8E5N0WZKOdv9ois8up7 X-Received: by 2002:a05:6214:1d28:b0:68c:8218:30a2 with SMTP id f8-20020a0562141d2800b0068c821830a2mr2240503qvd.0.1706965316961; Sat, 03 Feb 2024 05:01:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706965316; cv=pass; d=google.com; s=arc-20160816; b=0LrMWUXagNs8+/pVBtZw7zcIdZ4C5lfavTZiS89EZwHaTfz0dsYG9y5HBHoRKUmfxZ eFp1ESyVQMqINniDAcdNlN9TKfNU04xuuJXFDZ+CVRBO5obSg4u/VS2aLMieBmcTEZt7 yaSBCl/pyDftfUaKYRetT6eltMrx598ecDuwY2IlzU1xQE3wJ6V2/hF0T+MUQUtLTtrL kdd+pKAWdKxgo/UyiEmWiBUIg8pHVZjwcSSDWOf3Xh87Fjm4eHawMKJKxrboDTE8HuzJ IbhBOrh/JSYypFQLZ2Ha/1XJsFuUQazvWEJVW74ubNsOt3hRn2HShcyNuC/3EjZhBMPd zXMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=zLGxnjYpCjLTzfI0sdSBgA/NQfaVd05u4HzcPzyidiM=; fh=6UyeitiBoZcRJ9YXMMzKWt5s2n7oEXEDUCAznyI9a6o=; b=0pc1JyodvYYlB9MJcvyJzEa6TnwfaT1RbIjxyIQSET4+JXp9MK4mjZMc0UO565Eby2 LgwHSm+DdJqxjv9IhSkZ2pzgkSs4zOacQPb4lvuP/dr0aRA06QP9iDR5r+vshn0wZInw N13WT7MoOXlzBusV8Hf+mOxXirBPaysrpbbvNiwy2bOH8p5cBcfaEdiZ0eTSYbFg3kIa w22riWSLyrKGmFrnwsODAeAoGvJUhpyhm7rTiIVPMRb4lzssGkMLLFHc92h8OBdUhG57 1EbPLDjGoXpPBJ631IzpNkAm4ghBwv2MriRyHSHgsaX0TgkJ6CFiS0D/YFB4Cmt/dk/g QIJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TZQD6GrF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51096-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51096-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCW6PHGlS4vWufwOMS/1z3/FKEIGjSrgyOvSg3WGqTXuZV3Cq5F45ul9UHVuAO7KjlJOwnz9BC3nMRI/h4mc/fe4wbe3YGpVNPhkSJvoRQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id dk7-20020a056214092700b0068c81b7bb7dsi4031519qvb.452.2024.02.03.05.01.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 05:01:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51096-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TZQD6GrF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-51096-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51096-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 807391C22EA1 for ; Sat, 3 Feb 2024 13:01:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3DFBF5DF0B; Sat, 3 Feb 2024 13:01:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TZQD6GrF" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6907D5D755 for ; Sat, 3 Feb 2024 13:01:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706965285; cv=none; b=iciDqNzk5ttRFUpX4J1NchdW9NzyCtbFXNK4Sb94l/Hho6fCplTM1bXPrkVu4n03bX8UmR2zcENSgB2EMll6KsCg7wSxuJG2pNh/huaTOkF0mCZObd/Nj3A/NvWgc1NZfbzZp06CcS5wp7BV1eY/WhTx3wWHzbLXfu71HV7dzjY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706965285; c=relaxed/simple; bh=D3W1AsSUTP+B0YKV6vbmTQlyrvjF0RqEOhYOQor2mtE=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=bTDxCiJY9k4ECDYgfSKAOWXT3sh9eWRaFcrsTkz4hIGTLT22LPD5eHfd5qiHi9RsufXrHelrnH0t69xXPfNxUwSR+sn2BLnKdw4SDmJXuB8K4EONGjQKjFSVrP0zKJQnkshyfYcAt7Iq5G+o7LSQBcR2EOv5EoA4SoOKadRUN6U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TZQD6GrF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08212C433C7; Sat, 3 Feb 2024 13:01:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706965284; bh=D3W1AsSUTP+B0YKV6vbmTQlyrvjF0RqEOhYOQor2mtE=; h=From:Subject:Date:To:Cc:From; b=TZQD6GrFV2G+xwZX71EaBYFfeSfdGB3xv5QSX1iT2w/cWJKQr9TfHhgxXJvK+k0OQ p30tiZXkajbvu0Cotx7TCw/YeahmB1x5wcQKZyx/0fMthMhpkYZAAGum+h0aHc4TQ3 efeuHLwnYYyMZ6smxwdj/TOXLEUoo6GuoTILRtIfT7zpKBTzdI8t87vBCZeUiDrPVt tt1ozXuMT3WnvJlTehESbwjApoAGAzWT3iJv48JIfnjIXpsg6UX0qs/UEEqw9gnTQw OZ1s1slCiNpSIUU/l6uq3I28eZM1RNJ7opk/QZYpo/9wCzaAAMR9vC0R9d+VAfAFS8 P+uvpyoltIIVQ== From: Mark Brown Subject: [PATCH v2 0/2] arm64/sme: Fix handling of traps on resume Date: Sat, 03 Feb 2024 13:00:39 +0000 Message-Id: <20240203-arm64-sme-resume-v2-0-a1fbaddc4425@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAPc4vmUC/2WNwQ6CMBBEf4Xs2Zrtgo148j8Mh1YWaJRCttpoC P9uJd48Td4k82aByOI5wqlYQDj56KeQgXYFXAcbela+zQyEVKGmWlkZTaXiyEo4PnOUZIw+INX kDOTZLNz516a8NJkHHx+TvLeHpL/tT1bivyxphQrZIDtn9bHtzjeWwPf9JD0067p+AMo2zi+xA AAA To: Catalin Marinas , Will Deacon Cc: Dave Martin , Jackson Cooper-Driver , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.13-dev-a684c X-Developer-Signature: v=1; a=openpgp-sha256; l=880; i=broonie@kernel.org; h=from:subject:message-id; bh=D3W1AsSUTP+B0YKV6vbmTQlyrvjF0RqEOhYOQor2mtE=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlvjkSPyDD4qD02bq9cgLjmNpEkXRhypQErmtqaC0z lcggwOGJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZb45EgAKCRAk1otyXVSH0JkLB/ 4/6+XvC4MH7DTqdY/qRrhW2VVyJp/yA8nn1co9LeZGDg9eAn+Jkg5lcOVe/gI/ERmgtEV2SicTZ5sw vy76JP3CP1E4Pt1WXLJPd18j9VIYAY4ixLV8vp1xa+nGDSXfGUoci7mBRQ37rcQ5mLYNKk7BdXGnEE NbPhUXcNaYiNRM627fqtVCAnv58EYkOX2gqSxYP2c1dVwgQ7OplSahpFU0n8xlv38cYTWsuWrCDV3m 1FN8yjGoF4j08KsMd0oSbajyGyy4OUwJIGooTZx2ClH6Tw/ffMcLhKbDkOq32pvPf3zzZ0tBwdQgWu V60Dj5j2mrpBNlu+xnUhRofEYLgDTp X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB The fast model was recently changed to reset system registers to 0 on resume, exposing the fact that for SME we do not restore the configuration of traps for extensions that add state. Fix this. Signed-off-by: Mark Brown --- Changes in v2: - Also reinitialise SMPRI_EL1. - Link to v1: https://lore.kernel.org/r/20240130-arm64-sme-resume-v1-0-0e60ebba18df@kernel.org --- Mark Brown (2): arm64/sme: Restore SMCR on exit from suspend arm64/sme: Restore SMCR_EL1.EZT0 on exit from suspend arch/arm64/include/asm/fpsimd.h | 2 ++ arch/arm64/kernel/fpsimd.c | 16 ++++++++++++++++ arch/arm64/kernel/suspend.c | 3 +++ 3 files changed, 21 insertions(+) --- base-commit: 41bccc98fb7931d63d03f326a746ac4d429c1dd3 change-id: 20240129-arm64-sme-resume-3266150292b6 Best regards, -- Mark Brown