From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Thu, 2 Feb 2017 18:18:00 +0000 Subject: [PATCH 03/10] arm64: KVM: Save/restore the host SPE state when entering/leaving a VM In-Reply-To: <3064a7a5-6661-fc22-c5e4-2478e8457035@arm.com> References: <1485540470-11469-1-git-send-email-will.deacon@arm.com> <1485540470-11469-4-git-send-email-will.deacon@arm.com> <3064a7a5-6661-fc22-c5e4-2478e8457035@arm.com> Message-ID: <20170202181800.GM13839@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Feb 01, 2017 at 04:29:50PM +0000, Marc Zyngier wrote: > On 27/01/17 18:07, Will Deacon wrote: > > The SPE buffer is virtually addressed, using the page tables of the CPU > > MMU. Unusually, this means that the EL0/1 page table may be live whilst > > we're executing at EL2 on non-VHE configurations. When VHE is in use, > > we can use the same property to profile the guest behind its back. > > > > This patch adds the relevant disabling and flushing code to KVM so that > > the host can make use of SPE without corrupting guest memory, and any > > attempts by a guest to use SPE will result in a trap. > > > > Cc: Marc Zyngier > > Cc: Alex Benn?e > > Cc: Christoffer Dall > > Signed-off-by: Will Deacon > > --- > > arch/arm64/include/asm/kvm_arm.h | 3 ++ > > arch/arm64/include/asm/kvm_host.h | 7 ++++- > > arch/arm64/kvm/debug.c | 6 ++++ > > arch/arm64/kvm/hyp/debug-sr.c | 66 +++++++++++++++++++++++++++++++++++++-- > > arch/arm64/kvm/hyp/switch.c | 17 +++++++++- > > 5 files changed, 95 insertions(+), 4 deletions(-) [...] > Acked-by: Marc Zyngier Thanks! Given that this patch depends on an earlier one in the series (already queued via arm64) and the rest of the series depends on this patch, do you mind if I take this via arm64 for 4.11? It applies cleanly against current -next. Will From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751506AbdBBSSC (ORCPT ); Thu, 2 Feb 2017 13:18:02 -0500 Received: from foss.arm.com ([217.140.101.70]:36466 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750916AbdBBSSB (ORCPT ); Thu, 2 Feb 2017 13:18:01 -0500 Date: Thu, 2 Feb 2017 18:18:00 +0000 From: Will Deacon To: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org, mark.rutland@arm.com, kim.phillips@arm.com, alex.bennee@linaro.org, christoffer.dall@linaro.org, tglx@linutronix.de, peterz@infradead.org, alexander.shishkin@linux.intel.com, robh@kernel.org, suzuki.poulose@arm.com, pawel.moll@arm.com, mathieu.poirier@linaro.org, mingo@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 03/10] arm64: KVM: Save/restore the host SPE state when entering/leaving a VM Message-ID: <20170202181800.GM13839@arm.com> References: <1485540470-11469-1-git-send-email-will.deacon@arm.com> <1485540470-11469-4-git-send-email-will.deacon@arm.com> <3064a7a5-6661-fc22-c5e4-2478e8457035@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3064a7a5-6661-fc22-c5e4-2478e8457035@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 01, 2017 at 04:29:50PM +0000, Marc Zyngier wrote: > On 27/01/17 18:07, Will Deacon wrote: > > The SPE buffer is virtually addressed, using the page tables of the CPU > > MMU. Unusually, this means that the EL0/1 page table may be live whilst > > we're executing at EL2 on non-VHE configurations. When VHE is in use, > > we can use the same property to profile the guest behind its back. > > > > This patch adds the relevant disabling and flushing code to KVM so that > > the host can make use of SPE without corrupting guest memory, and any > > attempts by a guest to use SPE will result in a trap. > > > > Cc: Marc Zyngier > > Cc: Alex Bennée > > Cc: Christoffer Dall > > Signed-off-by: Will Deacon > > --- > > arch/arm64/include/asm/kvm_arm.h | 3 ++ > > arch/arm64/include/asm/kvm_host.h | 7 ++++- > > arch/arm64/kvm/debug.c | 6 ++++ > > arch/arm64/kvm/hyp/debug-sr.c | 66 +++++++++++++++++++++++++++++++++++++-- > > arch/arm64/kvm/hyp/switch.c | 17 +++++++++- > > 5 files changed, 95 insertions(+), 4 deletions(-) [...] > Acked-by: Marc Zyngier Thanks! Given that this patch depends on an earlier one in the series (already queued via arm64) and the rest of the series depends on this patch, do you mind if I take this via arm64 for 4.11? It applies cleanly against current -next. Will