From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91AB6C433FE for ; Tue, 1 Feb 2022 18:17:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236682AbiBASRU (ORCPT ); Tue, 1 Feb 2022 13:17:20 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:56572 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241850AbiBASRT (ORCPT ); Tue, 1 Feb 2022 13:17:19 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E48A161418 for ; Tue, 1 Feb 2022 18:17:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52FF6C340EC; Tue, 1 Feb 2022 18:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643739438; bh=Yo9eGjjqXm3djBj1msZWDv/57nkLaX6CCklZJLeSN0Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=D6JWr8iJGxf7rSZvpvFOkbdW/av+WQy1Q13DkYa+0HHk3mFGnUQuWmjumPVyyE6Kw C+IuECUjY9a1VVfJwGCe4+Dm/etkwsQZyDWfZA0KH54hxvgAeAWaFvaofxhSiddn46 BLqf5vY+r5IrmqIKZjYbFxPRHZ5n2d9DCaZcw5yRGyAa/Gf65uj4EfnXmAKEepRT2S 1pnCQtxkE2IXUBJy7fmDZqWezMxfKeynHQpMrEk9KblmlLBwaZPkgkrkfcqF5mdfyu yIVeXnO2Bzb6C+v8spsiIfAp7BvbB6T1uiNh6E95yigmMZV8VhYV2Pa15nHUuBqhYt G7652lbWzNe2A== Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nExiN-004iJL-3f; Tue, 01 Feb 2022 18:17:16 +0000 MIME-Version: 1.0 Date: Tue, 01 Feb 2022 18:17:14 +0000 From: Marc Zyngier To: "Russell King (Oracle)" Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Andre Przywara , Christoffer Dall , Jintack Lim , Haibo Xu , Ganapatrao Kulkarni , Chase Conklin , James Morse , Suzuki K Poulose , Alexandru Elisei , karl.heubaum@oracle.com, mihai.carabas@oracle.com, miguel.luis@oracle.com, kernel-team@android.com Subject: Re: [PATCH v6 15/64] KVM: arm64: nv: Handle HCR_EL2.E2H specially In-Reply-To: References: <20220128121912.509006-1-maz@kernel.org> <20220128121912.509006-16-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <67494ba2e12cbb9a4eba469dd45c2752@kernel.org> X-Sender: maz@kernel.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, andre.przywara@arm.com, christoffer.dall@arm.com, jintack@cs.columbia.edu, haibo.xu@linaro.org, gankulkarni@os.amperecomputing.com, chase.conklin@arm.com, james.morse@arm.com, suzuki.poulose@arm.com, alexandru.elisei@arm.com, karl.heubaum@oracle.com, mihai.carabas@oracle.com, miguel.luis@oracle.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On 2022-02-01 16:51, Russell King (Oracle) wrote: > On Fri, Jan 28, 2022 at 12:18:23PM +0000, Marc Zyngier wrote: >> HCR_EL2.E2H is nasty, as a flip of this bit completely changes the way >> we deal with a lot of the state. So when the guest flips this bit >> (sysregs are live), do the put/load dance so that we have a consistent >> state. >> >> Yes, this is slow. Don't do it. > > I'd hope this is very unlikely! A guest OS would probably do it once per CPU bring-up. So I'm not too bothered about the speed. But that's only one of the many cases where we need to do this put/load game. At this stage, we don't care too much. But the last two patches give you a glimpse of what sort of fine-grained optimisation we will eventually want to do for this not to suck too much. But again, this is NV, and it gives a whole new sense to "being slow". > >> >> Suggested-by: Alexandru Elisei >> Signed-off-by: Marc Zyngier > > Reviewed-by: Russell King (Oracle) Thanks, M. -- Jazz is not dead. It just smells funny... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E6A3C4321E for ; Tue, 1 Feb 2022 18:17:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id ABB4E40C31; Tue, 1 Feb 2022 13:17:22 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zGZXPXXVygz7; Tue, 1 Feb 2022 13:17:21 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 78CAD49E10; Tue, 1 Feb 2022 13:17:21 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id BDEED48F9C for ; Tue, 1 Feb 2022 13:17:20 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WoPhrmdkbNlF for ; Tue, 1 Feb 2022 13:17:19 -0500 (EST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 9FB5140C31 for ; Tue, 1 Feb 2022 13:17:19 -0500 (EST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8348861422; Tue, 1 Feb 2022 18:17:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52FF6C340EC; Tue, 1 Feb 2022 18:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643739438; bh=Yo9eGjjqXm3djBj1msZWDv/57nkLaX6CCklZJLeSN0Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=D6JWr8iJGxf7rSZvpvFOkbdW/av+WQy1Q13DkYa+0HHk3mFGnUQuWmjumPVyyE6Kw C+IuECUjY9a1VVfJwGCe4+Dm/etkwsQZyDWfZA0KH54hxvgAeAWaFvaofxhSiddn46 BLqf5vY+r5IrmqIKZjYbFxPRHZ5n2d9DCaZcw5yRGyAa/Gf65uj4EfnXmAKEepRT2S 1pnCQtxkE2IXUBJy7fmDZqWezMxfKeynHQpMrEk9KblmlLBwaZPkgkrkfcqF5mdfyu yIVeXnO2Bzb6C+v8spsiIfAp7BvbB6T1uiNh6E95yigmMZV8VhYV2Pa15nHUuBqhYt G7652lbWzNe2A== Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nExiN-004iJL-3f; Tue, 01 Feb 2022 18:17:16 +0000 MIME-Version: 1.0 Date: Tue, 01 Feb 2022 18:17:14 +0000 From: Marc Zyngier To: "Russell King (Oracle)" Subject: Re: [PATCH v6 15/64] KVM: arm64: nv: Handle HCR_EL2.E2H specially In-Reply-To: References: <20220128121912.509006-1-maz@kernel.org> <20220128121912.509006-16-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <67494ba2e12cbb9a4eba469dd45c2752@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, andre.przywara@arm.com, christoffer.dall@arm.com, jintack@cs.columbia.edu, haibo.xu@linaro.org, gankulkarni@os.amperecomputing.com, chase.conklin@arm.com, james.morse@arm.com, suzuki.poulose@arm.com, alexandru.elisei@arm.com, karl.heubaum@oracle.com, mihai.carabas@oracle.com, miguel.luis@oracle.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: kernel-team@android.com, kvm@vger.kernel.org, Andre Przywara , Christoffer Dall , Chase Conklin , kvmarm@lists.cs.columbia.edu, mihai.carabas@oracle.com, Ganapatrao Kulkarni , linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On 2022-02-01 16:51, Russell King (Oracle) wrote: > On Fri, Jan 28, 2022 at 12:18:23PM +0000, Marc Zyngier wrote: >> HCR_EL2.E2H is nasty, as a flip of this bit completely changes the way >> we deal with a lot of the state. So when the guest flips this bit >> (sysregs are live), do the put/load dance so that we have a consistent >> state. >> >> Yes, this is slow. Don't do it. > > I'd hope this is very unlikely! A guest OS would probably do it once per CPU bring-up. So I'm not too bothered about the speed. But that's only one of the many cases where we need to do this put/load game. At this stage, we don't care too much. But the last two patches give you a glimpse of what sort of fine-grained optimisation we will eventually want to do for this not to suck too much. But again, this is NV, and it gives a whole new sense to "being slow". > >> >> Suggested-by: Alexandru Elisei >> Signed-off-by: Marc Zyngier > > Reviewed-by: Russell King (Oracle) Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5DC05C433EF for ; Tue, 1 Feb 2022 18:18:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:Cc:To:From :Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zukvJ12PUztdHfB8lef2mIXLbTEQ9UNqNhklRHDSXD4=; b=iQkNh8ou3acZssS+1kndEPzpMb WOKPIVDN5t/SxGdslGFEC1WUn3won7Ibaq3ho5z+NzxmVa3eV2lFc9fFgF0KJPBgv2+bl2EmRzejs hqUJl+XdqOL0oXq1sZuz8PznpkQpVWIQMJ1iN3ubhDVJ9ED+LmnwUybQsHTJwEWEadXqKuYd7X4Xh JSuAkkDQe4z+5qvIqi0P12Nt1eYX0VfWQth027hcZP2vVhuFE/YyQwgCoUaBqRKercPwfxZn1BbMA GDNg6Jve3JMNDzQ8kDrQxhj2/RepYvLCnuJfG4C0FMLM45H6pL2AfMwt1sM0W5uviKvfFuH+0TLan 0TaoQfyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nExiV-00DJDo-AG; Tue, 01 Feb 2022 18:17:23 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nExiR-00DJC7-DZ for linux-arm-kernel@lists.infradead.org; Tue, 01 Feb 2022 18:17:20 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8348861422; Tue, 1 Feb 2022 18:17:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52FF6C340EC; Tue, 1 Feb 2022 18:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643739438; bh=Yo9eGjjqXm3djBj1msZWDv/57nkLaX6CCklZJLeSN0Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=D6JWr8iJGxf7rSZvpvFOkbdW/av+WQy1Q13DkYa+0HHk3mFGnUQuWmjumPVyyE6Kw C+IuECUjY9a1VVfJwGCe4+Dm/etkwsQZyDWfZA0KH54hxvgAeAWaFvaofxhSiddn46 BLqf5vY+r5IrmqIKZjYbFxPRHZ5n2d9DCaZcw5yRGyAa/Gf65uj4EfnXmAKEepRT2S 1pnCQtxkE2IXUBJy7fmDZqWezMxfKeynHQpMrEk9KblmlLBwaZPkgkrkfcqF5mdfyu yIVeXnO2Bzb6C+v8spsiIfAp7BvbB6T1uiNh6E95yigmMZV8VhYV2Pa15nHUuBqhYt G7652lbWzNe2A== Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nExiN-004iJL-3f; Tue, 01 Feb 2022 18:17:16 +0000 MIME-Version: 1.0 Date: Tue, 01 Feb 2022 18:17:14 +0000 From: Marc Zyngier To: "Russell King (Oracle)" Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Andre Przywara , Christoffer Dall , Jintack Lim , Haibo Xu , Ganapatrao Kulkarni , Chase Conklin , James Morse , Suzuki K Poulose , Alexandru Elisei , karl.heubaum@oracle.com, mihai.carabas@oracle.com, miguel.luis@oracle.com, kernel-team@android.com Subject: Re: [PATCH v6 15/64] KVM: arm64: nv: Handle HCR_EL2.E2H specially In-Reply-To: References: <20220128121912.509006-1-maz@kernel.org> <20220128121912.509006-16-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <67494ba2e12cbb9a4eba469dd45c2752@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, andre.przywara@arm.com, christoffer.dall@arm.com, jintack@cs.columbia.edu, haibo.xu@linaro.org, gankulkarni@os.amperecomputing.com, chase.conklin@arm.com, james.morse@arm.com, suzuki.poulose@arm.com, alexandru.elisei@arm.com, karl.heubaum@oracle.com, mihai.carabas@oracle.com, miguel.luis@oracle.com, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220201_101719_571828_7A8B7C6F X-CRM114-Status: GOOD ( 16.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022-02-01 16:51, Russell King (Oracle) wrote: > On Fri, Jan 28, 2022 at 12:18:23PM +0000, Marc Zyngier wrote: >> HCR_EL2.E2H is nasty, as a flip of this bit completely changes the way >> we deal with a lot of the state. So when the guest flips this bit >> (sysregs are live), do the put/load dance so that we have a consistent >> state. >> >> Yes, this is slow. Don't do it. > > I'd hope this is very unlikely! A guest OS would probably do it once per CPU bring-up. So I'm not too bothered about the speed. But that's only one of the many cases where we need to do this put/load game. At this stage, we don't care too much. But the last two patches give you a glimpse of what sort of fine-grained optimisation we will eventually want to do for this not to suck too much. But again, this is NV, and it gives a whole new sense to "being slow". > >> >> Suggested-by: Alexandru Elisei >> Signed-off-by: Marc Zyngier > > Reviewed-by: Russell King (Oracle) Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel