From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUor3-0006mh-La for qemu-devel@nongnu.org; Mon, 18 Jun 2018 03:45:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUor2-0006wg-WE for qemu-devel@nongnu.org; Mon, 18 Jun 2018 03:45:37 -0400 References: <20180604152941.20374-1-peter.maydell@linaro.org> <20180604152941.20374-9-peter.maydell@linaro.org> <64ff124d-fe34-75eb-e9e6-7c419827ee3c@redhat.com> From: Auger Eric Message-ID: <81c9d91c-516f-78f2-6684-3edda6a40348@redhat.com> Date: Mon, 18 Jun 2018 09:45:26 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 08/13] hw/misc/tz_mpc.c: Honour the BLK_LUT settings in translate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "patches@linaro.org" , QEMU Developers , Peter Xu , qemu-arm , Paolo Bonzini , =?UTF-8?Q?Alex_Benn=c3=a9e?= , Richard Henderson Hi Peter, On 06/15/2018 06:09 PM, Peter Maydell wrote: > On 15 June 2018 at 17:07, Peter Maydell wrote: >> On 15 June 2018 at 08:31, Auger Eric wrote: >>> Hi Peter, >>> >>> On 06/04/2018 05:29 PM, Peter Maydell wrote: >>>> The final part of the Memory Protection Controller we need to >>>> implement is actually using the BLK_LUT data programmed by the >>>> guest to determine whether to block the transaction or not. >>>> >>>> Since this means we now change transaction mappings when >>>> the guest writes to BLK_LUT, we must also call the IOMMU >>>> notifiers at that point. >>>> >>>> Signed-off-by: Peter Maydell >> >>>> + if (newlut & (1 << i)) { >>> Add a comment saying the block is configured as non-secure? > > ...actually, how about instead having a new variable > bool block_is_ns = newlut & (1 << i); > > and then here and in the later if() having "if (block_is_ns)" ? > I think that clarifies without needing a comment. yes, looks good to me Thanks Eric > > thanks > -- PMM >