From patchwork Mon Dec 14 15:57:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416054 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmK66Md5z9sTK for ; Tue, 15 Dec 2020 02:58:50 +1100 (AEDT) Received: from localhost ([::1]:38986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqFM-0007su-RU for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 10:58:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEQ-0007rG-Bp; Mon, 14 Dec 2020 10:57:50 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:42109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEN-0001Pl-4u; Mon, 14 Dec 2020 10:57:50 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MZCX1-1kbUCA2oNd-00V5aw; Mon, 14 Dec 2020 16:57:39 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 01/19] target/i386: tracing: format length values as hex Date: Mon, 14 Dec 2020 16:57:15 +0100 Message-Id: <20201214155733.207430-2-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:UNWULujz9hEHUSm9+OQnipBIRC7mLNsQ8JttQDjL2lt7nCRPxS3 wOhTe8HSlI3RarAjbenOqiYHnqV1PcQO45ldFPjuMYGaiouoHi9i0FURKZ552E40Ij1V/LZ M7HRM3fWlGK7HHSTemtxyaZntYHRrUvNi1Z7C0bUJ+dXHg8wLrl+kxW4cQFfutN+1CrrdSF sOTR1MSkZKQIfCqsNX1TQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:Pd/eAyQIvbs=:6Qk9M3/W95GY+xuLdF5rp5 FGj8FgImkVA1fzJyzW2rFghTwjajhoIX++XymZQPNU2VGr05/mp8yqqaMbQ93SL5sNCYokNxp fet2umgdkmEhyFYZm9zfi4brlozSTxztA0mhimjCQF/3i+9+eNauB4JlFDPqSEpepxWydwgEm q8KN0k+NBIeT2M7CZ1k5XK9RQ+FxlMuTJR5tu5L/o5KjGxCx6TTLRmE8yJRI5wBYLADNZXpMQ 7Cb2RL4BM6E4d0hnv1LUbEuL3LgmBhRMLDOLm+semeSJoL5TH+FrsBcbiJGvAIWXaib/Gcos4 B5hFSLLl8JEMBiPNq4gWWg8tSx0+7/kfQnWRUBbys3Rlbn46+zF/8nUXJTSdmoIe9e67esYQ2 hRgn2nXcTF5kbneGrX2xJ6ABP0VPhjbrMcMcRWQc8qMpXU6yELIdZN4bGWEHPF96D9/5BwoGa sDu9FIQasw== Received-SPF: none client-ip=212.227.17.13; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Dov Murik , Michael Tokarev , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Dov Murik Three trace events had a literal "0x" prefix but the 'len' values were formatted in decimal base. Keep the prefix and format the numbers as hex, as is usually the case for length of memory regions. Signed-off-by: Dov Murik Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20201103100745.160409-1-dovmurik@linux.vnet.ibm.com> Signed-off-by: Laurent Vivier --- target/i386/trace-events | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/i386/trace-events b/target/i386/trace-events index 9f299e94a2b7..246158ae1f00 100644 --- a/target/i386/trace-events +++ b/target/i386/trace-events @@ -8,11 +8,11 @@ kvm_x86_update_msi_routes(int num) "Updated %d MSI routes" # sev.c kvm_sev_init(void) "" -kvm_memcrypt_register_region(void *addr, size_t len) "addr %p len 0x%zu" -kvm_memcrypt_unregister_region(void *addr, size_t len) "addr %p len 0x%zu" +kvm_memcrypt_register_region(void *addr, size_t len) "addr %p len 0x%zx" +kvm_memcrypt_unregister_region(void *addr, size_t len) "addr %p len 0x%zx" kvm_sev_change_state(const char *old, const char *new) "%s -> %s" kvm_sev_launch_start(int policy, void *session, void *pdh) "policy 0x%x session %p pdh %p" -kvm_sev_launch_update_data(void *addr, uint64_t len) "addr %p len 0x%" PRIu64 +kvm_sev_launch_update_data(void *addr, uint64_t len) "addr %p len 0x%" PRIx64 kvm_sev_launch_measurement(const char *value) "data %s" kvm_sev_launch_finish(void) "" kvm_sev_launch_secret(uint64_t hpa, uint64_t hva, uint64_t secret, int len) "hpa 0x%" PRIx64 " hva 0x%" PRIx64 " data 0x%" PRIx64 " len %d" From patchwork Mon Dec 14 15:57:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416053 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmK65fKrz9sSf for ; Tue, 15 Dec 2020 02:58:49 +1100 (AEDT) Received: from localhost ([::1]:38978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqFJ-0007rb-U6 for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 10:58:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEN-0007qv-4q; Mon, 14 Dec 2020 10:57:48 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:33011) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEJ-0001PG-V1; Mon, 14 Dec 2020 10:57:46 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MYNS0-1kbD5412tW-00VMqL; Mon, 14 Dec 2020 16:57:40 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 02/19] qemu-options.hx: Fix minor issues in icount documentation Date: Mon, 14 Dec 2020 16:57:16 +0100 Message-Id: <20201214155733.207430-3-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:p/tHvfoeP1YHaAepxycYGHCI5A2loL+jaiXRn5NyVdmTbPD5Cox BlhzuYkTjvnXpdxsd2XYOp1NJjhRjylIVbIM8fGiAMfZmubhMLr4XNvqmOK3Jx0eaCmE4iq Z4863uGqhJIX6WqdBjUMn95heeq3DATaDWOLcPZDEbqdmzQZwPC3fg2Oj13zavB1I3p38Up oP4rXZPei+71fSLw1d9Qw== X-UI-Out-Filterresults: notjunk:1;V03:K0:k6kugBOBskA=:D99hRrClOnKv3MnjhPzOhB kvAp76+FyYmT135dx2A48ObZUG9Qd3iB4jmkjLzqKa8We4waicij11Y8dyN5kKs2nUh7YYfyH klGKVtbrtAEPuqBfMisupfInhaEvzYmORojCs8rOgMlRI9nAc/Hhv5OyZWd5TTWA5BamdGyZi o2n/aUrcZmFeDtX3KsjkbO0KffdFPwLYTbQlPWWY6Fk6hf515IXppbj5lH2lW85rAlnJYAsL2 wndN4Jnccu/gDBUzwiJpmyfTc+O+qTJ4wKqZiGvSQdYU/YjmfJvzXoiNqxs4SQqk+fHOagPlB yt+xV0Vp6x3XTHPAJSl0D1FZyClKBXkVWN0szCOXiaCG/x4fidfQNP45KI2SqmBltSwX884cR H/Fm4bYUdNey40uGR4wHG309YsmcoxWi+klayqTnl0rV4rH2dOwR4i8bVU59RmWgbg6aZOep9 aKAsHt4Dhw== Received-SPF: none client-ip=212.227.17.10; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Peter Maydell , Richard Henderson , Michael Tokarev , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell The documentation for the icount documentation has some minor issues: * in a couple of places it says "sleep=on|off" when in the context of the sentence it means specifically "sleep=on" * the synopsis line for the documentation has drifted out of sync with the synopsis line in the DEF() macro (used for "-help" output) * the synopsis line in the DEF() macro is missing a "][" between the sleep= part and the rr= part * the synopsis line doesn't indicate that rrsnapshot is an optional part of the rr=mode,rrfile=filename subgrouping * we don't document that sleep=on can't be used with shift=auto or align=on * the rr option description had some minor grammar and formatting errors and was a bit terse * in commit f1f4b57e88ff in 2015 the documentation of the sleep= suboption got added between the two paragraphs defining general behaviour of the icount option. This meant that the second paragraph talking about the behaviour of "this option" reads as if it's talking about sleep=on, when it's really describing -icount as a whole. The paragraph is better moved back up to above the sleep= section. * the summary text displayed in "-help" output didn't mention the record-and-replay part Fix these errors. Fixes: https://bugs.launchpad.net/qemu/+bug/1774412 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20201121213506.15599-1-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier --- qemu-options.hx | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index e60ad42976d0..ae8872d1d664 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -3958,30 +3958,34 @@ SRST ERST DEF("icount", HAS_ARG, QEMU_OPTION_icount, \ - "-icount [shift=N|auto][,align=on|off][,sleep=on|off,rr=record|replay,rrfile=,rrsnapshot=]\n" \ + "-icount [shift=N|auto][,align=on|off][,sleep=on|off][,rr=record|replay,rrfile=[,rrsnapshot=]]\n" \ " enable virtual instruction counter with 2^N clock ticks per\n" \ " instruction, enable aligning the host and virtual clocks\n" \ - " or disable real time cpu sleeping\n", QEMU_ARCH_ALL) + " or disable real time cpu sleeping, and optionally enable\n" \ + " record-and-replay mode\n", QEMU_ARCH_ALL) SRST -``-icount [shift=N|auto][,rr=record|replay,rrfile=filename,rrsnapshot=snapshot]`` +``-icount [shift=N|auto][,align=on|off][,sleep=on|off][,rr=record|replay,rrfile=filename[,rrsnapshot=snapshot]]`` Enable virtual instruction counter. The virtual cpu will execute one instruction every 2^N ns of virtual time. If ``auto`` is specified then the virtual cpu speed will be automatically adjusted to keep virtual time within a few seconds of real time. - When the virtual cpu is sleeping, the virtual time will advance at - default speed unless ``sleep=on|off`` is specified. With - ``sleep=on|off``, the virtual time will jump to the next timer - deadline instantly whenever the virtual cpu goes to sleep mode and - will not advance if no timer is enabled. This behavior give - deterministic execution times from the guest point of view. - Note that while this option can give deterministic behavior, it does not provide cycle accurate emulation. Modern CPUs contain superscalar out of order cores with complex cache hierarchies. The number of instructions executed often has little or no correlation with actual performance. + When the virtual cpu is sleeping, the virtual time will advance at + default speed unless ``sleep=on`` is specified. With + ``sleep=on``, the virtual time will jump to the next timer + deadline instantly whenever the virtual cpu goes to sleep mode and + will not advance if no timer is enabled. This behavior gives + deterministic execution times from the guest point of view. + The default if icount is enabled is ``sleep=off``. + ``sleep=on`` cannot be used together with either ``shift=auto`` + or ``align=on``. + ``align=on`` will activate the delay algorithm which will try to synchronise the host clock and the virtual clock. The goal is to have a guest running at the real frequency imposed by the shift @@ -3991,15 +3995,17 @@ SRST ``shift`` is ``auto``. Note: The sync algorithm will work for those shift values for which the guest clock runs ahead of the host clock. Typically this happens when the shift value is high (how high - depends on the host machine). - - When ``rr`` option is specified deterministic record/replay is - enabled. Replay log is written into filename file in record mode and - read from this file in replay mode. - - Option rrsnapshot is used to create new vm snapshot named snapshot - at the start of execution recording. In replay mode this option is - used to load the initial VM state. + depends on the host machine). The default if icount is enabled + is ``align=off``. + + When the ``rr`` option is specified deterministic record/replay is + enabled. The ``rrfile=`` option must also be provided to + specify the path to the replay log. In record mode data is written + to this file, and in replay mode it is read back. + If the ``rrsnapshot`` option is given then it specifies a VM snapshot + name. In record mode, a new VM snapshot with the given name is created + at the start of execution recording. In replay mode this option + specifies the snapshot name used to load the initial VM state. ERST DEF("watchdog", HAS_ARG, QEMU_OPTION_watchdog, \ From patchwork Mon Dec 14 15:57:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416059 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmPl4nyYz9sS8 for ; Tue, 15 Dec 2020 03:02:51 +1100 (AEDT) Received: from localhost ([::1]:48432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqJF-0003vK-4l for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 11:02:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqER-0007rh-R2; Mon, 14 Dec 2020 10:57:55 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:39781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEO-0001Q3-Vl; Mon, 14 Dec 2020 10:57:51 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MWRe1-1kd7pH3hal-00XqkO; Mon, 14 Dec 2020 16:57:41 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 03/19] MAINTAINERS: update my email address Date: Mon, 14 Dec 2020 16:57:17 +0100 Message-Id: <20201214155733.207430-4-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:+0RgFeJrRpYWk5HnGpqKDTM5QRbGWWVJd/yuwotCXToR5ZiUbVt XpwMVzJ4GirQXRDQ1A2Ss38d/0nHZO78ixo3dkvKOnp3pz5iZqCkjHKuaQoYSvuIJy/2uNs I6cffMQcd5VZaoX7rR5tB4RaX8fb7Pp2Fp8o8c7Wdaf/wHUef2Roc3T0GZ3bdbgFw++iT7c s4WBRF4BaqmNjZ0w9hYVA== X-UI-Out-Filterresults: notjunk:1;V03:K0:HTe+MwIoAUw=:8DutcSEqLUXrGUXP6gtQeA 3B66pON+vhlXhVGNLt2PEYxpo2rmFjJmeqB1jTTNtQWS+vpz+Z9ov0FxpG6FXrdm1pk/wl0RH PeNtZ8WRxpce549RGcxXRYnt5NQPvoB4J0s+czsm32x4mo6Sr1MM14qbTl0LO4S8uG6GcUFZZ Dh6MpP5RALHgJgb6hGoqmRElAFLcpsif3plrAoyTN3xkEuZ11cl8HpaKDcHSyfF+Zb1kiZCM1 Frpn5Y3FKqUweCZWf8DBTUOKOkZN9Ae51rVg8WV8mtPQzZXnHekCkiRaLQiUvufalRY6Osd9+ FuopjSxPFjvMQtL1Kja77n6W+xnP5gcLmkGsgQ7bgNtpckP0VhXkh/jv2QZ+GROxR6on7LmJc p233ye2F0irQ9SlrVviMnXuh91j0FRIP0luVYnnbUke9/x6f2RacP39yoNelNDPl9nDLwZinm qNeA+I0Rfg== Received-SPF: none client-ip=212.227.17.13; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Michael Roth , Thomas Huth , Michael Tokarev , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Michael Roth I've recently switched employers and the current email address is out of date. Signed-off-by: Michael Roth Reviewed-by: Thomas Huth Message-Id: <20201027060253.353054-1-michael.roth@amd.com> Signed-off-by: Laurent Vivier --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index d48a4e8a8b75..f9d14078bc08 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2427,7 +2427,7 @@ F: scripts/simplebench/ QAPI M: Markus Armbruster -M: Michael Roth +M: Michael Roth S: Supported F: qapi/ X: qapi/*.json @@ -2471,7 +2471,7 @@ F: tests/data/qobject/qdict.txt T: git https://repo.or.cz/qemu/armbru.git qapi-next QEMU Guest Agent -M: Michael Roth +M: Michael Roth S: Maintained F: qga/ F: docs/interop/qemu-ga.rst From patchwork Mon Dec 14 15:57:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416066 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmVV2kW9z9sS8 for ; Tue, 15 Dec 2020 03:06:58 +1100 (AEDT) Received: from localhost ([::1]:58242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqNE-0000UE-Ak for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 11:06:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEb-0007tl-D5; Mon, 14 Dec 2020 10:58:01 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:42397) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqES-0001Qb-A5; Mon, 14 Dec 2020 10:58:01 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MO9vD-1kUqMu1rVB-00OX5i; Mon, 14 Dec 2020 16:57:41 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 04/19] hw/xen: Don't use '#' flag of printf format Date: Mon, 14 Dec 2020 16:57:18 +0100 Message-Id: <20201214155733.207430-5-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:K7cpzHQZZg51CN2ZIO3GEdHZF9cJ7vcOp+Mqj4y6ZqXmAGW7bUv frwy4AS3f2xY8hDlm26cgfEJeEvY6WXZvLMzqwY2X6Ymhqnce9adl9kbARdNrNtn3DXl9NU oTOqG5anG2PIuYTiz7jMy39ItAUagTj1C/5qXJeSLrTxsfbzCZdJsZmfeFrtdIoY6hJTPi2 lEG1oBu91E1gW23bF/xYw== X-UI-Out-Filterresults: notjunk:1;V03:K0:yMcKUzW4YFg=:JRAb1j37TLsOBghDKm5QJv w3Y5wiuHYn3IQhaBTafyiY2uz8aSQfgj2mfSFW9JNx73TiJ3niM4WnTIdeTvNArvC6POoKwu/ +AXInaBXxY7osEQGzTLM2ed1lBvsigc45mAIzgf08VoHIUBurVeSr8HCgaJCW1Sko8tTLi+ly L2esM/pr/60XBonhbt9tdIUGPll50EREYV41OCmMuIjmGgGibXtPdTrACv9IgQGRzga4UtIXI OSQzKBypGDLaIb6nPZG2em46A6f+Bi+4Kvqd7/6vPiQxa1/YIqiLJUV7tyCpoJrovVM350chn b5mADOGFwa1KrvG+ur8OlUfhhrdyq75Q+uOtZ3BQCXYd5aSkh/G6wtvh9QQhJYzLTQmDLRC6G V/2luO31wgtPZkOOThxLLxTeOuPZGTbnk07Jc/B8O+4PA2moVfnUMFlx1rwWjr7RgQK/3BDyv UfuDWnFyow== Received-SPF: none client-ip=217.72.192.75; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Kai Deng , Michael Tokarev , Laurent Vivier , Xinhao Zhang Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Xinhao Zhang Fix code style. Don't use '#' flag of printf format ('%#') in format strings, use '0x' prefix instead Signed-off-by: Xinhao Zhang Signed-off-by: Kai Deng Message-Id: <20201104133709.3326630-1-zhangxinhao1@huawei.com> Signed-off-by: Laurent Vivier --- hw/xen/xen_pt.c | 10 +++++----- hw/xen/xen_pt_config_init.c | 6 +++--- hw/xen/xen_pt_msi.c | 16 ++++++++-------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index 6d359ee486f5..a5f3dd590c13 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -489,7 +489,7 @@ static int xen_pt_register_regions(XenPCIPassthroughState *s, uint16_t *cmd) pci_register_bar(&s->dev, i, type, &s->bar[i]); XEN_PT_LOG(&s->dev, "IO region %i registered (size=0x%08"PRIx64 - " base_addr=0x%08"PRIx64" type: %#x)\n", + " base_addr=0x%08"PRIx64" type: 0x%x)\n", i, r->size, r->base_addr, type); } @@ -578,7 +578,7 @@ static void xen_pt_check_bar_overlap(PCIBus *bus, PCIDevice *d, void *opaque) if (ranges_overlap(arg->addr, arg->size, r->addr, r->size)) { XEN_PT_WARN(&s->dev, "Overlapped to device [%02x:%02x.%d] Region: %i" - " (addr: %#"FMT_PCIBUS", len: %#"FMT_PCIBUS")\n", + " (addr: 0x%"FMT_PCIBUS", len: 0x%"FMT_PCIBUS")\n", pci_bus_num(bus), PCI_SLOT(d->devfn), PCI_FUNC(d->devfn), i, r->addr, r->size); arg->rc = true; @@ -618,8 +618,8 @@ static void xen_pt_region_update(XenPCIPassthroughState *s, pci_for_each_device(pci_get_bus(d), pci_dev_bus_num(d), xen_pt_check_bar_overlap, &args); if (args.rc) { - XEN_PT_WARN(d, "Region: %d (addr: %#"FMT_PCIBUS - ", len: %#"FMT_PCIBUS") is overlapped.\n", + XEN_PT_WARN(d, "Region: %d (addr: 0x%"FMT_PCIBUS + ", len: 0x%"FMT_PCIBUS") is overlapped.\n", bar, sec->offset_within_address_space, int128_get64(sec->size)); } @@ -786,7 +786,7 @@ static void xen_pt_realize(PCIDevice *d, Error **errp) /* register real device */ XEN_PT_LOG(d, "Assigning real physical device %02x:%02x.%d" - " to devfn %#x\n", + " to devfn 0x%x\n", s->hostaddr.bus, s->hostaddr.slot, s->hostaddr.function, s->dev.devfn); diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c index c8724cc7c855..c5c4e943a845 100644 --- a/hw/xen/xen_pt_config_init.c +++ b/hw/xen/xen_pt_config_init.c @@ -1622,7 +1622,7 @@ static int xen_pt_pcie_size_init(XenPCIPassthroughState *s, case PCI_EXP_TYPE_PCIE_BRIDGE: case PCI_EXP_TYPE_RC_EC: default: - XEN_PT_ERR(d, "Unsupported device/port type %#x.\n", type); + XEN_PT_ERR(d, "Unsupported device/port type 0x%x.\n", type); return -1; } } @@ -1645,11 +1645,11 @@ static int xen_pt_pcie_size_init(XenPCIPassthroughState *s, case PCI_EXP_TYPE_PCIE_BRIDGE: case PCI_EXP_TYPE_RC_EC: default: - XEN_PT_ERR(d, "Unsupported device/port type %#x.\n", type); + XEN_PT_ERR(d, "Unsupported device/port type 0x%x.\n", type); return -1; } } else { - XEN_PT_ERR(d, "Unsupported capability version %#x.\n", version); + XEN_PT_ERR(d, "Unsupported capability version 0x%x.\n", version); return -1; } diff --git a/hw/xen/xen_pt_msi.c b/hw/xen/xen_pt_msi.c index fb4b887b92b1..b71563f98a8b 100644 --- a/hw/xen/xen_pt_msi.c +++ b/hw/xen/xen_pt_msi.c @@ -123,7 +123,7 @@ static int msi_msix_setup(XenPCIPassthroughState *s, *ppirq = XEN_PT_UNASSIGNED_PIRQ; } else { XEN_PT_LOG(&s->dev, "requested pirq %d for MSI%s" - " (vec: %#x, entry: %#x)\n", + " (vec: 0x%x, entry: 0x%x)\n", *ppirq, is_msix ? "-X" : "", gvec, msix_entry); } } @@ -142,7 +142,7 @@ static int msi_msix_setup(XenPCIPassthroughState *s, msix_entry, table_base); if (rc) { XEN_PT_ERR(&s->dev, - "Mapping of MSI%s (err: %i, vec: %#x, entry %#x)\n", + "Mapping of MSI%s (err: %i, vec: 0x%x, entry 0x%x)\n", is_msix ? "-X" : "", errno, gvec, msix_entry); return rc; } @@ -165,8 +165,8 @@ static int msi_msix_update(XenPCIPassthroughState *s, int rc = 0; uint64_t table_addr = 0; - XEN_PT_LOG(d, "Updating MSI%s with pirq %d gvec %#x gflags %#x" - " (entry: %#x)\n", + XEN_PT_LOG(d, "Updating MSI%s with pirq %d gvec 0x%x gflags 0x%x" + " (entry: 0x%x)\n", is_msix ? "-X" : "", pirq, gvec, gflags, msix_entry); if (is_msix) { @@ -208,11 +208,11 @@ static int msi_msix_disable(XenPCIPassthroughState *s, } if (is_binded) { - XEN_PT_LOG(d, "Unbind MSI%s with pirq %d, gvec %#x\n", + XEN_PT_LOG(d, "Unbind MSI%s with pirq %d, gvec 0x%x\n", is_msix ? "-X" : "", pirq, gvec); rc = xc_domain_unbind_msi_irq(xen_xc, xen_domid, gvec, pirq, gflags); if (rc) { - XEN_PT_ERR(d, "Unbinding of MSI%s failed. (err: %d, pirq: %d, gvec: %#x)\n", + XEN_PT_ERR(d, "Unbinding of MSI%s failed. (err: %d, pirq: %d, gvec: 0x%x)\n", is_msix ? "-X" : "", errno, pirq, gvec); return rc; } @@ -539,7 +539,7 @@ int xen_pt_msix_init(XenPCIPassthroughState *s, uint32_t base) } if (id != PCI_CAP_ID_MSIX) { - XEN_PT_ERR(d, "Invalid id %#x base %#x\n", id, base); + XEN_PT_ERR(d, "Invalid id 0x%x base 0x%x\n", id, base); return -1; } @@ -582,7 +582,7 @@ int xen_pt_msix_init(XenPCIPassthroughState *s, uint32_t base) XEN_PT_ERR(d, "Can't open /dev/mem: %s\n", strerror(errno)); goto error_out; } - XEN_PT_LOG(d, "table_off = %#x, total_entries = %d\n", + XEN_PT_LOG(d, "table_off = 0x%x, total_entries = %d\n", table_off, total_entries); msix->table_offset_adjust = table_off & 0x0fff; msix->phys_iomem_base = From patchwork Mon Dec 14 15:57:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416056 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmKf40Vrz9sS8 for ; Tue, 15 Dec 2020 02:59:18 +1100 (AEDT) Received: from localhost ([::1]:40008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqFo-0008Tp-4S for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 10:59:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEQ-0007rZ-S4; Mon, 14 Dec 2020 10:57:51 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:44741) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEN-0001Pn-6A; Mon, 14 Dec 2020 10:57:50 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mwwm5-1juxO10CB1-00yQ8i; Mon, 14 Dec 2020 16:57:42 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 05/19] hw/pci-host/pam: Replace magic number by PAM_REGIONS_COUNT definition Date: Mon, 14 Dec 2020 16:57:19 +0100 Message-Id: <20201214155733.207430-6-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:yWbPKBhYLElznlki5MBnP6phYaUHaTDcWosOaEOxpm9tcG7y6fP WfHvto8f73FKuTOfLWQ1JdQSrhDCZCZAZGge5GQhSCrc+9G1oM4KbYrmD/ct/ZlniR0NuXP 9LDRvXrNgrjsdUN/MQiz3gXj3GP09pCV5u2ZpwOSRIIR63AO8mgAIEItDzBwW2dkfa7Sf85 l/uaVvimA6ucAjhpFLwUg== X-UI-Out-Filterresults: notjunk:1;V03:K0:AjbuZIq1BZU=:YAc6ZOGyf90rBFin/8nn/C KeEI2nNL3Z7JrUypjodL8F9YevL2+oEd2nD7Q2B6/PsgZ1taYHPndwK2UHST0lxfwDBWHgTDS OxgHnBWtw3JStNCJWLV01jo0A5cg9almBMLmbB2h9pgytHzkVTgZttjJ194PLjEC7mi0enqyo zQmjkYDegYUthhcA4NuAcEMb4F/OI64M4/QmtbGmivivv7kWCA5sQlhrXBirpvTB0n9Yots3j 2BGLJ65HxnO71jm3Fx1dN6Q2EHZl8Bi6YFcMlRFQ/xHjlpwoH3TYfUTeEAXZc3fcuI3jxRDZn 5ETc/7u3MgYsITga7hyzJjqwRHcSZimnXIq4410vTNCveihB771WGRjiuH7qBYTtW6t3J5fYM AQmmSJwruVGt0VkP2os4O6XrNxwpuOBpDmbvuVuB/u67LPyctZ9Cnoz2CqMAfpxSLLVtelB6B yQ4iGEGKRQ== Received-SPF: none client-ip=212.227.17.24; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Michael Tokarev , Laurent Vivier , Julia Suvorova Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé While this change helps triskaidekaphobic developers, it is a good practice to avoid magic values and using constant definitions instead. Introduce the PAM_REGIONS_COUNT and use it. No logical change. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Julia Suvorova Message-Id: <20201202132038.1276404-1-philmd@redhat.com> Signed-off-by: Laurent Vivier --- hw/pci-host/pam.c | 2 +- hw/pci-host/q35.c | 2 +- include/hw/pci-host/i440fx.h | 2 +- include/hw/pci-host/pam.h | 2 ++ include/hw/pci-host/q35.h | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/pci-host/pam.c b/hw/pci-host/pam.c index a4962057833f..454dd120db97 100644 --- a/hw/pci-host/pam.c +++ b/hw/pci-host/pam.c @@ -62,7 +62,7 @@ void init_pam(DeviceState *dev, MemoryRegion *ram_memory, void pam_update(PAMMemoryRegion *pam, int idx, uint8_t val) { - assert(0 <= idx && idx <= 12); + assert(0 <= idx && idx < PAM_REGIONS_COUNT); memory_region_set_enabled(&pam->alias[pam->current], false); pam->current = (val >> ((!(idx & 1)) * 4)) & PAM_ATTR_MASK; diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index b67cb9c29f8e..2eb729dff585 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -641,7 +641,7 @@ static void mch_realize(PCIDevice *d, Error **errp) init_pam(DEVICE(mch), mch->ram_memory, mch->system_memory, mch->pci_address_space, &mch->pam_regions[0], PAM_BIOS_BASE, PAM_BIOS_SIZE); - for (i = 0; i < 12; ++i) { + for (i = 0; i < ARRAY_SIZE(mch->pam_regions) - 1; ++i) { init_pam(DEVICE(mch), mch->ram_memory, mch->system_memory, mch->pci_address_space, &mch->pam_regions[i+1], PAM_EXPAN_BASE + i * PAM_EXPAN_SIZE, PAM_EXPAN_SIZE); diff --git a/include/hw/pci-host/i440fx.h b/include/hw/pci-host/i440fx.h index 6c16eaf876dd..24fd53942cab 100644 --- a/include/hw/pci-host/i440fx.h +++ b/include/hw/pci-host/i440fx.h @@ -29,7 +29,7 @@ struct PCII440FXState { MemoryRegion *system_memory; MemoryRegion *pci_address_space; MemoryRegion *ram_memory; - PAMMemoryRegion pam_regions[13]; + PAMMemoryRegion pam_regions[PAM_REGIONS_COUNT]; MemoryRegion smram_region; MemoryRegion smram, low_smram; }; diff --git a/include/hw/pci-host/pam.h b/include/hw/pci-host/pam.h index fec5cd35d60f..c1fd06ba2ae6 100644 --- a/include/hw/pci-host/pam.h +++ b/include/hw/pci-host/pam.h @@ -80,6 +80,8 @@ #define SMRAM_C_BASE_SEG_MASK ((uint8_t)0x7) #define SMRAM_C_BASE_SEG ((uint8_t)0x2) /* hardwired to b010 */ +#define PAM_REGIONS_COUNT 13 + typedef struct PAMMemoryRegion { MemoryRegion alias[4]; /* index = PAM value */ unsigned current; diff --git a/include/hw/pci-host/q35.h b/include/hw/pci-host/q35.h index bbb958176565..ab989698ef8f 100644 --- a/include/hw/pci-host/q35.h +++ b/include/hw/pci-host/q35.h @@ -44,7 +44,7 @@ struct MCHPCIState { MemoryRegion *pci_address_space; MemoryRegion *system_memory; MemoryRegion *address_space_io; - PAMMemoryRegion pam_regions[13]; + PAMMemoryRegion pam_regions[PAM_REGIONS_COUNT]; MemoryRegion smram_region, open_high_smram; MemoryRegion smram, low_smram, high_smram; MemoryRegion tseg_blackhole, tseg_window; From patchwork Mon Dec 14 15:57:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416070 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmXV0XpWz9sS8 for ; Tue, 15 Dec 2020 03:08:42 +1100 (AEDT) Received: from localhost ([::1]:39522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqOt-0004RP-VC for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 11:08:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEv-0008JI-VV; Mon, 14 Dec 2020 10:58:21 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:34463) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEZ-0001Rt-MH; Mon, 14 Dec 2020 10:58:19 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MtOOm-1jyWIC2Xp0-00upm5; Mon, 14 Dec 2020 16:57:42 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 06/19] fsdev: open brace '{' following struct go on the same line Date: Mon, 14 Dec 2020 16:57:20 +0100 Message-Id: <20201214155733.207430-7-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:pQqctQitfJUvkSvVY3kMl2Wy0lD3cIpkOHQB4FDBXqoyQrFQwNI NI8xPRko5RxqK4esqf6dO4EJ0axzX0MztpV+1grnl1HdNJ9MSrhVbwyK987T1DEikkor8nR y9xFGFz6DeJ7unH8mRn9UqnrgYpbdksZ2fse+OxkcUwzYNhUXzImn0dnd9ZRuKG86gQdk0P ge8n4QW/yf0yt2q/A1qpQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:yV9ilGWCju0=:F+6hXJ/tZJyHGd1R2N46jR AAHar87MsySpfdVoVO25jbjbG4JwGdFnHf+YUpvDTkCEchxoiJ9barOgJ3hRk+45glhCPPi92 +IwSTlttVzFmZ7cXLR8ZgSjJPGTzb0ZPxTTWZqZ1ZEFuhjHhs0NtTm9gX5D8QlVHT+yFmeLvC NZe7+52KfbLieF/Z4Wd+zNF6RPUHR/+3/7gYClszkLWrbicgnDnNgjf5MZpSADF5ZjPfED8VX lN3SdQUfsA3kzTG9vy+0lRjZlRZHJ6z7w72NpbsmEq6j6DZBWhiCrBsGt7q8/2naXigesc8cr Z7C/OCDfGDwdmKMjpiGgSGwGbG0RwQoGjkWpfwi7v0/vHon6sEFcv9wgC8Azlqpbw9sH4yWwQ eEDkOjUI6MsnqpUSXcn1O2aiA8GlxCLgCqhMsS7gSGQ8TzBJBshpGG/YzjLsD5hSdM7H7hZOF D8mj1kzsWA== Received-SPF: none client-ip=212.227.17.24; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_NONE=0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Michael Tokarev , Laurent Vivier , zhouyang Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: zhouyang I found some style problems while check the code using checkpatch.pl. This commit fixs the issue below: ERROR: open brace '{' following struct go on the same line Signed-off-by: zhouyang Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20201209060735.2760943-1-zhouyang789@huawei.com> Signed-off-by: Laurent Vivier --- fsdev/9p-marshal.h | 12 ++++-------- fsdev/file-op-9p.h | 3 +-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/fsdev/9p-marshal.h b/fsdev/9p-marshal.h index 8f3babb60a05..ceaf2f521ec4 100644 --- a/fsdev/9p-marshal.h +++ b/fsdev/9p-marshal.h @@ -1,21 +1,18 @@ #ifndef QEMU_9P_MARSHAL_H #define QEMU_9P_MARSHAL_H -typedef struct V9fsString -{ +typedef struct V9fsString { uint16_t size; char *data; } V9fsString; -typedef struct V9fsQID -{ +typedef struct V9fsQID { uint8_t type; uint32_t version; uint64_t path; } V9fsQID; -typedef struct V9fsStat -{ +typedef struct V9fsStat { int16_t size; int16_t type; int32_t dev; @@ -35,8 +32,7 @@ typedef struct V9fsStat int32_t n_muid; } V9fsStat; -typedef struct V9fsIattr -{ +typedef struct V9fsIattr { int32_t valid; int32_t mode; int32_t uid; diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h index d51cec2f3be0..42f677cf38c2 100644 --- a/fsdev/file-op-9p.h +++ b/fsdev/file-op-9p.h @@ -110,8 +110,7 @@ typedef union V9fsFidOpenState V9fsFidOpenState; void cred_init(FsCred *); -struct FileOperations -{ +struct FileOperations { int (*parse_opts)(QemuOpts *, FsDriverEntry *, Error **errp); int (*init)(FsContext *, Error **errp); void (*cleanup)(FsContext *); From patchwork Mon Dec 14 15:57:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416055 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmK66xjYz9sTL for ; Tue, 15 Dec 2020 02:58:50 +1100 (AEDT) Received: from localhost ([::1]:39046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqFM-0007vd-Ny for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 10:58:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEW-0007sO-Nl; Mon, 14 Dec 2020 10:57:58 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:34313) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEO-0001Pt-OF; Mon, 14 Dec 2020 10:57:54 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N33AR-1k7d620xjR-013Jx4; Mon, 14 Dec 2020 16:57:43 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 07/19] CODING_STYLE.rst: Be less strict about 80 character limit Date: Mon, 14 Dec 2020 16:57:21 +0100 Message-Id: <20201214155733.207430-8-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:dFbZeB9hYyMCoMAMNbQY5FhHlLjXOsmrd8vyeBmdGFee5Pa67VM DwhEamI1McOxEpbeLGGgL9YOJMZelWHTjSsEqqKCN+1QC/UwRBWndGw2QXVFMpYNP14Tevw ookrfu53ptHrKR/WArn436xheFPoUZfRFEziKX+V/LmKTuzZoayUeOMte9H7zAYOw2OH1GS w7rlV1tmlPNMwusAuKSZQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:tjGLg8d8DO4=:whDlGGOSaQOPOOswEiCXqN NhvPS0JImLMEfIVNWqP8DFPGC0Uny4LRqgsUbVrsZQWE7pu+kZzphJEYxYsSYHYxx2tDz8SEI lUzUm4UhoDsGFfW5+ysXnKC1EtWU2C3nXhmzhAN8usNkpS7x4iomu50hEPLK8Z/DYcLukvm6f 5HK8TYJ9ETSa/JYz/wWhYJt/yPUFkdsdSYoY3Y6DsRUb3EKMzjAtO4t6CdFELdIH+BYfRfWnz lrO8wlcBQmzQyfyb1CjxnsRSnubRGxuwoAfi4b2YymNJNTqi0q5km8mWHsom838/P9+MwIJR1 IM7g0UaAZ4/zKmXeGqolXhaqyeyXhqGP8/DmjWefXFoD1D+LDjxFXIkTLdbQoyJ4PKOnxashi YvMk1czRMk9Z6C1UMCnF9wuhIEONS6G9c6YKmQdJcOir6X9A+yvQHKx7IAKMGe4WxUpG2/UMs NO3f5Z1Odw== Received-SPF: none client-ip=212.227.17.13; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , "Michael S . Tsirkin" , qemu-trivial@nongnu.org, Michael Tokarev , Laurent Vivier , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Relax the wording about line lengths a little bit; this goes with the checkpatch changes to warn at 100 characters rather than 80. (Compare the Linux kernel commit bdc48fa11e46f8; our coding style is not theirs, but the rationale is good and applies to us too.) Signed-off-by: Peter Maydell Reviewed-by: Markus Armbruster Reviewed-by: Michael S. Tsirkin Message-Id: <20201106112940.31300-1-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier --- CODING_STYLE.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CODING_STYLE.rst b/CODING_STYLE.rst index 8b13ef0669eb..7bf4e39d4871 100644 --- a/CODING_STYLE.rst +++ b/CODING_STYLE.rst @@ -85,8 +85,13 @@ Line width Lines should be 80 characters; try not to make them longer. Sometimes it is hard to do, especially when dealing with QEMU subsystems -that use long function or symbol names. Even in that case, do not make -lines much longer than 80 characters. +that use long function or symbol names. If wrapping the line at 80 columns +is obviously less readable and more awkward, prefer not to wrap it; better +to have an 85 character line than one which is awkwardly wrapped. + +Even in that case, try not to make lines much longer than 80 characters. +(The checkpatch script will warn at 100 characters, but this is intended +as a guard against obviously-overlength lines, not a target.) Rationale: From patchwork Mon Dec 14 15:57:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416069 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmXJ4NyLz9sS8 for ; Tue, 15 Dec 2020 03:08:32 +1100 (AEDT) Received: from localhost ([::1]:38634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqOk-00044a-GN for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 11:08:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEh-00081L-FK; Mon, 14 Dec 2020 10:58:07 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:34645) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEV-0001RG-Nn; Mon, 14 Dec 2020 10:58:07 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MoNu2-1kM9J13kGu-00opV9; Mon, 14 Dec 2020 16:57:44 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 08/19] ads7846: moves from the hw/display folder to the hw/input folder. Date: Mon, 14 Dec 2020 16:57:22 +0100 Message-Id: <20201214155733.207430-9-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:0WKpRjXuBi8JwZ9eWpDAIR94JA6hlF7eM8C5YcsRp8JVnmWtlm5 WzVQYJv2gLKKUdqCkiYWlK+NkaK6QwnQzA6pjqgtesWbWeQkTU2WZoBHIKYf7qnecU+//7e fIUyk9Ho4/7Ihlr8najGYrh44PcGGQIhPtND7ybNEvTuJ+x5sTUV4OnW3escUgGbCNKkIIa miWE8wDRAWquFPb0/u1Og== X-UI-Out-Filterresults: notjunk:1;V03:K0:TMOv9w+DPrc=:saLVOzw4HNpL/dwp92moBc tzmOzB3RCh2P/EhwEBlg73DHUZk47PTpdpGdVoXcPTBay6p4WSn+/r0utuNqRGb6OWYRC+QVd sm3QPPF0JqhPbVSCV4LFrIfzxlcAqIMlIe3p0lqss96T8GNFofoc4aEg9l7t9Odc3m1LcyPxM Cw4PtNBfckaVfr73KCf6V+6OmzN5pXbeKi2XAKZ3BmlrkoYhy4AM2Y8tEm2xsd/+dfiDC+l4e SzIFx6GlRhEA8RB5ohf7/zEIoWViVupZwTVrfeQv4Zl8RPUMtissX6JZxyD3pVbqp4Xp5VKTZ oNhwGBawPmyVtATWCcYE6e3q/TJb7mHd7AkaEnm/9ndwEo7k2CL8UXlAUzbDjJCsp9cx3uB1f cyh/NeXmwNrLGYz+KSprp8bxo0GkIYKlkVif9dCdmMafRjJ6lOuDF2JPwpmkeD0DP1yMVpKZE QL22jiameQ== Received-SPF: none client-ip=212.227.17.10; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Peter Maydell , Michael Tokarev , Laurent Vivier , Gan Qixin Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Gan Qixin ads7846 is a touch-screen controller that is an input device rather than a display device, so move it to the hw/input folder. Signed-off-by: Gan Qixin Reviewed-by: Peter Maydell Message-Id: <20201115123503.1110665-1-ganqixin@huawei.com> Signed-off-by: Laurent Vivier --- hw/arm/Kconfig | 2 +- hw/display/Kconfig | 3 --- hw/display/meson.build | 1 - hw/input/Kconfig | 3 +++ hw/{display => input}/ads7846.c | 0 hw/input/meson.build | 1 + 6 files changed, 5 insertions(+), 5 deletions(-) rename hw/{display => input}/ads7846.c (100%) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index eb8a8844cf86..0a242e4c5d8a 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -156,7 +156,7 @@ config TOSA config SPITZ bool - select ADS7846 # display + select ADS7846 # touch-screen controller select MAX111X # A/D converter select WM8750 # audio codec select MAX7310 # GPIO expander diff --git a/hw/display/Kconfig b/hw/display/Kconfig index 15d59e10dc2c..ca46b5830e73 100644 --- a/hw/display/Kconfig +++ b/hw/display/Kconfig @@ -9,9 +9,6 @@ config EDID config FW_CFG_DMA bool -config ADS7846 - bool - config VGA_CIRRUS bool default y if PCI_DEVICES diff --git a/hw/display/meson.build b/hw/display/meson.build index dad3bd2b414b..9d79e3951d9e 100644 --- a/hw/display/meson.build +++ b/hw/display/meson.build @@ -6,7 +6,6 @@ softmmu_ss.add(when: 'CONFIG_EDID', if_true: files('edid-generate.c', 'edid-regi softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb.c')) softmmu_ss.add(when: 'CONFIG_FW_CFG_DMA', if_true: files('ramfb-standalone.c')) -softmmu_ss.add(when: 'CONFIG_ADS7846', if_true: files('ads7846.c')) softmmu_ss.add(when: 'CONFIG_VGA_CIRRUS', if_true: files('cirrus_vga.c')) softmmu_ss.add(when: ['CONFIG_VGA_CIRRUS', 'CONFIG_VGA_ISA'], if_true: files('cirrus_vga_isa.c')) softmmu_ss.add(when: 'CONFIG_G364FB', if_true: files('g364fb.c')) diff --git a/hw/input/Kconfig b/hw/input/Kconfig index 64f14daabf6c..55865bb38696 100644 --- a/hw/input/Kconfig +++ b/hw/input/Kconfig @@ -1,6 +1,9 @@ config ADB bool +config ADS7846 + bool + config LM832X bool depends on I2C diff --git a/hw/display/ads7846.c b/hw/input/ads7846.c similarity index 100% rename from hw/display/ads7846.c rename to hw/input/ads7846.c diff --git a/hw/input/meson.build b/hw/input/meson.build index e7285b15ae6d..0042c3f0dc54 100644 --- a/hw/input/meson.build +++ b/hw/input/meson.build @@ -1,5 +1,6 @@ softmmu_ss.add(files('hid.c')) softmmu_ss.add(when: 'CONFIG_ADB', if_true: files('adb.c', 'adb-mouse.c', 'adb-kbd.c')) +softmmu_ss.add(when: 'CONFIG_ADS7846', if_true: files('ads7846.c')) softmmu_ss.add(when: 'CONFIG_LM832X', if_true: files('lm832x.c')) softmmu_ss.add(when: 'CONFIG_PCKBD', if_true: files('pckbd.c')) softmmu_ss.add(when: 'CONFIG_PL050', if_true: files('pl050.c')) From patchwork Mon Dec 14 15:57:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416072 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmYK4f61z9sS8 for ; Tue, 15 Dec 2020 03:09:25 +1100 (AEDT) Received: from localhost ([::1]:41780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqPb-0005PO-Jy for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 11:09:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEe-0007wn-5n; Mon, 14 Dec 2020 10:58:04 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:36871) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqES-0001QK-AR; Mon, 14 Dec 2020 10:58:03 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M593i-1knkIm2LBM-001Cx9; Mon, 14 Dec 2020 16:57:44 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 09/19] configure: Test if $make actually exists Date: Mon, 14 Dec 2020 16:57:23 +0100 Message-Id: <20201214155733.207430-10-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:JHnV3P/bmthpjWCnE+kpU7A3yNBH+T/PRHkqdYdsnGgqhgkksYP 2czI1wOXl5VseAFpXx7dR86WT4DmruN1g3Ry+2rJswU4xhUKS234L6VjpaHfLG/5pdpEZAh 0ZF5SrUohD+zkWJREQAkbhbWXj/+cmfPAfXCQ/dQmZEk80mRBIjw81khcZgSUhg1aWgXUIE pJMzzThQ/Z16Nujro/9DQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:lKh6vAvFT9Y=:lc3Tb3KSlidjlIiOQGLKVZ UAT+ebALPX5wM7f6OEBFyXpwSQpTCARGD9V1If+n5Acp0rCjS7pd1yUmw7fRLv2TzFtHIp/Th tt5xX9/Jzc4Gk/j9m/lfi0kS2zXDLD6SnXCJuA99ayE/jdqC6b9Aq4FgMQLIzUOJ0p6uGu+Dj BbLDooHwW4YUuNpc852kbheZ1n0XywMtSrnPMqbqu+rcYa3UsrM7yXTMTshQKayPrbhh5DkHt fxhGA2EMxQIQz2Ql6kqpKh4OIhIv0FgbX/nBiFP0b3FIl2EcKsa83tWX8KKbfqfuqxCY47IvB 2eP05oKwHOU08Ep9pvKuBkno1qkHB0wsxiDwtoSvXpTM3jzrlHiNUP9fdyWIcqr/uozf8uRIA 4wt/5no1jRbiA4faXc2eFbQlx024/HQuVeOlVez8Nm21pprBgdezqpLqzeOM919cZga8sMZX8 TpPp8Gk5Xw== Received-SPF: none client-ip=217.72.192.75; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , qemu-trivial@nongnu.org, Michael Tokarev , Laurent Vivier , Roman Bolshakov Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Roman Bolshakov configure doesn't detect if $make is installed on the build host. This is also helpful for hosts where an alias for make is used, i.e. configure would fail if gmake is not present on macOS. Reviewed-by: Daniel P. Berrangé Signed-off-by: Roman Bolshakov Reviewed-by: Thomas Huth Message-Id: <20200825202755.50626-5-r.bolshakov@yadro.com> Signed-off-by: Laurent Vivier --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 3f823ed16374..c20ed86ff35b 100755 --- a/configure +++ b/configure @@ -1875,6 +1875,10 @@ if test -z "$python" then error_exit "Python not found. Use --python=/path/to/python" fi +if ! has "$make" +then + error_exit "GNU make ($make) not found" +fi # Note that if the Python conditional here evaluates True we will exit # with status 1 which is a shell 'false' value. From patchwork Mon Dec 14 15:57:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416065 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmVF0ysWz9sS8 for ; Tue, 15 Dec 2020 03:06:45 +1100 (AEDT) Received: from localhost ([::1]:57212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqN1-00081R-1z for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 11:06:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEf-0007xY-Uh; Mon, 14 Dec 2020 10:58:05 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:53107) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEW-0001Rf-Oq; Mon, 14 Dec 2020 10:58:05 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MI5cP-1krMvG1fq3-00FDR2; Mon, 14 Dec 2020 16:57:45 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 10/19] elf2dmp/qemu_elf: Plug memleak in QEMU_Elf_init Date: Mon, 14 Dec 2020 16:57:24 +0100 Message-Id: <20201214155733.207430-11-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:PtXP+yICFZb0DJUq14VYTCi8rkarqEddAG8h1oC1sJPCdQT4+ku mA7uoZgpXsNbUE/r1QE+uyZzzZRUKY0hSl9O8pbBvzmHXD9gL5I3GkgStMScos6Ll3DcYlr wgt8mUPgs3tykIhDjf16CRxSsvDu5CdwjZwlTvVvFZdJh28Obej+VGJiRr6mZxmC0RopiKW YodcFpiaQ/n+QGaEgXNyA== X-UI-Out-Filterresults: notjunk:1;V03:K0:7yLRA248l1E=:I5kTAPgFvHrEpf+H8y69GG OzgBhW54yglq4dQ4slmb15OAjct0D+beLUr+SNvqrHfp9hlUoZCW+E0gYLcEdb9rCl+RatsZH thruSszZuRqDvpBUBx+vp+SIkHeh1CbrZ02W05Bub+NFQw05jjnuI67JMxlu+cRMaODtGMz9O mNswV6yi/yZeSeBFtRTjhYQgPAh88yaLdQ43eJQrsC6XJ+80z3clJa02u1XS39e8OzKGkjCpM 4KpIpyjzPRbFGyr9QhF0bw7wuQsh0vEXKkiqGl0Hralqhk02JkMJ+Wg8EnhXF/PzpQAAW1ra0 CiqbR/tUALmu6Ubyd6OzLwS2byNOKOa/lsIaTJBj6F0dh+e7JrCbDBXsYIzU5S8DQS/XdhsTg 6jqnjYFIg6/MbhS8uZdg9H+/rzh7eAkUJPg1hXCjw1pRWKQXTOpKpIrpivsdWegYEuYf7U24k fVT4TQALNQ== Received-SPF: none client-ip=212.227.17.24; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Li Qiang , Viktor Prutyanov , qemu-trivial@nongnu.org, Michael Tokarev , Pan Nengyuan , Laurent Vivier , Euler Robot , Chen Qun Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Pan Nengyuan Missing g_error_free in QEMU_Elf_init() error path. Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Viktor Prutyanov Reviewed-by: Li Qiang Signed-off-by: Chen Qun Reviewed-by: Thomas Huth Message-Id: <20201023061218.2080844-4-kuhn.chenqun@huawei.com> Signed-off-by: Laurent Vivier --- contrib/elf2dmp/qemu_elf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/elf2dmp/qemu_elf.c b/contrib/elf2dmp/qemu_elf.c index 0db781658628..b601b6d7ba44 100644 --- a/contrib/elf2dmp/qemu_elf.c +++ b/contrib/elf2dmp/qemu_elf.c @@ -126,6 +126,7 @@ int QEMU_Elf_init(QEMU_Elf *qe, const char *filename) qe->gmf = g_mapped_file_new(filename, TRUE, &gerr); if (gerr) { eprintf("Failed to map ELF dump file \'%s\'\n", filename); + g_error_free(gerr); return 1; } From patchwork Mon Dec 14 15:57:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416077 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmjB02XRz9sS8 for ; Tue, 15 Dec 2020 03:16:13 +1100 (AEDT) Received: from localhost ([::1]:60788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqWB-0005GL-Lt for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 11:16:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEi-00085N-TH; Mon, 14 Dec 2020 10:58:08 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:49479) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEb-0001TX-D9; Mon, 14 Dec 2020 10:58:08 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MIdaF-1krv9b190P-00EfCk; Mon, 14 Dec 2020 16:57:46 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 11/19] elf2dmp/pdb: Plug memleak in pdb_init_from_file Date: Mon, 14 Dec 2020 16:57:25 +0100 Message-Id: <20201214155733.207430-12-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:spLQwwA7LagXLll9BNNWryX/92vE+OvP2KVXM5sehnSTSkoBBCG vtzrz4mXtqstfQVkSlBSmh7jVl4lMAJ/CjTjG3LJ1HKORxPfc9U+zT+Hl3cv2Xl0FboNQ/O S8kMOgvSLolOfBzFznya/YWBm/vveOjV2qkjy2O57nC8CkgqVVi34b9jvrfPT3YQhczmoVd ErLi/0HxP2bZ4jEkgPJYA== X-UI-Out-Filterresults: notjunk:1;V03:K0:aHhxv+F5UdU=:YP/iHiyI3wo1xBc1ny4SXd 5Op4samjG8xWWZAgAzxOa+qGVP06QFz751nKFxCGMzwbpwuL1db1L3x1NiKa64DwIKjDwdaqS DnCClFuBpYfmtKmUq4ibA8DRXycl3mscjG3JZ7kV0YQLdZ2JxE7e3WnFbsmuNsMVEjeQxszM1 wBssFfCzQLSxqdcYLB8qGMpwHZfx9JxtF2b3Ot0gB5kChOPE8jno5poJGlk1alchT1vuA9Za8 CF5mSxjNfXjopgfUQal3cFeFBmwr3jq0L4FcisPeQOhhlY5re0f/tiFMZaut4DHAjj/lMGVHt 8OqQHIl4Eshqo8y5aheyJMOczMaWX8DOIE+w00tM+gj881kefX1W77DHsfvGmDkK1y9227Nhj Ik2vpWie5qCumqK4WvJ0dUOIJqUcUArVmhbBsIbGYOpa+0tnZBgrt790971kbamlIERhzsQIJ CxVQOlSuGQ== Received-SPF: none client-ip=212.227.17.10; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Li Qiang , Viktor Prutyanov , qemu-trivial@nongnu.org, Michael Tokarev , Pan Nengyuan , Laurent Vivier , Euler Robot , Chen Qun Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Pan Nengyuan Missing g_error_free in pdb_init_from_file() error path. Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Viktor Prutyanov Reviewed-by: Li Qiang Signed-off-by: Chen Qun Reviewed-by: Thomas Huth Message-Id: <20201023061218.2080844-5-kuhn.chenqun@huawei.com> Signed-off-by: Laurent Vivier --- contrib/elf2dmp/pdb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/elf2dmp/pdb.c b/contrib/elf2dmp/pdb.c index a5bd40c99dca..b3a65470680d 100644 --- a/contrib/elf2dmp/pdb.c +++ b/contrib/elf2dmp/pdb.c @@ -285,6 +285,7 @@ int pdb_init_from_file(const char *name, struct pdb_reader *reader) reader->gmf = g_mapped_file_new(name, TRUE, &gerr); if (gerr) { eprintf("Failed to map PDB file \'%s\'\n", name); + g_error_free(gerr); return 1; } From patchwork Mon Dec 14 15:57:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416078 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cvmlj5vmzz9sS8 for ; Tue, 15 Dec 2020 03:18:25 +1100 (AEDT) Received: from localhost ([::1]:38418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqYB-0007vp-M4 for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 11:18:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEj-00086M-DT; Mon, 14 Dec 2020 10:58:09 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:54421) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEd-0001Tk-85; Mon, 14 Dec 2020 10:58:09 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N4i7l-1k4t0W0EB5-011fGC; Mon, 14 Dec 2020 16:57:47 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 12/19] block/file-posix: fix a possible undefined behavior Date: Mon, 14 Dec 2020 16:57:26 +0100 Message-Id: <20201214155733.207430-13-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:qLDPQrEQtWG2Dg8c4z8b4jPx7wioZRQYyfh02lniGNRyZgW6mcH yhMzXtwahF9OUjwU9OMfdyrh4hmSD2pnjckaIx0kDeS8plhW4OPaQJJmXCCBJ9p2c625S6j hb7CAJq8hMjzsthFFp78RH7aKlmfwCy0BWXtM1pWc0OSuhiBqxK5HkUX0OemwtvmD63H1fL HCGKR3AnaIwPCkUPRbHFw== X-UI-Out-Filterresults: notjunk:1;V03:K0:3mjSvXPmnhs=:NPP9GK/c2W8/WX3hkIKezS cDOIlq2Ng7CrvMIsf4AQtoLGzRzJ0edp5v0rhpiEWWrTmELQ/2O7IBnJWuBik8QPNKucnHsvT gixjUh6YRgFMhFVwETcuDkLXJv2Upp9PTxxTCVCxUQ9XbGV3HoaNWjCevKOyxRgo6V4Gtkwe7 n710NQgNL7FxranOuJK8o5K9h+Bst5aBys6Ly9tPcTXanSIX7BmZwkd6lU49ucggCY9LOrrSG cQBFWsQlkcEts2TjGEJTBgu9wCYne+NTI0reoss4/fnAg0Za7y+tekXHNCp+en2gNnnkDoqRI +ssJFxsUKFtKdQsDgRllRf+eRYn/yWgyNrHaKHvfXW9ZIIPIB2e8/PBSAPObYOdWbCoLOn6oY do4DarAO0QerLAGWDBSNtgfkIkg3xbmuMiEN7/D80X3qPcAC6C5A67sPDNL4cTIRI8EPeQ93p Ywz04Wcu7Q== Received-SPF: none client-ip=217.72.192.73; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Li Qiang , qemu-trivial@nongnu.org, Michael Tokarev , Pan Nengyuan , Laurent Vivier , Euler Robot , Chen Qun , Stefano Garzarella Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Pan Nengyuan local_err is not initialized to NULL, it will cause a assert error as below: qemu/util/error.c:59: error_setv: Assertion `*errp == NULL' failed. Fixes: c6447510690 Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Stefano Garzarella Reviewed-by: Kevin Wolf Reviewed-by: Li Qiang Signed-off-by: Chen Qun Message-Id: <20201023061218.2080844-8-kuhn.chenqun@huawei.com> Signed-off-by: Laurent Vivier --- block/file-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index 83e2cc55306c..9804681d5c44 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -2111,7 +2111,7 @@ static void raw_aio_attach_aio_context(BlockDriverState *bs, #endif #ifdef CONFIG_LINUX_IO_URING if (s->use_linux_io_uring) { - Error *local_err; + Error *local_err = NULL; if (!aio_setup_linux_io_uring(new_context, &local_err)) { error_reportf_err(local_err, "Unable to use linux io_uring, " "falling back to thread pool: "); From patchwork Mon Dec 14 15:57:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416071 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmYB0pFcz9sS8 for ; Tue, 15 Dec 2020 03:09:18 +1100 (AEDT) Received: from localhost ([::1]:41572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqPU-0005K0-1j for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 11:09:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEi-00084o-Km; Mon, 14 Dec 2020 10:58:08 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:60141) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEZ-0001TV-O3; Mon, 14 Dec 2020 10:58:08 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MZTua-1ka79W1VGY-00WTIv; Mon, 14 Dec 2020 16:57:48 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 13/19] blockdev: Fix a memleak in drive_backup_prepare() Date: Mon, 14 Dec 2020 16:57:27 +0100 Message-Id: <20201214155733.207430-14-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:735+zZjV7Kg4dys7SHq0LOXjYZoOFfqX/1cVH3mOYk/haK2LGKb Th8U6fcsWdlRLgXmtv1T60/d7Srcj+0kFXNA6R+1ST6eIWA+g0AVy4Y3128i+CeYAE70pjB 21wf6MP/ruvpsfcNzwy3TNtKiVIutCF7s2sZlMt8gjn/PexMhAbwSeM2DQeGBxRNZGUtsST lc3xAghxKEsu6Afh6tIFg== X-UI-Out-Filterresults: notjunk:1;V03:K0:ru3d2tFhvI8=:Q63Rp7jrB3UF+FXiXgUYVz yY/DkpNF7ifQYBE4UWU5rFn0KoVC/l9cxXCbidNFg8EoWmALQtjyLL4J0FXJ2Xj78XReeeOmX SEoErDpuE+jz0BAujXjjvMVITqrGxKXNlDykMvNzG+fc3j6IuCeT88UUjuae4wrmjHxgbuAZW gIevbxJXIXs1CZppw0V8Z94JY6XJkBXJfsoYXkBBP95USKBb7gv1skKdHMtUk2rDju5OT3vHW jOIVK2JZLs97KTRA6Kdu0k6+uJ+HxIri7Mza4uL0lWkcwY1wcnc0WlHumBUM00+9Br1BxwOWI GIzqy5LJ3IkYml/CttP7a2WQcvfaH+Tx2YGkd+dS2hS0qlvzvosXDh6gUhGjrPMODC7cEF3lC QVFwUK4Kyi30liDpVjcFaLcxbOu2GNATDW5N0EDXDg1yxu8WE3mUqUS8blJy19dUE7MOasupW KjShUm/gig== Received-SPF: none client-ip=212.227.17.10; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Li Qiang , qemu-trivial@nongnu.org, Michael Tokarev , Pan Nengyuan , Laurent Vivier , Euler Robot , Chen Qun Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Pan Nengyuan 'local_err' seems forgot to propagate in error path, it'll cause a memleak. Fix it. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Kevin Wolf Reviewed-by: Li Qiang Signed-off-by: Chen Qun Message-Id: <20201023061218.2080844-7-kuhn.chenqun@huawei.com> Signed-off-by: Laurent Vivier --- blockdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/blockdev.c b/blockdev.c index 412354b4b6ac..2431448c5d41 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1827,6 +1827,7 @@ static void drive_backup_prepare(BlkActionState *common, Error **errp) if (set_backing_hd) { bdrv_set_backing_hd(target_bs, source, &local_err); if (local_err) { + error_propagate(errp, local_err); goto unref; } } From patchwork Mon Dec 14 15:57:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416062 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmQX15CDz9sSf for ; Tue, 15 Dec 2020 03:03:32 +1100 (AEDT) Received: from localhost ([::1]:50492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqJt-0004ri-TZ for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 11:03:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEb-0007tZ-5m; Mon, 14 Dec 2020 10:58:01 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:35923) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEV-0001R5-5a; Mon, 14 Dec 2020 10:58:00 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MA7Om-1kzJXq3txS-00Bd4P; Mon, 14 Dec 2020 16:57:49 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 14/19] configure: Remove the obsolete check for ifaddrs.h Date: Mon, 14 Dec 2020 16:57:28 +0100 Message-Id: <20201214155733.207430-15-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:VDIPxspJMjUdPxEUny6PSSgzD8QmGgFfhzoxQzMGVlDMH7Z7ci/ RyJIZ7jAakG3u7+LIBp/b++k0CMIkui9FmdCfN5Mw9BiiJY7o8AspAhSxEU92COPE3uBueM 5inLU88TFKIoHYFWmi1T1zTDBKgLq9k6lBen1T+s7jW2XKbF5aD5RgmlDJxRx6buNzX1I5J akMzdaKQixG1Y0x1TglBQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:orRhYCUt9kc=:aoOp9bHKtb4xgNO1pK9uvs Bpwuk8bYU1WM7Xt4sTP9ItRvqvy8qjzosAAuhOVm0K9v4gmN1+aH8QJ7ewPErhiPzo0u0zypT XhiToJQYyvYu1sC1FmsW4SDmwm7OjcqpzRGQUN5H23hAcvJp7dYA8N2VzfVXMbctiNYxWqJtH ZNlCOAoOv7iVQcg4CElEsYQdSsV9yFjS8szh/w64tbS3Y7HHCPUopC5X2Fs1X81RcEH3awpm4 D5LfzYgVka294kGaEJHs30hO1A8Mr0J69TuxE8ZAY2htcDul1ui7BT1u1Cu7Z3B1bnXZz05hp Ijn2ohYofwS8Ce7zzXsnasG2YJ93R8VBhKzHVnve/bDT2EriWpHyXNMgLvQzlhi7zIQBIcwR1 ttYzRPqLWyoIHb6d9NRZXAp4l6mkWRbS5PKIGSjTkrFsJSz3dqOMahFI3DWQ/0mxqPj5dw5ND HcTZSNcK3w== Received-SPF: none client-ip=212.227.17.10; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Richard Henderson , Thomas Huth , Michael Tokarev , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth The code that used HAVE_IFADDRS_H has been removed in commit 0a27af918b ("io: use bind() to check for IPv4/6 availability"), so we don't need this check in the configure script anymore. Signed-off-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20201118171052.308191-2-thuth@redhat.com> Signed-off-by: Laurent Vivier --- configure | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/configure b/configure index c20ed86ff35b..1df5c848110e 100755 --- a/configure +++ b/configure @@ -3107,14 +3107,6 @@ EOF fi fi -########################################## -# getifaddrs (for tests/test-io-channel-socket ) - -have_ifaddrs_h=yes -if ! check_include "ifaddrs.h" ; then - have_ifaddrs_h=no -fi - ######################################### # libdrm check have_drm_h=no @@ -6219,9 +6211,6 @@ fi if test "$auth_pam" = "yes" ; then echo "CONFIG_AUTH_PAM=y" >> $config_host_mak fi -if test "$have_ifaddrs_h" = "yes" ; then - echo "HAVE_IFADDRS_H=y" >> $config_host_mak -fi if test "$have_drm_h" = "yes" ; then echo "HAVE_DRM_H=y" >> $config_host_mak fi From patchwork Mon Dec 14 15:57:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416060 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmPp6gv6z9sS8 for ; Tue, 15 Dec 2020 03:02:54 +1100 (AEDT) Received: from localhost ([::1]:48684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqJI-00041m-Sb for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 11:02:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEc-0007vg-Bh; Mon, 14 Dec 2020 10:58:02 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:43647) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEV-0001RE-68; Mon, 14 Dec 2020 10:58:02 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MkHIV-1kQFuO2XXt-00kgdi; Mon, 14 Dec 2020 16:57:49 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 15/19] configure / meson: Move check for pty.h to meson.build Date: Mon, 14 Dec 2020 16:57:29 +0100 Message-Id: <20201214155733.207430-16-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:z7y1afgEAePsEXgHdGk4OgPZ/fUlYM1E1J6zgKXB7HE0RpjQb6z UdGMV2EHLvbuN4DZjpYbF62K7XDRucJMewH0AkKuno4DmfaaWbQa7H9JO6DyukxsjX8mO9d +EGCTanChivGOM+XLBGJWf95g7OzQ+SZGopXxykffxKCt1lWxEnmhK7WF51+GX7pMhdyqKd KCuUYXs426JHLBJCtld5w== X-UI-Out-Filterresults: notjunk:1;V03:K0:gKf0OaDty2A=:mwFre4kswu0Dkl7ZS1wL+g WtWTlnIb4SHusORQfISvl9COCLicd7iY3fu2NuHw9y3CQHEaUgzbuOMplsaEl+cQlpfoyyUNC qiHQBFWKmvbDcsf3HbmAccNuWxYA77rZSgO9eNjjr9Epyqfljp7wZbm0qQhtfVQ40TgrG7G+Y KhBN4xHTecUR5RicniS6QPiNrURjXZ/gSRLgIb/SxDiznnRzvbCdZfZMO8aE6uvOAPTEUgZNI kEwD9aw1Brw9zw3Jv62r0skjTQlo69DNYq7Sh+aeAfu97Xn4wPxw9rcX+HjaSh3oIo3KNWnB5 2m/QFI+AYtntJDenXgSC40+JgGXEWLKBpV4Y9VZ8LNMcPsXAiApctGil16uqyV1NShxSHdkC3 n/eL8n6dvbv+84ao6ANiPJGniuX+0jxHnv/BNdqrw4+DbP2uOG87ZbTPnCBegB3L+c/rgudbT l4lPJ8yhVA== Received-SPF: none client-ip=217.72.192.73; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-trivial@nongnu.org, Michael Tokarev , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth This check can be done in a much shorter way in meson.build Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201118171052.308191-3-thuth@redhat.com> Signed-off-by: Laurent Vivier --- configure | 9 --------- meson.build | 1 + 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/configure b/configure index 1df5c848110e..39e61b275806 100755 --- a/configure +++ b/configure @@ -2332,12 +2332,6 @@ else l2tpv3=no fi -if check_include "pty.h" ; then - pty_h=yes -else - pty_h=no -fi - cat > $TMPC < int main(int argc, char *argv[]) { @@ -6687,9 +6681,6 @@ if test "$sheepdog" = "yes" ; then add_to deprecated_features "sheepdog" echo "CONFIG_SHEEPDOG=y" >> $config_host_mak fi -if test "$pty_h" = "yes" ; then - echo "HAVE_PTY_H=y" >> $config_host_mak -fi if test "$have_mlockall" = "yes" ; then echo "HAVE_MLOCKALL=y" >> $config_host_mak fi diff --git a/meson.build b/meson.build index f344b25955f9..ef053c98376d 100644 --- a/meson.build +++ b/meson.build @@ -836,6 +836,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0] config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2]) +config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h')) ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target From patchwork Mon Dec 14 15:57:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416068 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmW86xXzz9sS8 for ; Tue, 15 Dec 2020 03:07:32 +1100 (AEDT) Received: from localhost ([::1]:33424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqNm-0001tj-TN for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 11:07:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEd-0007vs-D7; Mon, 14 Dec 2020 10:58:03 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:60839) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEV-0001RJ-5E; Mon, 14 Dec 2020 10:58:03 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MTiLj-1kgxqV14Yf-00Tz8M; Mon, 14 Dec 2020 16:57:50 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 16/19] configure / meson: Move check for drm.h to meson.build Date: Mon, 14 Dec 2020 16:57:30 +0100 Message-Id: <20201214155733.207430-17-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:UvWVOTuKr20VfvZJVASlkISSmLvGBtnXcwPv3Dlyxw9oWILiQxZ rCDz1ICJgU2IyJzQATYqcynDP3wD2Bk9nBd7K7lh5wZ6VpAFhYwKCiQDxkXI58q22qgz0Xj MbzWj8xWE6s4Mf3zKxgelsVSQF4ZL/y6rZ1HFsfvMdcQVR00XwsxJ15pa3ae5muw+putUSV xMTg9uTXZ6Hqh4nMX7A9A== X-UI-Out-Filterresults: notjunk:1;V03:K0:wPZGeL3OaBc=:u/US9yroeaHwdgIarmQ9Gy u/WuDnnHNSDBQjYuJz4N7Vaxmdlo/KM6IS8wOCJbCykSg/kJWFuvlIWsCxt/Tu4p+2teiLkfR obBeWrJwcZ6K60PfAnI/8yaUy7AepJc8X6ndSvSpxbadZUCjVUzMQ/ONLrS/KyGUEtSu8uBOm 1epEGibAM6DDK4tY9QS/nH/+resIDrYelgnQu4D4pYP4zms6Tt69l9kGx/w7e7s08mR5rbbNq GsMeAv77/aq2rEN7Ne9gjxH3i1bcbu2nFt1twsMImYZuQC7mKZ5SN9OXHxC2sBS4Yb65Y/C1F 91cP+sMPBm97UmMKUdp6h9IukoS3yD0DvcQIETyrLI6Ux3VhOtwXtwTB+Qm0ffoNBOO8UHhF7 MQL9phDBtrqae/KbmZbb3tcR2050zvtUTR+SYzNPKlyh+glkn3/+yoSBF6tZIFvizwK4/baJk 5TipyMw30g== Received-SPF: none client-ip=212.227.17.13; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-trivial@nongnu.org, Michael Tokarev , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth This check can be done in a much shorter way in meson.build Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201118171052.308191-4-thuth@redhat.com> Signed-off-by: Laurent Vivier --- configure | 10 ---------- meson.build | 1 + 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/configure b/configure index 39e61b275806..ec2fae9e09c0 100755 --- a/configure +++ b/configure @@ -3101,13 +3101,6 @@ EOF fi fi -######################################### -# libdrm check -have_drm_h=no -if check_include "libdrm/drm.h" ; then - have_drm_h=yes -fi - ######################################### # sys/signal.h check have_sys_signal_h=no @@ -6205,9 +6198,6 @@ fi if test "$auth_pam" = "yes" ; then echo "CONFIG_AUTH_PAM=y" >> $config_host_mak fi -if test "$have_drm_h" = "yes" ; then - echo "HAVE_DRM_H=y" >> $config_host_mak -fi if test "$have_broken_size_max" = "yes" ; then echo "HAVE_BROKEN_SIZE_MAX=y" >> $config_host_mak fi diff --git a/meson.build b/meson.build index ef053c98376d..fc7ae6f86826 100644 --- a/meson.build +++ b/meson.build @@ -836,6 +836,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0] config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2]) +config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h')) config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h')) From patchwork Mon Dec 14 15:57:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416067 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmW307JWz9sSf for ; Tue, 15 Dec 2020 03:07:27 +1100 (AEDT) Received: from localhost ([::1]:32876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqNg-0001gG-UI for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 11:07:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEh-00080x-8z; Mon, 14 Dec 2020 10:58:07 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:50781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEX-0001Rp-4q; Mon, 14 Dec 2020 10:58:07 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MjSDU-1kPynE3hs2-00kxt7; Mon, 14 Dec 2020 16:57:51 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 17/19] configure / meson: Move check for sys/signal.h to meson.build Date: Mon, 14 Dec 2020 16:57:31 +0100 Message-Id: <20201214155733.207430-18-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:U+sLFcYb/yAKwqzvYeU0betj4us0/md4m36iyOZmM02GhP7r+oR pkFf+88GHVvpRsYLOBes7/LFwr7LntVE4WIHxhNtt3vZJb5zOWDSYDRs0NbOabunNxY+aDc SLmfj47hh18E/x5T2/a2fQe9nIBWHO+yrSA+v+I3oH3rfI01U1vR0REZLii5gFgY4emWH8b aYkAH1tB7JwvrlXMl3Ytg== X-UI-Out-Filterresults: notjunk:1;V03:K0:gVEz/gI4gcg=:Z5iptEpOJN1HMNMi25bLz6 GtjUr7iPSsZeWGrGeG9JqTICuz7QlQCmSnjMSf8gZrcou3+59h4aPZLmqFfO6BjDw9cbqDM3Y F0apfGrAZAf+SwCQ+ojFIwYKhmtgjVYEeyxt9FZPIMsi4nHzmXjVVKGGFFHuNn/dX1gqulxsh GPbSjmlOX0NZMXU3vGfmnOYiOKuDivPjvY0S0wS55mzUKfexRvz20aG8O6NhLfyyqoRLt+enz 3p45kmTOrLIyl08Qw9nsCSz8cnCdxX8LVW/CsIZoUwLgmdLKl18WZsOpCefL7WcZyZGvLHAb+ 5fue/hRU6qILWOMsOrP5jLLYjfMizMItgk64kKRs0lcz8sv6mE1AVPyQMP1k38XAbGF36YF6C CZed3sI8knPV+/j1BfVXLGI/gXI8mlbJvKxfdTyGUMTA1wkSHEp7b2rjHCWcLWc0oTY8/cgDb 8tPApq4isw== Received-SPF: none client-ip=212.227.17.24; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-trivial@nongnu.org, Michael Tokarev , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth This check can be done in a much shorter way in meson.build Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201118171052.308191-5-thuth@redhat.com> Signed-off-by: Laurent Vivier --- configure | 10 ---------- meson.build | 1 + 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/configure b/configure index ec2fae9e09c0..4f0f9c99d3d2 100755 --- a/configure +++ b/configure @@ -3101,13 +3101,6 @@ EOF fi fi -######################################### -# sys/signal.h check -have_sys_signal_h=no -if check_include "sys/signal.h" ; then - have_sys_signal_h=yes -fi - ########################################## # VTE probe @@ -6204,9 +6197,6 @@ fi if test "$have_openpty" = "yes" ; then echo "HAVE_OPENPTY=y" >> $config_host_mak fi -if test "$have_sys_signal_h" = "yes" ; then - echo "HAVE_SYS_SIGNAL_H=y" >> $config_host_mak -fi # Work around a system header bug with some kernel/XFS header # versions where they both try to define 'struct fsxattr': diff --git a/meson.build b/meson.build index fc7ae6f86826..a790cc527cf9 100644 --- a/meson.build +++ b/meson.build @@ -839,6 +839,7 @@ config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2] config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h')) config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h')) +config_host_data.set('HAVE_SYS_SIGNAL_H', cc.has_header('sys/signal.h')) ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target arrays = ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] From patchwork Mon Dec 14 15:57:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416074 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cvmc25d35z9sSf for ; Tue, 15 Dec 2020 03:11:46 +1100 (AEDT) Received: from localhost ([::1]:46912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqRs-0007bR-PM for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 11:11:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEh-00081e-Mk; Mon, 14 Dec 2020 10:58:07 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:55563) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEW-0001Rb-PM; Mon, 14 Dec 2020 10:58:06 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mf0FY-1kClNt242U-00gcJ3; Mon, 14 Dec 2020 16:57:51 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 18/19] configure / meson: Move check for sys/kcov.h to meson.build Date: Mon, 14 Dec 2020 16:57:32 +0100 Message-Id: <20201214155733.207430-19-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:rbZW9XEaQF337JySb+YlzD5UFIau91D1uHkkIDObCdul3PdZt6t zyJaJ1gzo/TqRtCxrfsz9BvoZx770kD938mNsoW0dpXaUIVul84Q93qRekbu+9fee94iJNP zL3mSykFOhrOlHicvdsRD3zVM7aKmTkZ1c+SpAXZyyh+C4/1QNT2E/RA8Zn5lIlXySdSADA Q13itQEQAMUBM1wuL8V5Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:2OvbeYpJ04Y=:E3g03z0xBf3bEd6zaVaZkb hcWcjenxCOKK7y2gOqrwLkUz90bGcBRyRl9iHhKJE3yuoyEDbqkZ2L01M/ZZEJCg5yx3jNdLQ nX2xtx0VWkPvbG2BKaNsXJz3XdNBSKdosJWOmH3bmDTB30fu62cFj5wOmssSHlCtCgTC6Ojq8 O53mqD3IeFDm4Gm2OONxd1ga5rVhgG8PFfJwnEhZungGu1fLQhOZwU8cmhkp5vmgkfNw+zPgF AJIkVoJ2PFiX4yWNnxNHDQV3/FJjxTXfltvT5DFokq0nZPdV+I6vLe3RURb99jCBM1UoNxOtK AHtGCIWcBfT+L05VN/BWYdAF5JbuDOW0kX8xB3AWlkCC7VZgEv07rVCPTNJmBs11jQtsVY8gh 1EqxyoudbHu9W8Klo/tuxQkyjMEjWgj+rG//WIpedf9Yu1T9CQJOmTWQxEwKgCjnauFKowTLj lv566iCrow== Received-SPF: none client-ip=212.227.17.24; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-trivial@nongnu.org, Michael Tokarev , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth This check can be done in a much shorter way in meson.build. And while we're at it, rename the #define to HAVE_SYS_KCOV_H to match the other HAVE_someheader_H symbols that we already have. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201118171052.308191-6-thuth@redhat.com> [lv: s/signal/kcov/] Signed-off-by: Laurent Vivier --- configure | 9 --------- linux-user/ioctls.h | 2 +- linux-user/syscall.c | 2 +- meson.build | 1 + 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 4f0f9c99d3d2..6c13964b247a 100755 --- a/configure +++ b/configure @@ -4402,12 +4402,6 @@ if compile_prog "" "" ; then syncfs=yes fi -# check for kcov support (kernel must be 4.4+, compiled with certain options) -kcov=no -if check_include sys/kcov.h ; then - kcov=yes -fi - # check for btrfs filesystem support (kernel must be 3.9+) btrfs=no if check_include linux/btrfs.h ; then @@ -6112,9 +6106,6 @@ fi if test "$syncfs" = "yes" ; then echo "CONFIG_SYNCFS=y" >> $config_host_mak fi -if test "$kcov" = "yes" ; then - echo "CONFIG_KCOV=y" >> $config_host_mak -fi if test "$btrfs" = "yes" ; then echo "CONFIG_BTRFS=y" >> $config_host_mak fi diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 585874f090ff..8efb4d38c014 100644 --- a/linux-user/ioctls.h +++ b/linux-user/ioctls.h @@ -715,7 +715,7 @@ IOCTL_IGNORE(TIOCSTOP) #endif -#ifdef CONFIG_KCOV +#ifdef HAVE_SYS_KCOV_H IOCTL(KCOV_ENABLE, 0, TYPE_NULL) IOCTL(KCOV_DISABLE, 0, TYPE_NULL) IOCTL(KCOV_INIT_TRACE, IOC_R, TYPE_ULONG) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 27adee908ebc..063130be048c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -73,7 +73,7 @@ #ifdef CONFIG_SENDFILE #include #endif -#ifdef CONFIG_KCOV +#ifdef HAVE_SYS_KCOV_H #include #endif diff --git a/meson.build b/meson.build index a790cc527cf9..04cdea75dd50 100644 --- a/meson.build +++ b/meson.build @@ -839,6 +839,7 @@ config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2] config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h')) config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h')) +config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h')) config_host_data.set('HAVE_SYS_SIGNAL_H', cc.has_header('sys/signal.h')) ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target From patchwork Mon Dec 14 15:57:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1416076 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CvmdY5b1Yz9sS8 for ; Tue, 15 Dec 2020 03:13:05 +1100 (AEDT) Received: from localhost ([::1]:53112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koqT8-0001u8-Qi for incoming@patchwork.ozlabs.org; Mon, 14 Dec 2020 11:13:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34350) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEi-00082x-1D; Mon, 14 Dec 2020 10:58:08 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:50349) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koqEW-0001Rn-V4; Mon, 14 Dec 2020 10:58:07 -0500 Received: from localhost.localdomain ([82.252.135.218]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M593i-1knkIu0Pm0-001Cx9; Mon, 14 Dec 2020 16:57:52 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 19/19] configure / meson: Move check for linux/btrfs.h to meson.build Date: Mon, 14 Dec 2020 16:57:33 +0100 Message-Id: <20201214155733.207430-20-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201214155733.207430-1-laurent@vivier.eu> References: <20201214155733.207430-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:iEQmCI2+fISc9GXEd0HEBd89pHFZqS7MeKajSfTqu9fnjfJpm8k oaE1SaXUSrFNLa8RHOPGEchUEPATFtCU0ioytqo8dFtIvMjmK+eYN1sEt5i6vkuaXPb4Syl JuSAsaNfihrbqohGdsY7U2J6Gp63AN5YJzj33URHurfp9j6YoyAGiNFaOjMOAFgOFXWaqv/ Z8pjy6qXr3qLos219z3Og== X-UI-Out-Filterresults: notjunk:1;V03:K0:JpqlyPvt3z0=:azeyHQ+Lk5DqgyKh8UOlja IV0jOepBjj5efbMm3TxlP2G5hqr1hHdLhfnOviqLjxZnT/fJ6hmCvMXg3XaeHZn0iCG711HYq oVvFUVqJS8ftgDYH3Y3CQIx4RbvBLpiO55cmRxWtreIkrMcPYDFnL2PRFFnWgSbirpE0JvNcO c38FEUMQWyJAkWuRoieZh2Dx58oezb84IdUsqs2yyS/pF2GXlz1SzCz0uuMCdHZ6Aj1B6tvL3 74IcO/8lqPj9KfGfCbE9jyPfyTZqd6E4rM3ZEO2BxmWhlAkJkYvcy71pQo2LzLo9zY5wF1W8G 0MgUxlnrwviJ9Y6Lgzr7W/8A7+VgUz5T50Z0c38F2FhUegyn2jT6IotEfNlRReSiAimGz0eRV 0KmchArxSABbqCT5cHg/JY9fl1f2FOv6iA3LCwSDrY4+uci4yrsEDV1kta+7ECz8UzvfL9Bad hwm9ULpbwg== Received-SPF: none client-ip=212.227.17.24; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-trivial@nongnu.org, Michael Tokarev , Richard Henderson , Laurent Vivier , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth This check can be done in a much shorter way in meson.build. And while we're at it, rename the #define to HAVE_BTRFS_H to match the other HAVE_someheader_H symbols that we already have. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201118171052.308191-7-thuth@redhat.com> Signed-off-by: Laurent Vivier --- configure | 9 --------- linux-user/syscall.c | 2 +- linux-user/syscall_defs.h | 2 +- meson.build | 1 + 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 6c13964b247a..cb21108d34c3 100755 --- a/configure +++ b/configure @@ -4402,12 +4402,6 @@ if compile_prog "" "" ; then syncfs=yes fi -# check for btrfs filesystem support (kernel must be 3.9+) -btrfs=no -if check_include linux/btrfs.h ; then - btrfs=yes -fi - # Search for bswap_32 function byteswap_h=no cat > $TMPC << EOF @@ -6106,9 +6100,6 @@ fi if test "$syncfs" = "yes" ; then echo "CONFIG_SYNCFS=y" >> $config_host_mak fi -if test "$btrfs" = "yes" ; then - echo "CONFIG_BTRFS=y" >> $config_host_mak -fi if test "$inotify" = "yes" ; then echo "CONFIG_INOTIFY=y" >> $config_host_mak fi diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 063130be048c..7bf99beb1814 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -112,7 +112,7 @@ #include #include #include -#ifdef CONFIG_BTRFS +#ifdef HAVE_BTRFS_H #include #endif #ifdef HAVE_DRM_H diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index cabbfb762dd9..b934d0b60676 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1006,7 +1006,7 @@ struct target_rtc_pll_info { #define TARGET_FS_IOC32_SETVERSION TARGET_IOW('v', 2, int) /* btrfs ioctls */ -#ifdef CONFIG_BTRFS +#ifdef HAVE_BTRFS_H #define TARGET_BTRFS_IOC_SNAP_CREATE TARGET_IOWU(BTRFS_IOCTL_MAGIC, 1) #define TARGET_BTRFS_IOC_SCAN_DEV TARGET_IOWU(BTRFS_IOCTL_MAGIC, 4) #define TARGET_BTRFS_IOC_FORGET_DEV TARGET_IOWU(BTRFS_IOCTL_MAGIC, 5) diff --git a/meson.build b/meson.build index 04cdea75dd50..fba6413056a3 100644 --- a/meson.build +++ b/meson.build @@ -836,6 +836,7 @@ config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('.')[0] config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('.')[1]) config_host_data.set('QEMU_VERSION_MICRO', meson.project_version().split('.')[2]) +config_host_data.set('HAVE_BTRFS_H', cc.has_header('linux/btrfs.h')) config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h')) config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))