[Qemu-devel] [PATCH v2 0/7] QOMify MIPS cpu

Philippe Mathieu-Daudé posted 7 patches 8 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170830225225.27925-1-f4bug@amsat.org
Test FreeBSD passed
Test checkpatch failed
Test docker passed
Test s390x passed
There is a newer version of this series
target/mips/cpu-qom.h                         |   1 +
target/mips/cpu.h                             | 357 +---------------------
target/mips/internal.h                        | 422 ++++++++++++++++++++++++++
hw/mips/cps.c                                 |   2 +-
hw/mips/mips_fulong2e.c                       |   2 +-
hw/mips/mips_jazz.c                           |   2 +-
hw/mips/mips_malta.c                          |   2 +-
hw/mips/mips_mipssim.c                        |   2 +-
hw/mips/mips_r4k.c                            |   2 +-
hw/mips/cputimer.c => target/mips/cp0_timer.c |   2 +-
target/mips/cpu.c                             |  57 +++-
target/mips/gdbstub.c                         |   1 +
target/mips/helper.c                          |  47 +++
target/mips/kvm.c                             |   1 +
target/mips/machine.c                         |   1 +
target/mips/msa_helper.c                      |   1 +
target/mips/op_helper.c                       |   1 +
target/mips/translate.c                       |  23 +-
target/mips/translate_init.c                  |  68 +----
hw/mips/Makefile.objs                         |   2 +-
target/mips/Makefile.objs                     |   2 +-
21 files changed, 549 insertions(+), 449 deletions(-)
create mode 100644 target/mips/internal.h
rename hw/mips/cputimer.c => target/mips/cp0_timer.c (99%)
[Qemu-devel] [PATCH v2 0/7] QOMify MIPS cpu
Posted by Philippe Mathieu-Daudé 8 years, 2 months ago
Hi,

This series is based on Igor's "complete cpu QOMification" [1] but only modify
the MIPS part. Igor posted an updated series [2], both series should apply
separately.

Igor suggested on IRC this series could enter via the Machine core tree, so
I added Eduardo and Marcel.

Regards,

Phil.

[1]: http://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg04414.html
[2]: http://lists.nongnu.org/archive/html/qemu-devel/2017-08/msg03364.html

v2: 
- added Igor and James Tested-by
- squashed "!fixup mips: now than MIPSCPU is QOMified, mark it abstract"

PS: code movement somehow triggers a "binary vs unary operators" confusion
    in checkpatch: "ERROR: space prohibited after that '&' (ctx:WxW)"

Igor Mammedov (2):
  mips: MIPSCPU model subclasses
  mips: replace cpu_mips_init() with cpu_generic_init()

Philippe Mathieu-Daudé (5):
  mips: move hw/mips/cputimer.c to target/mips/
  mips: introduce internal.h and cleanup cpu.h
  mips: split cpu_mips_realize_env() out of cpu_mips_init()
  mips: call cpu_mips_realize_env() from mips_cpu_realizefn()
  mips: update mips_cpu_list() to use object_class_get_list()

 target/mips/cpu-qom.h                         |   1 +
 target/mips/cpu.h                             | 357 +---------------------
 target/mips/internal.h                        | 422 ++++++++++++++++++++++++++
 hw/mips/cps.c                                 |   2 +-
 hw/mips/mips_fulong2e.c                       |   2 +-
 hw/mips/mips_jazz.c                           |   2 +-
 hw/mips/mips_malta.c                          |   2 +-
 hw/mips/mips_mipssim.c                        |   2 +-
 hw/mips/mips_r4k.c                            |   2 +-
 hw/mips/cputimer.c => target/mips/cp0_timer.c |   2 +-
 target/mips/cpu.c                             |  57 +++-
 target/mips/gdbstub.c                         |   1 +
 target/mips/helper.c                          |  47 +++
 target/mips/kvm.c                             |   1 +
 target/mips/machine.c                         |   1 +
 target/mips/msa_helper.c                      |   1 +
 target/mips/op_helper.c                       |   1 +
 target/mips/translate.c                       |  23 +-
 target/mips/translate_init.c                  |  68 +----
 hw/mips/Makefile.objs                         |   2 +-
 target/mips/Makefile.objs                     |   2 +-
 21 files changed, 549 insertions(+), 449 deletions(-)
 create mode 100644 target/mips/internal.h
 rename hw/mips/cputimer.c => target/mips/cp0_timer.c (99%)

-- 
2.14.1


Re: [Qemu-devel] [PATCH v2 0/7] QOMify MIPS cpu
Posted by no-reply@patchew.org 8 years, 2 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20170830225225.27925-1-f4bug@amsat.org
Subject: [Qemu-devel] [PATCH v2 0/7] QOMify MIPS cpu
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/20170830225225.27925-1-f4bug@amsat.org -> patchew/20170830225225.27925-1-f4bug@amsat.org
 t [tag update]            patchew/cover.1504111803.git.jcody@redhat.com -> patchew/cover.1504111803.git.jcody@redhat.com
Switched to a new branch 'test'
2eba874055 mips: update mips_cpu_list() to use object_class_get_list()
c9170c27df mips: replace cpu_mips_init() with cpu_generic_init()
bd1c0e43a2 mips: MIPSCPU model subclasses
e77d1d74ea mips: call cpu_mips_realize_env() from mips_cpu_realizefn()
4f1073d8be mips: split cpu_mips_realize_env() out of cpu_mips_init()
22f783eb50 mips: introduce internal.h and cleanup cpu.h
f846c7bfc6 mips: move hw/mips/cputimer.c to target/mips/

=== OUTPUT BEGIN ===
Checking PATCH 1/7: mips: move hw/mips/cputimer.c to target/mips/...
Checking PATCH 2/7: mips: introduce internal.h and cleanup cpu.h...
ERROR: space prohibited after that '&' (ctx:WxW)
#727: FILE: target/mips/internal.h:230:
+    if ((env->CP0_VPControl >> CP0VPCtl_DIS) & 1) {
                                              ^

ERROR: space prohibited after that '&' (ctx:WxW)
#735: FILE: target/mips/internal.h:238:
+            ((other_cpu->env.CP0_VPControl >> CP0VPCtl_DIS) & 1)) {
                                                             ^

ERROR: space prohibited after that '&' (ctx:WxW)
#755: FILE: target/mips/internal.h:258:
+        env->hflags |= (env->CP0_Status >> CP0St_KSU) & MIPS_HFLAG_KSU;
                                                       ^

total: 3 errors, 0 warnings, 842 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 3/7: mips: split cpu_mips_realize_env() out of cpu_mips_init()...
Checking PATCH 4/7: mips: call cpu_mips_realize_env() from mips_cpu_realizefn()...
Checking PATCH 5/7: mips: MIPSCPU model subclasses...
Checking PATCH 6/7: mips: replace cpu_mips_init() with cpu_generic_init()...
Checking PATCH 7/7: mips: update mips_cpu_list() to use object_class_get_list()...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
Re: [Qemu-devel] [PATCH v2 0/7] QOMify MIPS cpu
Posted by Eduardo Habkost 8 years, 2 months ago
On Wed, Aug 30, 2017 at 07:52:18PM -0300, Philippe Mathieu-Daudé wrote:
> Hi,
> 
> This series is based on Igor's "complete cpu QOMification" [1] but only modify
> the MIPS part. Igor posted an updated series [2], both series should apply
> separately.
> 
> Igor suggested on IRC this series could enter via the Machine core tree, so
> I added Eduardo and Marcel.

I would do that only if the MIPS maintainers (CCed) aren't
willing to merge the series themselves.


> 
> Regards,
> 
> Phil.
> 
> [1]: http://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg04414.html
> [2]: http://lists.nongnu.org/archive/html/qemu-devel/2017-08/msg03364.html
> 
> v2: 
> - added Igor and James Tested-by
> - squashed "!fixup mips: now than MIPSCPU is QOMified, mark it abstract"
> 
> PS: code movement somehow triggers a "binary vs unary operators" confusion
>     in checkpatch: "ERROR: space prohibited after that '&' (ctx:WxW)"
> 
> Igor Mammedov (2):
>   mips: MIPSCPU model subclasses
>   mips: replace cpu_mips_init() with cpu_generic_init()
> 
> Philippe Mathieu-Daudé (5):
>   mips: move hw/mips/cputimer.c to target/mips/
>   mips: introduce internal.h and cleanup cpu.h
>   mips: split cpu_mips_realize_env() out of cpu_mips_init()
>   mips: call cpu_mips_realize_env() from mips_cpu_realizefn()
>   mips: update mips_cpu_list() to use object_class_get_list()
> 
>  target/mips/cpu-qom.h                         |   1 +
>  target/mips/cpu.h                             | 357 +---------------------
>  target/mips/internal.h                        | 422 ++++++++++++++++++++++++++
>  hw/mips/cps.c                                 |   2 +-
>  hw/mips/mips_fulong2e.c                       |   2 +-
>  hw/mips/mips_jazz.c                           |   2 +-
>  hw/mips/mips_malta.c                          |   2 +-
>  hw/mips/mips_mipssim.c                        |   2 +-
>  hw/mips/mips_r4k.c                            |   2 +-
>  hw/mips/cputimer.c => target/mips/cp0_timer.c |   2 +-
>  target/mips/cpu.c                             |  57 +++-
>  target/mips/gdbstub.c                         |   1 +
>  target/mips/helper.c                          |  47 +++
>  target/mips/kvm.c                             |   1 +
>  target/mips/machine.c                         |   1 +
>  target/mips/msa_helper.c                      |   1 +
>  target/mips/op_helper.c                       |   1 +
>  target/mips/translate.c                       |  23 +-
>  target/mips/translate_init.c                  |  68 +----
>  hw/mips/Makefile.objs                         |   2 +-
>  target/mips/Makefile.objs                     |   2 +-
>  21 files changed, 549 insertions(+), 449 deletions(-)
>  create mode 100644 target/mips/internal.h
>  rename hw/mips/cputimer.c => target/mips/cp0_timer.c (99%)
> 
> -- 
> 2.14.1
> 
> 

-- 
Eduardo

Re: [Qemu-devel] [PATCH v2 0/7] QOMify MIPS cpu
Posted by Philippe Mathieu-Daudé 8 years, 2 months ago
On 09/01/2017 12:18 PM, Eduardo Habkost wrote:
> On Wed, Aug 30, 2017 at 07:52:18PM -0300, Philippe Mathieu-Daudé wrote:
>> Hi,
>>
>> This series is based on Igor's "complete cpu QOMification" [1] but only modify
>> the MIPS part. Igor posted an updated series [2], both series should apply
>> separately.
>>
>> Igor suggested on IRC this series could enter via the Machine core tree, so
>> I added Eduardo and Marcel.
> 
> I would do that only if the MIPS maintainers (CCed) aren't
> willing to merge the series themselves.

Aurelien told me he looked at the series but isn't comfortable with 
reviewing QOM code. Anyway since all patches are reviewed/tested and 
this is MIPS only series it also makes sens to me this enters via their 
tree.

Eduardo can you Ack this series from the QOM part to help Aurelien?

Thanks,

Phil.

> 
>>
>> Regards,
>>
>> Phil.
>>
>> [1]: http://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg04414.html
>> [2]: http://lists.nongnu.org/archive/html/qemu-devel/2017-08/msg03364.html
>>
>> v2:
>> - added Igor and James Tested-by
>> - squashed "!fixup mips: now than MIPSCPU is QOMified, mark it abstract"
>>
>> PS: code movement somehow triggers a "binary vs unary operators" confusion
>>      in checkpatch: "ERROR: space prohibited after that '&' (ctx:WxW)"
>>
>> Igor Mammedov (2):
>>    mips: MIPSCPU model subclasses
>>    mips: replace cpu_mips_init() with cpu_generic_init()
>>
>> Philippe Mathieu-Daudé (5):
>>    mips: move hw/mips/cputimer.c to target/mips/
>>    mips: introduce internal.h and cleanup cpu.h
>>    mips: split cpu_mips_realize_env() out of cpu_mips_init()
>>    mips: call cpu_mips_realize_env() from mips_cpu_realizefn()
>>    mips: update mips_cpu_list() to use object_class_get_list()
>>
>>   target/mips/cpu-qom.h                         |   1 +
>>   target/mips/cpu.h                             | 357 +---------------------
>>   target/mips/internal.h                        | 422 ++++++++++++++++++++++++++
>>   hw/mips/cps.c                                 |   2 +-
>>   hw/mips/mips_fulong2e.c                       |   2 +-
>>   hw/mips/mips_jazz.c                           |   2 +-
>>   hw/mips/mips_malta.c                          |   2 +-
>>   hw/mips/mips_mipssim.c                        |   2 +-
>>   hw/mips/mips_r4k.c                            |   2 +-
>>   hw/mips/cputimer.c => target/mips/cp0_timer.c |   2 +-
>>   target/mips/cpu.c                             |  57 +++-
>>   target/mips/gdbstub.c                         |   1 +
>>   target/mips/helper.c                          |  47 +++
>>   target/mips/kvm.c                             |   1 +
>>   target/mips/machine.c                         |   1 +
>>   target/mips/msa_helper.c                      |   1 +
>>   target/mips/op_helper.c                       |   1 +
>>   target/mips/translate.c                       |  23 +-
>>   target/mips/translate_init.c                  |  68 +----
>>   hw/mips/Makefile.objs                         |   2 +-
>>   target/mips/Makefile.objs                     |   2 +-
>>   21 files changed, 549 insertions(+), 449 deletions(-)
>>   create mode 100644 target/mips/internal.h
>>   rename hw/mips/cputimer.c => target/mips/cp0_timer.c (99%)
>>
>> -- 
>> 2.14.1
>>
>>
> 

Re: [Qemu-devel] [PATCH v2 0/7] QOMify MIPS cpu
Posted by Eduardo Habkost 8 years, 2 months ago
On Fri, Sep 01, 2017 at 12:44:42PM -0300, Philippe Mathieu-Daudé wrote:
> On 09/01/2017 12:18 PM, Eduardo Habkost wrote:
> > On Wed, Aug 30, 2017 at 07:52:18PM -0300, Philippe Mathieu-Daudé wrote:
> > > Hi,
> > > 
> > > This series is based on Igor's "complete cpu QOMification" [1] but only modify
> > > the MIPS part. Igor posted an updated series [2], both series should apply
> > > separately.
> > > 
> > > Igor suggested on IRC this series could enter via the Machine core tree, so
> > > I added Eduardo and Marcel.
> > 
> > I would do that only if the MIPS maintainers (CCed) aren't
> > willing to merge the series themselves.
> 
> Aurelien told me he looked at the series but isn't comfortable with
> reviewing QOM code. Anyway since all patches are reviewed/tested and this is
> MIPS only series it also makes sens to me this enters via their tree.
> 
> Eduardo can you Ack this series from the QOM part to help Aurelien?

Absolutely:

Acked-by: Eduardo Habkost <ehabkost@redhat.com>

I will try to review the QOM code more closely and send
Reviewed-by lines too.

-- 
Eduardo

Re: [Qemu-devel] [PATCH v2 0/7] QOMify MIPS cpu
Posted by Philippe Mathieu-Daudé 8 years, 2 months ago
On 09/01/2017 12:48 PM, Eduardo Habkost wrote:
> On Fri, Sep 01, 2017 at 12:44:42PM -0300, Philippe Mathieu-Daudé wrote:
>> On 09/01/2017 12:18 PM, Eduardo Habkost wrote:
>>> On Wed, Aug 30, 2017 at 07:52:18PM -0300, Philippe Mathieu-Daudé wrote:
>>>> Hi,
>>>>
>>>> This series is based on Igor's "complete cpu QOMification" [1] but only modify
>>>> the MIPS part. Igor posted an updated series [2], both series should apply
>>>> separately.
>>>>
>>>> Igor suggested on IRC this series could enter via the Machine core tree, so
>>>> I added Eduardo and Marcel.
>>>
>>> I would do that only if the MIPS maintainers (CCed) aren't
>>> willing to merge the series themselves.
>>
>> Aurelien told me he looked at the series but isn't comfortable with
>> reviewing QOM code. Anyway since all patches are reviewed/tested and this is
>> MIPS only series it also makes sens to me this enters via their tree.
>>
>> Eduardo can you Ack this series from the QOM part to help Aurelien?
> 
> Absolutely:
> 
> Acked-by: Eduardo Habkost <ehabkost@redhat.com>
> 
> I will try to review the QOM code more closely and send
> Reviewed-by lines too.

Thank you!


Re: [Qemu-devel] [PATCH v2 0/7] QOMify MIPS cpu
Posted by Yongbok Kim 8 years, 2 months ago

On 01/09/2017 17:09, Philippe Mathieu-Daudé wrote:
> On 09/01/2017 12:48 PM, Eduardo Habkost wrote:
>> On Fri, Sep 01, 2017 at 12:44:42PM -0300, Philippe Mathieu-Daudé wrote:
>>> On 09/01/2017 12:18 PM, Eduardo Habkost wrote:
>>>> On Wed, Aug 30, 2017 at 07:52:18PM -0300, Philippe Mathieu-Daudé wrote:
>>>>> Hi,
>>>>>
>>>>> This series is based on Igor's "complete cpu QOMification" [1] but
>>>>> only modify
>>>>> the MIPS part. Igor posted an updated series [2], both series should
>>>>> apply
>>>>> separately.
>>>>>
>>>>> Igor suggested on IRC this series could enter via the Machine core
>>>>> tree, so
>>>>> I added Eduardo and Marcel.
>>>>
>>>> I would do that only if the MIPS maintainers (CCed) aren't
>>>> willing to merge the series themselves.
>>>
>>> Aurelien told me he looked at the series but isn't comfortable with
>>> reviewing QOM code. Anyway since all patches are reviewed/tested and
>>> this is
>>> MIPS only series it also makes sens to me this enters via their tree.
>>>
>>> Eduardo can you Ack this series from the QOM part to help Aurelien?
>>
>> Absolutely:
>>
>> Acked-by: Eduardo Habkost <ehabkost@redhat.com>
>>
>> I will try to review the QOM code more closely and send
>> Reviewed-by lines too.
> 
> Thank you!
> 

I can take the series too. Please carry on reviewing.

Regards,
Yongbok

Re: [Qemu-devel] [PATCH v2 0/7] QOMify MIPS cpu
Posted by Philippe Mathieu-Daudé 8 years, 1 month ago
Hi Eduardo,

>>>>> On Wed, Aug 30, 2017 at 07:52:18PM -0300, Philippe Mathieu-Daudé wrote:
>>>>>> Hi,
>>>>>>
>>>>>> This series is based on Igor's "complete cpu QOMification" [1] but
>>>>>> only modify
>>>>>> the MIPS part. Igor posted an updated series [2], both series should
>>>>>> apply
>>>>>> separately.
>>>>>>
>>>>>> Igor suggested on IRC this series could enter via the Machine core
>>>>>> tree, so
>>>>>> I added Eduardo and Marcel.
>>>>>
>>>>> I would do that only if the MIPS maintainers (CCed) aren't
>>>>> willing to merge the series themselves.
>>>>
>>>> Aurelien told me he looked at the series but isn't comfortable with
>>>> reviewing QOM code. Anyway since all patches are reviewed/tested and
>>>> this is
>>>> MIPS only series it also makes sens to me this enters via their tree.
>>>>
>>>> Eduardo can you Ack this series from the QOM part to help Aurelien?
>>>
>>> Absolutely:
>>>
>>> Acked-by: Eduardo Habkost <ehabkost@redhat.com>
>>>
>>> I will try to review the QOM code more closely and send
>>> Reviewed-by lines too.

This series with your Acked-by tag is available for you to review at:

   git://github.com/philmd/qemu.git tags/mips-qomify-20170910

Regards,

Phil.

>>
>> Thank you!
>>
> 
> I can take the series too. Please carry on reviewing.
> 
> Regards,
> Yongbok
> 

Re: [Qemu-devel] [PATCH v2 0/7] QOMify MIPS cpu
Posted by Philippe Mathieu-Daudé 8 years, 2 months ago
Cc'ing Xiaoqiang Zhao, I forgot to include him.

On 08/30/2017 07:52 PM, Philippe Mathieu-Daudé wrote:
> Hi,
> 
> This series is based on Igor's "complete cpu QOMification" [1] but only modify
> the MIPS part. Igor posted an updated series [2], both series should apply
> separately.
> 
> Igor suggested on IRC this series could enter via the Machine core tree, so
> I added Eduardo and Marcel.
> 
> Regards,
> 
> Phil.
> 
> [1]: http://lists.nongnu.org/archive/html/qemu-devel/2017-07/msg04414.html
> [2]: http://lists.nongnu.org/archive/html/qemu-devel/2017-08/msg03364.html
> 
> v2:
> - added Igor and James Tested-by
> - squashed "!fixup mips: now than MIPSCPU is QOMified, mark it abstract"
> 
> PS: code movement somehow triggers a "binary vs unary operators" confusion
>      in checkpatch: "ERROR: space prohibited after that '&' (ctx:WxW)"
> 
> Igor Mammedov (2):
>    mips: MIPSCPU model subclasses
>    mips: replace cpu_mips_init() with cpu_generic_init()
> 
> Philippe Mathieu-Daudé (5):
>    mips: move hw/mips/cputimer.c to target/mips/
>    mips: introduce internal.h and cleanup cpu.h
>    mips: split cpu_mips_realize_env() out of cpu_mips_init()
>    mips: call cpu_mips_realize_env() from mips_cpu_realizefn()
>    mips: update mips_cpu_list() to use object_class_get_list()
> 
>   target/mips/cpu-qom.h                         |   1 +
>   target/mips/cpu.h                             | 357 +---------------------
>   target/mips/internal.h                        | 422 ++++++++++++++++++++++++++
>   hw/mips/cps.c                                 |   2 +-
>   hw/mips/mips_fulong2e.c                       |   2 +-
>   hw/mips/mips_jazz.c                           |   2 +-
>   hw/mips/mips_malta.c                          |   2 +-
>   hw/mips/mips_mipssim.c                        |   2 +-
>   hw/mips/mips_r4k.c                            |   2 +-
>   hw/mips/cputimer.c => target/mips/cp0_timer.c |   2 +-
>   target/mips/cpu.c                             |  57 +++-
>   target/mips/gdbstub.c                         |   1 +
>   target/mips/helper.c                          |  47 +++
>   target/mips/kvm.c                             |   1 +
>   target/mips/machine.c                         |   1 +
>   target/mips/msa_helper.c                      |   1 +
>   target/mips/op_helper.c                       |   1 +
>   target/mips/translate.c                       |  23 +-
>   target/mips/translate_init.c                  |  68 +----
>   hw/mips/Makefile.objs                         |   2 +-
>   target/mips/Makefile.objs                     |   2 +-
>   21 files changed, 549 insertions(+), 449 deletions(-)
>   create mode 100644 target/mips/internal.h
>   rename hw/mips/cputimer.c => target/mips/cp0_timer.c (99%)
>