Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2424107rdb; Mon, 5 Feb 2024 06:18:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IFZj4EuGfpFEXErGDCj8zLSHOX+IFhtO4wYfsAFZWP+xX0rr1V/l91Ta0/ONE32cA3OJY7k X-Received: by 2002:a05:6870:a44a:b0:218:7597:2018 with SMTP id n10-20020a056870a44a00b0021875972018mr7576175oal.16.1707142696002; Mon, 05 Feb 2024 06:18:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707142695; cv=pass; d=google.com; s=arc-20160816; b=yOzFTOhNk0XUpIXY2wauMW93B33+IA5gdhGo9PqeiMsn3lyeyJU0QqDUoGjyozYMQJ oklMVu3uYNMmf2fA3NdjrQOv3KaDA4YnHIPjLRvSaZiAM38btt6EJO58l9xeBWHmFLSs XMQ5N4U6K9vqKqeAqMbcLipMYnOyDYguNNGCe5+/yc8TFBOxQfeQqEdti2UGjSFbS3mE +XSE9SB8CrqDglNxHd1Erc4Na1J2AN7UG2xOYEp7hFk4uBFm7gAJctK0TdFCI4mjPrYy MR+yxG3KpyHM5l12yBrbDopD3ohTOoGFqoU9JjF2nVpoB5WUxnv1Kk2tlhnYYYIwKhoJ 205w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=dIDt+Hrjpgxm8jxe5fsazlOxVWSCXnOJsGvWFNC3ywA=; fh=3wJ5kLeqaPOYFxV5pYcvq9IQdi7wF2Hm/lCB2yXOQyI=; b=iVX8Y3tbR4aryCYErwUvRX2jhN2C2Pigx6Ki72DTXhtjqbVhDbKiLnBU7XJMqjOMvq Mq1pHHV0GLyhMqC/nY1H1cYNLQKEeQa7Sm9xum0PuhXG1kjxL1M4Y9j+u/5lRn/8SoMn eQSus1tntTHlMcvM6AQkb07NA21XZoW2WYBMVbP9fvDCDIEL1txO+c6WZ0uJ++9OFmUP 4Xntp4ZAY7OoVH0oAvZ08HyCp+D1IKDQiaKLQTJYvccr+7k7kP7yRHNW9qwZ/EI45vZT zSmsGBdQZDOBIKK51RWuXZk788eyP6lvnV/4thLyiQccwJvO05qcPJhaTTeGAOuj6r75 QKqg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N8zWt1jP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-52801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52801-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; AJvYcCWqAbsS9QjEJvBPwk4gUkGQa37ckFQflhvNVWL/EFK6H058Y8XlAL+7nxrFvBNICUl729lA6moxNW7GYmOF8SbjYKkQ8H5tmm7Uhm0CtQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g9-20020ad45149000000b0068c3dc8e55asi20964qvq.0.2024.02.05.06.18.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 06:18:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=N8zWt1jP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-52801-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52801-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 3D1521C2542C for ; Mon, 5 Feb 2024 14:16:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8AAEF28DD0; Mon, 5 Feb 2024 14:16:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="N8zWt1jP" 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 A72D41429C; Mon, 5 Feb 2024 14:16:11 +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=1707142571; cv=none; b=FZhLhrxfLso6RU9NzwTHmclwmSWB/TG7NU+HBQTL86fNojxE9O+DWpGyPedkUa3zSKc18UJwdCi/amJ0Clt/DiYke+oGxjNp4tLUny9tn9V3T2YreQHkvXgfSBDYeJuZT3p5eAkgKpju3MDiRKZMP25EVp8YEux/lXFdA/8AELI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707142571; c=relaxed/simple; bh=6ablIt6+waMs7azbKT/PMUfSpGgQX2Q6sJAtWzCITww=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=nBfyYibSBeyqaUdHOd/adkaVDXRcTOmcAHi+aeQ9s2vIVJkBJ6fLUr9uITr5Adl57fjc0tOM4IwZmWh/CveL27cdZ6AmpAh5h4JMm4GyVCE/KkIDy/5FxKShLkvfWaQMNzUtYX0RqSM5G0G3YgMmbedCXKwSJD4EP+76Ds3G3D8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=N8zWt1jP; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0C23FC433F1; Mon, 5 Feb 2024 14:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707142571; bh=6ablIt6+waMs7azbKT/PMUfSpGgQX2Q6sJAtWzCITww=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=N8zWt1jPSwomWNhcShaWN1v5WUQYxbWOoRAwSTBx1bz3DO640gk2s6yJ7QftjLuSA deZRZDMFr9iCeNRBolRYYkvz6zNqldekpfDM6AxYoXY8MHNnU+T6pz7aixF/ZaQiVW 7KpWgALv+uLC6CD+5pnwZC3oT5dChRRwFYcyRWdCkiCkh+OSltuD1JCbuEv6+YAK7T VyWDuU75j/WrbYXik29aMsCKT58ZV78BL/TImh0DZJFxHHw4n4p6867IxQXGyS3/Tz Ncixy2p6d2t763Sep+iBOymoFekKbWyiRh6u7H3czun8MaLyjQX2JkTxwVr3BGQpuB oaI++xAOoYnXA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rWzlY-000RWi-Cb; Mon, 05 Feb 2024 14:16:08 +0000 Date: Mon, 05 Feb 2024 14:16:07 +0000 Message-ID: <865xz36lp4.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: James Clark , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, broonie@kernel.org, suzuki.poulose@arm.com, acme@kernel.org, James Morse , Zenghui Yu , Catalin Marinas , Will Deacon , Mike Leach , Leo Yan , Alexander Shishkin , Anshuman Khandual , Rob Herring , Miguel Luis , Jintack Lim , Ard Biesheuvel , Mark Rutland , Arnd Bergmann , Vincent Donnefort , Kristina Martsenko , Fuad Tabba , Joey Gouly , Akihiko Odaki , Jing Zhang , linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 2/7] arm64: KVM: Use shared area to pass PMU event state to hypervisor In-Reply-To: References: <20240104162714.1062610-1-james.clark@arm.com> <20240104162714.1062610-3-james.clark@arm.com> <8a908ee8-620a-d9c2-734b-5a6402950072@arm.com> <867cjj6ohz.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, james.clark@arm.com, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, broonie@kernel.org, suzuki.poulose@arm.com, acme@kernel.org, james.morse@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, mike.leach@linaro.org, leo.yan@linaro.org, alexander.shishkin@linux.intel.com, anshuman.khandual@arm.com, robh@kernel.org, miguel.luis@oracle.com, jintack.lim@linaro.org, ardb@kernel.org, mark.rutland@arm.com, arnd@arndb.de, vdonnefort@google.com, kristina.martsenko@arm.com, tabba@google.com, joey.gouly@arm.com, akihiko.odaki@daynix.com, jingzhangos@google.com, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Mon, 05 Feb 2024 13:21:26 +0000, Oliver Upton wrote: > > On Mon, Feb 05, 2024 at 01:15:36PM +0000, Marc Zyngier wrote: > > On Mon, 05 Feb 2024 13:04:51 +0000, > > Oliver Upton wrote: > > > > > > Unless someone has strong opinions about making this work in protected > > > mode, I am happy to see tracing support limited to the 'normal' nVHE > > > configuration. The protected feature as a whole is just baggage until > > > upstream support is completed. > > > > Limiting tracing to non-protected mode is a must IMO. Allowing tracing > > when pKVM is enabled is a sure way to expose secrets that should > > stay... secret. The only exception I can think of is when > > CONFIG_NVHE_EL2_DEBUG is enabled, at which point all bets are off. > > Zero argument there :) I left off the "and PMU" part of what I was > saying, because that was a feature that semi-worked in protected mode > before VM/VCPU shadowing support landed. Indeed. The goal is that as far as userspace is concerned, the host running in protected mode shouldn't impair the ability to run non-protected VMs, and it should all be hunky-dory, unless you explicitly ask for a protected guest (at which point you are facing a lot of restrictions). PMU definitely falls into that last bucket, although I would hope that we eventually get some support by context-switching the whole of the PMU state. Don't worry, it's going to be cheap... Thanks, M. -- Without deviation from the norm, progress is not possible.