From nobody Wed May 1 22:58:17 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.zohomail.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 1499866795990698.7615655732907; Wed, 12 Jul 2017 06:39:55 -0700 (PDT) Received: from localhost ([::1]:53111 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHrs-00017v-OX for importer@patchew.org; Wed, 12 Jul 2017 09:39:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHqN-0008UU-EE for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:38:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVHqJ-0005KI-DC for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:38:19 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:53715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHqJ-0005Jg-45; Wed, 12 Jul 2017 09:38:15 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id B67E740F66; Wed, 12 Jul 2017 16:38:13 +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 3CB07AD0; Wed, 12 Jul 2017 16:38:13 +0300 (MSK) Received: (nullmailer pid 29032 invoked by uid 1000); Wed, 12 Jul 2017 13:38:12 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 16:37:57 +0300 Message-Id: X-Mailer: git-send-email 2.11.0 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/13] target/xtensa: gdbstub: drop dead return statement 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, Max Filippov , 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: Max Filippov Signed-off-by: Max Filippov Reviewed-by: Laurent Vivier Signed-off-by: Michael Tokarev --- target/xtensa/gdbstub.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/xtensa/gdbstub.c b/target/xtensa/gdbstub.c index da131ae8cc..d78a1b437d 100644 --- a/target/xtensa/gdbstub.c +++ b/target/xtensa/gdbstub.c @@ -72,7 +72,6 @@ int xtensa_cpu_gdb_read_register(CPUState *cs, uint8_t *m= em_buf, int n) __func__, n, reg->type); memset(mem_buf, 0, reg->size); return reg->size; - return 0; } } =20 --=20 2.11.0 From nobody Wed May 1 22:58:17 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.zohomail.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 1499867740985606.5198389576873; Wed, 12 Jul 2017 06:55:40 -0700 (PDT) Received: from localhost ([::1]:53260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVI79-0007VW-Pc for importer@patchew.org; Wed, 12 Jul 2017 09:55:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHqN-0008US-DJ for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:38:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVHqJ-0005Kg-FV for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:38:19 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:54353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHqJ-0005Jt-8P; Wed, 12 Jul 2017 09:38:15 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id F0D8940F67; Wed, 12 Jul 2017 16:38:13 +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 69C16AC8; Wed, 12 Jul 2017 16:38:13 +0300 (MSK) Received: (nullmailer pid 29034 invoked by uid 1000); Wed, 12 Jul 2017 13:38:12 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 16:37:58 +0300 Message-Id: <3bcf7d7df552c8bd4fdfe70b753f45169407cacb.1499866676.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.11.0 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 02/13] util/qemu-sockets: Drop unused helper socket_address_to_string() 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, Mao Zhongyi , 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: Mao Zhongyi Signed-off-by: Mao Zhongyi Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- include/qemu/sockets.h | 15 --------------- util/qemu-sockets.c | 34 ---------------------------------- 2 files changed, 49 deletions(-) diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 5c326db232..ef6b5591f7 100644 --- a/include/qemu/sockets.h +++ b/include/qemu/sockets.h @@ -106,21 +106,6 @@ SocketAddress *socket_local_address(int fd, Error **er= rp); SocketAddress *socket_remote_address(int fd, Error **errp); =20 /** - * socket_address_to_string: - * @addr: the socket address struct - * @errp: pointer to uninitialized error object - * - * Get the string representation of the socket - * address. A pointer to the char array containing - * string format will be returned, the caller is - * required to release the returned value when no - * longer required with g_free. - * - * Returns: the socket address in string format, or NULL on error - */ -char *socket_address_to_string(struct SocketAddress *addr, Error **errp); - -/** * socket_address_flatten: * @addr: the socket address to flatten * diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index d3e51089de..55b6c17f5f 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -1325,40 +1325,6 @@ SocketAddress *socket_remote_address(int fd, Error *= *errp) return socket_sockaddr_to_address(&ss, sslen, errp); } =20 -char *socket_address_to_string(struct SocketAddress *addr, Error **errp) -{ - char *buf; - InetSocketAddress *inet; - - switch (addr->type) { - case SOCKET_ADDRESS_TYPE_INET: - inet =3D &addr->u.inet; - if (strchr(inet->host, ':') =3D=3D NULL) { - buf =3D g_strdup_printf("%s:%s", inet->host, inet->port); - } else { - buf =3D g_strdup_printf("[%s]:%s", inet->host, inet->port); - } - break; - - case SOCKET_ADDRESS_TYPE_UNIX: - buf =3D g_strdup(addr->u.q_unix.path); - break; - - case SOCKET_ADDRESS_TYPE_FD: - buf =3D g_strdup(addr->u.fd.str); - break; - - case SOCKET_ADDRESS_TYPE_VSOCK: - buf =3D g_strdup_printf("%s:%s", - addr->u.vsock.cid, - addr->u.vsock.port); - break; - - default: - abort(); - } - return buf; -} =20 SocketAddress *socket_address_flatten(SocketAddressLegacy *addr_legacy) { --=20 2.11.0 From nobody Wed May 1 22:58:17 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.zohomail.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 1499867633187190.14302513978328; Wed, 12 Jul 2017 06:53:53 -0700 (PDT) Received: from localhost ([::1]:53241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVI5P-0005SH-41 for importer@patchew.org; Wed, 12 Jul 2017 09:53:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHqN-0008UW-Er for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:38:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVHqJ-0005KO-Cw for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:38:19 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:56061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHqJ-0005Jh-4J; Wed, 12 Jul 2017 09:38:15 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 626AC40F64; Wed, 12 Jul 2017 16:38:13 +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 CB282ACD; Wed, 12 Jul 2017 16:38:12 +0300 (MSK) Received: (nullmailer pid 29036 invoked by uid 1000); Wed, 12 Jul 2017 13:38:12 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 16:37:59 +0300 Message-Id: <5f37e6d4a7b22ccf1bb8fa4eb35784d90ff78fbc.1499866676.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.11.0 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/13] configure: Fix build with pkg-config and --static --enable-sdl 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 configure script prefers pkg-config over sdl-config, but the "--static-libs" parameter only exists for the latter. With pkg-config, "--static --libs" have to be used instead. Buglink: https://bugs.launchpad.net/qemu/+bug/984516 Signed-off-by: Thomas Huth Signed-off-by: Michael Tokarev --- configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 806658c98b..ce7e8aa842 100755 --- a/configure +++ b/configure @@ -2733,7 +2733,11 @@ int main( void ) { return SDL_Init (SDL_INIT_VIDEO);= } EOF sdl_cflags=3D$($sdlconfig --cflags 2>/dev/null) if test "$static" =3D "yes" ; then - sdl_libs=3D$($sdlconfig --static-libs 2>/dev/null) + if $pkg_config $sdlname --exists; then + sdl_libs=3D$($pkg_config $sdlname --static --libs 2>/dev/null) + else + sdl_libs=3D$($sdlconfig --static-libs 2>/dev/null) + fi else sdl_libs=3D$($sdlconfig --libs 2>/dev/null) fi --=20 2.11.0 From nobody Wed May 1 22:58:17 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.zohomail.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 1499868533144930.1748170828895; Wed, 12 Jul 2017 07:08:53 -0700 (PDT) Received: from localhost ([::1]:53444 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVIJs-0001l0-Cn for importer@patchew.org; Wed, 12 Jul 2017 10:08:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVI85-0008NY-4X for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:56:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVI81-0000qa-59 for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:56:37 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:39199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVI80-0000q5-TB; Wed, 12 Jul 2017 09:56:33 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 90D7040F61; Wed, 12 Jul 2017 16:56:31 +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 8D853ACA; Wed, 12 Jul 2017 16:38:13 +0300 (MSK) Received: (nullmailer pid 29038 invoked by uid 1000); Wed, 12 Jul 2017 13:38:12 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 16:38:00 +0300 Message-Id: <8f7b1bd6ceec07bf64a70d1a46c45cb45658af2d.1499866676.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.11.0 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 04/13] hw/misc: add missing includes 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 inlined create_unimplemented_device() calls sysbus_mmio_map_overlap(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- include/hw/misc/unimp.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/misc/unimp.h b/include/hw/misc/unimp.h index 3462d85836..52e068ec3e 100644 --- a/include/hw/misc/unimp.h +++ b/include/hw/misc/unimp.h @@ -8,6 +8,8 @@ #ifndef HW_MISC_UNIMP_H #define HW_MISC_UNIMP_H =20 +#include "hw/sysbus.h" + #define TYPE_UNIMPLEMENTED_DEVICE "unimplemented-device" =20 /** --=20 2.11.0 From nobody Wed May 1 22:58:17 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.zohomail.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 1499867896788815.6111423592016; Wed, 12 Jul 2017 06:58:16 -0700 (PDT) Received: from localhost ([::1]:53302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVI9d-00010Z-FA for importer@patchew.org; Wed, 12 Jul 2017 09:58:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHyP-0006ku-QB for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:46:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVHyL-0003PM-Ch for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:46:37 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:34065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHyL-0003Nu-4G; Wed, 12 Jul 2017 09:46:33 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 4262740F68; Wed, 12 Jul 2017 16:46:31 +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 B374AAD1; Wed, 12 Jul 2017 16:38:13 +0300 (MSK) Received: (nullmailer pid 29040 invoked by uid 1000); Wed, 12 Jul 2017 13:38:12 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 16:38:01 +0300 Message-Id: <667675623dc20b8d2f9ec2eff8a1c7eafcc86e19.1499866676.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.11.0 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 05/13] hw/pci: define msi_nonbroken in pci-stub 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 kludged field 'msi_nonbroken' is declared in "hw/pci/msi.h" and defined= in hw/pci/msi.c. When using an ARM config with CONFIG_PCI disabled, hw/pci/msi.c is not incl= uded. Without being PCI-related, the files hw/intc/arm_gicv[23*].c do access this field (to enable the kludge if PCI is enabled). The final link fails since hw/pci/msi.c is not included. Defining this field in pci-stub is safe enough for configs without CONFIG_P= CI. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Michael Tokarev --- hw/pci/pci-stub.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/pci/pci-stub.c b/hw/pci/pci-stub.c index 36d2c430c5..ecad664946 100644 --- a/hw/pci/pci-stub.c +++ b/hw/pci/pci-stub.c @@ -24,6 +24,9 @@ #include "qapi/qmp/qerror.h" #include "hw/pci/pci.h" #include "qmp-commands.h" +#include "hw/pci/msi.h" + +bool msi_nonbroken; =20 PciInfoList *qmp_query_pci(Error **errp) { --=20 2.11.0 From nobody Wed May 1 22:58:17 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.zohomail.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 149986736022724.942220561856402; Wed, 12 Jul 2017 06:49:20 -0700 (PDT) Received: from localhost ([::1]:53208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVI0z-0000B9-V3 for importer@patchew.org; Wed, 12 Jul 2017 09:49:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHqN-0008UV-E9 for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:38:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVHqJ-0005KU-E9 for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:38:19 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:38811) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHqJ-0005Jo-6m; Wed, 12 Jul 2017 09:38:15 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 7E91F40F65; Wed, 12 Jul 2017 16:38:13 +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 06F09ACF; Wed, 12 Jul 2017 16:38:13 +0300 (MSK) Received: (nullmailer pid 29042 invoked by uid 1000); Wed, 12 Jul 2017 13:38:12 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 16:38:02 +0300 Message-Id: X-Mailer: git-send-email 2.11.0 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 06/13] configure: Handle having no c++ compiler in FORTIFY_SOURCE check 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 Our FORTIFY_SOURCE check assumes that $cxx refers to a working C++ compiler, with the result that if you don't happen to have one then configure will spuriously print configure: line 4685: c++: command not found Fix this by adding a 'has $cxx' check. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Michael Tokarev --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index ce7e8aa842..08ef54103e 100755 --- a/configure +++ b/configure @@ -4771,7 +4771,7 @@ fi if test "$fortify_source" !=3D "no"; then if echo | $cc -dM -E - | grep __clang__ > /dev/null 2>&1 ; then fortify_source=3D"no"; - elif test -n "$cxx" && + elif test -n "$cxx" && has $cxx && echo | $cxx -dM -E - | grep __clang__ >/dev/null 2>&1 ; then fortify_source=3D"no"; else --=20 2.11.0 From nobody Wed May 1 22:58:17 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.zohomail.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 1499867045638791.5779883111232; Wed, 12 Jul 2017 06:44:05 -0700 (PDT) Received: from localhost ([::1]:53171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHvu-0004HG-9z for importer@patchew.org; Wed, 12 Jul 2017 09:44:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHqM-0008UB-RA for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:38:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVHqI-0005JQ-D0 for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:38:18 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:51619) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHqI-0005Iv-51; Wed, 12 Jul 2017 09:38:14 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id C4E6040F62; Wed, 12 Jul 2017 16:38: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 A1AC8ACA; Wed, 12 Jul 2017 16:38:12 +0300 (MSK) Received: (nullmailer pid 29044 invoked by uid 1000); Wed, 12 Jul 2017 13:38:12 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 16:38:03 +0300 Message-Id: X-Mailer: git-send-email 2.11.0 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/13] elf-loader: warn about invalid endianness 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 fprintf(stderr) is how errors are reported in this file. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Michael Tokarev --- hw/core/loader.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/core/loader.c b/hw/core/loader.c index f72930ca4a..3409cc6d1d 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -478,6 +478,7 @@ int load_elf_ram(const char *filename, } =20 if (target_data_order !=3D e_ident[EI_DATA]) { + fprintf(stderr, "%s: wrong endianness\n", filename); ret =3D ELF_LOAD_WRONG_ENDIAN; goto fail; } --=20 2.11.0 From nobody Wed May 1 22:58:17 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.zohomail.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 1499868027166524.0870221765787; Wed, 12 Jul 2017 07:00:27 -0700 (PDT) Received: from localhost ([::1]:53335 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVIBk-0003dX-2r for importer@patchew.org; Wed, 12 Jul 2017 10:00:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHyQ-0006lK-Bd for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:46:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVHyM-0003QF-6c for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:46:38 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:50221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHyL-0003Ps-UH; Wed, 12 Jul 2017 09:46:34 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 5B84640F6A; Wed, 12 Jul 2017 16:46:31 +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 785DFAD8; Wed, 12 Jul 2017 16:38:14 +0300 (MSK) Received: (nullmailer pid 29047 invoked by uid 1000); Wed, 12 Jul 2017 13:38:12 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 16:38:04 +0300 Message-Id: <32fb354b086eb8981a48c187c17fd937760cd02e.1499866676.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.11.0 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 08/13] hw/core: fix missing return value in load_image_targphys_as() 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 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Signed-off-by: Michael Tokarev --- hw/core/loader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/core/loader.c b/hw/core/loader.c index 3409cc6d1d..c17ace0a2e 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -150,7 +150,9 @@ int load_image_targphys_as(const char *filename, return -1; } if (size > 0) { - rom_add_file_fixed_as(filename, addr, -1, as); + if (rom_add_file_fixed_as(filename, addr, -1, as) < 0) { + return -1; + } } return size; } --=20 2.11.0 From nobody Wed May 1 22:58:17 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.zohomail.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 1499868000107244.59178306635272; Wed, 12 Jul 2017 07:00:00 -0700 (PDT) Received: from localhost ([::1]:53318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVIBK-00039V-Ty for importer@patchew.org; Wed, 12 Jul 2017 09:59:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39470) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVI85-0008NV-44 for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:56:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVI81-0000qZ-4u for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:56:37 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:54545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVI80-0000q6-TV; Wed, 12 Jul 2017 09:56:33 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 910BF40F6A; Wed, 12 Jul 2017 16:56:31 +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 8D90BAC8; Wed, 12 Jul 2017 16:38:14 +0300 (MSK) Received: (nullmailer pid 29049 invoked by uid 1000); Wed, 12 Jul 2017 13:38:12 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 16:38:05 +0300 Message-Id: <9bd8e9330ade42878b19a5172131087220d590d5.1499866676.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.11.0 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 09/13] qga-win32: Fix memory leak of device information set 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, Li Ping , 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: Li Ping The caller of SetupDiGetClassDevs must delete the returned device informati= on set when it is no longer needed by calling SetupDiDestroyDeviceInfoList. Signed-off-by: Li Ping Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Michael Tokarev --- qga/commands-win32.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 439d229225..6f1645747b 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -512,7 +512,7 @@ static GuestPCIAddress *get_pci_info(char *guid, Error = **errp) } else { error_setg_win32(errp, GetLastError(), "failed to get device name"); - goto out; + goto free_dev_info; } } =20 @@ -560,6 +560,9 @@ static GuestPCIAddress *get_pci_info(char *guid, Error = **errp) pci->bus =3D bus; break; } + +free_dev_info: + SetupDiDestroyDeviceInfoList(dev_info); out: g_free(buffer); g_free(name); --=20 2.11.0 From nobody Wed May 1 22:58:17 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.zohomail.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 1499867495670120.53728589046693; Wed, 12 Jul 2017 06:51:35 -0700 (PDT) Received: from localhost ([::1]:53224 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVI3A-0002he-EF for importer@patchew.org; Wed, 12 Jul 2017 09:51:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHyQ-0006lN-Be for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:46:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVHyL-0003PQ-CU for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:46:38 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:44751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHyL-0003Nv-4K; Wed, 12 Jul 2017 09:46:33 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 61EFC40F6B; Wed, 12 Jul 2017 16:46:31 +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 28854ACF; Wed, 12 Jul 2017 16:38:14 +0300 (MSK) Received: (nullmailer pid 29051 invoked by uid 1000); Wed, 12 Jul 2017 13:38:12 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 16:38:06 +0300 Message-Id: <44d619beb5ac50b09ce6785add8ec637de461d6a.1499866676.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.11.0 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 10/13] hxtool: remove dead -q option 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, Paolo Bonzini , 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: Paolo Bonzini This was used to extract .txt documentation for QMP. This was changed to use the QAPI schema instead, so zap it. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael Tokarev --- scripts/hxtool | 46 +--------------------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/scripts/hxtool b/scripts/hxtool index 5468cd7782..1e2c97c5e6 100644 --- a/scripts/hxtool +++ b/scripts/hxtool @@ -7,7 +7,7 @@ hxtoh() case $str in HXCOMM*) ;; - STEXI*|ETEXI*|SQMP*|EQMP*) flag=3D$(($flag^1)) + STEXI*|ETEXI*) flag=3D$(($flag^1)) ;; *) test $flag -eq 1 && printf "%s\n" "$str" @@ -45,12 +45,6 @@ hxtotexi() fi flag=3D0 ;; - SQMP*|EQMP*) - if test $flag -eq 1 ; then - printf "line %d: syntax error: expected ETEXI, found '%s'\= n" "$line" "$str" >&2 - exit 1 - fi - ;; DEFHEADING*) print_texi_heading "$(expr "$str" : "DEFHEADING(\(.*\))")" ;; @@ -65,47 +59,9 @@ hxtotexi() done } =20 -hxtoqmp() -{ - IFS=3D - flag=3D0 - line=3D1 - while read -r str; do - case "$str" in - HXCOMM*) - ;; - SQMP*) - if test $flag -eq 1 ; then - printf "line %d: syntax error: expected EQMP, found '%s'\n= " "$line" "$str" >&2 - exit 1 - fi - flag=3D1 - ;; - EQMP*) - if test $flag -ne 1 ; then - printf "line %d: syntax error: expected SQMP, found '%s'\n= " "$line" "$str" >&2 - exit 1 - fi - flag=3D0 - ;; - STEXI*|ETEXI*) - if test $flag -eq 1 ; then - printf "line %d: syntax error: expected EQMP, found '%s'\n= " "$line" "$str" >&2 - exit 1 - fi - ;; - *) - test $flag -eq 1 && printf '%s\n' "$str" - ;; - esac - line=3D$((line+1)) - done -} - case "$1" in "-h") hxtoh ;; "-t") hxtotexi ;; -"-q") hxtoqmp ;; *) exit 1 ;; esac =20 --=20 2.11.0 From nobody Wed May 1 22:58:17 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.zohomail.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 1499867467589895.9220896556967; Wed, 12 Jul 2017 06:51:07 -0700 (PDT) Received: from localhost ([::1]:53222 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVI2g-00023w-1W for importer@patchew.org; Wed, 12 Jul 2017 09:51:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHyP-0006kk-L2 for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:46:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVHyL-0003Pl-IC for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:46:37 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:60401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHyL-0003Ny-49; Wed, 12 Jul 2017 09:46:33 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 29B7B40F67; Wed, 12 Jul 2017 16:46:31 +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 A534EAEB; Wed, 12 Jul 2017 16:38:14 +0300 (MSK) Received: (nullmailer pid 29053 invoked by uid 1000); Wed, 12 Jul 2017 13:38:12 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 16:38:07 +0300 Message-Id: X-Mailer: git-send-email 2.11.0 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 11/13] include/hw/ptimer.h: Add documentation comments 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 Add documentation comments describing the public API of the ptimer countdown timer. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Michael Tokarev --- include/hw/ptimer.h | 120 ++++++++++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 120 insertions(+) diff --git a/include/hw/ptimer.h b/include/hw/ptimer.h index eafc3f0a86..fc4ef5cc1d 100644 --- a/include/hw/ptimer.h +++ b/include/hw/ptimer.h @@ -12,6 +12,20 @@ #include "qemu/timer.h" #include "migration/vmstate.h" =20 +/* The ptimer API implements a simple periodic countdown timer. + * The countdown timer has a value (which can be read and written via + * ptimer_get_count() and ptimer_set_count()). When it is enabled + * using ptimer_run(), the value will count downwards at the frequency + * which has been configured using ptimer_set_period() or ptimer_set_freq(= ). + * When it reaches zero it will trigger a QEMU bottom half handler, and + * can be set to either reload itself from a specified limit value + * and keep counting down, or to stop (as a one-shot timer). + * + * Forgetting to set the period/frequency (or setting it to zero) is a + * bug in the QEMU device and will cause warning messages to be printed + * to stderr when the guest attempts to enable the timer. + */ + /* The default ptimer policy retains backward compatibility with the legacy * timers. Custom policies are adjusting the default one. Consider providi= ng * a correct policy for your timer. @@ -59,15 +73,121 @@ typedef struct ptimer_state ptimer_state; typedef void (*ptimer_cb)(void *opaque); =20 +/** + * ptimer_init - Allocate and return a new ptimer + * @bh: QEMU bottom half which is run on timer expiry + * @policy: PTIMER_POLICY_* bits specifying behaviour + * + * The ptimer returned must be freed using ptimer_free(). + * The ptimer takes ownership of @bh and will delete it + * when the ptimer is eventually freed. + */ ptimer_state *ptimer_init(QEMUBH *bh, uint8_t policy_mask); + +/** + * ptimer_free - Free a ptimer + * @s: timer to free + * + * Free a ptimer created using ptimer_init() (including + * deleting the bottom half which it is using). + */ void ptimer_free(ptimer_state *s); + +/** + * ptimer_set_period - Set counter increment interval in nanoseconds + * @s: ptimer to configure + * @period: period of the counter in nanoseconds + * + * Note that if your counter behaviour is specified as having a + * particular frequency rather than a period then ptimer_set_freq() + * may be more appropriate. + */ void ptimer_set_period(ptimer_state *s, int64_t period); + +/** + * ptimer_set_freq - Set counter frequency in Hz + * @s: ptimer to configure + * @freq: counter frequency in Hz + * + * This does the same thing as ptimer_set_period(), so you only + * need to call one of them. If the counter behaviour is specified + * as setting the frequency then this function is more appropriate, + * because it allows specifying an effective period which is + * precise to fractions of a nanosecond, avoiding rounding errors. + */ void ptimer_set_freq(ptimer_state *s, uint32_t freq); + +/** + * ptimer_get_limit - Get the configured limit of the ptimer + * @s: ptimer to query + * + * This function returns the current limit (reload) value + * of the down-counter; that is, the value which it will be + * reset to when it hits zero. + * + * Generally timer devices using ptimers should be able to keep + * their reload register state inside the ptimer using the get + * and set limit functions rather than needing to also track it + * in their own state structure. + */ uint64_t ptimer_get_limit(ptimer_state *s); + +/** + * ptimer_set_limit - Set the limit of the ptimer + * @s: ptimer + * @limit: initial countdown value + * @reload: if nonzero, then reset the counter to the new limit + * + * Set the limit value of the down-counter. The @reload flag can + * be used to emulate the behaviour of timers which immediately + * reload the counter when their reload register is written to. + */ void ptimer_set_limit(ptimer_state *s, uint64_t limit, int reload); + +/** + * ptimer_get_count - Get the current value of the ptimer + * @s: ptimer + * + * Return the current value of the down-counter. This will + * return the correct value whether the counter is enabled or + * disabled. + */ uint64_t ptimer_get_count(ptimer_state *s); + +/** + * ptimer_set_count - Set the current value of the ptimer + * @s: ptimer + * @count: count value to set + * + * Set the value of the down-counter. If the counter is currently + * enabled this will arrange for a timer callback at the appropriate + * point in the future. + */ void ptimer_set_count(ptimer_state *s, uint64_t count); + +/** + * ptimer_run - Start a ptimer counting + * @s: ptimer + * @oneshot: non-zero if this timer should only count down once + * + * Start a ptimer counting down; when it reaches zero the bottom half + * passed to ptimer_init() will be invoked. If the @oneshot argument is ze= ro, + * the counter value will then be reloaded from the limit and it will + * start counting down again. If @oneshot is non-zero, then the counter + * will disable itself when it reaches zero. + */ void ptimer_run(ptimer_state *s, int oneshot); + +/** + * ptimer_stop - Stop a ptimer counting + * @s: ptimer + * + * Pause a timer (the count stays at its current value until ptimer_run() + * is called to start it counting again). + * + * Note that this can cause it to "lose" time, even if it is immediately + * restarted. + */ void ptimer_stop(ptimer_state *s); =20 extern const VMStateDescription vmstate_ptimer; --=20 2.11.0 From nobody Wed May 1 22:58:17 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.zohomail.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 1499867311715837.2646297608788; Wed, 12 Jul 2017 06:48:31 -0700 (PDT) Received: from localhost ([::1]:53206 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVI0C-00081y-IL for importer@patchew.org; Wed, 12 Jul 2017 09:48:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35714) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHyP-0006kq-Ob for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:46:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVHyL-0003PG-CG for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:46:37 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:47379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHyL-0003Nx-4E; Wed, 12 Jul 2017 09:46:33 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 4585040F69; Wed, 12 Jul 2017 16:46:31 +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 02A6FACD; Wed, 12 Jul 2017 16:38:14 +0300 (MSK) Received: (nullmailer pid 29055 invoked by uid 1000); Wed, 12 Jul 2017 13:38:12 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 16:38:08 +0300 Message-Id: <9f98da52e8bf0515d204861bbef2bf4d5abb618f.1499866676.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.11.0 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 12/13] qobject: Catch another straggler for use of qdict_put_str() 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 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: Eric Blake Dan's addition of key-secret improvements in commit 29cf9336 was developed prior to the addition of QDict scalar insertion macros, but merged after the general cleanup in commit 46f5ac20. Patch created mechanically by rerunning: spatch --sp-file scripts/coccinelle/qobject.cocci \ --macro-file scripts/cocci-macro-file.h --dir . --in-place Signed-off-by: Eric Blake Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia Signed-off-by: Michael Tokarev --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index f7ffb79db6..02900ce1d1 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -355,7 +355,7 @@ static int img_add_key_secrets(void *opaque, QDict *options =3D opaque; =20 if (g_str_has_suffix(name, "key-secret")) { - qdict_put(options, name, qstring_from_str(value)); + qdict_put_str(options, name, value); } =20 return 0; --=20 2.11.0 From nobody Wed May 1 22:58:17 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.zohomail.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 1499868177888303.6744858038736; Wed, 12 Jul 2017 07:02:57 -0700 (PDT) Received: from localhost ([::1]:53373 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVIEA-0005Z0-J1 for importer@patchew.org; Wed, 12 Jul 2017 10:02:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHyR-0006mC-A3 for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:46:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVHyL-0003PW-D5 for qemu-devel@nongnu.org; Wed, 12 Jul 2017 09:46:39 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:56165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVHyL-0003Nw-4I; Wed, 12 Jul 2017 09:46:33 -0400 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 280CD40F66; Wed, 12 Jul 2017 16:46:31 +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 582A5AD0; Wed, 12 Jul 2017 16:38:14 +0300 (MSK) Received: (nullmailer pid 29057 invoked by uid 1000); Wed, 12 Jul 2017 13:38:12 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Wed, 12 Jul 2017 16:38:09 +0300 Message-Id: <10cb4ec41734243b2798bd1d53919827eaccd673.1499866676.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.11.0 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/13] qobject: Update coccinelle script to catch Q{INC, DEC}REF 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 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: Eric Blake A recent patch submission was about to use qobject_decref(QOBJECT(E)), even though we already have QDECREF(E) for that purpose. While our tree is currently free from the longhand form, we might as well update our coccinelle script to catch any future relapses. Signed-off-by: Eric Blake Signed-off-by: Michael Tokarev --- scripts/coccinelle/qobject.cocci | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/coccinelle/qobject.cocci b/scripts/coccinelle/qobject.= cocci index c3253deb1b..c518caf7b1 100644 --- a/scripts/coccinelle/qobject.cocci +++ b/scripts/coccinelle/qobject.cocci @@ -3,6 +3,12 @@ expression Obj, Key, E; @@ ( +- qobject_incref(QOBJECT(E)); ++ QINCREF(E); +| +- qobject_decref(QOBJECT(E)); ++ QDECREF(E); +| - qdict_put_obj(Obj, Key, QOBJECT(E)); + qdict_put(Obj, Key, E); | --=20 2.11.0