qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU


From: Paolo Bonzini
Subject: Re: [RFC v3 8/9] module: introduce MODULE_INIT_ACCEL_CPU
Date: Mon, 23 Nov 2020 16:14:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 23/11/20 16:02, Claudio Fontana wrote:
Thanks, I'll work on this option.

Btw considering that CpusAccel for tcg is actually three different interfaces 
(for mttcg, for icount, and plain RR),
it will be tough to, in the stated objective, "remove all conditionals", even 
after removing the tcg_enabled().

I'm not sure removing all conditionals is a goal in and of itself, but of course keeping the conditionals more local should be a good.

Paolo

I wonder how you see this issue (patches for 3 TCG split are in Richard's queue 
atm).

static void tcg_accel_cpu_init(void)
{
     if (tcg_enabled()) {
         TCGState *s = TCG_STATE(current_accel());

         if (s->mttcg_enabled) {
             cpus_register_accel(&tcg_cpus_mttcg);
         } else if (icount_enabled()) {
             cpus_register_accel(&tcg_cpus_icount);
         } else {
             cpus_register_accel(&tcg_cpus_rr);
         }
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]