qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] Add phenom CPU descriptor


From: Amit Shah
Subject: Re: [Qemu-devel] [PATCH 2/2] Add phenom CPU descriptor
Date: Fri, 30 Jan 2009 14:36:52 +0530
User-agent: Mutt/1.5.18 (2008-05-17)

On (Tue) Jan 27 2009 [22:56:40], Paul Brook wrote:
> > > Although this is a bit different.  We aren't actually emulating a
> > > phenom.  We're just taking what we have and calling it a phenom.  I
> > > suspect there's going to be a desire to call whatever we emulate
> > > arbitrary things.
> >
> > I don't think we're likely to want the big list of cpus anyway.
> 
> Argh. I got that completely wrong.I mean we *are* likely to want a big list 
> of 
> cpus anyway. If done properly it should be fairly easy to maintain.
> e.g. instead of missing out unimplemented feature flags in each cpu, add them 
> all, then have qemu mask out the ones it doesn't implement.

What I'm thinking of is moving all the CPU definitions out from helper.c
into $(PREFIX)/usr/share/qemu/cpu-defs/... with one file holding one
definition, like
$ cat core2duo.def
model= 15
family = 16
stepping = 11
level = 10
.
.
.

Adding a new def then just becomes a matter of submitting a text file
for inclusion and doesn't need any recompilation.

Also, there are many details not captured in a CPU def, like the cache
sizes and types. They're hard-coded for all the CPUs in the cpuid helper
function. So we could have those values too incorporated in the CPU def
file an fall back to the defaults when not available.

When we do get some kind of a machine FDT, we can specify the cpu type
by either pointing to one of these files or by constructing a new CPU
type by specifying individual values.

Amit




reply via email to

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