On Mon, Mar 28, 2011 at 8:36 PM, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 28 March 2011 18:31, Blue Swirl <blauwir...@gmail.com> wrote: >> On Mon, Mar 28, 2011 at 4:44 PM, Peter Maydell <peter.mayd...@linaro.org> >> wrote: >>> Combine the per-machine QEMUMachine struct into the per-machine >>> sun4*_hwdef struct. This requires some moving around of init functions >>> to avoid forward references. We also have to move the 'const' >>> attribute from the whole sun4*_hwdef[] array to the individual fields >>> of the structure, because QEMUMachine is not const. >> >> Maybe QEMUMachine should be made const instead? The data does not ever >> need to change. > > I thought about that, but we need to fill in the 'next' links when > we do qemu_register_device().
The list could be kept separate from the structure. > (vl.c also sets machine->max_cpus if it wasn't set. I don't think > anything else modifies QEMUMachine structure fields.) The lines after that could be changed so that machine->max_cpus is not changed. It's not used afterwards.