[Qemu-devel] [PATCH 0/5] Remove qdev_get_machine() call from ppc_cpu_parse_featurestr()

Eduardo Habkost posted 5 patches 5 years ago
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test checkpatch passed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190417025944.16154-1-ehabkost@redhat.com
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Laurent Vivier <laurent@vivier.eu>, Artyom Tarasenko <atar4qemu@gmail.com>, Richard Henderson <rth@twiddle.net>, Riku Voipio <riku.voipio@iki.fi>, David Gibson <david@gibson.dropbear.id.au>, Paolo Bonzini <pbonzini@redhat.com>
include/qom/cpu.h               | 18 ++++++++++++++----
target/ppc/cpu-qom.h            |  3 ++-
bsd-user/main.c                 |  4 +++-
exec.c                          | 28 +++++++++++++++-------------
linux-user/main.c               |  4 +++-
qom/cpu.c                       |  3 ++-
target/i386/cpu.c               |  3 ++-
target/ppc/translate_init.inc.c |  7 ++++---
target/sparc/cpu.c              |  3 ++-
vl.c                            | 19 ++++++++++---------
10 files changed, 57 insertions(+), 35 deletions(-)
[Qemu-devel] [PATCH 0/5] Remove qdev_get_machine() call from ppc_cpu_parse_featurestr()
Posted by Eduardo Habkost 5 years ago
My initial goal was simple: removing the qdev_get_machine() call
from ppc_cpu_parse_featurestr() because I want to make
qdev_get_machine() available only to softmmu code.

Before doing this, I had to make *-user not call
CPUClass::parse_features() anymore (it was pointless to call it,
anyway).

While doing this, I decided to rename parse_cpu_model() to
something clearer (parse_cpu_option()).

As a nice side effect, now the dependency between machine object
creation and parse_cpu_option() is not hidden anymore.

Eduardo Habkost (5):
  cpu: Rename parse_cpu_model() to parse_cpu_option()
  cpu: Extract CPU class lookup from parse_cpu_option()
  linux-user: Use lookup_cpu_class()
  bsd-user: Use lookup_cpu_class()
  cpu: Add MachineState parameter to parse_features()

 include/qom/cpu.h               | 18 ++++++++++++++----
 target/ppc/cpu-qom.h            |  3 ++-
 bsd-user/main.c                 |  4 +++-
 exec.c                          | 28 +++++++++++++++-------------
 linux-user/main.c               |  4 +++-
 qom/cpu.c                       |  3 ++-
 target/i386/cpu.c               |  3 ++-
 target/ppc/translate_init.inc.c |  7 ++++---
 target/sparc/cpu.c              |  3 ++-
 vl.c                            | 19 ++++++++++---------
 10 files changed, 57 insertions(+), 35 deletions(-)

-- 
2.18.0.rc1.1.g3f1ff2140


Re: [Qemu-devel] [PATCH 0/5] Remove qdev_get_machine() call from ppc_cpu_parse_featurestr()
Posted by Markus Armbruster 5 years ago
Eduardo Habkost <ehabkost@redhat.com> writes:

> My initial goal was simple: removing the qdev_get_machine() call
> from ppc_cpu_parse_featurestr() because I want to make
> qdev_get_machine() available only to softmmu code.
>
> Before doing this, I had to make *-user not call
> CPUClass::parse_features() anymore (it was pointless to call it,
> anyway).
>
> While doing this, I decided to rename parse_cpu_model() to
> something clearer (parse_cpu_option()).
>
> As a nice side effect, now the dependency between machine object
> creation and parse_cpu_option() is not hidden anymore.

Series
Reviewed-by: Markus Armbruster <armbru@redhat.com>

Re: [Qemu-devel] [PATCH 0/5] Remove qdev_get_machine() call from ppc_cpu_parse_featurestr()
Posted by Eduardo Habkost 5 years ago
On Wed, Apr 17, 2019 at 07:45:24AM +0200, Markus Armbruster wrote:
> Eduardo Habkost <ehabkost@redhat.com> writes:
> 
> > My initial goal was simple: removing the qdev_get_machine() call
> > from ppc_cpu_parse_featurestr() because I want to make
> > qdev_get_machine() available only to softmmu code.
> >
> > Before doing this, I had to make *-user not call
> > CPUClass::parse_features() anymore (it was pointless to call it,
> > anyway).
> >
> > While doing this, I decided to rename parse_cpu_model() to
> > something clearer (parse_cpu_option()).
> >
> > As a nice side effect, now the dependency between machine object
> > creation and parse_cpu_option() is not hidden anymore.
> 
> Series
> Reviewed-by: Markus Armbruster <armbru@redhat.com>

Thanks.  I'm queueing this even though I agree with the comments
at patch 2/5, because I'm already planning to send a separate
cleanup series for cpu_class_by_name() and other related code.

-- 
Eduardo