[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] tcg: Initialize cpu_env generically
From: |
Lluís Vilanova |
Subject: |
Re: [Qemu-devel] [PATCH] tcg: Initialize cpu_env generically |
Date: |
Thu, 12 Oct 2017 23:32:39 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Richard Henderson writes:
> On 10/11/2017 11:43 PM, Lluís Vilanova wrote:
>>> /* Track which vCPU triggers events */
>>> CPUState *cpu; /* *_trans */
>>> - TCGv_env tcg_env; /* *_exec */
>>
>> I would rather keep it here instead of making a new global variable, since
>> that
>> should make it easier in the future to have multiple translation contexts.
> Why do you believe this prevents it? The variable is literally identical for
> *all* targets.
If someone decides to make tcg_ctx thread-local or have one per target
architecture (supporting multiple target archs concurrently), having all that
info on the tcg_ctx object is easier to track and modify, compared to having
multiple global variables.
> r~
> PS: Everyone, please trim context that you don't care about. If you just add
> two lines in the middle of 1000, I'll not always find it.
So true; I just went with the flow of the list, sorry.
Cheers,
Lluis