qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC v5 11/12] i386: centralize initialization of cpu accel interfac


From: Paolo Bonzini
Subject: Re: [RFC v5 11/12] i386: centralize initialization of cpu accel interfaces
Date: Thu, 26 Nov 2020 16:14:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 26/11/20 15:55, Claudio Fontana wrote:
If we agree to use "accel-cpu" I would lookup "kvm-accel-cpu"
if we agree to use "accel-x86_64" aka "accel-" CPU_RESOLVING_TYPE, I would lookup 
"kvm-accel-" CPU_RESOLVING_TYPE

* initialize the arch-specific accel CpuClass interfaces */
static void accel_init_cpu_interfaces(AccelClass *ac, const char *cpu_type)
{
     const char *ac_name; /* AccelClass name */
     char *acc_name;      /* AccelCPUClass name */
     ObjectClass *acc;    /* AccelCPUClass */

     ac_name = object_class_get_name(OBJECT_CLASS(ac));
     g_assert(ac_name != NULL);

     acc_name = g_strdup_printf("%s-cpu", ac_name);
     acc = object_class_by_name(acc_name);
     g_free(acc_name);

     if (acc) {
         object_class_foreach(accel_init_cpu_interfaces_aux, cpu_type, false, 
acc);
     }
}

I would use the second; there's no reason to have allow only one CPU type, it's just a limitation of QEMU.

Paolo




reply via email to

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