From patchwork Fri Dec 17 20:10:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1570342 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4JG0W76v6kz9sVq for ; Sat, 18 Dec 2021 07:11:47 +1100 (AEDT) Received: from localhost ([::1]:50112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myJZx-00076j-PZ for incoming@patchwork.ozlabs.org; Fri, 17 Dec 2021 15:11:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYj-0005u1-SO; Fri, 17 Dec 2021 15:10:29 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:46733) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYi-0001J5-AQ; Fri, 17 Dec 2021 15:10:29 -0500 Received: from quad ([82.142.30.186]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MYNeM-1n3AzP0r6g-00VTr1; Fri, 17 Dec 2021 21:10:21 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 1/9] configure: Symlink binaries using .exe suffix with MinGW Date: Fri, 17 Dec 2021 21:10:11 +0100 Message-Id: <20211217201019.1652798-2-laurent@vivier.eu> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211217201019.1652798-1-laurent@vivier.eu> References: <20211217201019.1652798-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:zqP7h73vrj28ySvPM1QIgAFipWSIY22h++MPsCYVLUBSq+UsPPW XxyNd60ZwYAuGmd5rz1/HLZ7YDqil+lj7M4tat14NTuJvenuB0SeQ5YGdOZ3MMMZHAfEvOF pe8UQD4QMCHQqnSKfSDYVrnwVacP6D+ye1Mk3zXbk8cj0XJuigyLlajso1QyQUSilK6PhFo n6u1BSnj/sAV/CjviPrKA== X-UI-Out-Filterresults: notjunk:1;V03:K0:24eMlDOtQvc=:h5wrPM837Y2lvrfFMt4t3L suFJS+HA5HWMT6O9sWsdvK12BSS575gzanZcsO1R4migyYsAKgiSZoqkL8v8ATClVMEg+mcFr HmD2w/anx6I2PSaKy7wdbLocI2Wa0h2hTEW2N407blVYHvQ9sMFITk9G1ZHa1qtACrAnuvgjK VfKKvBerjBWFja7ZPUDhLxndsHyO21Db20aCJwzEUNqq2xc8g2UeuLmJu6IEaHPBz+WgcFTqE GMtsOWmi1EVPDosvIVJe1nSlkkN8jxYU/KHZE6nF4PkxGAjxA6Kyw5HOBR1wMEpft79GP5FLi D2nTu0c94bM/Y6LgG8Hs/ukpm2xgF/vyd7rWB1tp+vUqEKK8ZJdTc/9gVL1pf12NO973xhovx gKE562uHg4Eq0AITVqFf5fi21TUFn2zUop78fJUZDOWx+Cf4GtcJaouOUxpf58voGXmNIfq3/ J2JlrkIWwq256MjoCWIeihZMKFGiloWx7yUXfzA/5AoxZEXE/QU05FaOYSbZ+4trf9iVBNidP rAQLZ5oonHjMIQOiRnzZEqBTNwu+IdKmqRDeKay/BoH0p3RM9Q0aC4Oyp7oUH2TkUjEG/AD8S sj7+djnaS6XCADoXQWXY5qSFXCAmbW3FEA+ID62eNxvSGMiOlvacHz9K1drANqm7WCE332SxS bCVE0VCcRTO9qp37zrVMYrAiXYnYwlq9AzSbUFPgPSBIofTwbIs4QrCUwdt206lqR1O4= Received-SPF: none client-ip=212.227.126.135; 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Stefan Weil , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Laurent Vivier , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé When using the MinGW toolchain, we use the .exe suffix for the executable name. We also need to use it for the symlinks in the build directory. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Weil Acked-by: Paolo Bonzini Message-Id: <20211109144504.1541206-1-philmd@redhat.com> Signed-off-by: Laurent Vivier --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 5fae19858d58..28e1cf6291bb 100755 --- a/configure +++ b/configure @@ -3754,7 +3754,7 @@ fi for target in $target_list; do target_dir="$target" - target_name=$(echo $target | cut -d '-' -f 1) + target_name=$(echo $target | cut -d '-' -f 1)$EXESUF mkdir -p $target_dir case $target in *-user) symlink "../qemu-$target_name" "$target_dir/qemu-$target_name" ;; From patchwork Fri Dec 17 20:10:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1570343 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4JG0Xt5pDGz9sVq for ; Sat, 18 Dec 2021 07:13:18 +1100 (AEDT) Received: from localhost ([::1]:56802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myJbQ-00037f-L3 for incoming@patchwork.ozlabs.org; Fri, 17 Dec 2021 15:13:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYh-0005po-SZ; Fri, 17 Dec 2021 15:10:27 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:59525) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYg-0001IJ-CF; Fri, 17 Dec 2021 15:10:27 -0500 Received: from quad ([82.142.30.186]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1McXs5-1mLwSu386H-00cufE; Fri, 17 Dec 2021 21:10:21 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 2/9] target/i386/kvm: Replace use of __u32 type Date: Fri, 17 Dec 2021 21:10:12 +0100 Message-Id: <20211217201019.1652798-3-laurent@vivier.eu> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211217201019.1652798-1-laurent@vivier.eu> References: <20211217201019.1652798-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:fyWsljQuV2ckBBMTcxXIz+WOj/dSSWgGibWMtCyplCIyCga1TSe ZgHMLnB+W4739oebK3R7hlPKweuB58jzdNHL9grO4bCqQMr9p9Nfcz3TmOOyuK6pN1YTY1L sDXVsyIMissdM0oZant+gJ3GKAFOONnZHA59Ho09UY9r4yqZtOye/2t+DPD0onS606kj7Yb /UzB2zHGyY12ZYNYI4CpQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:hEQm1re27Go=:AgqnFOhiEqEGMED4hGi4sr 9xTtFyXMDCzqx3DzRiWG4Aspp9KajXXzY76S81oRaJt50BHR15lUhArk8SncwT1pqeR1hc7pO GeLxIyJ7aV5n49CyEgi32kwMlWxptFPudzz9kaQj7kemz5uSicitZHtdgmq2j/VdtZORmAHkk ZDQdF3Uj4ceYms6xikYHCU2XbTsnUPfys6nxFX4sbWD0SZ72g08RDUkahiEYu19euxQTVMrzw kPCWkM7mX4gbJaFEnl7s3U3w3G1f7gUP9kMl+hdZAHsE46XNTbxF9PWLbKPUBwAqMRYucmPUk i9rAOdown8g3otD4hSEXDNVIudtfWrLgsWLIVO+OenKrEsd4gTevhw/9pG3vA/cefgheBCbe1 StvMK/cKYZ+OyrVN27sEYQLKeWyDpdJ+2SG67RtT5kaKucSmAr7qctO8dqD/9216BkPWIW27F xR2/FAaUa2ed6/R2kdFd8Md78vCgd6W/JbIjsWBgUzr3x9cRmYyZaiigz2sqdIxfI1UXM4K6A VWOct/CHrdaV3KjpINCFkx98fo31pWHGgmcCJF7+x0M9nBuFhl7700SKxtlXhAQnFZ6mA6FUS GS8L4QLaSxywRD7//VqBnxEfeDPw1aTkuINuSw5T/HE9UlVRZALtSM0HabAGuH5y/DPwK5jgD 0GIRD+UOcvcuXpQlvU2oIip/oUZPjYISf1JBG4zH1n4nUEkq7ZA7h2N9q8xSHtC50qBc= Received-SPF: none client-ip=212.227.126.131; 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_H3=0.001, RCVD_IN_MSPIKE_WL=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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé QEMU coding style mandates to not use Linux kernel internal types for scalars types. Replace __u32 by uint32_t. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20211116193955.2793171-1-philmd@redhat.com> Signed-off-by: Laurent Vivier --- target/i386/kvm/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 5a698bde19ac..13f8e30c2a54 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -1406,7 +1406,7 @@ static int hyperv_fill_cpuids(CPUState *cs, c->edx = cpu->hyperv_limits[2]; if (hyperv_feat_enabled(cpu, HYPERV_FEAT_EVMCS)) { - __u32 function; + uint32_t function; /* Create zeroed 0x40000006..0x40000009 leaves */ for (function = HV_CPUID_IMPLEMENT_LIMITS + 1; From patchwork Fri Dec 17 20:10:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1570341 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4JG0W142Z2z9sVq for ; Sat, 18 Dec 2021 07:11:41 +1100 (AEDT) Received: from localhost ([::1]:49474 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myJZr-0006h0-B6 for incoming@patchwork.ozlabs.org; Fri, 17 Dec 2021 15:11:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39978) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYi-0005rb-LP; Fri, 17 Dec 2021 15:10:28 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:42525) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYh-0001Ii-0u; Fri, 17 Dec 2021 15:10:28 -0500 Received: from quad ([82.142.30.186]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MD9jV-1mpky72CfJ-0097k8; Fri, 17 Dec 2021 21:10:22 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 3/9] qemu-keymap: Add license in generated files Date: Fri, 17 Dec 2021 21:10:13 +0100 Message-Id: <20211217201019.1652798-4-laurent@vivier.eu> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211217201019.1652798-1-laurent@vivier.eu> References: <20211217201019.1652798-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:A3llPF56irfZvVW8MkGLCyDMUK72MzADvHBAYtB54wwt07A7CYF NKVOW4AFXO9RQ4TaFiljNVLcZqHpfr5pJeHK2A3gqIrusI0HFnwPtfygCwxatiT66tRL8CE ZqAmyGGSAgGKJCHUuGeUBqjhLn1axrX/hKCSQx2VkDl++Ll4oVPjP00BzrueIb/jjcqw4Uk Ehl2UJC35eHiqxFStioHg== X-UI-Out-Filterresults: notjunk:1;V03:K0:+QzkVDwHR5c=:UXu/ms6/8Lv/MzlupUTVGs eZI9ylHAgPdYmF6nuMsRgkmOIdjpC7buwCObzwgNfWRPzaqBcW9BzGDzamBc6MDHkEVIlP+5Q q+fGLjPJllqN6IiujAR6WA8A1AejeaP/F38nzVVJLDZj4gQIPv+MJEVqDsYMNNbwM+mlSTrnT wOcB/QrEt84fvtSu44FW1/eEUd4ak9JB9YNY931s7uhFw7JURaEWokUTmtFPb2ZzKYDEbuo+R MIiyMC2rt0sHtsdGr0Oi9+CstZWbjTpRxr8FWul3cv15uM5fLaTs+F/8CUIWAo066nzXow8Uo 47jOKmJl3lI1T2y8VSF/F9OGvgrTlHFNV8N69Cvd50jhXbbvx7E1QEVB+fCM3ZG34RsqOWAKa gLKK1JE8bl1TiTpRmLaobyynbaAxWC2IH0Pv/svv6GuQWdlPhB4BxBIW/StWqFNK6SDMw1JPJ flZPCxdjCZtWPpSlSkbH5oX/0h99hc2qa5+WbWfDdyaKi8hnzDNmthcTsMzE/PycMweITcq/W 4dYSypjcK4ihBztJypdhgV3D72TTklFPlE1YZflsUWmw7itd9SzZqSeNv2WnAhN6yp57gOr1m Gv2iPYPcBFm8K2ZGtYV+F20Kfm47XqyX2d8q7vbMM5WApJjzBdz1mwCy1I+Sx05uc65cxG3ZY xwnfIyChYXyjw4zbIW+RvPr6q4Apw6i5jGcP+jFJU/OM8uYyIpfud7hTN2gKB6ACXZI8= Received-SPF: none client-ip=212.227.126.133; 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_H3=0.001, RCVD_IN_MSPIKE_WL=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.29 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?= , Laurent Vivier , Warner Losh Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Warner Losh Message-Id: <20211117174533.1900570-1-philmd@redhat.com> Signed-off-by: Laurent Vivier --- qemu-keymap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu-keymap.c b/qemu-keymap.c index 536e8f2385d7..4095b654a607 100644 --- a/qemu-keymap.c +++ b/qemu-keymap.c @@ -187,6 +187,7 @@ int main(int argc, char *argv[]) } fprintf(outfile, + "# SPDX-License-Identifier: GPL-2.0-or-later\n" "#\n" "# generated by qemu-keymap\n" "# model : %s\n" From patchwork Fri Dec 17 20:10:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1570349 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4JG0hh4HNKz9sVq for ; Sat, 18 Dec 2021 07:20:04 +1100 (AEDT) Received: from localhost ([::1]:42376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myJhx-0004Kc-L0 for incoming@patchwork.ozlabs.org; Fri, 17 Dec 2021 15:20:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJZ1-0006Fu-66; Fri, 17 Dec 2021 15:10:50 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:51513) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYq-0001MG-54; Fri, 17 Dec 2021 15:10:37 -0500 Received: from quad ([82.142.30.186]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MmUYD-1mGQ9O0Ufx-00iSYq; Fri, 17 Dec 2021 21:10:23 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 4/9] hw/avr: Realize AVRCPU qdev object using qdev_realize() Date: Fri, 17 Dec 2021 21:10:14 +0100 Message-Id: <20211217201019.1652798-5-laurent@vivier.eu> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211217201019.1652798-1-laurent@vivier.eu> References: <20211217201019.1652798-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:R70kTna8rRJD+JhV25qXyrvnmPOe12pS+SsPgukOH90eTZXweCA 7oAzql7rmqeoaa5XjpS0rM3IyHKylb8F19Ln4DCO2wNSKold5GtjTAktFdQe3T7wCFwmNIc 0nV5U4r/szSoe5ijt7qjXeUDka/g/2sSR6Z+k0RrNPhz7Wp3xpMOrKZmukyJc6xwU1ZxknJ PaH06bjPvZSan6pnD2XLg== X-UI-Out-Filterresults: notjunk:1;V03:K0:fZ9wgF/45kY=:2MSIvKqM72rNPqLGLj0AXS MVccKNUGRv4s4/DJAJNGs0AtUXeaCaOZ7MYQPQVadbqPwHFK+4MEFlrbCkmA1OJNgJWe/1+OC 1nKkXtYDv1Gtq3xIBgAA5kDEnBPsv13lyegeHVDVbX1LNd2cdKJ81FqOPMmCPRhyTxUNxP2GC c3bZs9ZH5JwXjFP9JdtUh16RZub4wW4/EufA5DA9s473izfGuCrCCqk0UM3YFK2yHL1dOUswH yLrlqNED+GwNv1KZq1kOtkJrf0BuWWHM8JFivZbve9mcE0PWtzbGuAtu6TW2NbeMeb2RUJRD4 J5tXGueGYZtpHlISsc45fPOZlOCHGSE4KXo4IAy97FaqBFhEZ33NsRjJHlMNm7xJhDNWM2nlU s6rT/LmafAza0a8xc1R89/Q5VZyAd6uAHXLBlvsnKVK8pNYaEHSfoWOxdCG8TvJ3+eV5Qiuaw Ny4aWNDnPl+Lx0vNTaXqN3ufR2lqCtzyMl+vrCF9DMM9eYt05L/SSZmEHfOYPxefcO3HlzcqY wgp/Blg9G1BJCm2F9VO67Hc4/ZnciNR/uId65/vVPWUTpyFJeFt/3TIKCihaBl1ML6f41YZFb w6sZ44wbRCXdamMzbE0Dg/2Vpk9pgXlWk9xQj/gYWmL40GlHydQsVvBDfI6N9u4Tki1whVQXY aeYGh/fcS5koBmN+4LtgfDGR3FkmGgGbjo0L/EKptP+w+h1QYsgniEFWruYGoMDQsbg0= Received-SPF: none client-ip=212.227.126.130; 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_H3=0.001, RCVD_IN_MSPIKE_WL=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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Michael Rolnik , =?utf-8?q?P?= =?utf-8?q?hilippe_Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé TYPE_AVR_CPU inherits TYPE_CPU, which itself inherits TYPE_DEVICE. TYPE_DEVICE instances are realized using qdev_realize(), we don't need to access QOM internal values. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael Rolnik Message-Id: <20211205224109.322152-1-f4bug@amsat.org> Signed-off-by: Laurent Vivier --- hw/avr/atmega.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/avr/atmega.c b/hw/avr/atmega.c index 0608e2d475ee..a34803e64272 100644 --- a/hw/avr/atmega.c +++ b/hw/avr/atmega.c @@ -233,7 +233,7 @@ static void atmega_realize(DeviceState *dev, Error **errp) /* CPU */ object_initialize_child(OBJECT(dev), "cpu", &s->cpu, mc->cpu_type); - object_property_set_bool(OBJECT(&s->cpu), "realized", true, &error_abort); + qdev_realize(DEVICE(&s->cpu), NULL, &error_abort); cpudev = DEVICE(&s->cpu); /* SRAM */ From patchwork Fri Dec 17 20:10:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1570347 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4JG0cl4gFpz9sVq for ; Sat, 18 Dec 2021 07:16:38 +1100 (AEDT) Received: from localhost ([::1]:36890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myJec-0000XJ-Np for incoming@patchwork.ozlabs.org; Fri, 17 Dec 2021 15:16:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40088) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYm-00061D-Ls; Fri, 17 Dec 2021 15:10:32 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:55089) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYl-0001Kn-2F; Fri, 17 Dec 2021 15:10:32 -0500 Received: from quad ([82.142.30.186]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MXXdn-1n08iO3gnH-00Z2lC; Fri, 17 Dec 2021 21:10:24 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 5/9] hw/virtio/vhost: Fix typo in comment. Date: Fri, 17 Dec 2021 21:10:15 +0100 Message-Id: <20211217201019.1652798-6-laurent@vivier.eu> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211217201019.1652798-1-laurent@vivier.eu> References: <20211217201019.1652798-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:Yp9InfhxjS+IS2Gv4DyCN+O6FlSuobETECztAK1zs9ZGMMRGR4e HM9r7EmKV4P6b3YStylpv2MaZKPEbSJD1IaQ3yQbN2upQqHoTr9Cyjr9beDqZhlWmGtygIb n5+HYoE6NtxK/D3a9fcb6RsJq09k/bWVGWMGYlg3In1cNvuIKAdX0yCCCV2Q2DILfJguHDh 6Pqsm+pGbCxxp7S3+tiaw== X-UI-Out-Filterresults: notjunk:1;V03:K0:qf6sSX9QtPU=:lwHID7xH7Fyi/hx1KD1hbf rArFthZ+p0MAfwnxqu2LxKHkEiydh95CDuh2rOQUxnKKADilgsYSabr5FAd1Qz7zcGazHMagO klzqupSH6Imj6J/Vs0lglbZo28ccAzL2VpZsP9d3onh9t4PJyUighM4M40izkJSB8L/5mH7aB 73RFlvM08xsfDW/wJrcqYamDAvRQIFvob1C6PbxtPmBlhhcwAfHyaBzIzw3M6lDSp8rWSe+o3 d0pJesQs8DNbf1amUTaLkUu/BH5EltaJF5P/+LuQELqbChu3GVebvlygh+13aTACqLMIHwoDp wqKyTe1QeYbayaLZk46UDBOfldj5NpvZ475v+WFEwovopTet/GNsZc8P0x4LDsO2ADKSjhv5y 5P2U9GvG/6UQTyQ3Jc6Ts51Bpsh129CI6DTfVcKKsZEdolV8nryvKuhKzJT/2OCwOIk8Vtzp9 HGBO0hdliG6vpDOqkpoVsG6GqpMLPWThikGKJv4yUoyYbDakg9THIePD88VVDYZkzzlrrK4nY CMSYuXpY9ongJgKuS4WDtPam0yax2ttp+Q+Jv3mCYUqwHQnccHSOrds50afk/PLQmJznuvNGO KwAuMoXj7YEIbuQ7jTk0juFyKXMCDaLUGFQ4HtWduQ3SloNI4WsbwHO5qnaVE0+Pnr9PAgwm7 nBAyuC3Dx5x9QdOECWR2h8ilOMgfewmIfDx+j+pGt/91X4wX6WNBOy1DJhSlrtcDLmSo= Received-SPF: none client-ip=212.227.126.131; 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_H3=0.001, RCVD_IN_MSPIKE_WL=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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Leonardo Garcia , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Leonardo Garcia Signed-off-by: Leonardo Garcia Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: Signed-off-by: Laurent Vivier --- hw/virtio/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 437347ad01c9..20913cf8fb4b 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -313,7 +313,7 @@ static int vhost_dev_has_iommu(struct vhost_dev *dev) * For vhost, VIRTIO_F_IOMMU_PLATFORM means the backend support * incremental memory mapping API via IOTLB API. For platform that * does not have IOMMU, there's no need to enable this feature - * which may cause unnecessary IOTLB miss/update trnasactions. + * which may cause unnecessary IOTLB miss/update transactions. */ return virtio_bus_device_iommu_enabled(vdev) && virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM); From patchwork Fri Dec 17 20:10:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1570340 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4JG0Vv73Ytz9sVq for ; Sat, 18 Dec 2021 07:11:35 +1100 (AEDT) Received: from localhost ([::1]:48894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myJZl-0006BG-4d for incoming@patchwork.ozlabs.org; Fri, 17 Dec 2021 15:11:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYm-00060m-JC; Fri, 17 Dec 2021 15:10:32 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:55467) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYk-0001Kg-TG; Fri, 17 Dec 2021 15:10:32 -0500 Received: from quad ([82.142.30.186]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MPXxi-1nC0gc3A9K-00MeAN; Fri, 17 Dec 2021 21:10:24 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 6/9] docs/block-replication.txt: Fix replication top-id command demo Date: Fri, 17 Dec 2021 21:10:16 +0100 Message-Id: <20211217201019.1652798-7-laurent@vivier.eu> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211217201019.1652798-1-laurent@vivier.eu> References: <20211217201019.1652798-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:ssDFRdxDU16rVQvfzMzWFZ47dYx4Nv9mVinYp71rDC1gBkVny77 0Tm9NPLR5qWRURP9TlhOms110cyPsAPLbVrePzJCTYd2Uu7wF6/ioOU1MDqyWlxlqWi47f8 Qnoq8u58hviyW5OETWCvAXS+kk1dpWji5nJf4nbReTywOmdmp790Pb/w26GWJ/wHAIR8QRQ mAQzNlTXHkPt4E2nYkBVw== X-UI-Out-Filterresults: notjunk:1;V03:K0:ekthWI3McGs=:ke8MFEY93nnxy6QVecBJAA 181Iecl6D8J6vchjkB+9NLWTaGkR2QKf+Xcqj7SlQ0j2p9hDmXlj98xtwj2lFkLDEvqnZ/GBA s6YbwILa0KiX93oe46xDSgLMankYPN+grdnKCvS1/9FdOFhggssXNJmn6Hq26g8v1I/vvFBLW ijbU83Xn+dckWdUCMeEb+5i04jclA+Zv49lGsRVPG7I7FtlRX9+ZStuEhDpd8ICXcn+VuyX4s +uLZ7T7KheBxW3bGAZZbf9CXqihCjA/pFzxkr27C0eSHXZqQFioUdmUcMA2anLszRMel1a85h eFrM8fb+eTryNXegWRLW1XAJa3mJDoadRDzp6PhI3yxCsPOgNWZPK74BaQu4rujDrJofLyEfc NL0FRrjwW+VHd/RA8w0Qn0YHhdPYYRqQKkhHy4Te6Qlo6/3cYRNJRhOy6rovXNbrsVwVxGDBZ VKO/1psXrGxJVfLKd2oIOMpCoX38ce7xvE4916HUSSRPXO4ZHR22pPq6CCUS8q15I1JBq+Frt f/0qpgPw/D1x5BGvM9cafL/Y1yrXUVIWJQAOZ3xMRLKnoPf8O9kK7VaCVkydKb4DJahOhHK+a NGOmu0vbCp/fHVk1j8csztyUpV0gBeAYLF4nbInP7vuvBVkMY4+2Jdcz0VdfWtDZhG0Z5q+rW 2c7yVcCfB70vwHyVmRQNginMaZv/fis9Ie4PpD6wapppC/tEJ89Kl2EEC3Ritq55Hk30= Received-SPF: none client-ip=212.227.126.131; 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_H3=0.001, RCVD_IN_MSPIKE_WL=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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Zhang Chen , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Zhang Chen This demo not correct, the original childs1 can't pass the the bdrv_is_root_node check in replcation_start(). Keep consistent with docs/COLO-FT.txt Signed-off-by: Zhang Chen Reviewed-by: Laurent Vivier Message-Id: <20211018085044.2788276-1-chen.zhang@intel.com> Signed-off-by: Laurent Vivier --- docs/block-replication.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/block-replication.txt b/docs/block-replication.txt index b0f23761c6e7..e1b28a6cc117 100644 --- a/docs/block-replication.txt +++ b/docs/block-replication.txt @@ -179,7 +179,7 @@ Primary: Secondary: -drive if=none,driver=raw,file.filename=1.raw,id=colo1 \ - -drive if=none,id=childs1,driver=replication,mode=secondary,top-id=childs1 + -drive if=none,id=childs1,driver=replication,mode=secondary,top-id=top-disk1 file.file.filename=active_disk.qcow2,\ file.driver=qcow2,\ file.backing.file.filename=hidden_disk.qcow2,\ From patchwork Fri Dec 17 20:10:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1570344 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4JG0ZK48xcz9sVq for ; Sat, 18 Dec 2021 07:14:33 +1100 (AEDT) Received: from localhost ([::1]:59142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myJcd-0004lG-DV for incoming@patchwork.ozlabs.org; Fri, 17 Dec 2021 15:14:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYl-0005wH-8J; Fri, 17 Dec 2021 15:10:31 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:55323) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYj-0001K7-C5; Fri, 17 Dec 2021 15:10:30 -0500 Received: from quad ([82.142.30.186]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M72Xn-1mrRXC1K3T-008XfC; Fri, 17 Dec 2021 21:10:25 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 7/9] glib-compat: Introduce g_memdup2() wrapper Date: Fri, 17 Dec 2021 21:10:17 +0100 Message-Id: <20211217201019.1652798-8-laurent@vivier.eu> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211217201019.1652798-1-laurent@vivier.eu> References: <20211217201019.1652798-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:UeMXTxEg4EZxikICzR28+jbzOvBt+qYBo66QQvSlzlZMPxYxKa6 8Zlt9gUR0RdLQMwks26xphRyjvlaUyzVLqNPRDwCLH7pAJxixV4O55pIHJ8U56BwlTvYS61 NhPs0MIJYnWB+y9AWCa1FBub2s97dViQduaDqdZ1GOVslhiFOHHMWOPgjW3fA19ugC8rkD6 uk2RwfHlUVLiu0dimD92g== X-UI-Out-Filterresults: notjunk:1;V03:K0:QJFJ1H0ftOo=:fML5X/pRHoasRnp12sVCgd cwiihyEKbXMSamd4gOKNEQ5VM9RJlwwAqa3aBeErm7CblgRc80Y00obtvJBgq8sfXJtTPpbCl PeqmzfKRONkmxrzp709EuAxpLcP8nv3uvoY2FUYQr00tDhL09VvAUUJg5x1HSP3Um73LS5gV3 J/7uBUWgMPFKvIhzfDMo+jpgpXM+yWMtvnQfpNRcrM08gR9d7Njq9uGL4YV+JUPnoOwcjlnIK 61o/sjN5Ah28pEoEOeMhYZK4e4o3nKi9I9b/bzGjxqRrS9O/3PchRIUhDFWX8agf6SXOGTdL/ 43+ZGKU1IZRnoYmICliNbSfp4ju01pYe8bOHlkUNIX9PRWy5idqqOOW5pP8ndIXFrZgYh3aXv 6L9hkuDJ8UC8TK5JzAQCn5arEbHTqA4gYyUQZZyeufiyosNcxQn7s1LRG+U8Hiu3HTOOVz0pc YBv83WT70KQgMkxF1dJS9nogHgm+4Xx1MJNy5L+/M450qGI/i5tDvtw/Q5/ZiDb1rKanRQ81J qovb1CwRd0KsJq6eZFE/9AdNVBZBYo8TGgscSu/Eh6t5z46G8NcJynl8IMgX+S587jEA0WHxA ZSg3BoNJNzvPiRm6XxoOrPEzax0sKnf6oKZMn6BckgNQuCv6y5hMCv+Q3Ro+7TKqzIwNwnsUQ 27QldzoOXxVHV/BMS83MlnnGlREKrwM0lErS1HM7EOW6Rj+f3wOCxRwR6CK765/0q9J8= Received-SPF: none client-ip=212.227.126.135; 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Eric Blake , =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé When experimenting raising GLIB_VERSION_MIN_REQUIRED to 2.68 (Fedora 34 provides GLib 2.68.1) we get: hw/virtio/virtio-crypto.c:245:24: error: 'g_memdup' is deprecated: Use 'g_memdup2' instead [-Werror,-Wdeprecated-declarations] ... g_memdup() has been updated by g_memdup2() to fix eventual security issues (size argument is 32-bit and could be truncated / wrapping). GLib recommends to copy their static inline version of g_memdup2(): https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538 Our glib-compat.h provides a comment explaining how to deal with these deprecated declarations (see commit e71e8cc0355 "glib: enforce the minimum required version and warn about old APIs"). Following this comment suggestion, implement the g_memdup2_qemu() wrapper to g_memdup2(), and use the safer equivalent inlined when we are using pre-2.68 GLib. Reported-by: Eric Blake Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Blake Message-Id: <20210903174510.751630-3-philmd@redhat.com> Signed-off-by: Laurent Vivier --- include/glib-compat.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/include/glib-compat.h b/include/glib-compat.h index 9e95c888f54f..8d01a8c01fb8 100644 --- a/include/glib-compat.h +++ b/include/glib-compat.h @@ -68,6 +68,43 @@ * without generating warnings. */ +/* + * g_memdup2_qemu: + * @mem: (nullable): the memory to copy. + * @byte_size: the number of bytes to copy. + * + * Allocates @byte_size bytes of memory, and copies @byte_size bytes into it + * from @mem. If @mem is %NULL it returns %NULL. + * + * This replaces g_memdup(), which was prone to integer overflows when + * converting the argument from a #gsize to a #guint. + * + * This static inline version is a backport of the new public API from + * GLib 2.68, kept internal to GLib for backport to older stable releases. + * See https://gitlab.gnome.org/GNOME/glib/-/issues/2319. + * + * Returns: (nullable): a pointer to the newly-allocated copy of the memory, + * or %NULL if @mem is %NULL. + */ +static inline gpointer g_memdup2_qemu(gconstpointer mem, gsize byte_size) +{ +#if GLIB_CHECK_VERSION(2, 68, 0) + return g_memdup2(mem, byte_size); +#else + gpointer new_mem; + + if (mem && byte_size != 0) { + new_mem = g_malloc(byte_size); + memcpy(new_mem, mem, byte_size); + } else { + new_mem = NULL; + } + + return new_mem; +#endif +} +#define g_memdup2(m, s) g_memdup2_qemu(m, s) + #if defined(G_OS_UNIX) /* * Note: The fallback implementation is not MT-safe, and it returns a copy of From patchwork Fri Dec 17 20:10:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1570348 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4JG0d52ZxLz9sVq for ; Sat, 18 Dec 2021 07:16:57 +1100 (AEDT) Received: from localhost ([::1]:38164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myJex-0001Ss-7N for incoming@patchwork.ozlabs.org; Fri, 17 Dec 2021 15:16:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40082) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYm-0005zw-C3; Fri, 17 Dec 2021 15:10:32 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:60303) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYk-0001KQ-AF; Fri, 17 Dec 2021 15:10:31 -0500 Received: from quad ([82.142.30.186]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MofLl-1m9pVY3vKL-00p4H2; Fri, 17 Dec 2021 21:10:26 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 8/9] tests/qtest: Replace g_memdup() by g_memdup2() Date: Fri, 17 Dec 2021 21:10:18 +0100 Message-Id: <20211217201019.1652798-9-laurent@vivier.eu> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211217201019.1652798-1-laurent@vivier.eu> References: <20211217201019.1652798-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:IRl181831kfe7Kst9/qSnJ/Ub6AHW1ciwDNOZLIa4NxnFzqvaMy Cq54sPP5afFS1QtMXhfEYkCQQfia/q8NJaJ6ctFMrp/Ew2REO4AxSmoXuTibQcgLKtSvISd EY3UEbyIiKbU8NLbuTS6kGYzEe3fiTwLnjUHfYly3rjnsQ3agS3Kh8Z/uNrqSWzx6MMtv2m h8E+4HAMXwl8x7BjCIOHw== X-UI-Out-Filterresults: notjunk:1;V03:K0:QkQYXng95t8=:fP3L+dRY7rM693uG46DOXe uxZLlBY9X7760qkYrZaRwIBlUO/Gsvb6hLIZDZGyhIu5a7H5YMqdgJRhaPArfjXyfRHm4VS+u cDLg5PQ/0ISElcNMA2XyHRE2NecUxtlx0NAStj9nJwEs6uJGCWNENU/hmc/v023/JfpTFEFxn WkWyf2uoT1cnAZfwRbroI2Ljg2qyD7MUzJYpZqyGmF4fmyMmjX8npvuKT9D7Kam6PJiFnWxTb Bb6wOwl8GupCA0QC84AvZ8Xl1Fvfx6DB5Xm6/s0AqgbPpLWg3WJ1Ef7OAyxlnYTdzuZPgzKR5 TZNkjDuZWtKXtxnqoXTmJYGIJatQhTpbn3nP3I84F/ibXbU2KKmS+/sgewbyoMwRbY3ODZg2h i6gt/gHD0wfUcUpb46++gf4Ns3yB41/YzZBg9UIOixV74wLcPloU0fBiBLYW09YPZgvCUHAC+ uAgJ9gXMwUe3qOHEGX+Ro+q64l13JtYbKpF6VGCAGWMawh1g2K9opkdObdY32aeCFLj1KGVoK 89F6XGvtVXQNAcUS9IGDi0mL0kkujrCmp6DkcMV+RireKBW03FI77axkYCIPoxkDSs7Itzft1 DsAAhwn5aIhOk8UVf7T3Qs+jz8EvfC3GoOXxpdVROnEsC2mvmhXpav2YZaKagZB+10sr3R54o i1Ox+IWlbhaOk4+WGT2yu5xQ3jsj9KL69j0SCMFaz48VneY/DHZ2QAEkf2mx/d6YfNLE= Received-SPF: none client-ip=212.227.126.135; 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Thomas Huth , =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Per https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538 The old API took the size of the memory to duplicate as a guint, whereas most memory functions take memory sizes as a gsize. This made it easy to accidentally pass a gsize to g_memdup(). For large values, that would lead to a silent truncation of the size from 64 to 32 bits, and result in a heap area being returned which is significantly smaller than what the caller expects. This can likely be exploited in various modules to cause a heap buffer overflow. Replace g_memdup() by the safer g_memdup2() wrapper. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20210903174510.751630-25-philmd@redhat.com> Signed-off-by: Laurent Vivier --- tests/qtest/libqos/ahci.c | 6 +++--- tests/qtest/libqos/qgraph.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qtest/libqos/ahci.c b/tests/qtest/libqos/ahci.c index fba3e7a954ed..eaa2096512e5 100644 --- a/tests/qtest/libqos/ahci.c +++ b/tests/qtest/libqos/ahci.c @@ -639,8 +639,8 @@ void ahci_exec(AHCIQState *ahci, uint8_t port, AHCIOpts *opts; uint64_t buffer_in; - opts = g_memdup((opts_in == NULL ? &default_opts : opts_in), - sizeof(AHCIOpts)); + opts = g_memdup2((opts_in == NULL ? &default_opts : opts_in), + sizeof(AHCIOpts)); buffer_in = opts->buffer; @@ -860,7 +860,7 @@ AHCICommand *ahci_command_create(uint8_t command_name) g_assert(!props->ncq || props->lba48); /* Defaults and book-keeping */ - cmd->props = g_memdup(props, sizeof(AHCICommandProp)); + cmd->props = g_memdup2(props, sizeof(AHCICommandProp)); cmd->name = command_name; cmd->xbytes = props->size; cmd->prd_size = 4096; diff --git a/tests/qtest/libqos/qgraph.c b/tests/qtest/libqos/qgraph.c index d1dc49193055..109ff04e1e8f 100644 --- a/tests/qtest/libqos/qgraph.c +++ b/tests/qtest/libqos/qgraph.c @@ -93,7 +93,7 @@ static void add_edge(const char *source, const char *dest, edge->type = type; edge->dest = g_strdup(dest); edge->edge_name = g_strdup(opts->edge_name ?: dest); - edge->arg = g_memdup(opts->arg, opts->size_arg); + edge->arg = g_memdup2(opts->arg, opts->size_arg); edge->before_cmd_line = opts->before_cmd_line ? g_strconcat(" ", opts->before_cmd_line, NULL) : NULL; From patchwork Fri Dec 17 20:10:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1570345 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4JG0ZN6jp2z9sVq for ; Sat, 18 Dec 2021 07:14:36 +1100 (AEDT) Received: from localhost ([::1]:59446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myJcg-0004yp-On for incoming@patchwork.ozlabs.org; Fri, 17 Dec 2021 15:14:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40084) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYm-0005zx-CV; Fri, 17 Dec 2021 15:10:32 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:33149) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myJYk-0001Ke-PB; Fri, 17 Dec 2021 15:10:32 -0500 Received: from quad ([82.142.30.186]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N2lzA-1mUMXO1t4W-0138e5; Fri, 17 Dec 2021 21:10:26 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 9/9] checkpatch: Do not allow deprecated g_memdup() Date: Fri, 17 Dec 2021 21:10:19 +0100 Message-Id: <20211217201019.1652798-10-laurent@vivier.eu> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211217201019.1652798-1-laurent@vivier.eu> References: <20211217201019.1652798-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:n/0qUk+ExpCi1UzF9vwS45WsPPf2mwPWWO2GJ9rfDGfVjQqWMPv t6QsnZSNduTTgQzTm0Kxe6rOkaGJbxgjZwmu3D/+7jlTUmUNuf16DNr33VSY81/ldFEO0Hh HnGdOcK4YqQsE+lIEScWenWNdi1uIPuXGsle4NWxAaurJz490B1Ys32sbA3AL1sMLBVPDpN 7lT1tKlVLPF8n0mlEgUOg== X-UI-Out-Filterresults: notjunk:1;V03:K0:swnoLcIIHrc=:B+upXRvFACYoJr0Z3Ffkxc be4ez8vZNZ09q9IaDUZsx1UQRVw48yBYIm2ip4FCBnDHtNwfYMSkalMuMZyFsR0jTGZhrPt9n x4F8VYWrKSK0g8aXtGvxKsLSFBT1To7fHbMLtFLWfaBd8Ugzj49jhx84+3GCtNzeYWNeVKQss xNThTOOJxQK++I+sBE388/ptpbW2v6x8k6porhjlA3HhxcHtLTuo3CBLA+m8mxpipbkhY+Iqf NPf/pGK6KWZGkfvFQNumI2Yly4+3Uh95XrVexFyJneH1G1I5hgLLcgrpZis2sJM1XfFLIdT08 GUv4yf4NUUoRA0oC2B1AVCMAvTfMEm1bvL01futC7ETLkeY9TxLxpBvTKdEms3AFFMNedXVxh X6wh5Z1pVhCDfSNlie03SUIDV6kb+GL7BStvx7g27TDWufNZ6K/rn0zJnjmssU5rH2ghrOQ/K kBLykbR/u4kBwkN45XawjTdWFOkXOKGBKQ0FdAZw7/NJbP/C2xJb6IpX2FRNGEpuavPw1kn1h vTuZycn9+knKjGRP7l6RmnMBQxMH/984zQKn97/XEJZJyGK0fw46Cb7idESXX0//jLcvNODlX D7zlKcMdXxttejfLJYufvS/CroNm+4ciaoAx9LWaAVQBwiDGBDJvpE5usJJCWysKHHsiZGz1d u3PwzsGrkC5D2rEUSOdO8+XbG+qE33MT5wOlSVivjSRGaRLac8qM20hxoPUr5LcZ6rbw= Received-SPF: none client-ip=212.227.126.135; 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Eric Blake , =?utf-8?q?Phili?= =?utf-8?q?ppe_Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé g_memdup() is insecure and as been deprecated in GLib 2.68. QEMU provides the safely equivalent g_memdup2() wrapper. Do not allow more g_memdup() calls in the repository, provide a hint to use g_memdup2(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Blake Message-Id: <20210903174510.751630-29-philmd@redhat.com> Signed-off-by: Laurent Vivier --- scripts/checkpatch.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index cb8eff233e06..5caa739db486 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2850,6 +2850,11 @@ sub process { WARN("consider using g_path_get_$1() in preference to g_strdup($1())\n" . $herecurr); } +# enforce g_memdup2() over g_memdup() + if ($line =~ /\bg_memdup\s*\(/) { + ERROR("use g_memdup2() instead of unsafe g_memdup()\n" . $herecurr); + } + # recommend qemu_strto* over strto* for numeric conversions if ($line =~ /\b(strto[^kd].*?)\s*\(/) { ERROR("consider using qemu_$1 in preference to $1\n" . $herecurr);