[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC v2 08/11] tcg: add options for enabling MTTCG
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [RFC v2 08/11] tcg: add options for enabling MTTCG |
Date: |
Tue, 12 Apr 2016 15:28:25 +0100 |
User-agent: |
mu4e 0.9.17; emacs 25.0.92.6 |
Sergey Fedorov <address@hidden> writes:
> On 05/04/16 18:32, Alex Bennée wrote:
>> diff --git a/cpus.c b/cpus.c
>> index 46732a5..8d27fb0 100644
>> --- a/cpus.c
>> +++ b/cpus.c
>
> (snip)
>
>> @@ -146,6 +147,48 @@ typedef struct TimersState {
>> } TimersState;
>>
>> static TimersState timers_state;
>> +static bool mttcg_enabled;
>> +
>> +static QemuOptsList qemu_tcg_opts = {
>> + .name = "tcg",
>> + .head = QTAILQ_HEAD_INITIALIZER(qemu_tcg_opts.head),
>> + .desc = {
>> + {
>> + .name = "mttcg",
>> + .type = QEMU_OPT_BOOL,
>> + .help = "Enable/disable multi-threaded TCG",
>> + },
>> + { /* end of list */ }
>> + },
>> +};
>> +
>> +static void tcg_register_config(void)
>> +{
>> + qemu_add_opts(&qemu_tcg_opts);
>> +}
>> +
>> +opts_init(tcg_register_config);
>> +
>> +static bool default_mttcg_enabled(void)
>> +{
>> + /*
>> + * TODO: Check if we have a chance to have MTTCG working on this
>> guest/host.
>> + * Basically is the atomic instruction implemented? Is there any
>> + * memory ordering issue?
>> + */
>
> I think this could be decided in configure/makefiles.
I was think we might have other interactions, like if the user enabled
replay/playback mode. There is also an argument that by having the logic
in the code it's easier for developers to see the logic as people don't
generally grok Makefiles.
>
>> + return false;
>> +}
>> +
>> +void qemu_tcg_configure(QemuOpts *opts)
>> +{
>> + mttcg_enabled = qemu_opt_get_bool(opts, "mttcg",
>> default_mttcg_enabled());
>> +}
>> +
>> +bool qemu_tcg_mttcg_enabled(void)
>> +{
>> + return mttcg_enabled;
>> +}
>> +
>>
>> int64_t cpu_get_icount_raw(void)
>> {
>> diff --git a/include/qom/cpu.h b/include/qom/cpu.h
>> index 13eeaae..5e3826c 100644
>> --- a/include/qom/cpu.h
>> +++ b/include/qom/cpu.h
>> @@ -369,6 +369,20 @@ extern struct CPUTailQ cpus;
>> extern __thread CPUState *current_cpu;
>>
>> /**
>> + * qemu_tcg_enable_mttcg:
>> + * Enable the MultiThread TCG support.
>> + */
>> +void qemu_tcg_enable_mttcg(void);
>
> Seems to be an orphaned declaration.
>
> Kind regards,
> Sergey
--
Alex Bennée
- Re: [Qemu-devel] [RFC v2 08/11] tcg: add options for enabling MTTCG, (continued)
- Re: [Qemu-devel] [RFC v2 08/11] tcg: add options for enabling MTTCG, Alex Bennée, 2016/04/12
- Re: [Qemu-devel] [RFC v2 08/11] tcg: add options for enabling MTTCG, Peter Maydell, 2016/04/12
- Re: [Qemu-devel] [RFC v2 08/11] tcg: add options for enabling MTTCG, Sergey Fedorov, 2016/04/12
- Re: [Qemu-devel] [RFC v2 08/11] tcg: add options for enabling MTTCG, KONRAD Frederic, 2016/04/12
- Re: [Qemu-devel] [RFC v2 08/11] tcg: add options for enabling MTTCG, Sergey Fedorov, 2016/04/12
- Re: [Qemu-devel] [RFC v2 08/11] tcg: add options for enabling MTTCG, Pavel Dovgalyuk, 2016/04/12
- Re: [Qemu-devel] [RFC v2 08/11] tcg: add options for enabling MTTCG, Sergey Fedorov, 2016/04/12
- Re: [Qemu-devel] [RFC v2 08/11] tcg: add options for enabling MTTCG, Alex Bennée, 2016/04/12
- Re: [Qemu-devel] [RFC v2 08/11] tcg: add options for enabling MTTCG, Sergey Fedorov, 2016/04/12
Re: [Qemu-devel] [RFC v2 08/11] tcg: add options for enabling MTTCG, Sergey Fedorov, 2016/04/12
- Re: [Qemu-devel] [RFC v2 08/11] tcg: add options for enabling MTTCG,
Alex Bennée <=
[Qemu-devel] [RFC v2 01/11] tcg: move tb_invalidated_flag to CPUState, Alex Bennée, 2016/04/05
[Qemu-devel] [RFC v2 03/11] docs: new design document multi-thread-tcg.txt (DRAFTING), Alex Bennée, 2016/04/05
[Qemu-devel] [RFC v2 11/11] tcg: enable thread-per-vCPU, Alex Bennée, 2016/04/05
[Qemu-devel] [RFC v2 07/11] tcg: cpus rm tcg_exec_all(), Alex Bennée, 2016/04/05
[Qemu-devel] [RFC v2 10/11] tcg: drop global lock during TCG code execution, Alex Bennée, 2016/04/05
[Qemu-devel] [RFC v2 04/11] tcg: comment on which functions have to be called with tb_lock held, Alex Bennée, 2016/04/05