From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3ACEF1D696 for ; Mon, 22 Jul 2024 13:40:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721655640; cv=none; b=uqDP9fh8aPXGOAdfO4EzlHgy9LNtxwv9S+0J1vbMlG43N8CYp3qN55JXPu4Gojzp4/8HNUidCuckuhgyv/jL3TTkP+5M8nrZZqCc0xbo2XaiiyGJ+4M9NgbyBPZPHnsTxZTngK4qGolHN330llxEBwTMVRDcy5UpZnUcKJWI+6o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721655640; c=relaxed/simple; bh=axriSwjh1W5G1c4850mcMvg5Q8/pBlPOM0L1puihvI0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UDnvi9jGBHI9fCyYcvty/zGI0AFXZ96+a+zDfzzI/TLVSBO8HDuCB3qPKw+w1nMUMGEq8kI4g3a/dNn0zt1rmoWDnExxNBFn3PFMPyLsD5sV0i/8uwP/P/MjDNPwkDsWU5dCgz7K0ohgnwI4eS9srX10HShvayhTAQlvdAH47+g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 40DD31007; Mon, 22 Jul 2024 06:41:04 -0700 (PDT) Received: from [10.44.160.75] (e126510-lin.lund.arm.com [10.44.160.75]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E32943F766; Mon, 22 Jul 2024 06:40:33 -0700 (PDT) Message-ID: <57220128-e8b0-4b78-b0f9-8c8dc195f1fb@arm.com> Date: Mon, 22 Jul 2024 15:40:32 +0200 Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 06/29] arm64: context switch POR_EL0 register To: Joey Gouly , linux-arm-kernel@lists.infradead.org Cc: akpm@linux-foundation.org, aneesh.kumar@kernel.org, aneesh.kumar@linux.ibm.com, bp@alien8.de, broonie@kernel.org, catalin.marinas@arm.com, christophe.leroy@csgroup.eu, dave.hansen@linux.intel.com, hpa@zytor.com, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, maz@kernel.org, mingo@redhat.com, mpe@ellerman.id.au, naveen.n.rao@linux.ibm.com, npiggin@gmail.com, oliver.upton@linux.dev, shuah@kernel.org, szabolcs.nagy@arm.com, tglx@linutronix.de, will@kernel.org, x86@kernel.org, kvmarm@lists.linux.dev References: <20240503130147.1154804-1-joey.gouly@arm.com> <20240503130147.1154804-7-joey.gouly@arm.com> Content-Language: en-GB From: Kevin Brodsky In-Reply-To: <20240503130147.1154804-7-joey.gouly@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 03/05/2024 15:01, Joey Gouly wrote: > @@ -371,6 +382,9 @@ int copy_thread(struct task_struct *p, const struct kernel_clone_args *args) > if (system_supports_tpidr2()) > p->thread.tpidr2_el0 = read_sysreg_s(SYS_TPIDR2_EL0); > > + if (system_supports_poe()) > + p->thread.por_el0 = read_sysreg_s(SYS_POR_EL0); This is most likely needed for kernel threads as well, because they may be affected by POR_EL0 too (see my reply on patch 17). Kevin > + > if (stack_start) { > if (is_compat_thread(task_thread_info(p))) > childregs->compat_sp = stack_start;