From patchwork Tue Jan 21 11:03:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11343553 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 94EAC924 for ; Tue, 21 Jan 2020 11:06:17 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B53120882 for ; Tue, 21 Jan 2020 11:06:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AbyyGOv/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B53120882 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrMO-00056J-5Q for patchwork-qemu-devel@patchwork.kernel.org; Tue, 21 Jan 2020 06:06:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40260) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrKZ-0002iP-Op for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:04:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itrKW-0002H4-80 for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:04:23 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:52777 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1itrKW-0002GO-3s for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:04:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579604659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M9YLZWFuUPGqf31v4qZl1Pp9bDL94NV9XAqJHkBYaeI=; b=AbyyGOv/hSPjJphB9/XKPAa6XxYP68qoqlNnRjpgKVGs2Fbq0iGi9axaRzdksR7rypfZgg xHdhc+iaXPoAqQPs/4ajTEvh8ffolPyZuhrCu+DPdT2LTFvTVgFtSkYH+Xd9MRQkZcfSpW eVdcFOAKGU0u61f3FWiAznyCyY46uOE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-197-LMl9Q4MAPJu1MdrGURLk5g-1; Tue, 21 Jan 2020 06:04:12 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0497E107ACC7; Tue, 21 Jan 2020 11:04:11 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-38.brq.redhat.com [10.40.205.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1EC2583860; Tue, 21 Jan 2020 11:04:04 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 01/10] hw/ppc/spapr_rtas: Use local MachineState variable Date: Tue, 21 Jan 2020 12:03:40 +0100 Message-Id: <20200121110349.25842-2-philmd@redhat.com> In-Reply-To: <20200121110349.25842-1-philmd@redhat.com> References: <20200121110349.25842-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: LMl9Q4MAPJu1MdrGURLk5g-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Cornelia Huck , Eduardo Habkost , Like Xu , David Hildenbrand , Marcelo Tosatti , Markus Armbruster , Greg Kurz , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Since we have the MachineState already available locally, use it instead of the global current_machine. Reviewed-by: Greg Kurz Acked-by: David Gibson Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/spapr_rtas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index 8d8d8cdfcb..e88bb1930e 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -281,7 +281,7 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu, "DesProcs=%d," "MaxPlatProcs=%d", max_cpus, - current_machine->ram_size / MiB, + ms->ram_size / MiB, ms->smp.cpus, max_cpus); if (pcc->n_host_threads > 0) { From patchwork Tue Jan 21 11:03:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11343555 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A4419109A for ; Tue, 21 Jan 2020 11:06:22 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7A9C524125 for ; Tue, 21 Jan 2020 11:06:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="jWYEql/l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A9C524125 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrMT-0005DI-5q for patchwork-qemu-devel@patchwork.kernel.org; Tue, 21 Jan 2020 06:06:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40302) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrKg-0002rm-Ro for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:04:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itrKd-0002Mn-A4 for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:04:30 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:59873 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1itrKd-0002ML-4A for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:04:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579604666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ugM9iIFSDeSVcz1r2AmzyjCdAlqSyh7orSAZpE2fwRQ=; b=jWYEql/l1UrYdHo7j+WZrhTbhtMO+3g+Kj1iSSMCVlIGKvttJrXGDPVpXe8Ahmnh12rab1 dPurqVLPODa5k9fBj41yalcFS9MOK2JCwsux3iOHNNIdsgj2nhl6pbiLYGU8RpP4Fli13e qjgcBrO2PVVnkWXACj6Pz74m0bBjyAM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-106-03CrOVL0Nxaaees-369O2Q-1; Tue, 21 Jan 2020 06:04:25 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E55848010DE; Tue, 21 Jan 2020 11:04:23 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-38.brq.redhat.com [10.40.205.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 916F483860; Tue, 21 Jan 2020 11:04:11 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 02/10] hw/ppc/spapr_rtas: Access MachineState via SpaprMachineState argument Date: Tue, 21 Jan 2020 12:03:41 +0100 Message-Id: <20200121110349.25842-3-philmd@redhat.com> In-Reply-To: <20200121110349.25842-1-philmd@redhat.com> References: <20200121110349.25842-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: 03CrOVL0Nxaaees-369O2Q-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Cornelia Huck , Eduardo Habkost , Like Xu , David Hildenbrand , Marcelo Tosatti , Markus Armbruster , Greg Kurz , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" We received a SpaprMachineState argument. Since SpaprMachineState inherits of MachineState, use it instead of calling qdev_get_machine. Reviewed-by: Greg Kurz Acked-by: David Gibson Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/spapr_rtas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index e88bb1930e..6f06e9d7fe 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -267,7 +267,7 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu, uint32_t nret, target_ulong rets) { PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu); - MachineState *ms = MACHINE(qdev_get_machine()); + MachineState *ms = MACHINE(spapr); unsigned int max_cpus = ms->smp.max_cpus; target_ulong parameter = rtas_ld(args, 0); target_ulong buffer = rtas_ld(args, 1); From patchwork Tue Jan 21 11:03:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11343559 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 48CA9109A for ; Tue, 21 Jan 2020 11:08:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F4022253D for ; Tue, 21 Jan 2020 11:08:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hDx8lR0t" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F4022253D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrOq-0000PM-Mb for patchwork-qemu-devel@patchwork.kernel.org; Tue, 21 Jan 2020 06:08:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40349) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrKt-00038c-0w for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:04:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itrKp-0002T4-6k for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:04:42 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:38267 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1itrKp-0002Sa-2s for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:04:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579604678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2FdyuOddDgduFYXe6Y137A4VQhs5udzN82HFgwEGmO0=; b=hDx8lR0tRpO94giY/ESCypACsFA2LQV3MT1p27Upk3eD5OToqrzihFNYAsAYiF0BAHVMCm uYuNnTT4DN3xt2nQcIxezYclTJwnxUaFIeiYDuZqdo9EhpE2rGzlWDOT8A/Mto2yOGYxKL WB9+DgIi/UQH+xYCOoTaXIdrHZYuEnI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-165-uWSQThgZPmChLebSa4X5wg-1; Tue, 21 Jan 2020 06:04:37 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BBD1B800D41; Tue, 21 Jan 2020 11:04:34 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-38.brq.redhat.com [10.40.205.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 92039811F8; Tue, 21 Jan 2020 11:04:24 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 03/10] hw/ppc/spapr_rtas: Remove local variable Date: Tue, 21 Jan 2020 12:03:42 +0100 Message-Id: <20200121110349.25842-4-philmd@redhat.com> In-Reply-To: <20200121110349.25842-1-philmd@redhat.com> References: <20200121110349.25842-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: uWSQThgZPmChLebSa4X5wg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Cornelia Huck , Eduardo Habkost , Like Xu , David Hildenbrand , Marcelo Tosatti , Markus Armbruster , Greg Kurz , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" We only access this variable in the RTAS_SYSPARM_SPLPAR_CHARACTERISTICS case. Use it in place and remove the local declaration. Suggested-by: Greg Kurz Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson --- v2: Do not reduce MachineState variable scope (David Gibson) --- hw/ppc/spapr_rtas.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index 6f06e9d7fe..85135e0e1a 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -268,7 +268,6 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu, { PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu); MachineState *ms = MACHINE(spapr); - unsigned int max_cpus = ms->smp.max_cpus; target_ulong parameter = rtas_ld(args, 0); target_ulong buffer = rtas_ld(args, 1); target_ulong length = rtas_ld(args, 2); @@ -280,10 +279,10 @@ static void rtas_ibm_get_system_parameter(PowerPCCPU *cpu, "DesMem=%" PRIu64 "," "DesProcs=%d," "MaxPlatProcs=%d", - max_cpus, + ms->smp.max_cpus, ms->ram_size / MiB, ms->smp.cpus, - max_cpus); + ms->smp.max_cpus); if (pcc->n_host_threads > 0) { char *hostthr_val, *old = param_val; From patchwork Tue Jan 21 11:03:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11343557 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 05143109A for ; Tue, 21 Jan 2020 11:07:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CFB5C2253D for ; Tue, 21 Jan 2020 11:07:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="aGU4WD54" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFB5C2253D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrN6-0006AB-JV for patchwork-qemu-devel@patchwork.kernel.org; Tue, 21 Jan 2020 06:07:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40406) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrL0-0003IP-Ea for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:04:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itrKz-0002YF-6n for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:04:50 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:31188 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1itrKz-0002Xk-3M for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:04:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579604688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YNlVqBRJIlR7/zXL37e3Z5FlDIKU7U2XhzOak3irN/g=; b=aGU4WD54Km/tTKhOTjvCncg9EuO0pCmV7+yTQ7hqmkNI67ZKjOyN7NDWblkPMW/A6wXpTK fGvrJDkgSLoEndGXZHEyWJEu2+fwyaR6MwrCssegvnwMcLZA96OYebEcnGVpC/mA3h4eIm V50vWHplxzMAsyGdzRC0Lwoe41Fa2bc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-329-bfzwLpcAO7mKKSD-CO1Xng-1; Tue, 21 Jan 2020 06:04:47 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C9B9118A6EC1; Tue, 21 Jan 2020 11:04:45 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-38.brq.redhat.com [10.40.205.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 66ADA85726; Tue, 21 Jan 2020 11:04:35 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 04/10] target/arm/kvm: Use CPUState::kvm_state in kvm_arm_pmu_supported() Date: Tue, 21 Jan 2020 12:03:43 +0100 Message-Id: <20200121110349.25842-5-philmd@redhat.com> In-Reply-To: <20200121110349.25842-1-philmd@redhat.com> References: <20200121110349.25842-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: bfzwLpcAO7mKKSD-CO1Xng-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Alistair Francis , Cornelia Huck , Eduardo Habkost , Like Xu , David Hildenbrand , Marcelo Tosatti , Markus Armbruster , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" KVMState is already accessible via CPUState::kvm_state, use it. Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/arm/kvm.c b/target/arm/kvm.c index b87b59a02a..8d82889150 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -181,9 +181,7 @@ void kvm_arm_set_cpu_features_from_host(ARMCPU *cpu) bool kvm_arm_pmu_supported(CPUState *cpu) { - KVMState *s = KVM_STATE(current_machine->accelerator); - - return kvm_check_extension(s, KVM_CAP_ARM_PMU_V3); + return kvm_check_extension(cpu->kvm_state, KVM_CAP_ARM_PMU_V3); } int kvm_arm_get_max_vm_ipa_size(MachineState *ms) From patchwork Tue Jan 21 11:03:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11343565 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AC5B0109A for ; Tue, 21 Jan 2020 11:10:05 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 82A3524125 for ; Tue, 21 Jan 2020 11:10:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="G+LJDLSN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 82A3524125 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrQ4-0002LL-0Q for patchwork-qemu-devel@patchwork.kernel.org; Tue, 21 Jan 2020 06:10:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40476) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrLA-0003Wd-4W for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itrL6-0002bY-Gm for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:00 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:41104 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1itrL6-0002bG-Cj for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:04:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579604696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ea1a/sRDFxUcqC42bdgwDPTcMkjiHzUbs2lKdEFCTMo=; b=G+LJDLSNRLj7ZROSq7MttakiRrldUXmybCFa9lO7pQBSMIOsCWO+TtYdz/99FpOxStHAus TmnA8k3gOFvyjRR/JcnYWzXO6GiP31CABuWmxeCwVNS8xfTcEh2MbR4ipHWwlW6OtVoTtL QOUpFo1y60VazqfHcTr/nZ0vqs54jlc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-27-0FJY1TuUOrOL2stsHOrGTw-1; Tue, 21 Jan 2020 06:04:54 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2F968DBA5; Tue, 21 Jan 2020 11:04:53 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-38.brq.redhat.com [10.40.205.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 96C1C811F8; Tue, 21 Jan 2020 11:04:46 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 05/10] target/s390x: Remove duplicated ifdef macro Date: Tue, 21 Jan 2020 12:03:44 +0100 Message-Id: <20200121110349.25842-6-philmd@redhat.com> In-Reply-To: <20200121110349.25842-1-philmd@redhat.com> References: <20200121110349.25842-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: 0FJY1TuUOrOL2stsHOrGTw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Cornelia Huck , Eduardo Habkost , Like Xu , David Hildenbrand , Marcelo Tosatti , Markus Armbruster , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Commit ae71ed8610 replaced the use of global max_cpus variable with a machine property, but introduced a unnecessary ifdef, as this block is already in the 'not CONFIG_USER_ONLY' branch part: 86 #if defined(CONFIG_USER_ONLY) 87 ... 106 #else /* !CONFIG_USER_ONLY */ 107 ... 292 static void do_ext_interrupt(CPUS390XState *env) 293 { ... 313 #ifndef CONFIG_USER_ONLY 314 MachineState *ms = MACHINE(qdev_get_machine()); 315 unsigned int max_cpus = ms->smp.max_cpus; 316 #endif To ease code review, remove the duplicated preprocessor macro, and move the declarations at the beginning of the statement. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck --- v2: New patch Cc: Like Xu --- target/s390x/excp_helper.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/s390x/excp_helper.c b/target/s390x/excp_helper.c index e70c20d363..1e9d6f20c1 100644 --- a/target/s390x/excp_helper.c +++ b/target/s390x/excp_helper.c @@ -305,15 +305,14 @@ static void do_ext_interrupt(CPUS390XState *env) if ((env->pending_int & INTERRUPT_EMERGENCY_SIGNAL) && (env->cregs[0] & CR0_EMERGENCY_SIGNAL_SC)) { + MachineState *ms = MACHINE(qdev_get_machine()); + unsigned int max_cpus = ms->smp.max_cpus; + lowcore->ext_int_code = cpu_to_be16(EXT_EMERGENCY); cpu_addr = find_first_bit(env->emergency_signals, S390_MAX_CPUS); g_assert(cpu_addr < S390_MAX_CPUS); lowcore->cpu_addr = cpu_to_be16(cpu_addr); clear_bit(cpu_addr, env->emergency_signals); -#ifndef CONFIG_USER_ONLY - MachineState *ms = MACHINE(qdev_get_machine()); - unsigned int max_cpus = ms->smp.max_cpus; -#endif if (bitmap_empty(env->emergency_signals, max_cpus)) { env->pending_int &= ~INTERRUPT_EMERGENCY_SIGNAL; } From patchwork Tue Jan 21 11:03:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11343569 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03ACB92A for ; Tue, 21 Jan 2020 11:12:57 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE25E2253D for ; Tue, 21 Jan 2020 11:12:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PQNiJGg5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE25E2253D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrSp-00066M-Qk for patchwork-qemu-devel@patchwork.kernel.org; Tue, 21 Jan 2020 06:12:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40520) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrLJ-0003hh-Jc for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itrLE-0002fN-Ut for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:09 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:20570 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1itrLE-0002ev-Rm for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579604704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CleyiTyFzeU7YFGR9t8XlXBZmAxEriIlOMwBzucwkpQ=; b=PQNiJGg56cBkEdlMbT0/TTxIEFLYVPPfH7LLrc6jwIX/W5wRc1odh2xQyy27Q7fZ7p9dOZ GHW5xZ9h+t7N518HxKitLYHWJCfM107skk/p3Yxj8IGhaH6jPIF5RVwZnUgyOFOWqiAcWP OQVvwSpdHSCylTLIsDySH5KYBrMsst0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-377-EdVqMcpMOy2sK8ntRqZvkQ-1; Tue, 21 Jan 2020 06:05:03 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 63E5B18A6EC1; Tue, 21 Jan 2020 11:05:01 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-38.brq.redhat.com [10.40.205.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A48C811F8; Tue, 21 Jan 2020 11:04:53 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 06/10] qom/object: Display more helpful message when a parent is missing Date: Tue, 21 Jan 2020 12:03:45 +0100 Message-Id: <20200121110349.25842-7-philmd@redhat.com> In-Reply-To: <20200121110349.25842-1-philmd@redhat.com> References: <20200121110349.25842-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: EdVqMcpMOy2sK8ntRqZvkQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Cornelia Huck , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Like Xu , David Hildenbrand , Marcelo Tosatti , Markus Armbruster , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" QEMU object model is scarse in documentation. Some calls are recursive, and it might be hard to figure out even trivial issues. We can avoid developers to waste time in a debugging session by displaying a simple error message. This commit is also similar to e02bdf1cecd2 ("Display more helpful message when an object type is missing"). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck --- v2: New patch --- qom/object.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qom/object.c b/qom/object.c index 0d971ca897..bc13a55094 100644 --- a/qom/object.c +++ b/qom/object.c @@ -173,7 +173,11 @@ static TypeImpl *type_get_parent(TypeImpl *type) { if (!type->parent_type && type->parent) { type->parent_type = type_get_by_name(type->parent); - g_assert(type->parent_type != NULL); + if (!type->parent_type) { + fprintf(stderr, "Object '%s' missing its parent '%s'\n", + type->name, type->parent); + abort(); + } } return type->parent_type; From patchwork Tue Jan 21 11:03:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11343561 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C044924 for ; Tue, 21 Jan 2020 11:08:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62CC02253D for ; Tue, 21 Jan 2020 11:08:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="G6QQpNHP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62CC02253D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrOr-0000S5-UC for patchwork-qemu-devel@patchwork.kernel.org; Tue, 21 Jan 2020 06:08:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40588) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrLa-0003xt-Ie for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itrLV-0002rx-Td for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:26 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:27184 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1itrLU-0002nR-GM for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579604716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=szvLNNLQdSyRCXMP/WlwlQ7xqfZ8pJdJ2R1hbRxN9kc=; b=G6QQpNHPGkwXNL2SKZ3d0qZgxnCBXUpMA5NJJVCg3NZgXDcsL3zOO2vYVkdLiyZiwvHXoM 3MAI+gbQvSFWc3OqWGk8O68h/wQtJlY4hgqKh4a4q6nC6M+BWCQMfuoyiYVN+aEn+FrV63 AuPvBBvPj/IHOH1nTQa2Hv9PPtkSuHI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-364-DZCZJ4sFPIuNo7RuHdQnlQ-1; Tue, 21 Jan 2020 06:05:15 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7878B8010D8; Tue, 21 Jan 2020 11:05:13 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-38.brq.redhat.com [10.40.205.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2C0D285733; Tue, 21 Jan 2020 11:05:01 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 07/10] qdev: Abort if the root machine container is missing Date: Tue, 21 Jan 2020 12:03:46 +0100 Message-Id: <20200121110349.25842-8-philmd@redhat.com> In-Reply-To: <20200121110349.25842-1-philmd@redhat.com> References: <20200121110349.25842-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: DZCZJ4sFPIuNo7RuHdQnlQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Cornelia Huck , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Like Xu , David Hildenbrand , Marcelo Tosatti , Markus Armbruster , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The QEMU device API (qdev) relies on having the '/machine' container always available. If it is missing, QEMU will later crash dereferencing a NULL pointer, we will get a SEGV, open a debugger, look at the backtrace, and figure out we messed with QOM. Or we can use g_assert() which abort, displaying the filename and line number, so we can quickly open our favorite IDE. Prefer the later, to save time to developers. Signed-off-by: Philippe Mathieu-Daudé --- v2: New patch --- hw/core/qdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 58e87d336d..d30cf6320b 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -1143,6 +1143,7 @@ Object *qdev_get_machine(void) if (dev == NULL) { dev = container_get(object_get_root(), "/machine"); + g_assert(dev != NULL); } return dev; From patchwork Tue Jan 21 11:03:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11343563 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E175109A for ; Tue, 21 Jan 2020 11:09:13 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 643EB2253D for ; Tue, 21 Jan 2020 11:09:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SvYTNB+x" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 643EB2253D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrPE-00010k-Cn for patchwork-qemu-devel@patchwork.kernel.org; Tue, 21 Jan 2020 06:09:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40635) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrLe-00044N-KM for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itrLa-0002vK-0l for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:30 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:55445 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1itrLZ-0002v1-SL for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579604725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xXEz7PhStQkERVMKiqaV7Qb0h7hoBdcqu+yYcMWd3AI=; b=SvYTNB+xFc3bY8irYanOOqqf93prNKz4Cb+71gaEpOk/wqZxYCbnJn6/1yDkfU3+A91fTk ygg83djv5WvuWVtGZeQZkWKtGYNJcjaKNcIxbebn/FEDgUKuvs96XhrPZzJ3oYNqvQGPbJ BS+ckoPLydyabcQL+Yn0VfE+8MlwfFM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-94-_7zYfEwQPzuFedrPlu-uRQ-1; Tue, 21 Jan 2020 06:05:23 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8D131107ACC4; Tue, 21 Jan 2020 11:05:21 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-38.brq.redhat.com [10.40.205.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0FF2E811F8; Tue, 21 Jan 2020 11:05:13 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 08/10] accel: Introduce the current_accel() wrapper Date: Tue, 21 Jan 2020 12:03:47 +0100 Message-Id: <20200121110349.25842-9-philmd@redhat.com> In-Reply-To: <20200121110349.25842-1-philmd@redhat.com> References: <20200121110349.25842-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: _7zYfEwQPzuFedrPlu-uRQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Alistair Francis , Cornelia Huck , Eduardo Habkost , Like Xu , David Hildenbrand , Marcelo Tosatti , Markus Armbruster , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The accel/ code only access the MachineState::accel field. As we simply want to access the accelerator, not the machine, add a current_accel() wrapper. Suggested-by: Paolo Bonzini Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck --- v2: Reworded description using 'wrapper' --- include/sysemu/accel.h | 2 ++ accel/accel.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/include/sysemu/accel.h b/include/sysemu/accel.h index d4c1429711..47e5788530 100644 --- a/include/sysemu/accel.h +++ b/include/sysemu/accel.h @@ -70,4 +70,6 @@ int accel_init_machine(AccelState *accel, MachineState *ms); /* Called just before os_setup_post (ie just before drop OS privs) */ void accel_setup_post(MachineState *ms); +AccelState *current_accel(void); + #endif diff --git a/accel/accel.c b/accel/accel.c index 1c5c3a6abb..cb555e3b06 100644 --- a/accel/accel.c +++ b/accel/accel.c @@ -63,6 +63,11 @@ int accel_init_machine(AccelState *accel, MachineState *ms) return ret; } +AccelState *current_accel(void) +{ + return current_machine->accelerator; +} + void accel_setup_post(MachineState *ms) { AccelState *accel = ms->accelerator; From patchwork Tue Jan 21 11:03:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11343567 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B2B4F92A for ; Tue, 21 Jan 2020 11:11:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 88FEC24125 for ; Tue, 21 Jan 2020 11:11:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="i0oIASQj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 88FEC24125 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrRm-0004dB-32 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 21 Jan 2020 06:11:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40683) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrLk-0004DF-9Z for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itrLf-0002yG-MC for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:36 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:29201 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1itrLf-0002xm-I3 for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579604731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iNuoGr5oPJiuWEZoZePQ9BsL70DcUB2WguHzKK55cpE=; b=i0oIASQjfC6SBaFXZjprEgIgMac0ULh3WqCuwtSVQRYkPUq+B19KLe8Qp9LTDizcZTK1dq 0AJLDanTkQ8HxJjD4xB4JG9CgJrfjkDTVFBBGfgp3EU9dXrw+m5bd9TH1SApnfTrVHBkGD tMsCO68DyKzJAVa4+KdaAnYZFOWXr6s= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-254-JQqfRcGaOUKmLMIdFS6tiQ-1; Tue, 21 Jan 2020 06:05:29 -0500 X-MC-Unique: JQqfRcGaOUKmLMIdFS6tiQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 363F6DBA3; Tue, 21 Jan 2020 11:05:28 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-38.brq.redhat.com [10.40.205.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 13C98811F8; Tue, 21 Jan 2020 11:05:21 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 09/10] accel: Replace current_machine->accelerator by current_accel() wrapper Date: Tue, 21 Jan 2020 12:03:48 +0100 Message-Id: <20200121110349.25842-10-philmd@redhat.com> In-Reply-To: <20200121110349.25842-1-philmd@redhat.com> References: <20200121110349.25842-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Alistair Francis , Cornelia Huck , Eduardo Habkost , Like Xu , David Hildenbrand , Marcelo Tosatti , Markus Armbruster , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, "open list:Overall KVM CPUs" , Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" We actually want to access the accelerator, not the machine, so use the current_accel() wrapper instead. Suggested-by: Paolo Bonzini Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson --- v2: - Reworded description - Remove unused include in arm/kvm64 --- accel/kvm/kvm-all.c | 4 ++-- accel/tcg/tcg-all.c | 2 +- memory.c | 2 +- target/arm/kvm64.c | 5 ++--- target/i386/kvm.c | 2 +- target/ppc/kvm.c | 2 +- vl.c | 2 +- 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 1ada2f4ecb..c111312dfd 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -164,7 +164,7 @@ static NotifierList kvm_irqchip_change_notifiers = int kvm_get_max_memslots(void) { - KVMState *s = KVM_STATE(current_machine->accelerator); + KVMState *s = KVM_STATE(current_accel()); return s->nr_slots; } @@ -1848,7 +1848,7 @@ static int kvm_max_vcpu_id(KVMState *s) bool kvm_vcpu_id_is_valid(int vcpu_id) { - KVMState *s = KVM_STATE(current_machine->accelerator); + KVMState *s = KVM_STATE(current_accel()); return vcpu_id >= 0 && vcpu_id < kvm_max_vcpu_id(s); } diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index 1dc384c8d2..1802ce02f6 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -124,7 +124,7 @@ static void tcg_accel_instance_init(Object *obj) static int tcg_init(MachineState *ms) { - TCGState *s = TCG_STATE(current_machine->accelerator); + TCGState *s = TCG_STATE(current_accel()); tcg_exec_init(s->tb_size * 1024 * 1024); cpu_interrupt_handler = tcg_handle_interrupt; diff --git a/memory.c b/memory.c index d7b9bb6951..854798791e 100644 --- a/memory.c +++ b/memory.c @@ -3104,7 +3104,7 @@ void mtree_info(bool flatview, bool dispatch_tree, bool owner) }; GArray *fv_address_spaces; GHashTable *views = g_hash_table_new(g_direct_hash, g_direct_equal); - AccelClass *ac = ACCEL_GET_CLASS(current_machine->accelerator); + AccelClass *ac = ACCEL_GET_CLASS(current_accel()); if (ac->has_memory) { fvi.ac = ac; diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index 876184b8fe..e3c580e749 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -26,7 +26,6 @@ #include "sysemu/kvm.h" #include "sysemu/kvm_int.h" #include "kvm_arm.h" -#include "hw/boards.h" #include "internals.h" static bool have_guest_debug; @@ -613,14 +612,14 @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) bool kvm_arm_aarch32_supported(CPUState *cpu) { - KVMState *s = KVM_STATE(current_machine->accelerator); + KVMState *s = KVM_STATE(current_accel()); return kvm_check_extension(s, KVM_CAP_ARM_EL1_32BIT); } bool kvm_arm_sve_supported(CPUState *cpu) { - KVMState *s = KVM_STATE(current_machine->accelerator); + KVMState *s = KVM_STATE(current_accel()); return kvm_check_extension(s, KVM_CAP_ARM_SVE); } diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 7ee3202634..eddb930065 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -147,7 +147,7 @@ bool kvm_allows_irq0_override(void) static bool kvm_x2apic_api_set_flags(uint64_t flags) { - KVMState *s = KVM_STATE(current_machine->accelerator); + KVMState *s = KVM_STATE(current_accel()); return !kvm_vm_enable_cap(s, KVM_CAP_X2APIC_API, 0, flags); } diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index b5799e62b4..45ede6b6d9 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -258,7 +258,7 @@ static void kvm_get_smmu_info(struct kvm_ppc_smmu_info *info, Error **errp) struct ppc_radix_page_info *kvm_get_radix_page_info(void) { - KVMState *s = KVM_STATE(current_machine->accelerator); + KVMState *s = KVM_STATE(current_accel()); struct ppc_radix_page_info *radix_page_info; struct kvm_ppc_rmmu_info rmmu_info; int i; diff --git a/vl.c b/vl.c index 71d3e7eefb..a8ea36f4f8 100644 --- a/vl.c +++ b/vl.c @@ -2812,7 +2812,7 @@ static void configure_accelerators(const char *progname) } if (init_failed) { - AccelClass *ac = ACCEL_GET_CLASS(current_machine->accelerator); + AccelClass *ac = ACCEL_GET_CLASS(current_accel()); error_report("falling back to %s", ac->name); } From patchwork Tue Jan 21 11:03:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11343571 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E49A492A for ; Tue, 21 Jan 2020 11:13:23 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7DBC2253D for ; Tue, 21 Jan 2020 11:13:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="i2+VHspw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7DBC2253D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrTG-0006ht-Bl for patchwork-qemu-devel@patchwork.kernel.org; Tue, 21 Jan 2020 06:13:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40737) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itrLu-0004RG-RF for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itrLq-00032N-8I for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:46 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:60536 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1itrLq-00031Z-4A for qemu-devel@nongnu.org; Tue, 21 Jan 2020 06:05:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579604741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EFdg22iZe4beJkoIxalQuHSOoIgflOzQgeNR8OSLq/w=; b=i2+VHspwIsgAS1cKMVWnbVIby6wbepatnljKyKpFXVZmC3MeM+Gz/7ckH9u+WklV/dR2UW YkAYzXjfAvIZfP/mIPoLwE4NQ6PGMiBR4uzHlrtXtuEySkTUIz74bxYwToqgUoD3Ol15nI EzkCPywiRZbvXtP7DOCKE0kUEBQD5nY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-190-3lyWe00MOQuR_hnOS1mLPg-1; Tue, 21 Jan 2020 06:05:40 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 98CE718A6EC2; Tue, 21 Jan 2020 11:05:36 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-38.brq.redhat.com [10.40.205.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DD54D811F8; Tue, 21 Jan 2020 11:05:28 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 10/10] accel/tcg: Sanitize include path Date: Tue, 21 Jan 2020 12:03:49 +0100 Message-Id: <20200121110349.25842-11-philmd@redhat.com> In-Reply-To: <20200121110349.25842-1-philmd@redhat.com> References: <20200121110349.25842-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: 3lyWe00MOQuR_hnOS1mLPg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Cornelia Huck , Eduardo Habkost , Like Xu , David Hildenbrand , Marcelo Tosatti , Markus Armbruster , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Commit af0440ae852 moved the qemu_tcg_configure() function, but introduced extraneous 'include/' in the includes path. As it is not necessary, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck --- v2: New patch --- accel/tcg/tcg-all.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index 1802ce02f6..acfdcfdf59 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -31,9 +31,9 @@ #include "sysemu/cpus.h" #include "qemu/main-loop.h" #include "tcg/tcg.h" -#include "include/qapi/error.h" -#include "include/qemu/error-report.h" -#include "include/hw/boards.h" +#include "qapi/error.h" +#include "qemu/error-report.h" +#include "hw/boards.h" #include "qapi/qapi-builtin-visit.h" typedef struct TCGState {