[Qemu-devel] [PATCH v2 0/5] rework the ICS classes inheritance tree

Cédric Le Goater posted 5 patches 7 years, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180625091718.18544-1-clg@kaod.org
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test s390x passed
include/hw/ppc/xics.h |   4 +-
hw/intc/xics.c        | 164 ++++++++++++++++++++++++++++----------------------
hw/intc/xics_kvm.c    |  46 +++++++-------
hw/ppc/spapr.c        |   2 +-
4 files changed, 121 insertions(+), 95 deletions(-)
[Qemu-devel] [PATCH v2 0/5] rework the ICS classes inheritance tree
Posted by Cédric Le Goater 7 years, 4 months ago
Hello,

It makes the class hierarchy much cleaner and removes duplicated
code. As we are touching the location of the objects states, migration
compatibility was checked and the following tests were performed under
KVM :

  qemu-3.0 (pseries-3.0)   -> qemu-3.0  (pseries-3.0)   OK
  qemu-3.0 (pseries-2.12)  -> qemu-2.12 (pseries-2.12)  OK
  qemu-3.0 (pseries-2.11)  -> qemu-2.11 (pseries-2.11)  OK
  qemu-3.0 (pseries-2.10)  -> qemu-2.10 (pseries-2.10)  OK
  qemu-3.0 (pseries-2.9)   -> qemu-2.9  (pseries-2.9)   OK
  qemu-3.0 (pseries-2.8)   -> qemu-2.8  (pseries-2.8)   OK
  qemu-3.0 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL

and back :

  qemu-3.0 (pseries-3.0)  <-  qemu-3.0  (pseries-3.0)   OK
  qemu-3.0 (pseries-2.12) <-  qemu-2.12 (pseries-2.12)  OK
  qemu-3.0 (pseries-2.11) <-  qemu-2.11 (pseries-2.11)  OK
  qemu-3.0 (pseries-2.10) <-  qemu-2.10 (pseries-2.10)  OK
  qemu-3.0 (pseries-2.9)  <-  qemu-2.9  (pseries-2.9)   OK
  qemu-3.0 (pseries-2.8)  <-  qemu-2.8  (pseries-2.8)   OK
  qemu-3.0 (pseries-2.7)  <-  qemu-2.7  (pseries-2.7)   OK

under TCG, same scenarios were run but up to 2.10 only, in which case
the migration fails for other reasons.

I wouldn't mind some extra cross checking from someone else.

Thanks,

C.

Changes since v2:

 - split the patch in smaller units. The migration tests were not
   rerun because the code is very much the same. make check was run on
   each patch.


Cédric Le Goater (5):
  ppc/xics: introduce a parent_realize in ICSStateClass
  ppc/xics: move the instance_init handler under the ics-base class
  ppx/xics: introduce a parent_reset in ICSStateClass
  ppc/xics: move the vmstate structures under the ics-base class
  ppc/xics: rework the ICS classes inheritance tree

 include/hw/ppc/xics.h |   4 +-
 hw/intc/xics.c        | 164 ++++++++++++++++++++++++++++----------------------
 hw/intc/xics_kvm.c    |  46 +++++++-------
 hw/ppc/spapr.c        |   2 +-
 4 files changed, 121 insertions(+), 95 deletions(-)

-- 
2.13.6


Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 0/5] rework the ICS classes inheritance tree
Posted by Greg Kurz 7 years, 4 months ago
On Mon, 25 Jun 2018 11:17:13 +0200
Cédric Le Goater <clg@kaod.org> wrote:

> Hello,
> 

Hello,

Sorry I didn't manage to look at this before it got merged :)

> It makes the class hierarchy much cleaner and removes duplicated
> code. As we are touching the location of the objects states, migration
> compatibility was checked and the following tests were performed under
> KVM :
> 
>   qemu-3.0 (pseries-3.0)   -> qemu-3.0  (pseries-3.0)   OK
>   qemu-3.0 (pseries-2.12)  -> qemu-2.12 (pseries-2.12)  OK
>   qemu-3.0 (pseries-2.11)  -> qemu-2.11 (pseries-2.11)  OK
>   qemu-3.0 (pseries-2.10)  -> qemu-2.10 (pseries-2.10)  OK
>   qemu-3.0 (pseries-2.9)   -> qemu-2.9  (pseries-2.9)   OK
>   qemu-3.0 (pseries-2.8)   -> qemu-2.8  (pseries-2.8)   OK
>   qemu-3.0 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL

What's the failure ?

> 
> and back :
> 
>   qemu-3.0 (pseries-3.0)  <-  qemu-3.0  (pseries-3.0)   OK
>   qemu-3.0 (pseries-2.12) <-  qemu-2.12 (pseries-2.12)  OK
>   qemu-3.0 (pseries-2.11) <-  qemu-2.11 (pseries-2.11)  OK
>   qemu-3.0 (pseries-2.10) <-  qemu-2.10 (pseries-2.10)  OK
>   qemu-3.0 (pseries-2.9)  <-  qemu-2.9  (pseries-2.9)   OK
>   qemu-3.0 (pseries-2.8)  <-  qemu-2.8  (pseries-2.8)   OK
>   qemu-3.0 (pseries-2.7)  <-  qemu-2.7  (pseries-2.7)   OK
> 
> under TCG, same scenarios were run but up to 2.10 only, in which case
> the migration fails for other reasons.
> 
> I wouldn't mind some extra cross checking from someone else.
> 
> Thanks,
> 
> C.
> 
> Changes since v2:
> 
>  - split the patch in smaller units. The migration tests were not
>    rerun because the code is very much the same. make check was run on
>    each patch.
> 
> 
> Cédric Le Goater (5):
>   ppc/xics: introduce a parent_realize in ICSStateClass
>   ppc/xics: move the instance_init handler under the ics-base class
>   ppx/xics: introduce a parent_reset in ICSStateClass
>   ppc/xics: move the vmstate structures under the ics-base class
>   ppc/xics: rework the ICS classes inheritance tree
> 
>  include/hw/ppc/xics.h |   4 +-
>  hw/intc/xics.c        | 164 ++++++++++++++++++++++++++++----------------------
>  hw/intc/xics_kvm.c    |  46 +++++++-------
>  hw/ppc/spapr.c        |   2 +-
>  4 files changed, 121 insertions(+), 95 deletions(-)
> 


Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 0/5] rework the ICS classes inheritance tree
Posted by Cédric Le Goater 7 years, 4 months ago
On 06/26/2018 03:27 PM, Greg Kurz wrote:
> On Mon, 25 Jun 2018 11:17:13 +0200
> Cédric Le Goater <clg@kaod.org> wrote:
> 
>> Hello,
>>
> 
> Hello,
> 
> Sorry I didn't manage to look at this before it got merged :)
> 
>> It makes the class hierarchy much cleaner and removes duplicated
>> code. As we are touching the location of the objects states, migration
>> compatibility was checked and the following tests were performed under
>> KVM :
>>
>>   qemu-3.0 (pseries-3.0)   -> qemu-3.0  (pseries-3.0)   OK
>>   qemu-3.0 (pseries-2.12)  -> qemu-2.12 (pseries-2.12)  OK
>>   qemu-3.0 (pseries-2.11)  -> qemu-2.11 (pseries-2.11)  OK
>>   qemu-3.0 (pseries-2.10)  -> qemu-2.10 (pseries-2.10)  OK
>>   qemu-3.0 (pseries-2.9)   -> qemu-2.9  (pseries-2.9)   OK
>>   qemu-3.0 (pseries-2.8)   -> qemu-2.8  (pseries-2.8)   OK
>>   qemu-3.0 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
> 
> What's the failure ?

qemu-system-ppc64: error while loading state for instance 0x0 of device 'cpu'
qemu-system-ppc64: load of migration failed: Invalid argument

and to be more precise :

   qemu-3.0  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
   qemu-2.12 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
   qemu-2.11 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
   qemu-2.10 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
   qemu-2.9  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
   qemu-2.8  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
   qemu-2.7  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   OK


So it has been a while.

C. 


> 
>>
>> and back :
>>
>>   qemu-3.0 (pseries-3.0)  <-  qemu-3.0  (pseries-3.0)   OK
>>   qemu-3.0 (pseries-2.12) <-  qemu-2.12 (pseries-2.12)  OK
>>   qemu-3.0 (pseries-2.11) <-  qemu-2.11 (pseries-2.11)  OK
>>   qemu-3.0 (pseries-2.10) <-  qemu-2.10 (pseries-2.10)  OK
>>   qemu-3.0 (pseries-2.9)  <-  qemu-2.9  (pseries-2.9)   OK
>>   qemu-3.0 (pseries-2.8)  <-  qemu-2.8  (pseries-2.8)   OK
>>   qemu-3.0 (pseries-2.7)  <-  qemu-2.7  (pseries-2.7)   OK
>>
>> under TCG, same scenarios were run but up to 2.10 only, in which case
>> the migration fails for other reasons.
>>
>> I wouldn't mind some extra cross checking from someone else.
>>
>> Thanks,
>>
>> C.
>>
>> Changes since v2:
>>
>>  - split the patch in smaller units. The migration tests were not
>>    rerun because the code is very much the same. make check was run on
>>    each patch.
>>
>>
>> Cédric Le Goater (5):
>>   ppc/xics: introduce a parent_realize in ICSStateClass
>>   ppc/xics: move the instance_init handler under the ics-base class
>>   ppx/xics: introduce a parent_reset in ICSStateClass
>>   ppc/xics: move the vmstate structures under the ics-base class
>>   ppc/xics: rework the ICS classes inheritance tree
>>
>>  include/hw/ppc/xics.h |   4 +-
>>  hw/intc/xics.c        | 164 ++++++++++++++++++++++++++++----------------------
>>  hw/intc/xics_kvm.c    |  46 +++++++-------
>>  hw/ppc/spapr.c        |   2 +-
>>  4 files changed, 121 insertions(+), 95 deletions(-)
>>
> 


Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 0/5] rework the ICS classes inheritance tree
Posted by David Gibson 7 years, 4 months ago
On Tue, Jun 26, 2018 at 06:37:12PM +0200, Cédric Le Goater wrote:
1;5202;0c> On 06/26/2018 03:27 PM, Greg Kurz wrote:
> > On Mon, 25 Jun 2018 11:17:13 +0200
> > Cédric Le Goater <clg@kaod.org> wrote:
> > 
> >> Hello,
> >>
> > 
> > Hello,
> > 
> > Sorry I didn't manage to look at this before it got merged :)
> > 
> >> It makes the class hierarchy much cleaner and removes duplicated
> >> code. As we are touching the location of the objects states, migration
> >> compatibility was checked and the following tests were performed under
> >> KVM :
> >>
> >>   qemu-3.0 (pseries-3.0)   -> qemu-3.0  (pseries-3.0)   OK
> >>   qemu-3.0 (pseries-2.12)  -> qemu-2.12 (pseries-2.12)  OK
> >>   qemu-3.0 (pseries-2.11)  -> qemu-2.11 (pseries-2.11)  OK
> >>   qemu-3.0 (pseries-2.10)  -> qemu-2.10 (pseries-2.10)  OK
> >>   qemu-3.0 (pseries-2.9)   -> qemu-2.9  (pseries-2.9)   OK
> >>   qemu-3.0 (pseries-2.8)   -> qemu-2.8  (pseries-2.8)   OK
> >>   qemu-3.0 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
> > 
> > What's the failure ?
> 
> qemu-system-ppc64: error while loading state for instance 0x0 of device 'cpu'
> qemu-system-ppc64: load of migration failed: Invalid argument
> 
> and to be more precise :
> 
>    qemu-3.0  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
>    qemu-2.12 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
>    qemu-2.11 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
>    qemu-2.10 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
>    qemu-2.9  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
>    qemu-2.8  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
>    qemu-2.7  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   OK
> 
> 
> So it has been a while.

Yeah, IIRC that's a known problem.  If you try 2.7.1, I think it will work.

> 
> C. 
> 
> 
> > 
> >>
> >> and back :
> >>
> >>   qemu-3.0 (pseries-3.0)  <-  qemu-3.0  (pseries-3.0)   OK
> >>   qemu-3.0 (pseries-2.12) <-  qemu-2.12 (pseries-2.12)  OK
> >>   qemu-3.0 (pseries-2.11) <-  qemu-2.11 (pseries-2.11)  OK
> >>   qemu-3.0 (pseries-2.10) <-  qemu-2.10 (pseries-2.10)  OK
> >>   qemu-3.0 (pseries-2.9)  <-  qemu-2.9  (pseries-2.9)   OK
> >>   qemu-3.0 (pseries-2.8)  <-  qemu-2.8  (pseries-2.8)   OK
> >>   qemu-3.0 (pseries-2.7)  <-  qemu-2.7  (pseries-2.7)   OK
> >>
> >> under TCG, same scenarios were run but up to 2.10 only, in which case
> >> the migration fails for other reasons.
> >>
> >> I wouldn't mind some extra cross checking from someone else.
> >>
> >> Thanks,
> >>
> >> C.
> >>
> >> Changes since v2:
> >>
> >>  - split the patch in smaller units. The migration tests were not
> >>    rerun because the code is very much the same. make check was run on
> >>    each patch.
> >>
> >>
> >> Cédric Le Goater (5):
> >>   ppc/xics: introduce a parent_realize in ICSStateClass
> >>   ppc/xics: move the instance_init handler under the ics-base class
> >>   ppx/xics: introduce a parent_reset in ICSStateClass
> >>   ppc/xics: move the vmstate structures under the ics-base class
> >>   ppc/xics: rework the ICS classes inheritance tree
> >>
> >>  include/hw/ppc/xics.h |   4 +-
> >>  hw/intc/xics.c        | 164 ++++++++++++++++++++++++++++----------------------
> >>  hw/intc/xics_kvm.c    |  46 +++++++-------
> >>  hw/ppc/spapr.c        |   2 +-
> >>  4 files changed, 121 insertions(+), 95 deletions(-)
> >>
> > 
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 0/5] rework the ICS classes inheritance tree
Posted by Cédric Le Goater 7 years, 4 months ago
On 06/27/2018 02:14 AM, David Gibson wrote:
> On Tue, Jun 26, 2018 at 06:37:12PM +0200, Cédric Le Goater wrote:
> 1;5202;0c> On 06/26/2018 03:27 PM, Greg Kurz wrote:
>>> On Mon, 25 Jun 2018 11:17:13 +0200
>>> Cédric Le Goater <clg@kaod.org> wrote:
>>>
>>>> Hello,
>>>>
>>>
>>> Hello,
>>>
>>> Sorry I didn't manage to look at this before it got merged :)
>>>
>>>> It makes the class hierarchy much cleaner and removes duplicated
>>>> code. As we are touching the location of the objects states, migration
>>>> compatibility was checked and the following tests were performed under
>>>> KVM :
>>>>
>>>>   qemu-3.0 (pseries-3.0)   -> qemu-3.0  (pseries-3.0)   OK
>>>>   qemu-3.0 (pseries-2.12)  -> qemu-2.12 (pseries-2.12)  OK
>>>>   qemu-3.0 (pseries-2.11)  -> qemu-2.11 (pseries-2.11)  OK
>>>>   qemu-3.0 (pseries-2.10)  -> qemu-2.10 (pseries-2.10)  OK
>>>>   qemu-3.0 (pseries-2.9)   -> qemu-2.9  (pseries-2.9)   OK
>>>>   qemu-3.0 (pseries-2.8)   -> qemu-2.8  (pseries-2.8)   OK
>>>>   qemu-3.0 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
>>>
>>> What's the failure ?
>>
>> qemu-system-ppc64: error while loading state for instance 0x0 of device 'cpu'
>> qemu-system-ppc64: load of migration failed: Invalid argument
>>
>> and to be more precise :
>>
>>    qemu-3.0  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
>>    qemu-2.12 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
>>    qemu-2.11 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
>>    qemu-2.10 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
>>    qemu-2.9  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
>>    qemu-2.8  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
>>    qemu-2.7  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   OK
>>
>>
>> So it has been a while.
> 
> Yeah, IIRC that's a known problem.  If you try 2.7.1, I think it will work.

I was using a 2.7.1.

C. 


> 
>>
>> C. 
>>
>>
>>>
>>>>
>>>> and back :
>>>>
>>>>   qemu-3.0 (pseries-3.0)  <-  qemu-3.0  (pseries-3.0)   OK
>>>>   qemu-3.0 (pseries-2.12) <-  qemu-2.12 (pseries-2.12)  OK
>>>>   qemu-3.0 (pseries-2.11) <-  qemu-2.11 (pseries-2.11)  OK
>>>>   qemu-3.0 (pseries-2.10) <-  qemu-2.10 (pseries-2.10)  OK
>>>>   qemu-3.0 (pseries-2.9)  <-  qemu-2.9  (pseries-2.9)   OK
>>>>   qemu-3.0 (pseries-2.8)  <-  qemu-2.8  (pseries-2.8)   OK
>>>>   qemu-3.0 (pseries-2.7)  <-  qemu-2.7  (pseries-2.7)   OK
>>>>
>>>> under TCG, same scenarios were run but up to 2.10 only, in which case
>>>> the migration fails for other reasons.
>>>>
>>>> I wouldn't mind some extra cross checking from someone else.
>>>>
>>>> Thanks,
>>>>
>>>> C.
>>>>
>>>> Changes since v2:
>>>>
>>>>  - split the patch in smaller units. The migration tests were not
>>>>    rerun because the code is very much the same. make check was run on
>>>>    each patch.
>>>>
>>>>
>>>> Cédric Le Goater (5):
>>>>   ppc/xics: introduce a parent_realize in ICSStateClass
>>>>   ppc/xics: move the instance_init handler under the ics-base class
>>>>   ppx/xics: introduce a parent_reset in ICSStateClass
>>>>   ppc/xics: move the vmstate structures under the ics-base class
>>>>   ppc/xics: rework the ICS classes inheritance tree
>>>>
>>>>  include/hw/ppc/xics.h |   4 +-
>>>>  hw/intc/xics.c        | 164 ++++++++++++++++++++++++++++----------------------
>>>>  hw/intc/xics_kvm.c    |  46 +++++++-------
>>>>  hw/ppc/spapr.c        |   2 +-
>>>>  4 files changed, 121 insertions(+), 95 deletions(-)
>>>>
>>>
>>
> 


Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 0/5] rework the ICS classes inheritance tree
Posted by David Gibson 7 years, 4 months ago
On Wed, Jun 27, 2018 at 08:34:22AM +0200, Cédric Le Goater wrote:
> On 06/27/2018 02:14 AM, David Gibson wrote:
> > On Tue, Jun 26, 2018 at 06:37:12PM +0200, Cédric Le Goater wrote:
> > 1;5202;0c> On 06/26/2018 03:27 PM, Greg Kurz wrote:
> >>> On Mon, 25 Jun 2018 11:17:13 +0200
> >>> Cédric Le Goater <clg@kaod.org> wrote:
> >>>
> >>>> Hello,
> >>>>
> >>>
> >>> Hello,
> >>>
> >>> Sorry I didn't manage to look at this before it got merged :)
> >>>
> >>>> It makes the class hierarchy much cleaner and removes duplicated
> >>>> code. As we are touching the location of the objects states, migration
> >>>> compatibility was checked and the following tests were performed under
> >>>> KVM :
> >>>>
> >>>>   qemu-3.0 (pseries-3.0)   -> qemu-3.0  (pseries-3.0)   OK
> >>>>   qemu-3.0 (pseries-2.12)  -> qemu-2.12 (pseries-2.12)  OK
> >>>>   qemu-3.0 (pseries-2.11)  -> qemu-2.11 (pseries-2.11)  OK
> >>>>   qemu-3.0 (pseries-2.10)  -> qemu-2.10 (pseries-2.10)  OK
> >>>>   qemu-3.0 (pseries-2.9)   -> qemu-2.9  (pseries-2.9)   OK
> >>>>   qemu-3.0 (pseries-2.8)   -> qemu-2.8  (pseries-2.8)   OK
> >>>>   qemu-3.0 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
> >>>
> >>> What's the failure ?
> >>
> >> qemu-system-ppc64: error while loading state for instance 0x0 of device 'cpu'
> >> qemu-system-ppc64: load of migration failed: Invalid argument
> >>
> >> and to be more precise :
> >>
> >>    qemu-3.0  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
> >>    qemu-2.12 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
> >>    qemu-2.11 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
> >>    qemu-2.10 (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
> >>    qemu-2.9  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
> >>    qemu-2.8  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   FAIL
> >>    qemu-2.7  (pseries-2.7)   -> qemu-2.7  (pseries-2.7)   OK
> >>
> >>
> >> So it has been a while.
> > 
> > Yeah, IIRC that's a known problem.  If you try 2.7.1, I think it will work.
> 
> I was using a 2.7.1.

Huh.  Ok, I don't know what's going on then.  But your patches haven't
changed the behaviour, so, whatever.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson