From patchwork Wed Jun 10 13:09:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 280881 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2062C433E1 for ; Wed, 10 Jun 2020 13:18:12 +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 7A751206F4 for ; Wed, 10 Jun 2020 13:18:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A751206F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivier.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj0cN-0001Jd-Lt for qemu-devel@archiver.kernel.org; Wed, 10 Jun 2020 09:18:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj0Ur-0007l7-0Y; Wed, 10 Jun 2020 09:10:25 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:46185) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj0Up-0003cY-4z; Wed, 10 Jun 2020 09:10:24 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M6lxe-1jrEUa0Fag-008JRU; Wed, 10 Jun 2020 15:10:14 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 01/16] Fix parameter type in vhost migration log path Date: Wed, 10 Jun 2020 15:09:56 +0200 Message-Id: <20200610131011.1941209-2-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200610131011.1941209-1-laurent@vivier.eu> References: <20200610131011.1941209-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:GC4QxVhoyRWPc2opmiANzOPcwFOhSvLfhoXfjQFiQAGmI5kg1fh ip2rXH5dOtjWESF9Z8A+xvyBu6sGdUETpHpTFL/RLAjZxhKnNnV1rHEBPkjLW9FarwC0Ze0 osAGfGPjkmHPW9a1oYsUlqincWHaoSL/qs08z8FTFDdagrN/C2fa6cV0isCPITize/5JRNo eZDIIeoUSt35+5MvL+X9A== X-UI-Out-Filterresults: notjunk:1; V03:K0:/2BlOD/8RX0=:fiowDzPcbOKbIEeEYSVbNC eh66wg1Kpbpw92XQUGaHM3ByigAp7IPE3QCbPvLikJNZvrhbS6wbHcV/4MCVJYMix3/sHhgRl g/3KMh+gsf+c5H00Mv+VDuY07cE8eOxHIFR4p/Um3RyHZdvcdNy0aYsIuBhUthDuHNES3K/C2 CXCfD3SO2Ogy6OOyYAb8nMUGltp3BBeCZwBNASeIfC4EQwoN6beb6FBOxpqGC4Vvk2TDV6Q4d XoSEA6AG1sPASRGw7K1dBmJsL7rNfy/UdaU2GBqullNepBA1rDkvZHqcz4w1HToD09HIha9Qe WtPrz3uRVZx1SHX8wA8ty69qM3nnSyX5Mo/uOGBRRcqkCM2x1Jw59g8BnolZvkLeKo/u9++92 mFhiK6PPc7viYnAvx7pE/LsFtkZuqUCdsLFwpNt9zJfkwvv4UAZHcN2wG0DcaSivUxX+xRuXo WFSDtf7o6nnO5TqgZ51zxGRUqvuAqvUvc3ZHarJoCmO5j0FIJoIaklUQC2JhWFxjwKDQYGui7 QruQXVbgeFoGitL76NimV0q2DQ1Knza+8jnvRQEhF2V3FxZq0AwPAzbnhv3QDKQs+0uD88ZsA k8Y3v0l/KZyRufkvYuW4IEvAvrjHPxI40v2uFuTwrrDY8G4Xa2H6aG/h+kInt6u69co1bympg AkUTvsMbW9EVyX+7yOKDBXYUYs6UFQe6prIx/TM6NPNvBAHsKDlgj1acopL2dT2dkIbGEy3QA E4j6TFcESqoJ/629RkhsLa7ZzLlEE/7Am2hfv64/AdI/u04WXzkSxLz2AdCNHD2QGO1MI6ip5 k4d63rreD73W2SececyC6/MWysHgbRsdyV/SOmibp4hlif4qZdIBIzI0kq7bIyWzCwovQ7m Received-SPF: none client-ip=212.227.126.133; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/10 09:10:17 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: Raphael Norwitz , qemu-trivial@nongnu.org, Michael Tokarev , Laurent Vivier , Raphael Norwitz Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Raphael Norwitz The ‘enable’ parameter to the vhost_migration_log() function is given as an int, but "true"/"false" values are passed in wherever it is invoked. Inside the function itself it is only ever compared with bool values. Therefore the parameter value itself should be changed to bool. Signed-off-by: Raphael Norwitz Reviewed-by: Eric Blake Message-Id: Signed-off-by: Laurent Vivier --- hw/virtio/vhost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index aff98a0ede56..aa06a3691919 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -809,12 +809,12 @@ err_features: return r; } -static int vhost_migration_log(MemoryListener *listener, int enable) +static int vhost_migration_log(MemoryListener *listener, bool enable) { struct vhost_dev *dev = container_of(listener, struct vhost_dev, memory_listener); int r; - if (!!enable == dev->log_enabled) { + if (enable == dev->log_enabled) { return 0; } if (!dev->started) { From patchwork Wed Jun 10 13:09:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 280884 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA069C433E3 for ; Wed, 10 Jun 2020 13:12:43 +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 AFF002078D for ; Wed, 10 Jun 2020 13:12:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFF002078D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivier.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj0X4-0002Fw-SX for qemu-devel@archiver.kernel.org; Wed, 10 Jun 2020 09:12:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj0Up-0007iM-8b; Wed, 10 Jun 2020 09:10:23 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:33379) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj0Un-0003a7-V6; Wed, 10 Jun 2020 09:10:22 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N8GIa-1incZS2u0W-014Dwg; Wed, 10 Jun 2020 15:10:14 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 02/16] net: Do not include a newline in the id of -nic devices Date: Wed, 10 Jun 2020 15:09:57 +0200 Message-Id: <20200610131011.1941209-3-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200610131011.1941209-1-laurent@vivier.eu> References: <20200610131011.1941209-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:zW5agQm9+hnRkugX9dRv6OmtIMNVTi/qL7EpK+RoYDoTmod2A5g lV3oXzwahxJw72SWY7LHB/N2bOdU23umLr+LEvpi11y/3ONei4iWPMrl3z5CERtEQWU+CDt HXJBHVX1OKt3aXCWkDqGTUrP0MnnwkkhW+Oy6GvCTmC3hWStuH1nqFJZQqQCsbQhATAewh/ fKibQv8rovx2XdwjtMGCQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:5J5hcVjLmQQ=:zmL8+vTkzeBwOhQPCqsUl2 U2yAmhYHA3+LS5TeyXRziGo8+dAigCZtBLBwkOmUVAoRTZVl/edkJPn3GGPKFlBpIsICDvS4C 1RMi3aRmomf8nZ1sh4wI1ybW8aM+ovj23SENpt1uFIj6lwmOhlc7DHm3Y6ogjQuDWY78kO74/ QqUzYGQpKc+fljJxU4023vA8F6om9bcPB9drenatls5sa2p+O8yNEpaT5VqdBAx1ORR6cdtUh a5pkdbhDzpY19GuviVOFw6rni1dxUAbvXduivOKQVfBBqRPArxSqNTR8yNJ0qzAEVwgvh2t1/ u7Jr2U1HNak4DO0SDUePMcR2NX8ktKiqEHRt6jo0KUpWZwUEITme4tV8ixWYQtu6n71gp93RC Cnb6PO32SZu6+bm5MAFvh6eQUEIK+gxsOgpQg0yTBzWkpBufdTZ9LufKMtrsz1/a26tsHhcgP t4k2ZEmgpHIg0iDIJflypnL+wZpYiBs3jeJ3YNywgsuGd1D7X7k4VPFiTVodPTkjqhzDKEtDx 1KIvXPqyrbQCAb9zxJbqN1uB0wMdulfhal2gGjqswQjTsZR8KrKpU8kkEpqwqv+V+5/dC2TSH V7JR7skh+gKr4z9FLH/GdGSu+bXmWlaeRQxePacp9omTauw99xurwrjUtOMLycii4vZ1uYQFy PyloLiwAqLb0rcChZLniuEfNqgWgYhtOb+QKzvrO7IIfHx/jD6Bs46OCvRJ4Y+9Pd5WO28w8d MZtMe2nXDxPuoIm9e+U994JEtQdKYa/qXp+U4M6c9h7XmsJBSTzV3pdspCFrBQLrJHsZR83lN 6wtARNCmuPe21+MRzTraG0Oy9nlEsjwmcHS/7F77YgJhCLy6Hk= Received-SPF: none client-ip=212.227.126.130; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/10 09:10:20 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: qemu-trivial@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Michael Tokarev , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth The '\n' sneaked in by accident here, an "id" string should really not contain a newline character at the end. Fixes: 78cd6f7bf6b ('net: Add a new convenience option "--nic" ...') Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200518074352.23125-1-thuth@redhat.com> Signed-off-by: Laurent Vivier --- net/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c index 38778e831da2..cbeeeadff8f8 100644 --- a/net/net.c +++ b/net/net.c @@ -1506,7 +1506,7 @@ static int net_param_nic(void *dummy, QemuOpts *opts, Error **errp) /* Create an ID if the user did not specify one */ nd_id = g_strdup(qemu_opts_id(opts)); if (!nd_id) { - nd_id = g_strdup_printf("__org.qemu.nic%i\n", idx); + nd_id = g_strdup_printf("__org.qemu.nic%i", idx); qemu_opts_set_id(opts, nd_id); } From patchwork Wed Jun 10 13:10:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 280885 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFF13C433DF for ; Wed, 10 Jun 2020 13:12:16 +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 A8BD8206F4 for ; Wed, 10 Jun 2020 13:12:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A8BD8206F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivier.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:35698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj0Wd-0001E3-RA for qemu-devel@archiver.kernel.org; Wed, 10 Jun 2020 09:12:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj0Un-0007gB-9w; Wed, 10 Jun 2020 09:10:21 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:57733) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj0Um-0003Z9-5j; Wed, 10 Jun 2020 09:10:20 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MStKw-1jMPxe2iS6-00UKQO; Wed, 10 Jun 2020 15:10:16 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 05/16] hw/isa/apm: Convert debug printf()s to trace events Date: Wed, 10 Jun 2020 15:10:00 +0200 Message-Id: <20200610131011.1941209-6-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200610131011.1941209-1-laurent@vivier.eu> References: <20200610131011.1941209-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:BSGPFsbMSrJJdCEnLODi1H19zLMsYGbOkyF+y1Wm295AfJR35Be 8kS5Sux21+dUpwv6a1tCd5NHcMC3p3feZa/Z+4MMy63sLS/GQ5upeM/gRn9DI2pndz2J3vk 3A9iPIFjjG7dlTHAwlJEQ60DyczrD5XE+MKziiZ7drp0uDEN5RLf9OleO6R2NhlLzzpHs+D W6fgnlV4yELsSgaRG8Ghg== X-UI-Out-Filterresults: notjunk:1; V03:K0:lIGKMcqLdaw=:FlYsc7R6ktKHedypKWSwJQ ApYGKp9QN++nfazBcZ3D3wwwAc9hw5piRUdrJbSirnMq1GF7fY3o8z9MBRUBn7mcY1yXHNdmb VMaTZ9uZF4O7mgGL7fmM9eVFfjxrwb2eUJmJNyYW0y/0PwBWE9XPKOhRDPCEqU1dGQ/8psg7n g+BId/kN02a7lIhfS6wBmsyIiiBeeXmUAfv8QQhZPi87g3kNK9eofIUou26JnN9SyAFAH1FVS uReg/DBP45yqnZidSNl1NyusAJhV6YYUHV888TJ00IH13XF5TGS2sRHlldo/PGNZo365rXMd6 uDLJ3ooi2aoFc/F9glZqClCH8cCL/Te1snP6aBPTwj9EJVv/5sHFaAt0T36OM+Y+lCZj8i9li D0ij1YV9IUqTP7glE1YrkG5XyVib0o/LmlqeVqsJxRHl6L4gH69J90RVSssC/JLnKuXXblXJa a/i4pvY3EmMdI+JDLHb0o1dGZZHP3ocVYH0oK63tmshMWHSGlakgbBeMgFeHhy7i4AokVh+NT 8Km/aVh14X2fEVz4IeeRveTEWRvZn88YWvcqP4grMYy8O72kFn+GGSCHmTNNvGwLhcWo5FCvp dvSjRbmMIaXBof2f5EPVMI/hzfPRMSmWOZNG6aE9kG0rzlkg7m/R91dYo4516XvAyt9wDdcKI ZMHiePHw5R3nKQ1cnCtQo385feDdtXqs6bF6AKaOpbyJOjQDTxFu9bPx/UN3hjqVP+nHZm8Fb OWZ4GBAfqidfq4a/JRYLys64SpxzU+PVtdl5bk23UPLovkfmgKfI/+KvbEUj4UMtqxYsU08cE r07JlIpXdefQkRomKK9KzyX1QRoyZ5th0c92EbtUjWhgVu3CkisUGA2597FsMhetQsgXmHW Received-SPF: none client-ip=212.227.126.187; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/10 09:10:15 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: qemu-trivial@nongnu.org, Richard Henderson , Michael Tokarev , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Convert APM_DPRINTF() to trace events and remove ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20200524164806.12658-1-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- hw/isa/apm.c | 15 +++++---------- hw/isa/trace-events | 4 ++++ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/hw/isa/apm.c b/hw/isa/apm.c index 6300b1ba7ace..bce266b9574c 100644 --- a/hw/isa/apm.c +++ b/hw/isa/apm.c @@ -24,14 +24,8 @@ #include "hw/isa/apm.h" #include "hw/pci/pci.h" #include "migration/vmstate.h" +#include "trace.h" -//#define DEBUG - -#ifdef DEBUG -# define APM_DPRINTF(format, ...) printf(format, ## __VA_ARGS__) -#else -# define APM_DPRINTF(format, ...) do { } while (0) -#endif /* fixed I/O location */ #define APM_STS_IOPORT 0xb3 @@ -41,8 +35,8 @@ static void apm_ioport_writeb(void *opaque, hwaddr addr, uint64_t val, { APMState *apm = opaque; addr &= 1; - APM_DPRINTF("apm_ioport_writeb addr=0x%" HWADDR_PRIx - " val=0x%02" PRIx64 "\n", addr, val); + + trace_apm_io_write(addr, val); if (addr == 0) { apm->apmc = val; @@ -65,7 +59,8 @@ static uint64_t apm_ioport_readb(void *opaque, hwaddr addr, unsigned size) } else { val = apm->apms; } - APM_DPRINTF("apm_ioport_readb addr=0x%" HWADDR_PRIx " val=0x%02x\n", addr, val); + trace_apm_io_read(addr, val); + return val; } diff --git a/hw/isa/trace-events b/hw/isa/trace-events index 202f8938e7b8..3544c6213c39 100644 --- a/hw/isa/trace-events +++ b/hw/isa/trace-events @@ -9,3 +9,7 @@ superio_create_ide(int id, uint16_t base, unsigned int irq) "id=%d, base 0x%03x, # pc87312.c pc87312_io_read(uint32_t addr, uint32_t val) "read addr=0x%x val=0x%x" pc87312_io_write(uint32_t addr, uint32_t val) "write addr=0x%x val=0x%x" + +# apm.c +apm_io_read(uint8_t addr, uint8_t val) "read addr=0x%x val=0x%02x" +apm_io_write(uint8_t addr, uint8_t val) "write addr=0x%x val=0x%02x" From patchwork Wed Jun 10 13:10:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 280879 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D270CC433E0 for ; Wed, 10 Jun 2020 13:21:19 +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 A7D1F2072E for ; Wed, 10 Jun 2020 13:21:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7D1F2072E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivier.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj0fO-00062V-R7 for qemu-devel@archiver.kernel.org; Wed, 10 Jun 2020 09:21:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj0Ur-0007m9-Mq; Wed, 10 Jun 2020 09:10:25 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:37667) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj0Up-0003d4-9a; Wed, 10 Jun 2020 09:10:25 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N6KML-1iq5PX05ST-016hql; Wed, 10 Jun 2020 15:10:18 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 07/16] qemu-img: Fix doc typo for 'bitmap' subcommand Date: Wed, 10 Jun 2020 15:10:02 +0200 Message-Id: <20200610131011.1941209-8-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200610131011.1941209-1-laurent@vivier.eu> References: <20200610131011.1941209-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:fK8iv6C1HwdqQhd/VkgelztgmZ7yxCQwoDAv43kmXHdv0sWRPjY RA9JL+I2c0a7jdxDQbdasICULdQk1X8tMYW2Z5oX35UEEqwWRXrkCP9mVE2fR1khinotDux ps0FXEvEvCGoGixiHt9vUJk3E3qRnfjhIHzc3OKHvhBihPP5dPhujaE/4QHlEhNqEAoNmml sYBnb+gHwOci0/goFiP3w== X-UI-Out-Filterresults: notjunk:1; V03:K0:YbtXtnlVb9Q=:zP3khABMS+VslhTTURfDky atM1nzYWYeKVpKdsZpV1tKWIuj31z8an7nfJWQuUOjm3F4iVA8Wi3YH6D9olXG2KsASRKkR5p 2Ql6kVXa/MoQy2M/Q8uo6yw8UpmFz/IVAjKfxA7XxTUd3vIvsamXg1jzncU1+Z1SmGcD6hof3 tFf76ViH1PlFOlCKrV0DuC+Mn++eIuhEfa8LaARRE5PrbB252gQv2oCbYe3zAtgbeGpg/wtAy EJlprAJ8ViCJJ2h8NPRwmw+SiwT6LQ4h4xOGU8/neaG4AfdF+HxjGfd/6H6FmT94+8CaIh63L sih1GKIuO5vp6XDqccI2fFimsCHR8HXK9PB7ChzBB7xed5pLkHVKuaMqxsCxHGI5/DX1ryvmo hRreQB5knWlOIu/fjfmz0kRpmDr/iyjsyks55B88eUbFt87tw4GGEkucKBN5vcYwphc7Q9uRv HYUWzIJ8ajxjkV7zm43HxqAbWDIm3bL4uw2R0XQaFTrUDC2beXeapUzBEOm/69cHKq+5i8Fj0 WcUFamYzoDaelnXawFDMfXNujhsA9lVDyWeITkepseqNMV+F5xqEKSKaqaZpYv9lfni+X7cea 8ZfFYIFV9GCoAWqcaAYaeD7+fHyqaEU8ooGaZ2zpTxM3zX9NctwVoabgX8GLe/kP2kVqySGp1 2FY17rq1amQCkw5ZAwWEy9xhy4F8ic7mfDL+QGMRk3qEKIRmySVoIfDsv4Qzz+aGpQB5qmkfK qbw73A7WU4uRShNvHUarNP29xPqzR3wFtapLWzN1EhgdbXPc1/eek5GMXxNxwNulu8rqRwbV8 Wfwh9iqZeCKCr93loMqvegER/O7ZQfdVZy7OrI+WIbcZFXzPceNh8YwhvDZ6HfNByQRD5+T Received-SPF: none client-ip=212.227.126.133; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/10 09:10:17 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: qemu-trivial@nongnu.org, Vladimir Sementsov-Ogievskiy , Michael Tokarev , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Eric Blake Prefer a consistent naming for the --merge argument. Fixes: 3b51ab4bf Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200529144527.1943527-1-eblake@redhat.com> Signed-off-by: Laurent Vivier --- docs/tools/qemu-img.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst index 69cd9a30373a..7f0737488ade 100644 --- a/docs/tools/qemu-img.rst +++ b/docs/tools/qemu-img.rst @@ -300,7 +300,7 @@ Command description: ``--disable`` to change *BITMAP* to stop recording future edits. - ``--merge`` to merge the contents of *SOURCE_BITMAP* into *BITMAP*. + ``--merge`` to merge the contents of the *SOURCE* bitmap into *BITMAP*. Additional options include ``-g`` which sets a non-default *GRANULARITY* for ``--add``, and ``-b`` and ``-F`` which select an From patchwork Wed Jun 10 13:10:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 280883 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B514BC433DF for ; Wed, 10 Jun 2020 13:14: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 8687B206F4 for ; Wed, 10 Jun 2020 13:14:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8687B206F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivier.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj0YW-000531-N9 for qemu-devel@archiver.kernel.org; Wed, 10 Jun 2020 09:14:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj0Ur-0007lP-9U; Wed, 10 Jun 2020 09:10:25 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:43219) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj0Up-0003cU-68; Wed, 10 Jun 2020 09:10:24 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MZkxj-1jOsnc1wZT-00WoKz; Wed, 10 Jun 2020 15:10:19 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 09/16] hw/hppa/dino: Use the IEC binary prefix definitions Date: Wed, 10 Jun 2020 15:10:04 +0200 Message-Id: <20200610131011.1941209-10-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200610131011.1941209-1-laurent@vivier.eu> References: <20200610131011.1941209-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:ZJcuuVvZMn4vd9WaxvKpzIGlpcH+8rkPeaVxzY+wL56wQ5SnrCV 8nsiZ9XpxJWmulsBA6wbojcB0wLerOd2JYBRjvBsolUqcExn5b+u+rGKTG2ut+84W4vqARR wvrMVnIj8D4x+VvmdgCqkklPQ0GlVC5dKAQzkgFWJjAjG1vM4HXRY+o4+Ns9ikDrzttMjTa RVpKQ1+vcYat/GTfClYeA== X-UI-Out-Filterresults: notjunk:1; V03:K0:JS5sxbSkzn4=:hw/NgN8XCkcbu9zBQ39147 Of+PRjGZZRJju14sMc59M8qd91EtnE8n9o+asBzRl+/VoM849ivnQk79V3OQ4Uvn0928rOYqc S8pi15XRpu30aZEQMLePw2niARh8zUoe3jZH+dSIJm/W/eurwXP0gwQIyiBYubl6w01ngRr8B Eq2jYHTHaaXaKumC4t9qO1kfH5nRFTZ4nWw92rxBfk96uKE3UmfaQsGS2iPLCaRbJSELV5o8M 5kAJ//Xwv6vnK8Ip242X4jxJgBBw4dLhU+a4hLfUyvYPNRwrUehcKijKERXkmk5x/X4/qeAvf O/gdCIOOJsrlF2sqImje+lfbP/Hjl31J7QgXqmfX3JEKKrPlL+L/9LUebKdvynTwK7WalKQ5l Em1QQNzvSZOFNptCjpU6h0btgnnShTQlxjMKpfmYrG+dwD4K3s2JdZL+huCLCF9fWoGiEl+gq v8GQiM/UY5kxp/uMtzlsfarFM+ijvJ1/vYhM3kgjJ5x9NZjvYlgG95pUW9XXDGyjOhh7XQU8p oyjZiQZeFQ8CKjINl/P/JD4syFlr8qFhxpmEJVKJ9EXkkFNVH22t5bfuUxmAcL6gso9gr5dDb 4zC0a68Mh+u+sFx9UNt2GIiFLqObRjeeXoHaltqW4hDfspb+EuZ+6xjqlpbbg7nSd3+QGrMCI AE1BMKtVQ8TiUAL8Fj+xhhb1Vvfuya9gS4JSRRSO8Cb/ZCXNi84QAMwZzq9RL1zxQUnBjltIm Ud8QtgLJxcDs3SRaqOj8+hzcQ2llifdQiQzQkdk1WriYHvziLR1dvifPKIJBFyrrcRlwU7OMH E7SYUM+Mf6CZJ6rJezubFhaSWHXU2maZSw4IugAGKlRjeVtjkUFEh3qY7ZDEyhIoq5VeMkQ Received-SPF: none client-ip=212.227.126.133; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/10 09:10:17 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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 , qemu-trivial@nongnu.org, Michael Tokarev , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé IEC binary prefixes ease code review: the unit is explicit. Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20200601142930.29408-7-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- hw/hppa/dino.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c index 2b1b38c58abc..7290f23962ce 100644 --- a/hw/hppa/dino.c +++ b/hw/hppa/dino.c @@ -542,7 +542,7 @@ PCIBus *dino_init(MemoryRegion *addr_space, &s->parent_obj.data_mem); /* Dino PCI bus memory. */ - memory_region_init(&s->pci_mem, OBJECT(s), "pci-memory", 1ull << 32); + memory_region_init(&s->pci_mem, OBJECT(s), "pci-memory", 4 * GiB); b = pci_register_root_bus(dev, "pci", dino_set_irq, dino_pci_map_irq, s, &s->pci_mem, get_system_io(), @@ -561,7 +561,7 @@ PCIBus *dino_init(MemoryRegion *addr_space, } /* Set up PCI view of memory: Bus master address space. */ - memory_region_init(&s->bm, OBJECT(s), "bm-dino", 1ull << 32); + memory_region_init(&s->bm, OBJECT(s), "bm-dino", 4 * GiB); memory_region_init_alias(&s->bm_ram_alias, OBJECT(s), "bm-system", addr_space, 0, 0xf0000000 + DINO_MEM_CHUNK_SIZE); From patchwork Wed Jun 10 13:10:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 280882 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A901C433DF for ; Wed, 10 Jun 2020 13:14:41 +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 6194A206F4 for ; Wed, 10 Jun 2020 13:14:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6194A206F4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivier.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj0Yy-00062s-IZ for qemu-devel@archiver.kernel.org; Wed, 10 Jun 2020 09:14:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj0Ut-0007qf-Qn; Wed, 10 Jun 2020 09:10:27 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:45539) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj0Us-0003gq-HS; Wed, 10 Jun 2020 09:10:27 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MIdW9-1jg0D53fAz-00EahL; Wed, 10 Jun 2020 15:10:23 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 14/16] target/unicore32: Prefer qemu_semihosting_log_out() over curses Date: Wed, 10 Jun 2020 15:10:09 +0200 Message-Id: <20200610131011.1941209-15-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200610131011.1941209-1-laurent@vivier.eu> References: <20200610131011.1941209-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:nujbTLVeKt9LpZQbtZRxvpwXyfbarq8r5Bk1K42Ndq6YN0OacSQ RM56+kdZz5ysrbbSarasKGjY3EURD0bJo4Mz7hLzRHGQWNdyDGCLlx1Ocoa3hcs0OQ+B6n+ GXaSjO4a31/Yz+hUunQI2HM/axggTOjV3spR0vhJMZhCon2SHBQMfWw3oXq6W0tCSYf99WZ maom1MPm1jNzid/hHLUxQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:31TZV5x5tDg=:XrbprX7eZQeHeu4ew2uE2e NiKAqgGKP87b+jo8vIHXujuIXGkAEH6HZkkkdr/4VexALoV8uU9BA0T2eaIpTtQFg+6NbJeQQ ssE+kug7hMqlS/P85p+Y8SYoTKmCuWf7TDzS81qHp8AB2yUVRsLviXUhsQbI4ncGolyRM+iDx FESoMm7n9tw9ylLTCTNUi5cbZ7/HycYTENnVqgrwTdddoPIhaz79Y6jj0tiyNmpjMFUWtotAB Na8azqLuZLq15zd//b5471kN5k9PwXQSPAUI8oNnOE400tQZwKTc/nmp5HyyatrzwaUT/jCNd VwAYB4s2Jd3p/iE0goxtStM794sKKc0hj5APO0TH0ZnhqPObkaf9o5tCnJXXP8xkZo0gcr4k9 8VTGpjWMGJSgHk/YBi3MHfQhXlnpqR46TCcdcXE5GNY3rb2KcM0L9tzv+GLQou7gbd7zHlIDu l/TU6pOjaLqZoFd+hjZ5kjI42h8Ityz0mg4hTTMzzZ0C6Mi5XEe0ZTAiKPad/7q5DKTdIhdgN pePwzIntf3XoDgCbQr+VDhJD3C20e1HkylQ4SYTqD2RArHbG8IwhkbUrjLupmgLKG9LO31pP5 ocl4vMCoCSfNGpidenuZxRPwIiQc1e5R7GByKe8TfhFdHdjyIDPFt7D+D6OP+1G7yxmNHzSrP /0alf45SSeZbnNybSHQSkEsXQ5GN23f3O2+5L/4iEKHIOaIYSf43NQCUg+T6vMn343mTnLw8l fRG2ict5eA8JYdLNIsf4VpvS6CJNaeILE40A4nFyN6+Byv5lpkGQBmJfCXsdn3i6Bgnn/lG0z oB/fciBqwR38r9NsTCv58/6ulBoJKPqVRpHiRofMIg82ubJ06k= Received-SPF: none client-ip=212.227.126.130; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/10 09:10:20 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: qemu-trivial@nongnu.org, Richard Henderson , Michael Tokarev , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Use the common API for semihosting logging. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20200603123754.19059-4-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- default-configs/unicore32-softmmu.mak | 1 + target/unicore32/helper.c | 57 +++------------------------ 2 files changed, 6 insertions(+), 52 deletions(-) diff --git a/default-configs/unicore32-softmmu.mak b/default-configs/unicore32-softmmu.mak index 0bfce48c6da7..899288e3d715 100644 --- a/default-configs/unicore32-softmmu.mak +++ b/default-configs/unicore32-softmmu.mak @@ -3,3 +3,4 @@ # Boards: # CONFIG_PUV3=y +CONFIG_SEMIHOSTING=y diff --git a/target/unicore32/helper.c b/target/unicore32/helper.c index 00371a7da660..54c26871feab 100644 --- a/target/unicore32/helper.c +++ b/target/unicore32/helper.c @@ -14,9 +14,7 @@ #include "cpu.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" -#ifndef CONFIG_USER_ONLY -#include "ui/console.h" -#endif +#include "hw/semihosting/console.h" #undef DEBUG_UC32 @@ -161,58 +159,13 @@ uint32_t helper_cp0_get(CPUUniCore32State *env, uint32_t creg, uint32_t cop) return 0; } -#ifdef CONFIG_CURSES - -/* KEY_EVENT is defined in wincon.h and in curses.h. Avoid redefinition. */ -#undef KEY_EVENT -#include -#undef KEY_EVENT - -/* - * FIXME: - * 1. curses windows will be blank when switching back - * 2. backspace is not handled yet - */ -static void putc_on_screen(unsigned char ch) +void helper_cp1_putc(target_ulong regval) { - static WINDOW *localwin; - static int init; - - if (!init) { - /* Assume 80 * 30 screen to minimize the implementation */ - localwin = newwin(30, 80, 0, 0); - scrollok(localwin, TRUE); - init = TRUE; - } + const char c = regval; - if (isprint(ch)) { - wprintw(localwin, "%c", ch); - } else { - switch (ch) { - case '\n': - wprintw(localwin, "%c", ch); - break; - case '\r': - /* If '\r' is put before '\n', the curses window will destroy the - * last print line. And meanwhile, '\n' implifies '\r' inside. */ - break; - default: /* Not handled, so just print it hex code */ - wprintw(localwin, "-- 0x%x --", ch); - } - } - - wrefresh(localwin); -} -#else -#define putc_on_screen(c) do { } while (0) -#endif - -void helper_cp1_putc(target_ulong x) -{ - putc_on_screen((unsigned char)x); /* Output to screen */ - DPRINTF("%c", x); /* Output to stdout */ + qemu_semihosting_log_out(&c, sizeof(c)); } -#endif +#endif /* !CONFIG_USER_ONLY */ bool uc32_cpu_exec_interrupt(CPUState *cs, int interrupt_request) { From patchwork Wed Jun 10 13:10:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 280878 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E709C433DF for ; Wed, 10 Jun 2020 13:23: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 05B912072E for ; Wed, 10 Jun 2020 13:23:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 05B912072E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=vivier.eu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jj0hp-0001Yo-8X for qemu-devel@archiver.kernel.org; Wed, 10 Jun 2020 09:23:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj0Ux-0007ya-Cr; Wed, 10 Jun 2020 09:10:31 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:40119) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jj0Uw-0003iG-5v; Wed, 10 Jun 2020 09:10:30 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Macaw-1jCPVK24pm-00c8PY; Wed, 10 Jun 2020 15:10:24 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL v2 16/16] semihosting: remove the pthread include which seems unused Date: Wed, 10 Jun 2020 15:10:11 +0200 Message-Id: <20200610131011.1941209-17-laurent@vivier.eu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200610131011.1941209-1-laurent@vivier.eu> References: <20200610131011.1941209-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:ldzgHkhI8KmsyOCiFaLmnS0K5iFXGYvIBP/UBPuWhTqg8wcqsIP wsnEKytnVV2F1Xl988TfyG7hNDxvvV8fex9KGMgtE3jS2B3NbI6ghu3admhgoWYmRFzJAkw XzfCqsNp24L7150ogMU20TZs8szOCUpvhqQw/N2SamZIFX4xZ9OpBSLcTnebS2TwD9xOVqT DPDZ3oUFlPcDVg7XX0QkA== X-UI-Out-Filterresults: notjunk:1; V03:K0:GYFIDvf0oXM=:Krk5biTk1H33Y5ee50ButZ KesGI7jR5CilUGKYf/qlesmRjJvaAWuS1X+djGX16sOcdpgFZ5wt4qbqJ7Cx4jiXL5NtFoZTH 59FLYlbBxTo1dsbz1IG6Q/tnB/lnNOObu/HFH3QdE1iI1/tfXhY4WjbZvxT17HiLLibiVjpHg lQkQXC78L6vvsUG34cGD6VtWtRkw1fMEGNasxf7ATMFU/iumlLuGMYmOiU6puTwOyaKLnSIFD nEiVTEBerofBPHyZyAGOP96sapnmXAHTSSak4fwLTQ0t19HmNTu8pV+k5lFSDkayz5CCOenFl 8pR6/mxIEywRCn0QwmtBlbbGN9/SYEMSMoMZylX7QBidYxH3KP07uVsBSRjTNvFOLr/pCkDeK y2J8K4i4ejAKS9DJKA5IN5KF5idXNgkDfB4YuAvnoQFl4BFtf0Xn1DyDTfhXXXvqMP+gpWZS6 sl38acmww4EsxKFKlrALfBk6PODbF7sSWZfAAN5bmxOouGDLy1vRExNjjSMRtngkMcL07YKgn O/RLm6WlvKP0Xb6Vx/7zbwSqAB1Oe0rvwESCMdp9rUFiFntgbs24V0XIwndaiIF8WsHyiCZBB 3Wgaeo5JcnEuINI/mrlYqIBDl4FlOBumiaG7xwh5hwD2PsZX/Oh14S6E73ull74ELXLyg6zLI jJMCIr89CcsD39paGP5bz16hSJcha1ku4Cep3rIT7SBwVSuxhwt7s+yjJkzEoOtJH75iDgLM7 uh4XLoS7dtw5UW2OTW6so2jeguMXwb0lakuBsduF5pOY9NtHjNltIRX4gmgURh0kTjL8faOFO qTT6nvUxmVfDgsrFcdbCgeNSlo4ZlAbDxZnbmofS78CrrZ0QSy1zlDsVTNVl1Nj5qIYECRi Received-SPF: none client-ip=212.227.126.131; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/10 09:10:24 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: qemu-trivial@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Michael Tokarev , Laurent Vivier , KONRAD Frederic , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: KONRAD Frederic This have been introduced by: 8de702cb677c8381fb702cae252d6b69aa4c653b It doesn't seem to be used so remove it. Signed-off-by: KONRAD Frederic Reviewed-by: Philippe Mathieu-Daudé Acked-by: Alex Bennée Message-Id: <1589806958-23511-1-git-send-email-frederic.konrad@adacore.com> Signed-off-by: Laurent Vivier --- hw/semihosting/console.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/semihosting/console.c b/hw/semihosting/console.c index 6346bd7f506e..22e7827824af 100644 --- a/hw/semihosting/console.c +++ b/hw/semihosting/console.c @@ -23,7 +23,6 @@ #include "exec/exec-all.h" #include "qemu/log.h" #include "chardev/char.h" -#include #include "chardev/char-fe.h" #include "sysemu/sysemu.h" #include "qemu/main-loop.h"