Re: [Qemu-devel] [RFC qom-cpu v2 1/8] apic: remove apic_no from apic_init_common()

2013-09-10 Thread chenfan
On Tue, 2013-09-10 at 14:16 +0200, Andreas Färber wrote: > Am 10.09.2013 14:09, schrieb Igor Mammedov: > > On Tue, 10 Sep 2013 17:43:41 +0800 > > Chen Fan wrote: > > > >> the 'apic_no' is increased by one when initialize/create a vCPU each time, > >> which causes APICCommonState s->idx always is

Re: [Qemu-devel] [RFC qom-cpu v2 1/8] apic: remove apic_no from apic_init_common()

2013-09-10 Thread Andreas Färber
Am 10.09.2013 14:09, schrieb Igor Mammedov: > On Tue, 10 Sep 2013 17:43:41 +0800 > Chen Fan wrote: > >> the 'apic_no' is increased by one when initialize/create a vCPU each time, >> which causes APICCommonState s->idx always is increased. >> but if we want to re-add a vCPU after removing a vCPU,

Re: [Qemu-devel] [RFC qom-cpu v2 1/8] apic: remove apic_no from apic_init_common()

2013-09-10 Thread Igor Mammedov
On Tue, 10 Sep 2013 17:43:41 +0800 Chen Fan wrote: > the 'apic_no' is increased by one when initialize/create a vCPU each time, > which causes APICCommonState s->idx always is increased. > but if we want to re-add a vCPU after removing a vCPU, we need to re-use the > vacant s->idx which the corre

[Qemu-devel] [RFC qom-cpu v2 1/8] apic: remove apic_no from apic_init_common()

2013-09-10 Thread Chen Fan
the 'apic_no' is increased by one when initialize/create a vCPU each time, which causes APICCommonState s->idx always is increased. but if we want to re-add a vCPU after removing a vCPU, we need to re-use the vacant s->idx which the corresponding vCPU had been removed. so we could use the unique c