From nobody Fri May 3 03:46:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488264394231282.7566793735625; Mon, 27 Feb 2017 22:46:34 -0800 (PST) Received: from localhost ([::1]:58945 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibYN-0002WO-Vg for importer@patchew.org; Tue, 28 Feb 2017 01:46:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibX1-0001o9-Lc for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:45:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cibWy-0003EA-Ka for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:45:07 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:60649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibWy-0003DZ-C2; Tue, 28 Feb 2017 01:45:04 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 9DB0443587; Tue, 28 Feb 2017 09:45:00 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id DE161233; Tue, 28 Feb 2017 09:44:59 +0300 (MSK) Received: (nullmailer pid 19617 invoked by uid 1000); Tue, 28 Feb 2017 06:44:59 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 09:44:44 +0300 Message-Id: <8dc52350f97ec7e2ce5d16c65021b5283f71b184.1488264243.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 01/14] target/s390x: Fix typo X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Stefan Weil , Michael Tokarev Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Stefan Weil Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- target/s390x/cpu_models.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 5b66d33..2a894ee 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -671,7 +671,7 @@ static S390CPUModel *get_max_cpu_model(Error **errp) if (kvm_enabled()) { kvm_s390_get_host_cpu_model(&max_model, errp); } else { - /* TCG enulates a z900 */ + /* TCG emulates a z900 */ max_model.def =3D &s390_cpu_defs[0]; bitmap_copy(max_model.features, max_model.def->default_feat, S390_FEAT_MAX); --=20 2.1.4 From nobody Fri May 3 03:46:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488265552242829.7890636430741; Mon, 27 Feb 2017 23:05:52 -0800 (PST) Received: from localhost ([::1]:59066 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibr3-00079p-S9 for importer@patchew.org; Tue, 28 Feb 2017 02:05:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibpX-0006EU-Px for qemu-devel@nongnu.org; Tue, 28 Feb 2017 02:04:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cibpU-0000Or-OC for qemu-devel@nongnu.org; Tue, 28 Feb 2017 02:04:15 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:43761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibpU-0000Od-HA; Tue, 28 Feb 2017 02:04:12 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 33B584358C; Tue, 28 Feb 2017 10:04:12 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 829653D5; Tue, 28 Feb 2017 09:45:01 +0300 (MSK) Received: (nullmailer pid 19619 invoked by uid 1000); Tue, 28 Feb 2017 06:44:59 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 09:44:45 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 02/14] softfloat: Use correct type in float64_to_uint64_round_to_zero() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Peter Maydell In float64_to_uint64_round_to_zero() a typo meant that we were taking the uint64_t return value from float64_to_uint64() and putting it into an int64_t variable before returning it as uint64_t again. Use uint64_t instead of pointlessly casting it back and forth to int64_t. Signed-off-by: Peter Maydell Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Michael Tokarev --- fpu/softfloat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 485a006..7af14e2 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -7492,7 +7492,7 @@ uint64_t float64_to_uint64_round_to_zero(float64 a, f= loat_status *status) { signed char current_rounding_mode =3D status->float_rounding_mode; set_float_rounding_mode(float_round_to_zero, status); - int64_t v =3D float64_to_uint64(a, status); + uint64_t v =3D float64_to_uint64(a, status); set_float_rounding_mode(current_rounding_mode, status); return v; } --=20 2.1.4 From nobody Fri May 3 03:46:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488266728363319.28673868075487; Mon, 27 Feb 2017 23:25:28 -0800 (PST) Received: from localhost ([::1]:59138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cicA2-0004Yh-Q6 for importer@patchew.org; Tue, 28 Feb 2017 02:25:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cic8w-0003tR-LV for qemu-devel@nongnu.org; Tue, 28 Feb 2017 02:24:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cic8s-0005ID-7u for qemu-devel@nongnu.org; Tue, 28 Feb 2017 02:24:18 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:57885) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cic8s-0005Hy-0T; Tue, 28 Feb 2017 02:24:14 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 853984338E; Tue, 28 Feb 2017 10:24:10 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 175E43E2; Tue, 28 Feb 2017 09:45:02 +0300 (MSK) Received: (nullmailer pid 19621 invoked by uid 1000); Tue, 28 Feb 2017 06:44:59 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 09:44:46 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 03/14] hw/core/or-irq: Mark the device with cannot_instantiate_with_device_add_yet X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Thomas Huth , Michael Tokarev Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth The "or-irq" device needs to be wired up in source code, there is no way the user can make any real use of this device with the "-device" parameter or the "device_add" monitor command yet. Signed-off-by: Thomas Huth Reviewed-by: Markus Armbruster Reviewed-by: Alistair Francis Signed-off-by: Michael Tokarev --- hw/core/or-irq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/core/or-irq.c b/hw/core/or-irq.c index 1ac090d..1485d5b 100644 --- a/hw/core/or-irq.c +++ b/hw/core/or-irq.c @@ -89,6 +89,9 @@ static void or_irq_class_init(ObjectClass *klass, void *d= ata) dc->props =3D or_irq_properties; dc->realize =3D or_irq_realize; dc->vmsd =3D &vmstate_or_irq; + + /* Reason: Needs to be wired up to work, e.g. see stm32f205_soc.c */ + dc->cannot_instantiate_with_device_add_yet =3D true; } =20 static const TypeInfo or_irq_type_info =3D { --=20 2.1.4 From nobody Fri May 3 03:46:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488265550206793.4055095566986; Mon, 27 Feb 2017 23:05:50 -0800 (PST) Received: from localhost ([::1]:59065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibr2-00078k-DW for importer@patchew.org; Tue, 28 Feb 2017 02:05:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibpX-0006ET-Pz for qemu-devel@nongnu.org; Tue, 28 Feb 2017 02:04:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cibpU-0000P5-SQ for qemu-devel@nongnu.org; Tue, 28 Feb 2017 02:04:15 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:57044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibpU-0000Of-Lm; Tue, 28 Feb 2017 02:04:12 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 473594358D; Tue, 28 Feb 2017 10:04:12 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id EED2B3D0; Tue, 28 Feb 2017 09:45:00 +0300 (MSK) Received: (nullmailer pid 19623 invoked by uid 1000); Tue, 28 Feb 2017 06:44:59 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 09:44:47 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 04/14] hw/core/register: Mark the device with cannot_instantiate_with_device_add_yet X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Thomas Huth , Michael Tokarev Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth The "qemu,register" device needs to be wired up in source code, there is no way the user can make any real use of this device with the "-device" parameter or the "device_add" monitor command yet. Signed-off-by: Thomas Huth Reviewed-by: Markus Armbruster Reviewed-by: Alistair Francis Signed-off-by: Michael Tokarev --- hw/core/register.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hw/core/register.c b/hw/core/register.c index 4bfbc50..be170dc 100644 --- a/hw/core/register.c +++ b/hw/core/register.c @@ -274,9 +274,18 @@ void register_finalize_block(RegisterInfoArray *r_arra= y) g_free(r_array); } =20 +static void register_class_init(ObjectClass *oc, void *data) +{ + DeviceClass *dc =3D DEVICE_CLASS(oc); + + /* Reason: needs to be wired up to work */ + dc->cannot_instantiate_with_device_add_yet =3D true; +} + static const TypeInfo register_info =3D { .name =3D TYPE_REGISTER, .parent =3D TYPE_DEVICE, + .class_init =3D register_class_init, }; =20 static void register_register_types(void) --=20 2.1.4 From nobody Fri May 3 03:46:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488264971195964.6066191328797; Mon, 27 Feb 2017 22:56:11 -0800 (PST) Received: from localhost ([::1]:59007 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibhh-0008NL-T0 for importer@patchew.org; Tue, 28 Feb 2017 01:56:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibfq-00079b-T7 for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:54:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cibfn-0005sr-Qk for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:54:14 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:37841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibfn-0005sV-IW; Tue, 28 Feb 2017 01:54:11 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 8219A43567; Tue, 28 Feb 2017 09:54:10 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id D1D563DE; Tue, 28 Feb 2017 09:45:01 +0300 (MSK) Received: (nullmailer pid 19625 invoked by uid 1000); Tue, 28 Feb 2017 06:44:59 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 09:44:48 +0300 Message-Id: <25ac5bbec43973e9b97a454e55fd307ef9db1320.1488264243.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 05/14] CODING_STYLE: Mention preferred comment form X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Peter Maydell Our defacto coding style strongly prefers /* */ style comments over the single-line // style, and checkpatch enforces this, but we don't actually document this. Mention it in CODING_STYLE. Suggested-by: Thomas Huth Signed-off-by: Peter Maydell Reviewed-by: Markus Armbruster Reviewed-by: Fam Zheng Reviewed-by: Laurent Vivier Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael Tokarev --- CODING_STYLE | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CODING_STYLE b/CODING_STYLE index f53180b..2fa0c0b 100644 --- a/CODING_STYLE +++ b/CODING_STYLE @@ -116,3 +116,10 @@ if (a =3D=3D 1) { Rationale: Yoda conditions (as in 'if (1 =3D=3D a)') are awkward to read. Besides, good compilers already warn users when '=3D=3D' is mis-typed as '= =3D', even when the constant is on the right. + +7. Comment style + +We use traditional C-style /* */ comments and avoid // comments. + +Rationale: The // form is valid in C99, so this is purely a matter of +consistency of style. The checkpatch script will warn you about this. --=20 2.1.4 From nobody Fri May 3 03:46:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488264661399734.3622095254402; Mon, 27 Feb 2017 22:51:01 -0800 (PST) Received: from localhost ([::1]:58965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibci-0005Iq-AT for importer@patchew.org; Tue, 28 Feb 2017 01:51:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibX1-0001oJ-Ld for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:45:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cibWy-0003E2-KY for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:45:07 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:39219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibWy-0003DW-CM; Tue, 28 Feb 2017 01:45:04 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id B611643588; Tue, 28 Feb 2017 09:45:00 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 208483D0; Tue, 28 Feb 2017 09:45:00 +0300 (MSK) Received: (nullmailer pid 19627 invoked by uid 1000); Tue, 28 Feb 2017 06:44:59 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 09:44:49 +0300 Message-Id: <6048018ef6112476b529807ad603015314151bb2.1488264243.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 06/14] ide: remove undefined behavior in ide-test X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Michael Tokarev , John Snow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: John Snow trivial: initialize the dirty buffer with a random-ish byte. Stops valgrind from whining about uninitialized buffers. Signed-off-by: John Snow Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael Tokarev --- tests/ide-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ide-test.c b/tests/ide-test.c index fb541f8..b57c2b1 100644 --- a/tests/ide-test.c +++ b/tests/ide-test.c @@ -544,6 +544,7 @@ static void make_dirty(uint8_t device) =20 guest_buf =3D guest_alloc(guest_malloc, len); buf =3D g_malloc(len); + memset(buf, rand() % 255 + 1, len); g_assert(guest_buf); g_assert(buf); =20 --=20 2.1.4 From nobody Fri May 3 03:46:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488265551831565.5818261841092; Mon, 27 Feb 2017 23:05:51 -0800 (PST) Received: from localhost ([::1]:59067 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibr4-0007AW-En for importer@patchew.org; Tue, 28 Feb 2017 02:05:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibpX-0006EV-Q9 for qemu-devel@nongnu.org; Tue, 28 Feb 2017 02:04:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cibpU-0000Ol-N7 for qemu-devel@nongnu.org; Tue, 28 Feb 2017 02:04:15 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:47006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibpU-0000OZ-GW; Tue, 28 Feb 2017 02:04:12 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id B09E54358A; Tue, 28 Feb 2017 10:04:11 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 894822C; Tue, 28 Feb 2017 09:45:00 +0300 (MSK) Received: (nullmailer pid 19629 invoked by uid 1000); Tue, 28 Feb 2017 06:44:59 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 09:44:50 +0300 Message-Id: <4729b3a41d11f053a6d03620ff12b266dd0ab330.1488264243.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 07/14] register: fix incorrect read mask X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Michael Tokarev , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 The register_read() and register_write() functions expect a bitmask argumen= t. To avoid duplicated code, a new inlined function register_enabled_mask() is introduced. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Signed-off-by: Michael Tokarev --- hw/core/register.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/hw/core/register.c b/hw/core/register.c index be170dc..dc335a7 100644 --- a/hw/core/register.c +++ b/hw/core/register.c @@ -59,6 +59,15 @@ static inline uint64_t register_read_val(RegisterInfo *r= eg) return 0; /* unreachable */ } =20 +static inline uint64_t register_enabled_mask(int data_size, unsigned size) +{ + if (data_size < size) { + size =3D data_size; + } + + return MAKE_64BIT_MASK(0, size * 8); +} + void register_write(RegisterInfo *reg, uint64_t val, uint64_t we, const char *prefix, bool debug) { @@ -192,11 +201,7 @@ void register_write_memory(void *opaque, hwaddr addr, } =20 /* Generate appropriate write enable mask */ - if (reg->data_size < size) { - we =3D MAKE_64BIT_MASK(0, reg->data_size * 8); - } else { - we =3D MAKE_64BIT_MASK(0, size * 8); - } + we =3D register_enabled_mask(reg->data_size, size); =20 register_write(reg, value, we, reg_array->prefix, reg_array->debug); @@ -208,6 +213,7 @@ uint64_t register_read_memory(void *opaque, hwaddr addr, RegisterInfoArray *reg_array =3D opaque; RegisterInfo *reg =3D NULL; uint64_t read_val; + uint64_t re; int i; =20 for (i =3D 0; i < reg_array->num_elements; i++) { @@ -223,7 +229,10 @@ uint64_t register_read_memory(void *opaque, hwaddr add= r, return 0; } =20 - read_val =3D register_read(reg, size * 8, reg_array->prefix, + /* Generate appropriate read enable mask */ + re =3D register_enabled_mask(reg->data_size, size); + + read_val =3D register_read(reg, re, reg_array->prefix, reg_array->debug); =20 return extract64(read_val, 0, size * 8); --=20 2.1.4 From nobody Fri May 3 03:46:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488265196267430.4114241196621; Mon, 27 Feb 2017 22:59:56 -0800 (PST) Received: from localhost ([::1]:59025 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciblK-0003EA-2B for importer@patchew.org; Tue, 28 Feb 2017 01:59:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibfq-00079W-RV for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:54:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cibfn-0005ss-Qp for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:54:14 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:59578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibfn-0005sW-Ib; Tue, 28 Feb 2017 01:54:11 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 9084943588; Tue, 28 Feb 2017 09:54:10 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id A32F83D7; Tue, 28 Feb 2017 09:45:01 +0300 (MSK) Received: (nullmailer pid 19631 invoked by uid 1000); Tue, 28 Feb 2017 06:44:59 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 09:44:51 +0300 Message-Id: <8ea1d056320dd5bbbd480c45e6cfb8e3689bcc7e.1488264243.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 08/14] cadence_gem: Remove unused parameter debug message X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Michael Tokarev , Fam Zheng Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Fam Zheng Reported by cppcheck. Signed-off-by: Fam Zheng Signed-off-by: Michael Tokarev --- hw/net/cadence_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c index e99d454..d4de8ad 100644 --- a/hw/net/cadence_gem.c +++ b/hw/net/cadence_gem.c @@ -508,7 +508,7 @@ static void gem_update_int_status(CadenceGEMState *s) =20 if ((s->num_priority_queues =3D=3D 1) && s->regs[GEM_ISR]) { /* No priority queues, just trigger the interrupt */ - DB_PRINT("asserting int.\n", i); + DB_PRINT("asserting int.\n"); qemu_set_irq(s->irq[0], 1); return; } --=20 2.1.4 From nobody Fri May 3 03:46:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488265196264470.8852939134862; Mon, 27 Feb 2017 22:59:56 -0800 (PST) Received: from localhost ([::1]:59026 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciblK-0003EM-6T for importer@patchew.org; Tue, 28 Feb 2017 01:59:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45120) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibfq-00079Z-S4 for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:54:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cibfn-0005sn-Qb for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:54:14 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:54252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibfn-0005sU-IN; Tue, 28 Feb 2017 01:54:11 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 8480943587; Tue, 28 Feb 2017 09:54:10 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id F0D8A3DF; Tue, 28 Feb 2017 09:45:01 +0300 (MSK) Received: (nullmailer pid 19633 invoked by uid 1000); Tue, 28 Feb 2017 06:44:59 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 09:44:52 +0300 Message-Id: <6b591ad613010f136dec4657f3c8ed6b051802c8.1488264243.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 09/14] tests/prom-env: Enable the test for the sun4u machine, too X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Thomas Huth , Michael Tokarev Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth The 32-bit TCG bug has been fixed a while ago, so we can enable this test for sparc64 now, too. Unfortunately, OpenBIOS does not work with the sun4v machine anymore (it needs to catch up with the improved emulation), so we can only enable this test for the sun4u machine right now. Signed-off-by: Thomas Huth Signed-off-by: Michael Tokarev --- tests/Makefile.include | 3 +-- tests/prom-env-test.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index e60bb6c..3310c17 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -308,8 +308,7 @@ check-qtest-sparc-y =3D tests/prom-env-test$(EXESUF) check-qtest-sparc64-y =3D tests/endianness-test$(EXESUF) #check-qtest-sparc64-y +=3D tests/m48t59-test$(EXESUF) #gcov-files-sparc64-y +=3D hw/timer/m48t59.c -#Disabled for now, triggers a TCG bug on 32-bit hosts -#check-qtest-sparc64-y +=3D tests/prom-env-test$(EXESUF) +check-qtest-sparc64-y +=3D tests/prom-env-test$(EXESUF) =20 check-qtest-arm-y =3D tests/tmp105-test$(EXESUF) check-qtest-arm-y +=3D tests/ds1338-test$(EXESUF) diff --git a/tests/prom-env-test.c b/tests/prom-env-test.c index bd33bc3..eac207b 100644 --- a/tests/prom-env-test.c +++ b/tests/prom-env-test.c @@ -76,7 +76,7 @@ static void add_tests(const char *machines[]) int main(int argc, char *argv[]) { const char *sparc_machines[] =3D { "SPARCbook", "Voyager", "SS-20", NU= LL }; - const char *sparc64_machines[] =3D { "sun4u", "sun4v", NULL }; + const char *sparc64_machines[] =3D { "sun4u", NULL }; const char *ppc_machines[] =3D { "mac99", "g3beige", NULL }; const char *ppc64_machines[] =3D { "mac99", "g3beige", "pseries", NULL= }; const char *arch =3D qtest_get_arch(); --=20 2.1.4 From nobody Fri May 3 03:46:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488264970389950.0798206174295; Mon, 27 Feb 2017 22:56:10 -0800 (PST) Received: from localhost ([::1]:59006 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibhg-0008Mu-Pe for importer@patchew.org; Tue, 28 Feb 2017 01:56:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibfq-00079X-Rg for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:54:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cibfo-0005t7-6X for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:54:14 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:33108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibfn-0005sd-VU; Tue, 28 Feb 2017 01:54:12 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 9B3644358A; Tue, 28 Feb 2017 09:54:10 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 64C403D4; Tue, 28 Feb 2017 09:45:01 +0300 (MSK) Received: (nullmailer pid 19635 invoked by uid 1000); Tue, 28 Feb 2017 06:44:59 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 09:44:53 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 10/14] Update copyright year X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Michael Tokarev Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Marc-Andr=C3=A9 Lureau It's still time to wish happy new year! The Year of the Rooster will begin on January 28, 2017! Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael Tokarev --- include/qemu-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu-common.h b/include/qemu-common.h index 1430390..d218821 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -19,7 +19,7 @@ #include "qemu/option.h" =20 /* Copyright string for -version arguments, About dialogs, etc */ -#define QEMU_COPYRIGHT "Copyright (c) 2003-2016 " \ +#define QEMU_COPYRIGHT "Copyright (c) 2003-2017 " \ "Fabrice Bellard and the QEMU Project developers" =20 /* main function, renamed */ --=20 2.1.4 From nobody Fri May 3 03:46:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488265352070342.80104539733827; Mon, 27 Feb 2017 23:02:32 -0800 (PST) Received: from localhost ([::1]:59047 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibnp-00059G-Lt for importer@patchew.org; Tue, 28 Feb 2017 02:02:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibfq-00079a-SQ for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:54:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cibfo-0005tL-IA for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:54:14 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:56570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibfo-0005t1-9s; Tue, 28 Feb 2017 01:54:12 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id A2A714358B; Tue, 28 Feb 2017 09:54:10 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id CA3BD233; Tue, 28 Feb 2017 09:45:00 +0300 (MSK) Received: (nullmailer pid 19637 invoked by uid 1000); Tue, 28 Feb 2017 06:44:59 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 09:44:54 +0300 Message-Id: <79cad2faace2175f2f21dc4f8f40c3b7722cf999.1488264243.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 11/14] qemu-options.hx: add missing id=chr0 chardev argument in vhost-user example X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Michael Tokarev , Vincenzo Maffione Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Vincenzo Maffione In the vhost-user example, a chardev with id chr0 is referenced by the vhost-user net backend, but the id is not specified in the chardev option. Signed-off-by: Vincenzo Maffione Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index bf458f8..faf5cf8 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2146,7 +2146,7 @@ Example: @example qemu -m 512 -object memory-backend-file,id=3Dmem,size=3D512M,mem-path=3D/h= ugetlbfs,share=3Don \ -numa node,memdev=3Dmem \ - -chardev socket,path=3D/path/to/socket \ + -chardev socket,id=3Dchr0,path=3D/path/to/socket \ -netdev type=3Dvhost-user,id=3Dnet0,chardev=3Dchr0 \ -device virtio-net-pci,netdev=3Dnet0 @end example --=20 2.1.4 From nobody Fri May 3 03:46:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488265732456915.1364177930976; Mon, 27 Feb 2017 23:08:52 -0800 (PST) Received: from localhost ([::1]:59082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibty-0001CQ-Uv for importer@patchew.org; Tue, 28 Feb 2017 02:08:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibpX-0006ES-Pf for qemu-devel@nongnu.org; Tue, 28 Feb 2017 02:04:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cibpU-0000Ow-Nw for qemu-devel@nongnu.org; Tue, 28 Feb 2017 02:04:15 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:40398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibpU-0000Oa-Gx; Tue, 28 Feb 2017 02:04:12 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id ADF0C43578; Tue, 28 Feb 2017 10:04:11 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 2C9003D3; Tue, 28 Feb 2017 09:45:01 +0300 (MSK) Received: (nullmailer pid 19639 invoked by uid 1000); Tue, 28 Feb 2017 06:44:59 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 09:44:55 +0300 Message-Id: <3d74ee7dcae57b93a64737b954d76cf96236a367.1488264243.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 12/14] lm32: milkymist-tmu2: fix a third integer overflow X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Peter Maydell Don't truncate the multiplication and do a 64 bit one instead because the result is stored in a 64 bit variable. This fixes a similar coverity warning to commits 237a8650d640 and 4382fa655498, in a similar way, and is the final third of the fix for coverity CID 1167561 (hopefully!). Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Michael Walle Signed-off-by: Michael Tokarev --- hw/display/milkymist-tmu2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/milkymist-tmu2.c b/hw/display/milkymist-tmu2.c index 7528665..59120dd 100644 --- a/hw/display/milkymist-tmu2.c +++ b/hw/display/milkymist-tmu2.c @@ -293,7 +293,7 @@ static void tmu2_start(MilkymistTMU2State *s) cpu_physical_memory_unmap(mesh, mesh_len, 0, mesh_len); =20 /* Write back the OpenGL framebuffer to the QEMU framebuffer */ - fb_len =3D 2 * s->regs[R_DSTHRES] * s->regs[R_DSTVRES]; + fb_len =3D 2ULL * s->regs[R_DSTHRES] * s->regs[R_DSTVRES]; fb =3D cpu_physical_memory_map(s->regs[R_DSTFBUF], &fb_len, 1); if (fb =3D=3D NULL) { glDeleteTextures(1, &texture); --=20 2.1.4 From nobody Fri May 3 03:46:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488264398071977.1250487991114; Mon, 27 Feb 2017 22:46:38 -0800 (PST) Received: from localhost ([::1]:58949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibYS-0002Yr-JS for importer@patchew.org; Tue, 28 Feb 2017 01:46:36 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibX1-0001oB-Lc for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:45:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cibWy-0003Dw-JY for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:45:07 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:41176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibWy-0003DY-CG; Tue, 28 Feb 2017 01:45:04 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id E0A6043589; Tue, 28 Feb 2017 09:45:00 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 662013D1; Tue, 28 Feb 2017 09:45:00 +0300 (MSK) Received: (nullmailer pid 19641 invoked by uid 1000); Tue, 28 Feb 2017 06:44:59 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 09:44:56 +0300 Message-Id: <6c608953a5512b556fd0913d740e932366d6bb5d.1488264243.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 13/14] hw/acpi/tco.c: fix tco timer stop X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Pavlikevich , qemu-trivial@nongnu.org, Michael Tokarev Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Igor Pavlikevich TCO timer does not actually stop Signed-off-by: Igor Pavlikevich Signed-off-by: Michael Tokarev --- hw/acpi/tco.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/acpi/tco.c b/hw/acpi/tco.c index 8ce7daf..b4adac8 100644 --- a/hw/acpi/tco.c +++ b/hw/acpi/tco.c @@ -49,6 +49,7 @@ static inline void tco_timer_reload(TCOIORegs *tr) static inline void tco_timer_stop(TCOIORegs *tr) { tr->expire_time =3D -1; + timer_del(tr->tco_timer); } =20 static void tco_timer_expired(void *opaque) --=20 2.1.4 From nobody Fri May 3 03:46:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488264970948769.6587341167963; Mon, 27 Feb 2017 22:56:10 -0800 (PST) Received: from localhost ([::1]:59005 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibhh-0008Mq-Io for importer@patchew.org; Tue, 28 Feb 2017 01:56:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibfq-00079Y-Rr for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:54:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cibfo-0005t9-6A for qemu-devel@nongnu.org; Tue, 28 Feb 2017 01:54:14 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:38538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cibfn-0005se-VX; Tue, 28 Feb 2017 01:54:12 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 9363243589; Tue, 28 Feb 2017 09:54:10 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 368933E4; Tue, 28 Feb 2017 09:45:02 +0300 (MSK) Received: (nullmailer pid 19643 invoked by uid 1000); Tue, 28 Feb 2017 06:44:59 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 28 Feb 2017 09:44:57 +0300 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 14/14] syscall: fixed mincore(2) not failing with ENOMEM X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Riku Voipio , "Franklin \\\"Snaipe\\\" Mathieu" , Michael Tokarev , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Franklin \\\"Snaipe\\\" Mathieu" The current implementation of the mincore(2) syscall sets errno to EFAULT when the region identified by the first two parameters is invalid. This goes against the man page specification, where mincore(2) should only fail with EFAULT when the third parameter is an invalid address; and fail with ENOMEM when the checked region does not point to mapped memory. Signed-off-by: Franklin "Snaipe" Mathieu Cc: Riku Voipio Cc: Aurelien Jarno Reviewed-by: Laurent Vivier Signed-off-by: Michael Tokarev --- linux-user/syscall.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f569f82..6715ce3 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11063,11 +11063,16 @@ abi_long do_syscall(void *cpu_env, int num, abi_l= ong arg1, case TARGET_NR_mincore: { void *a; + ret =3D -TARGET_ENOMEM; + a =3D lock_user(VERIFY_READ, arg1, arg2, 0); + if (!a) { + goto fail; + } ret =3D -TARGET_EFAULT; - if (!(a =3D lock_user(VERIFY_READ, arg1,arg2, 0))) - goto efault; - if (!(p =3D lock_user_string(arg3))) + p =3D lock_user_string(arg3); + if (!p) { goto mincore_fail; + } ret =3D get_errno(mincore(a, arg2, p)); unlock_user(p, arg3, ret); mincore_fail: --=20 2.1.4