Re: [Qemu-devel] [PATCH 6/6] spapr: fix migration of ICP objects from/to older QEMU

2017-05-19 Thread David Gibson
On Wed, May 17, 2017 at 10:33:44PM +0200, Greg Kurz wrote: > On Wed, 17 May 2017 14:18:16 +1000 > David Gibson wrote: > > > On Mon, May 15, 2017 at 06:11:27PM +0200, Cédric Le Goater wrote: > > > >>> +int smt = kvmppc_smt_threads(); > > > >>> +int

Re: [Qemu-devel] [PATCH 6/6] spapr: fix migration of ICP objects from/to older QEMU

2017-05-17 Thread Greg Kurz
On Wed, 17 May 2017 14:18:16 +1000 David Gibson wrote: > On Mon, May 15, 2017 at 06:11:27PM +0200, Cédric Le Goater wrote: > > >>> +int smt = kvmppc_smt_threads(); > > >>> +int nr_servers = DIV_ROUND_UP(max_cpus * smt, smp_threads); > > >> > > >> may

Re: [Qemu-devel] [PATCH 6/6] spapr: fix migration of ICP objects from/to older QEMU

2017-05-16 Thread David Gibson
On Mon, May 15, 2017 at 02:22:32PM +0200, Cédric Le Goater wrote: > On 05/15/2017 01:40 PM, Greg Kurz wrote: > > Commit 5bc8d26de20c ("spapr: allocate the ICPState object from under > > sPAPRCPUCore") moved ICP objects from the machine to CPU cores. This > > is an improvement since we no longer

Re: [Qemu-devel] [PATCH 6/6] spapr: fix migration of ICP objects from/to older QEMU

2017-05-16 Thread David Gibson
On Mon, May 15, 2017 at 06:20:06PM +0200, Greg Kurz wrote: > On Mon, 15 May 2017 18:09:04 +0200 > Cédric Le Goater wrote: > > > On 05/15/2017 03:16 PM, Greg Kurz wrote: > > > On Mon, 15 May 2017 14:22:32 +0200 > > > Cédric Le Goater wrote: > > > > > >> On

Re: [Qemu-devel] [PATCH 6/6] spapr: fix migration of ICP objects from/to older QEMU

2017-05-16 Thread David Gibson
On Mon, May 15, 2017 at 06:11:27PM +0200, Cédric Le Goater wrote: > >>> +int smt = kvmppc_smt_threads(); > >>> +int nr_servers = DIV_ROUND_UP(max_cpus * smt, smp_threads); > >> > >> may be we should reintroduce nr_servers at the machine level ? > >> > > > > I had reintroduced

Re: [Qemu-devel] [PATCH 6/6] spapr: fix migration of ICP objects from/to older QEMU

2017-05-16 Thread David Gibson
On Mon, May 15, 2017 at 03:16:02PM +0200, Greg Kurz wrote: > On Mon, 15 May 2017 14:22:32 +0200 > Cédric Le Goater wrote: > > > On 05/15/2017 01:40 PM, Greg Kurz wrote: [snip] > > > + > > > +object_initialize(obj, sizeof(ICPState), spapr->icp_type); > > > +

Re: [Qemu-devel] [PATCH 6/6] spapr: fix migration of ICP objects from/to older QEMU

2017-05-15 Thread Greg Kurz
On Mon, 15 May 2017 18:11:27 +0200 Cédric Le Goater wrote: > >>> +int smt = kvmppc_smt_threads(); > >>> +int nr_servers = DIV_ROUND_UP(max_cpus * smt, smp_threads); > >> > >> may be we should reintroduce nr_servers at the machine level ? > >> > > > > I had

Re: [Qemu-devel] [PATCH 6/6] spapr: fix migration of ICP objects from/to older QEMU

2017-05-15 Thread Greg Kurz
On Mon, 15 May 2017 18:09:04 +0200 Cédric Le Goater wrote: > On 05/15/2017 03:16 PM, Greg Kurz wrote: > > On Mon, 15 May 2017 14:22:32 +0200 > > Cédric Le Goater wrote: > > > >> On 05/15/2017 01:40 PM, Greg Kurz wrote: > >>> Commit 5bc8d26de20c ("spapr:

Re: [Qemu-devel] [PATCH 6/6] spapr: fix migration of ICP objects from/to older QEMU

2017-05-15 Thread Cédric Le Goater
>>> +int smt = kvmppc_smt_threads(); >>> +int nr_servers = DIV_ROUND_UP(max_cpus * smt, smp_threads); >> >> may be we should reintroduce nr_servers at the machine level ? >> > > I had reintroduced it but then I realized it was only used in this > function. nr_servers is also

Re: [Qemu-devel] [PATCH 6/6] spapr: fix migration of ICP objects from/to older QEMU

2017-05-15 Thread Cédric Le Goater
On 05/15/2017 03:16 PM, Greg Kurz wrote: > On Mon, 15 May 2017 14:22:32 +0200 > Cédric Le Goater wrote: > >> On 05/15/2017 01:40 PM, Greg Kurz wrote: >>> Commit 5bc8d26de20c ("spapr: allocate the ICPState object from under >>> sPAPRCPUCore") moved ICP objects from the machine to

Re: [Qemu-devel] [PATCH 6/6] spapr: fix migration of ICP objects from/to older QEMU

2017-05-15 Thread Greg Kurz
On Mon, 15 May 2017 14:22:32 +0200 Cédric Le Goater wrote: > On 05/15/2017 01:40 PM, Greg Kurz wrote: > > Commit 5bc8d26de20c ("spapr: allocate the ICPState object from under > > sPAPRCPUCore") moved ICP objects from the machine to CPU cores. This > > is an improvement since we no

Re: [Qemu-devel] [PATCH 6/6] spapr: fix migration of ICP objects from/to older QEMU

2017-05-15 Thread Cédric Le Goater
On 05/15/2017 01:40 PM, Greg Kurz wrote: > Commit 5bc8d26de20c ("spapr: allocate the ICPState object from under > sPAPRCPUCore") moved ICP objects from the machine to CPU cores. This > is an improvement since we no longer allocate ICP objects that will > never be used. But it has the side-effect

[Qemu-devel] [PATCH 6/6] spapr: fix migration of ICP objects from/to older QEMU

2017-05-15 Thread Greg Kurz
Commit 5bc8d26de20c ("spapr: allocate the ICPState object from under sPAPRCPUCore") moved ICP objects from the machine to CPU cores. This is an improvement since we no longer allocate ICP objects that will never be used. But it has the side-effect of breaking migration of older machine types from