From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asVXr-0006BN-Uu for qemu-devel@nongnu.org; Tue, 19 Apr 2016 09:18:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1asVXn-0000gL-UH for qemu-devel@nongnu.org; Tue, 19 Apr 2016 09:18:23 -0400 References: <1460324732-30330-1-git-send-email-sergey.fedorov@linaro.org> <1460324732-30330-11-git-send-email-sergey.fedorov@linaro.org> <8760vdwxqa.fsf@linaro.org> From: Sergey Fedorov Message-ID: <57163002.2070803@gmail.com> Date: Tue, 19 Apr 2016 16:17:54 +0300 MIME-Version: 1.0 In-Reply-To: <8760vdwxqa.fsf@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 10/10] tcg: Moderate direct block chaining safety checks in user mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Alex_Benn=c3=a9e?= , Sergey Fedorov Cc: qemu-devel@nongnu.org, Paolo Bonzini , Peter Crosthwaite , Richard Henderson , Riku Voipio , Blue Swirl , Peter Maydell , "Edgar E. Iglesias" , Eduardo Habkost , Michael Walle , Aurelien Jarno , Leon Alrae , Anthony Green , Jia Liu , Alexander Graf , Mark Cave-Ayland , Bastian Koppelmann , Guan Xuetao , Max Filippov , qemu-arm@nongnu.org, qemu-ppc@nongnu.org On 19/04/16 16:10, Alex Bennée wrote: > Sergey Fedorov writes: (snip) >> diff --git a/target-alpha/translate.c b/target-alpha/translate.c >> index 5fa66309ce2e..684559e694bd 100644 >> --- a/target-alpha/translate.c >> +++ b/target-alpha/translate.c >> @@ -464,11 +464,19 @@ static bool use_goto_tb(DisasContext *ctx, uint64_t dest) >> if (in_superpage(ctx, dest)) { >> return true; >> } >> +#ifndef CONFIG_USER_ONLY >> /* Direct jumps with goto_tb are only safe within the page this TB resides >> * in because we don't take care of direct jumps when address mapping >> - * changes. >> + * changes in system mode. >> */ >> return ((ctx->tb->pc ^ dest) & TARGET_PAGE_MASK) == 0; >> +#else >> + /* In user mode, there's only a static address translation, so the >> + * destination address is always valid. TBs are always invalidated properly >> + * and direct jumps are reset when mapping attributes change. >> + */ >> + return true; > The same comment as before with all this repeating boilerplate commentary. Except this time I can't think of a central place to put such a comment at. Maybe just drop the comment and get by on just commit message? Kind regards, Sergey