[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 16/18] hw/i386: Introduce EPYC mode function handlers
From: |
Eduardo Habkost |
Subject: |
Re: [PATCH v3 16/18] hw/i386: Introduce EPYC mode function handlers |
Date: |
Wed, 29 Jan 2020 11:41:54 -0500 |
On Tue, Jan 28, 2020 at 03:48:15PM -0600, Babu Moger wrote:
> On 1/28/20 2:04 PM, Eduardo Habkost wrote:
[...]
> > If you need a CPU model to provide special behavior,
> > you have two options:
> >
> > * Add a method pointer to X86CPUClass and/or X86CPUDefinition
> > * Add a QOM property to enable/disable special behavior, and
> > include the property in the CPU model definition.
> >
> > The second option might be preferable long term, but might
> > require more work because the property would become visible in
> > query-cpu-model-expansion and in the command line. The first
> > option may be acceptable to avoid extra user-visible complexity
> > in the first version.
>
> Yes. We need to have a special behavior for specific model.
> I will look at both these above approaches closely. Challenge is this
> needs to be done much early in the initialization(before parse_numa_opts
> or machine_run_board_init). Will research more on this.
You should be able to look up the requested CPU model using
object_class_by_name(machine->cpu_type). If you do this inside
x86-specific code before calling
apicid_from_cpu_idx/topo_ids_from_apicid/apicid_from_topo_ids,
you probably won't need a init_apicid_fn hook.
--
Eduardo