[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v3 10/10] tcg: Moderate direct block chaining safe
From: |
Sergey Fedorov |
Subject: |
Re: [Qemu-ppc] [PATCH v3 10/10] tcg: Moderate direct block chaining safety checks in user mode |
Date: |
Tue, 19 Apr 2016 16:17:54 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
On 19/04/16 16:10, Alex Bennée wrote:
> Sergey Fedorov <address@hidden> 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