From patchwork Wed Apr 17 02:59:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 1086773 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44kRnP6kJdz9s4Y for ; Wed, 17 Apr 2019 13:00:41 +1000 (AEST) Received: from localhost ([127.0.0.1]:45878 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hGaoR-0002kJ-DN for incoming@patchwork.ozlabs.org; Tue, 16 Apr 2019 23:00:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hGanf-0002k4-Ir for qemu-devel@nongnu.org; Tue, 16 Apr 2019 22:59:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hGane-0007hh-N0 for qemu-devel@nongnu.org; Tue, 16 Apr 2019 22:59:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34950) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hGane-0007h1-F7; Tue, 16 Apr 2019 22:59:50 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B70EE36961; Wed, 17 Apr 2019 02:59:48 +0000 (UTC) Received: from localhost (ovpn-116-9.gru2.redhat.com [10.97.116.9]) by smtp.corp.redhat.com (Postfix) with ESMTP id BEE0D1001E65; Wed, 17 Apr 2019 02:59:46 +0000 (UTC) From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Tue, 16 Apr 2019 23:59:39 -0300 Message-Id: <20190417025944.16154-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 17 Apr 2019 02:59:49 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 0/5] Remove qdev_get_machine() call from ppc_cpu_parse_featurestr() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Thomas Huth , Eduardo Habkost , Like Xu , Riku Voipio , Mark Cave-Ayland , Laurent Vivier , Markus Armbruster , qemu-ppc@nongnu.org, Igor Mammedov , Paolo Bonzini , David Gibson , Artyom Tarasenko , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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(-) Reviewed-by: Markus Armbruster