Am 30.01.2012 03:14, schrieb Anthony Liguori: > On 01/29/2012 07:25 AM, Andreas Färber wrote: >> +static TypeInfo cpu_type_info = { >> + .name = TYPE_CPU, >> + .parent = TYPE_OBJECT, >> + .instance_size = sizeof(CPU), > > > Probably want to do CPUState or something of that nature so that you can > use CPU() as a dynamic_cast macro.
My testing seems to indicate CPU and CPU(obj) can co-exist (GCC 4.6.2). Considered name alternatives: CPUState - already taken as #define for legacy CPU${arch}State CPUCore - fits ARM but there's socket vs. core vs. thread on x86 CPUCommon - puts the emphasis on common, which is not a noun CommonCPU - no other base class uses such a naming scheme CPUModel - it's not just a model but the state of one instance CPUFamily - same as for CPUModel CPUState would be nicest IMO, but refactoring CPUState into something else just to refactor it back to QOM CPUState feels like churn. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg