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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15D34C433F5 for ; Mon, 18 Oct 2021 19:31:44 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 88B7B61350 for ; Mon, 18 Oct 2021 19:31:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 88B7B61350 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 1B0434B1E3; Mon, 18 Oct 2021 15:31:43 -0400 (EDT) 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 U+vDcTbxkhXz; Mon, 18 Oct 2021 15:31:42 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 260494B17C; Mon, 18 Oct 2021 15:31:42 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 2F3254B16E for ; Mon, 18 Oct 2021 15:31:41 -0400 (EDT) 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 VhouVCQHjspB for ; Mon, 18 Oct 2021 15:31:40 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 0CF884B163 for ; Mon, 18 Oct 2021 15:31:40 -0400 (EDT) Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0D70A60E90; Mon, 18 Oct 2021 19:31:39 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) 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 1mcYMC-0003Zq-E5; Mon, 18 Oct 2021 20:31:37 +0100 Date: Mon, 18 Oct 2021 20:31:37 +0100 Message-ID: <874k9euo2u.wl-maz@kernel.org> From: Marc Zyngier To: Chenxu Wang Subject: Re: Problems about Stage-2 translation In-Reply-To: References: <877decvf9x.wl-maz@kernel.org> <87zgr6odec.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/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: irakatz51@gmail.com, kvmarm@lists.cs.columbia.edu X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: kvmarm@lists.cs.columbia.edu 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu Wang, On Mon, 18 Oct 2021 20:01:23 +0100, Chenxu Wang wrote: > > Hi Marc, > > Sorry, but I could not find the bottom posting mode in Gmail. Easy. You click on the '...' button at the bottom left of the reply window, scroll down and place your cursor at the right location. > Also, thanks for your reply, I continue to discover how the Stage-2 > translation works in KVM. > But, when I read the HCR_EL2 register in Host (it is v5.3.0) , its > value is 0x4_8800_0000. So > (1) I am in VHE mode. > (2) The Stage-2 translation is disabled. > > I am sure that I have run a Non-Secure VM with QEMU, so is it correct > that the S-2 translation is disabled in VHE mode? If so, how it > handles the memory management for Guest? By switching stage-2 on when required. HCR_EL2 isn't a static setting, and gets updated at run-time. Also, HCR_EL2.VM means exactly nothing when HCR_EL2.{E2H,TGE}={1,1}. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm