From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoffer Dall Subject: Re: [PATCH] arm64: KVM: VHE: Clear HCR_TGE when invalidating guest TLBs Date: Thu, 2 Mar 2017 13:59:17 +0100 Message-ID: <20170302125917.GK1409@cbox> References: <20170227152437.26261-1-marc.zyngier@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 9EECA40A54 for ; Thu, 2 Mar 2017 07:58:25 -0500 (EST) 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 WpF8nbDzm2PP for ; Thu, 2 Mar 2017 07:58:24 -0500 (EST) Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 057AB40966 for ; Thu, 2 Mar 2017 07:58:23 -0500 (EST) Received: by mail-wm0-f41.google.com with SMTP id n11so24128815wma.0 for ; Thu, 02 Mar 2017 04:59:36 -0800 (PST) Content-Disposition: inline In-Reply-To: <20170227152437.26261-1-marc.zyngier@arm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org, Tomasz Nowicki , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org List-Id: kvmarm@lists.cs.columbia.edu On Mon, Feb 27, 2017 at 03:24:37PM +0000, Marc Zyngier wrote: > When invalidating guest TLBs, special care must be taken to > actually shoot the guest TLBs and not the host ones if we're > running on a VHE system. This is controlled by the HCR_EL2.TGE > bit, which we forget to clear before invalidating TLBs. > > Address the issue by introducing two wrappers (__tlb_switch_to_guest > and __tlb_switch_to_host) that take care of both the VTTBR_EL2 > and HCR_EL2.TGE switching. > > Reported-by: Tomasz Nowicki > Tested-by: Tomasz Nowicki > Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall From mboxrd@z Thu Jan 1 00:00:00 1970 From: cdall@linaro.org (Christoffer Dall) Date: Thu, 2 Mar 2017 13:59:17 +0100 Subject: [PATCH] arm64: KVM: VHE: Clear HCR_TGE when invalidating guest TLBs In-Reply-To: <20170227152437.26261-1-marc.zyngier@arm.com> References: <20170227152437.26261-1-marc.zyngier@arm.com> Message-ID: <20170302125917.GK1409@cbox> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Mon, Feb 27, 2017 at 03:24:37PM +0000, Marc Zyngier wrote: > When invalidating guest TLBs, special care must be taken to > actually shoot the guest TLBs and not the host ones if we're > running on a VHE system. This is controlled by the HCR_EL2.TGE > bit, which we forget to clear before invalidating TLBs. > > Address the issue by introducing two wrappers (__tlb_switch_to_guest > and __tlb_switch_to_host) that take care of both the VTTBR_EL2 > and HCR_EL2.TGE switching. > > Reported-by: Tomasz Nowicki > Tested-by: Tomasz Nowicki > Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall