From patchwork Tue Apr 14 16:26:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 185425 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1615185ilf; Tue, 14 Apr 2020 09:27:43 -0700 (PDT) X-Google-Smtp-Source: APiQypJKPpwrsb9ApAnNJCna1nBamejNbaCF1VWC0dd+i+TcB78YUk+h7BMxi5dJtHfo7kSBcc8B X-Received: by 2002:ac8:60a:: with SMTP id d10mr17579224qth.140.1586881663098; Tue, 14 Apr 2020 09:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586881663; cv=none; d=google.com; s=arc-20160816; b=rtvcYkM4G5gD98L4UOTYJniyo29IFVDRUtGYaOWTZQs9BUzr+2ULXHF5rYYza45jKn JOKy0rIeTVX9vcympf9q0Nivg+m9bcR6MymDw1p5S5soP80ZSfyIfQVEQvGPRzdhhitd fJdljAGK9Ru4UDovQ8syzrF1331yE0RZ4RzD/bL/CysYzRR4Q5tqakLJA3Fn0aeJqnLm FoBojFLZy+/OuF58mrxTiHrHXrY729Atk2CMiVRm4zjl3FLr//G+5WzKbEgz7bk1lhjm bV+5YNc8J46d8yA3HVgOJlRCEHDPsKZwvDj1V9DdhPv7/OTLZEWyOfbmTxGzyrQU9VIg m6yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=OKC9Pxddfkn7fXnu8/AzAFxKBTosF8UUw8eP0Jg/zfU=; b=x0paDgRIoQ6hmijKVd2dzdNqA3kBzZCA8VHCzRmeq+RBJzNZ1cg8qwO/10mPVOYrp4 ysRtiyRJBHwgS2Rs2BRa6XM+QcczolliyKaGF8vr/6yVDTn7kOq6wj5nokv1pWYBqrVs Bs6lKBtXiKm4RROhP4vekob0Oq8UMlpO0OhwxM+tCFGz7S6NWY0DUhSNHW4Kgsfm3/Jp yq2RjNHre0OoESvH5G1eLniKTqb5jlTFgbw8ZnhKHT9He54iAgDVNDIDZxi5sdD/YdSq Nyq9jFWxr9h/ZW/5KcwgcB53ibdHWHD0nxSSijl3hj+tE9fGWDbPl0B5oA49KiTtGCR+ vQTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=StXec8e7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c23si8042358qkb.380.2020.04.14.09.27.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Apr 2020 09:27:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=StXec8e7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOPW-0006BM-Kp for patch@linaro.org; Tue, 14 Apr 2020 12:27:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51630) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOOF-000559-Tb for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOOA-00079A-CM for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:23 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:38964) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOOOA-00078h-6X for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:18 -0400 Received: by mail-wm1-x344.google.com with SMTP id y24so14710326wma.4 for ; Tue, 14 Apr 2020 09:26:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=OKC9Pxddfkn7fXnu8/AzAFxKBTosF8UUw8eP0Jg/zfU=; b=StXec8e7eWk3jn6nerfcl8zvAfN5inSEjyMBFxd9eK1lH9JiMepbUIIs/vRnbnhGTN lFxVrAnpmCwWZTQme5A4n7wLLA6yWt/f6OAdOCeKVczg4dGBmonlvIbGOup3DVqDv15V bUmWRdhjspeV/NGz5V68A25JvnHWIpRzKxKYQXT9/Kwn1yHFgttV47BE6giysXNqyfzJ YjcI1plO4ERLAoSkSfmvmyks3bmkDOSYrmQLXPw+vPau1EXRZibDy0MT14BK4VvxZvk/ SYVtAnc+khAMPdD6wlPW5QKScl65vWGdU6V5DQqHArs1Y/yD6YGD86esw2cN7X86hpqR gXVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OKC9Pxddfkn7fXnu8/AzAFxKBTosF8UUw8eP0Jg/zfU=; b=epRj/ZJCzuin5gMYJNSF4p4qtCpqielAdDel6gQiyeiozZO7146wugzsDAYX0JBlse z1qHV6liQOWNhiOU/bffVjBTkww3rIQsbrOhCOYVWh0tM39enLo7kHiP2y2jdxGm3bDn 5ldlStFGLp2U0+RcFxdBqFwTZ+HgqH13G9YWhLde2rwF6uvspdkYDQ/ZuQGXcz0fZ1PA zpCC9qdGa023RCL1pb63enxUgn35/HsPIZ0vX/fME2VJtzxSrGOYrGbNTEjMcyEKZnt4 HMwwFiuXyJvQXEY3i1ogat/BSm2es8VfjG4lazGm5bHOAeJXVgorTmnNz9ecezVDo5MM FeWQ== X-Gm-Message-State: AGi0PuaKXgQ4FgiOZK5FGPpC+PfDSZV2kCVm6/oh9ULlW/H/IwUIM1Ei G0tNS4DBsfusCVP8HrvDpJR5GXeT/LYMUg== X-Received: by 2002:a05:600c:2046:: with SMTP id p6mr615121wmg.177.1586881576889; Tue, 14 Apr 2020 09:26:16 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id i129sm20003802wmi.20.2020.04.14.09.26.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:26:16 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/12] osdep.h: Drop no-longer-needed Coverity workarounds Date: Tue, 14 Apr 2020 17:26:02 +0100 Message-Id: <20200414162613.4479-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414162613.4479-1-peter.maydell@linaro.org> References: <20200414162613.4479-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" In commit a1a98357e3fd in 2018 we added some workarounds for Coverity not being able to handle the _Float* types introduced by recent glibc. Newer versions of the Coverity scan tools have support for these types, and will fail with errors about duplicate typedefs if we have our workaround. Remove our copy of the typedefs. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20200319193323.2038-2-peter.maydell@linaro.org --- include/qemu/osdep.h | 14 -------------- 1 file changed, 14 deletions(-) -- 2.20.1 diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 9bd3dcfd136..20f5c5f197d 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -33,20 +33,6 @@ #else #include "exec/poison.h" #endif -#ifdef __COVERITY__ -/* Coverity does not like the new _Float* types that are used by - * recent glibc, and croaks on every single file that includes - * stdlib.h. These typedefs are enough to please it. - * - * Note that these fix parse errors so they cannot be placed in - * scripts/coverity-model.c. - */ -typedef float _Float32; -typedef double _Float32x; -typedef double _Float64; -typedef __float80 _Float64x; -typedef __float128 _Float128; -#endif #include "qemu/compiler.h" From patchwork Tue Apr 14 16:26:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 185423 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1614292ilf; Tue, 14 Apr 2020 09:26:44 -0700 (PDT) X-Google-Smtp-Source: APiQypLvrpwKWm9NQB94wLcto7Mm8qkjfl+pixSLGVf+XcbXJJSrkBjuOsbWsV45OLfmnSUY5SXz X-Received: by 2002:ae9:dd85:: with SMTP id r127mr20901057qkf.58.1586881604011; Tue, 14 Apr 2020 09:26:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586881604; cv=none; d=google.com; s=arc-20160816; b=P+WZMXkT8CEWeyLpIirEMrcciF9G3FhPum+G9d8HS13ejtKFjiDXqeXRd7Xh7QNXfL kzUpa8t5XBy1sbmkqXv4LI+uEhvfPEqh1ko4xxrcj0JasZRrpPWU4k0Erkf1ZqaMUTlU p0/y1IE47RFVr+36/xsBPLg/tRe+2kyDdwVBuLdW0mcnpPEGPQLvWz04IR9twKyLIItS iG4y+jc695SFuPbQP4NZGZKiS1p6V+7hmG686+OdSILjaKs/yBuAdbygiDzfHNk0psPf E4mvnwFaCX1HtSa75Bx931pE2M16D5btdT3GRlPsbI0WWgJnyf5CvhsUi2xxDz4qKw7T NuMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=6N7F/VqKmbYnLDIg9jtfPkCRYuB7XZyhZjr0Akis3f0=; b=NQhdgZPeTqRvdZi8twRAaFPCgiCVq8vV8hdg8pxxLA6Eqq2scmca0xkziyFcpDKt1Y TJPKXqPwAGKCubExh+/g9jq530XLskox/3hvT+Mlf0LpoGowQmoTptV0nvoIiQkDzSDJ YQojWi/VCcDX8vCgbEkmJzPzph3KCy23gkwg47xKjPu762NW4LyKlobW43vc65HWZuct FzkNT7psxvlExLCP/ZF1Pu2XgQUE3ysMhEgVT7R/jyBlSMcAhD+5nA3NN6yxRRvTRNEC 8tmAiJFuxMWpvT0Tz1BIglbBeRZ5HZ7V7dQ4qf0wfXXA3PWlVXVqVgrTu2rmvhmknCIe Sabg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h9qKX8lZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r22si7725763qtn.222.2020.04.14.09.26.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Apr 2020 09:26:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h9qKX8lZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOOZ-0005D0-Fo for patch@linaro.org; Tue, 14 Apr 2020 12:26:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51642) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOOH-00056X-7x for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOOB-00079j-Kn for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:25 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:39642) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOOOB-00079J-EN for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:19 -0400 Received: by mail-wr1-x442.google.com with SMTP id b11so3681776wrs.6 for ; Tue, 14 Apr 2020 09:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=6N7F/VqKmbYnLDIg9jtfPkCRYuB7XZyhZjr0Akis3f0=; b=h9qKX8lZo0wdP1+4dNosaxnySI5/WifsBOPoiUsv27MzgZQ7CWmm+GkaIn6IpepZ3a wba7SFeCMtWcFkBFaGLpBInFTTCp5FE0KlkcK2PCiTK4qR27+1hV40wU3LDxiovrSJYy aqkpI57yKpCPWOX+sfAiCkX0sa548gj23+duxEYggaZltcnZkITnmW0Wmm7IEA13Fari OcxbY7vj8+d5ohkXPU1F4wars6YfY7PT/jxAkl6BNQd4fRDfr1BuFGMIC7wMVGeEjLUC GU1q2FmJqzWwwzDfnFIXOrctoqGTbaMK1VSjLGImH597YulVd2A5fBRDDBHBya+HxvM+ OlhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6N7F/VqKmbYnLDIg9jtfPkCRYuB7XZyhZjr0Akis3f0=; b=bQWwEZzBy0W95FJGFYJyj6XDuKfIG/qPCiwu1L/B5d+mtmS8r9M8ESWwE5w+zx8shp rIB+DORoC2l/2v5d2lG1/udnvvpeyoJ+6DVMoUOVUlbLPTqXK2dVo1gBr0p5jfpR8MUN 9OykAoJG54aZhlRHG8QRmVqrhsI3bKa579qSOeLJjLpkkE042gUg8Es/myrdnLrtYQad Q7jPKlW2I0LyTUToisJz1412+4+5hbmeaH4XGTw81dcg/gRYJhRcmGkpMt4J/s2srIOB 5Vmhb4aqk1gYnYJWwDJUv0TeQQlZScmbABDqtrAF4nq+tIsz24Zl+qc7HwHrlDIXTeaF 2XLg== X-Gm-Message-State: AGi0PuargmSGuAwb+r/r72l7nJ+bW/H5pL3ki4Ec/Ur2GKJ2vlsPLHGd y0mdZJXTyvjEhCjKCwZciieZ50Pvrdg+YQ== X-Received: by 2002:a5d:48cc:: with SMTP id p12mr26037990wrs.170.1586881578020; Tue, 14 Apr 2020 09:26:18 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id i129sm20003802wmi.20.2020.04.14.09.26.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:26:17 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 02/12] thread.h: Fix Coverity version of qemu_cond_timedwait() Date: Tue, 14 Apr 2020 17:26:03 +0100 Message-Id: <20200414162613.4479-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414162613.4479-1-peter.maydell@linaro.org> References: <20200414162613.4479-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" For Coverity's benefit, we provide simpler versions of functions like qemu_mutex_lock(), qemu_cond_wait() and qemu_cond_timedwait(). When we added qemu_cond_timedwait() in commit 3dcc9c6ec4ea, a cut and paste error meant that the Coverity version of qemu_cond_timedwait() was using the wrong _impl function, which makes the Coverity parser complain: "/qemu/include/qemu/thread.h", line 159: warning #140: too many arguments in function call return qemu_cond_timedwait(cond, mutex, ms); ^ "/qemu/include/qemu/thread.h", line 159: warning #120: return value type does not match the function type return qemu_cond_timedwait(cond, mutex, ms); ^ "/qemu/include/qemu/thread.h", line 156: warning #1563: function "qemu_cond_timedwait" not emitted, consider modeling it or review parse diagnostics to improve fidelity static inline bool (qemu_cond_timedwait)(QemuCond *cond, QemuMutex *mutex, ^ These aren't fatal, but reduce the scope of the analysis. Fix the error. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20200319193323.2038-3-peter.maydell@linaro.org --- include/qemu/thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/include/qemu/thread.h b/include/qemu/thread.h index 047db0307e7..10262c63f58 100644 --- a/include/qemu/thread.h +++ b/include/qemu/thread.h @@ -67,7 +67,7 @@ extern QemuCondTimedWaitFunc qemu_cond_timedwait_func; #define qemu_cond_wait(c, m) \ qemu_cond_wait_impl(c, m, __FILE__, __LINE__); #define qemu_cond_timedwait(c, m, ms) \ - qemu_cond_wait_impl(c, m, ms, __FILE__, __LINE__); + qemu_cond_timedwait_impl(c, m, ms, __FILE__, __LINE__); #else #define qemu_mutex_lock(m) ({ \ QemuMutexLockFunc _f = atomic_read(&qemu_mutex_lock_func); \ From patchwork Tue Apr 14 16:26:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 185426 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1615845ilf; Tue, 14 Apr 2020 09:28:25 -0700 (PDT) X-Google-Smtp-Source: APiQypI2stYZHa9wb609zakpn9P2GpuyNiKknrTx4+SE4qPUX/zNC7Y/A388Nb6R5RylDleArvAS X-Received: by 2002:ac8:698d:: with SMTP id o13mr17235554qtq.2.1586881705032; Tue, 14 Apr 2020 09:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586881705; cv=none; d=google.com; s=arc-20160816; b=yQvni9Q0KaI1LtSjIfu1Ra2Sa9fLJy2MG4o37n7ElRCslTc0TvRUhZdKArHgpoVimf aPth4lLRlP5+kQYGDE2qceuqOiNCzHN24QqFIgYxNzMqbuIzb0VxOc064xOWADC2Macc dLj/WqYe6AEb2qhx+6aErBGj6SLyW1pKv3kAoja8SimWjaL0sP+8KqMEDUZEZpdComfM i48ejiF81Z4CbXeN8yWhX4CChchUfRyxNg2edDtJfmYqvKqWOUWPEyLdvfnlClKPrMk1 bOU3oJYFlv/UP86VxiePQUWjEj+3FFQeQS7MWGONkeb9HmpWYj9XCT5IRT2dDzZGh20y EUcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=yvyxieRgXTgnaYpRAHFSnkQCJYL7gwucJ9BQHEnE72U=; b=CeJN5f8jhXPP5UTGPnMD7FgHuFJGJ0ewjdmAEUJgKAuI4gZQw4bkXK0uFZXH5re3ti 9knZqidofPQPXUMZ7PuUjnhZlq2VY8D/L9rM66jTBvDcHZVAAyRjGVjeGgI/ICd0OxMA tFnGJtnRkp7rve2t5Yq2WDte7xyp/vnjnfa6g19DAcXBn4l/XuzDVLfsYATdEGpN+SSG pqYhayv5zlE/LiHNSptwdvP63y6oxkdezHKFphmcTS9zYFnlChg+Ga2wO5Ma3mTK+cD2 k6I3XDJtf+xCHQtm7FSTOQA8gM51L3laGbf/bU2hdC57/hrMIzIaC6247NCLBjpq4YY+ tkDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dsCYQ8Fp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h18si7551585qvr.54.2020.04.14.09.28.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Apr 2020 09:28:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dsCYQ8Fp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOQC-0000I0-Ff for patch@linaro.org; Tue, 14 Apr 2020 12:28:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51652) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOOI-00057I-0W for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOOC-00079x-Cd for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:25 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:38629) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOOOC-00079Y-6e for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:20 -0400 Received: by mail-wm1-x341.google.com with SMTP id g12so6879148wmh.3 for ; Tue, 14 Apr 2020 09:26:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=yvyxieRgXTgnaYpRAHFSnkQCJYL7gwucJ9BQHEnE72U=; b=dsCYQ8FpR5f1yzZHJovafOOVrGN+hbeQLjaxs5CckGpDvnvr5tvobIlieI1LGou891 3lWmb1/4L+0TtDr/zrt1ZIX1nhfegha2HgujbwnS+GXCIShHtkH0ioThszOtAiDZzC6O hv5Esu+UaX2INjPxGvvs9vbJMgt0AafIpzhQGGx004KUv6eDQ/gPVpa0zdxtPYYPKT1p k2fKI+UQLj5VShL7IZZx7rxT8HGgQ+g48Uq5OXYKQpEglxM3LvJ+aIu68MYElAhUF6Vy n/PeMXXKosGCsGULv8qVGmrThjpAbwSg/3Z29TzNsyNnnKgVBeBdW3knvW7lsJ+NlyIl D6Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yvyxieRgXTgnaYpRAHFSnkQCJYL7gwucJ9BQHEnE72U=; b=m254sfJSsdtmhe6eg7CTZlU+cNgeWvv70ehH0+5QjrSOceVM3M7hCRATl9ftagxeVH JlCLvY0q7DLJlO9gEAo2/zAQu8IOe0SEYnTNEJsM3OClw4TYA4PVCrZmLxWb5Is0oF4K aCs0HKtXXbTJAgR5oGatR3EJ8N9osOYbS7IrfzSOUQ0co9Eo/5tQpVnDcMy4bTJaN0v3 S9qw1PAf0BE0XkVtaEK2F1ezVg9zdZ9NtPzotT1zeK5lkM8xj+V8+RYdK4Bjg3rAab6i bUC5m9+CdFeL4TMI84Dl1FB03zbhM8uJEqIo+Nz7t3HMBccHt+vtnXyGHxB2749GpZ+s qoUA== X-Gm-Message-State: AGi0PubzLqWIlinFPJrwTkq2F41bDGE1fQ32GM7an5kKHaigep7ENf0x A4fcOdRVSXv+LnMd7ElcIeTZaKCrbhpsXQ== X-Received: by 2002:a1c:e302:: with SMTP id a2mr633636wmh.96.1586881578930; Tue, 14 Apr 2020 09:26:18 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id i129sm20003802wmi.20.2020.04.14.09.26.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:26:18 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 03/12] thread.h: Remove trailing semicolons from Coverity qemu_mutex_lock() etc Date: Tue, 14 Apr 2020 17:26:04 +0100 Message-Id: <20200414162613.4479-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414162613.4479-1-peter.maydell@linaro.org> References: <20200414162613.4479-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" All the Coverity-specific definitions of qemu_mutex_lock() and friends have a trailing semicolon. This works fine almost everywhere because of QEMU's mandatory-braces coding style and because most callsites are simple, but target/s390x/sigp.c has a use of qemu_mutex_trylock() as an if() statement, which makes the ';' a syntax error: "../target/s390x/sigp.c", line 461: warning #18: expected a ")" if (qemu_mutex_trylock(&qemu_sigp_mutex)) { ^ Remove the bogus semicolons from the macro definitions. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20200319193323.2038-4-peter.maydell@linaro.org --- include/qemu/thread.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.20.1 diff --git a/include/qemu/thread.h b/include/qemu/thread.h index 10262c63f58..d22848138ea 100644 --- a/include/qemu/thread.h +++ b/include/qemu/thread.h @@ -57,17 +57,17 @@ extern QemuCondTimedWaitFunc qemu_cond_timedwait_func; * hide them. */ #define qemu_mutex_lock(m) \ - qemu_mutex_lock_impl(m, __FILE__, __LINE__); + qemu_mutex_lock_impl(m, __FILE__, __LINE__) #define qemu_mutex_trylock(m) \ - qemu_mutex_trylock_impl(m, __FILE__, __LINE__); + qemu_mutex_trylock_impl(m, __FILE__, __LINE__) #define qemu_rec_mutex_lock(m) \ - qemu_rec_mutex_lock_impl(m, __FILE__, __LINE__); + qemu_rec_mutex_lock_impl(m, __FILE__, __LINE__) #define qemu_rec_mutex_trylock(m) \ - qemu_rec_mutex_trylock_impl(m, __FILE__, __LINE__); + qemu_rec_mutex_trylock_impl(m, __FILE__, __LINE__) #define qemu_cond_wait(c, m) \ - qemu_cond_wait_impl(c, m, __FILE__, __LINE__); + qemu_cond_wait_impl(c, m, __FILE__, __LINE__) #define qemu_cond_timedwait(c, m, ms) \ - qemu_cond_timedwait_impl(c, m, ms, __FILE__, __LINE__); + qemu_cond_timedwait_impl(c, m, ms, __FILE__, __LINE__) #else #define qemu_mutex_lock(m) ({ \ QemuMutexLockFunc _f = atomic_read(&qemu_mutex_lock_func); \ From patchwork Tue Apr 14 16:26:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 185427 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1615897ilf; Tue, 14 Apr 2020 09:28:27 -0700 (PDT) X-Google-Smtp-Source: APiQypJQaNYEX+h/tDkaTiVnblcRU3BJzwHrDAbMZsyxQOVJawPJBDP8TRF1+zuvmRE6fvXG2Gpj X-Received: by 2002:a37:6393:: with SMTP id x141mr3868778qkb.179.1586881707634; Tue, 14 Apr 2020 09:28:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586881707; cv=none; d=google.com; s=arc-20160816; b=u7we2ltHFxM2t0NmYlVwayJtBwsLXku4Jq1Y6yBtCa6NlI7KCh68+clq72ix+3c/WV c4rDknaiKKh0NchQFSSuujDUUFcgim6bpk2x5q1mZtbVno3DkUcG1PcuOaHZ3/3l/uZT KojYHAJyTIgsICXSpAc+NywhIo+WIqMQXBz2pC1/uAtHNC5SAC7N1ZiYMSSdAQot5GNP Fe9HZWfuidvtpf6r4UlH2bYI/sMIK5jRZ4l1spA+GhwLcgp12WXXf+CRTyf8Id9RHRuy n2/7Ufh+VRC/ndO60V/3B3QEjOi+mXsaotpnv88OIxw264xsefHdIrciKSAkazKjobjy dBng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=xINSNigMYarXwX5/BhM4LUoIhEq1H+iUx4YSxS6L/Cc=; b=RmIb+l7WEB5B6Z/WSUljisN7YuEzQ9xUZyLGMi+6Dq1d7Ajwf+aXc5O3QGpJ8ZmVmb mrS7VqavhTgvO+b8gwaevLP1J7UHr9SKNk/5KdfpIHlkhheFLckD3hWATO4XijSk1Hgy P/1t0HONWq1GomlpO48FXp5OmvsCMRVzJFCDNvPorA/NxZrSqncU3ym5WTXJfecbhU4N 2uoyNnYPKRM0jWPUAWGG62l4mTCv18L6NX1tIjjYOEta+/MUajdrv4WdC40v/metEeWz UBpEjehC9s7jNuaOlbuqqj1J7+iJO4D/t1HILUqCYYekSuJiiL7CAK/WQtmy1Uwntnt2 YtZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="f/B4EbYe"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t128si8203572qke.368.2020.04.14.09.28.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Apr 2020 09:28:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="f/B4EbYe"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOQF-0000Qx-3s for patch@linaro.org; Tue, 14 Apr 2020 12:28:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51658) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOOI-00057g-RC for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOOD-0007Ah-Bl for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:26 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:39641) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOOOD-0007A4-5q for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:21 -0400 Received: by mail-wr1-x435.google.com with SMTP id b11so3681943wrs.6 for ; Tue, 14 Apr 2020 09:26:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=xINSNigMYarXwX5/BhM4LUoIhEq1H+iUx4YSxS6L/Cc=; b=f/B4EbYeNkIaChrTAPdThS3sNrFdhkrN38rPqJBbHatN1Wi6F8+vr6OSsYRmhTF/Ds 7rsVD4+UT9iw0un33x1k4r7H9EdniDZt6uj/+e6BFPBDtECjKSXmNym7Ibf5s6jshK+V Fwc3hcZ55CCY6n0a81C7rmuP4CogCw+CeQADabHiPHrgQR9J34xhjT4FjQGJI0fO3BC6 H75FBpwFferp7lEtxXhgbD9GtNy/icduqJPPwqEOy3pgXpoZhocWb3JJEEKYmiEkF9f7 1qfWkaNza53CCHrd/1iTz9Fq0o/Bh3M5RkE1+naQnW6Ung67ikyz8t6ahZdq1SEYmcs3 ZTGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xINSNigMYarXwX5/BhM4LUoIhEq1H+iUx4YSxS6L/Cc=; b=rTvK+vd2sFJkyS6hTK05PmaHGuruN3zEWeij76uBS0IEYY4SCv/vmBRs6q4xi0ln7U TVbohImOsHaYsHXupsay3sSwV2Q8KQBpUioIEumvgX8y9uUnxMZ2F3Lw9BRXqFFVCk8X jmojDm/S7vjThUvBWchJ2fchMY/yzU0jGSWd4vFgTnLNUwJpIfZapqOXUzpCyFfcKYHx gl+TAI9AujKyxA3zgH4hA7LGORxnws2Xrc5IsoprRV6pePXwfl3uroPrD8LPXMo0nSQe mN5LmNqZV36yNZNv/vh8eVv1X8isDlfXB784UPTLr6DqzqlDsxT5INu+/d+TCkokpCM8 vucQ== X-Gm-Message-State: AGi0Puaq1U5DLxXqkUOWfTP8JwSmxsxMdbBpbFr6Ud1l6K4c/kqqI4C/ Q4KnW5jkoLDTB3ZVjcyEHAC1RGf/vhdIrA== X-Received: by 2002:adf:e403:: with SMTP id g3mr23992501wrm.121.1586881579945; Tue, 14 Apr 2020 09:26:19 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id i129sm20003802wmi.20.2020.04.14.09.26.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:26:19 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/12] linux-user/flatload.c: Use "" for include of QEMU header target_flat.h Date: Tue, 14 Apr 2020 17:26:05 +0100 Message-Id: <20200414162613.4479-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414162613.4479-1-peter.maydell@linaro.org> References: <20200414162613.4479-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::435 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The target_flat.h file is a QEMU header, so we should include it using quotes, not angle brackets. Coverity otherwise is unable to find the header: "../linux-user/flatload.c", line 40: error #1712: cannot open source file "target_flat.h" #include ^ because the relevant directory is only on the -iquote path, not the -I path. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20200319193323.2038-5-peter.maydell@linaro.org --- linux-user/flatload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/linux-user/flatload.c b/linux-user/flatload.c index 0122ab3afe6..66901f39cc5 100644 --- a/linux-user/flatload.c +++ b/linux-user/flatload.c @@ -37,7 +37,7 @@ #include "qemu.h" #include "flat.h" -#include +#include "target_flat.h" //#define DEBUG From patchwork Tue Apr 14 16:26:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 185424 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1614380ilf; Tue, 14 Apr 2020 09:26:50 -0700 (PDT) X-Google-Smtp-Source: APiQypKPNqpRwuMndcV92Si9Dh1KykIl9Nxkr+27ekb96+P1WovF8UUCLikr5zELg//eU3a0O5vG X-Received: by 2002:a37:274a:: with SMTP id n71mr11177841qkn.212.1586881610065; Tue, 14 Apr 2020 09:26:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586881610; cv=none; d=google.com; s=arc-20160816; b=F/kAiCCfvBp8cU+nkK+j/uJ8CbxkdIVLZYx2TqZQSoXRGA/vyL13zSNfYmvqo7YeyM ZmBE+lKCSCNFj4LJ5d8upcQz9tC8TxIayGHGLoYBYfUhZGMu8KIAWj7kQg1e4/eJLhkv w0/mFMg5zBspOcEH5reLtkgK1vbqbzP7YCsqlaxpfmc5TA7XjFWPDhh9QJAlBV9fnWkU XFw8dkngEYUBJ3erFQGUnvplx5fkDWl5dNLa6cVZafErdhYTMyQ6TvrvmD3sGqKwHFk1 LU0VjiZE2XaxtvBGUzN+JxLeSC5AysEcFmvyDWr1G9AU2uGqo80oRbZW1H/oODoPT1GE 1oxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=7ac9z7NGgu/WIBfQCIpXpUHbyr0rqhQpZciZjY8CLv8=; b=vyOglLMWusLw+D+DmKfSb0W9hRQQRHzot9d/64pjq9SUDvFGysxpwUXniaDNBj1dQ4 VD6+amvjWiOUSbGqJqrx13KnSWNPArg60cEShJrIPq+jg6bWFHXZOWri75rfKFvu5K+r odsKbaa5WhsO5YYdt0VGSXJtsws3T23vHGCky3P2P06q1Pv4FsuDCgBJuh5aTqhmEOAX ArEXE7h3DnPY/8WvNUBmUBsTq81K8PqG/SMLO6suwKT7NQJbuoGHI2PTJ8gduJwE1rDz 5H0lV6btJd11RWsjTcZuYK7wBVz3Z0kp1w0G9grjgyx6V12WIcaGZyO/gKoTKK0wfTKI DwoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e4pSYJ9l; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m23si7684771qtn.35.2020.04.14.09.26.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Apr 2020 09:26:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e4pSYJ9l; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOOf-0005Ro-JG for patch@linaro.org; Tue, 14 Apr 2020 12:26:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51673) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOOL-0005A7-HO for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOOF-0007B0-1A for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:29 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:35016) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOOOE-0007Ar-Q4 for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:22 -0400 Received: by mail-wr1-x42f.google.com with SMTP id x18so10782645wrq.2 for ; Tue, 14 Apr 2020 09:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=7ac9z7NGgu/WIBfQCIpXpUHbyr0rqhQpZciZjY8CLv8=; b=e4pSYJ9lAPfZkg0TGQ7Z/V/GWfXlfrXgTmC4y2vwl/BXe6P69l8vdPM2aDldladjN8 B9Fsh2oz3+t/qEQW+6iJaNvoh8VuwDQP90yFDsulssVe/pmi5h6r1XDgFatz/5umOB0b T8RD1VAgCR7Qs9cdto0V7uwaUWpzYEq1mvlrPaoaBXIbJO2vIk+HOvDSBRSFap/By3it 6ejdNJMdY1iQkf2iCXVXrmJcxBxTp8HMeWz+LzWPsoH9m7AbwMZlpdzdPmTeXoOgcsSI Qd1MSuW/oSdGbvOfkjL30fAgsjcGXFKDNCMPflFamIbzCkb1kSmngAzu4x6eo7rp9sBw lYuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7ac9z7NGgu/WIBfQCIpXpUHbyr0rqhQpZciZjY8CLv8=; b=Dfarygfag/Kw0qB6sNqgjRDv7s57m4RUfzT1TQea/dmT3J9PivOixrctB4An5lYvkW 71q3rcM7wP3BZhBooZnn+J0PUQRWudDH7dYNSY2OK64k4KjiJIi0gd3igxfjMPBbFnq6 51QPTVPNbe4O4y6VKm3XCRI/5NBXXXu6bM79Xdb4+Pz42OCE/Y0xPC7VUUMt4aG9W6IM NSEJ0Co0h5f8EuN6XCTbfgjxz0BfaW4E5Dfzt3Gdtdmn6xOrEBdVEYjjRapE0Ha5UTW7 zkoi31b9+JELA+eTCB6/OIIfPQFHXVEgTjsW6/y8YxESWlq0I4ywm2Er2uwEFcjqTSp5 4RgA== X-Gm-Message-State: AGi0Pubh45tFpq4fCztjtY0ipkZftxEhdVilGPwtDpVXz9XH4k4FuIjg mK0LnuvdBSGA08VNETt8MPYlgA1LB//FiA== X-Received: by 2002:adf:bb94:: with SMTP id q20mr26634168wrg.105.1586881581021; Tue, 14 Apr 2020 09:26:21 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id i129sm20003802wmi.20.2020.04.14.09.26.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:26:20 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/12] scripts/run-coverity-scan: Script to run Coverity Scan build Date: Tue, 14 Apr 2020 17:26:06 +0100 Message-Id: <20200414162613.4479-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414162613.4479-1-peter.maydell@linaro.org> References: <20200414162613.4479-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42f 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Add a new script to automate the process of running the Coverity Scan build tools and uploading the resulting tarball to the website. This is intended eventually to be driven from Travis, but it can be run locally, if you are a maintainer of the QEMU project on the Coverity Scan website and have the secret upload token. The script must be run on a Fedora 30 system. Support for using a Docker container is added in a following commit. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell Message-id: 20200319193323.2038-6-peter.maydell@linaro.org --- MAINTAINERS | 5 + scripts/coverity-scan/run-coverity-scan | 311 ++++++++++++++++++++++++ 2 files changed, 316 insertions(+) create mode 100755 scripts/coverity-scan/run-coverity-scan -- 2.20.1 diff --git a/MAINTAINERS b/MAINTAINERS index 5f93e8c01d3..8cbc1fac2bf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2038,6 +2038,11 @@ M: Markus Armbruster S: Supported F: scripts/coverity-model.c +Coverity Scan integration +M: Peter Maydell +S: Maintained +F: scripts/coverity-scan/ + Device Tree M: Alistair Francis R: David Gibson diff --git a/scripts/coverity-scan/run-coverity-scan b/scripts/coverity-scan/run-coverity-scan new file mode 100755 index 00000000000..d40b51969fa --- /dev/null +++ b/scripts/coverity-scan/run-coverity-scan @@ -0,0 +1,311 @@ +#!/bin/sh -e + +# Upload a created tarball to Coverity Scan, as per +# https://scan.coverity.com/projects/qemu/builds/new + +# This work is licensed under the terms of the GNU GPL version 2, +# or (at your option) any later version. +# See the COPYING file in the top-level directory. +# +# Copyright (c) 2017-2020 Linaro Limited +# Written by Peter Maydell + +# Note that this script will automatically download and +# run the (closed-source) coverity build tools, so don't +# use it if you don't trust them! + +# This script assumes that you're running it from a QEMU source +# tree, and that tree is a fresh clean one, because we do an in-tree +# build. (This is necessary so that the filenames that the Coverity +# Scan server sees are relative paths that match up with the component +# regular expressions it uses; an out-of-tree build won't work for this.) +# The host machine should have as many of QEMU's dependencies +# installed as possible, for maximum coverity coverage. + +# To do an upload you need to be a maintainer in the Coverity online +# service, and you will need to know the "Coverity token", which is a +# secret 8 digit hex string. You can find that from the web UI in the +# project settings, if you have maintainer access there. + +# Command line options: +# --dry-run : run the tools, but don't actually do the upload +# --update-tools-only : update the cached copy of the tools, but don't run them +# --tokenfile : file to read Coverity token from +# --version ver : specify version being analyzed (default: ask git) +# --description desc : specify description of this version (default: ask git) +# --srcdir : QEMU source tree to analyze (default: current working dir) +# --results-tarball : path to copy the results tarball to (default: don't +# copy it anywhere, just upload it) +# +# User-specifiable environment variables: +# COVERITY_TOKEN -- Coverity token +# COVERITY_EMAIL -- the email address to use for uploads (default: +# looks at your git user.email config) +# COVERITY_BUILD_CMD -- make command (default: 'make -jN' where N is +# number of CPUs as determined by 'nproc') +# COVERITY_TOOL_BASE -- set to directory to put coverity tools +# (default: /tmp/coverity-tools) +# +# You must specify the token, either by environment variable or by +# putting it in a file and using --tokenfile. Everything else has +# a reasonable default if this is run from a git tree. + +check_upload_permissions() { + # Check whether we can do an upload to the server; will exit the script + # with status 1 if the check failed (usually a bad token); + # will exit the script with status 0 if the check indicated that we + # can't upload yet (ie we are at quota) + # Assumes that PROJTOKEN, PROJNAME and DRYRUN have been initialized. + + echo "Checking upload permissions..." + + if ! up_perm="$(wget https://scan.coverity.com/api/upload_permitted --post-data "token=$PROJTOKEN&project=$PROJNAME" -q -O -)"; then + echo "Coverity Scan API access denied: bad token?" + exit 1 + fi + + # Really up_perm is a JSON response with either + # {upload_permitted:true} or {next_upload_permitted_at:} + # We do some hacky string parsing instead of properly parsing it. + case "$up_perm" in + *upload_permitted*true*) + echo "Coverity Scan: upload permitted" + ;; + *next_upload_permitted_at*) + if [ "$DRYRUN" = yes ]; then + echo "Coverity Scan: upload quota reached, continuing dry run" + else + echo "Coverity Scan: upload quota reached; stopping here" + # Exit success as this isn't a build error. + exit 0 + fi + ;; + *) + echo "Coverity Scan upload check: unexpected result $up_perm" + exit 1 + ;; + esac +} + + +update_coverity_tools () { + # Check for whether we need to download the Coverity tools + # (either because we don't have a copy, or because it's out of date) + # Assumes that COVERITY_TOOL_BASE, PROJTOKEN and PROJNAME are set. + + mkdir -p "$COVERITY_TOOL_BASE" + cd "$COVERITY_TOOL_BASE" + + echo "Checking for new version of coverity build tools..." + wget https://scan.coverity.com/download/linux64 --post-data "token=$PROJTOKEN&project=$PROJNAME&md5=1" -O coverity_tool.md5.new + + if ! cmp -s coverity_tool.md5 coverity_tool.md5.new; then + # out of date md5 or no md5: download new build tool + # blow away the old build tool + echo "Downloading coverity build tools..." + rm -rf coverity_tool coverity_tool.tgz + wget https://scan.coverity.com/download/linux64 --post-data "token=$PROJTOKEN&project=$PROJNAME" -O coverity_tool.tgz + if ! (cat coverity_tool.md5.new; echo " coverity_tool.tgz") | md5sum -c --status; then + echo "Downloaded tarball didn't match md5sum!" + exit 1 + fi + # extract the new one, keeping it corralled in a 'coverity_tool' directory + echo "Unpacking coverity build tools..." + mkdir -p coverity_tool + cd coverity_tool + tar xf ../coverity_tool.tgz + cd .. + mv coverity_tool.md5.new coverity_tool.md5 + fi + + rm -f coverity_tool.md5.new +} + + +# Check user-provided environment variables and arguments +DRYRUN=no +UPDATE_ONLY=no + +while [ "$#" -ge 1 ]; do + case "$1" in + --dry-run) + shift + DRYRUN=yes + ;; + --update-tools-only) + shift + UPDATE_ONLY=yes + ;; + --version) + shift + if [ $# -eq 0 ]; then + echo "--version needs an argument" + exit 1 + fi + VERSION="$1" + shift + ;; + --description) + shift + if [ $# -eq 0 ]; then + echo "--description needs an argument" + exit 1 + fi + DESCRIPTION="$1" + shift + ;; + --tokenfile) + shift + if [ $# -eq 0 ]; then + echo "--tokenfile needs an argument" + exit 1 + fi + COVERITY_TOKEN="$(cat "$1")" + shift + ;; + --srcdir) + shift + if [ $# -eq 0 ]; then + echo "--srcdir needs an argument" + exit 1 + fi + SRCDIR="$1" + shift + ;; + --results-tarball) + shift + if [ $# -eq 0 ]; then + echo "--results-tarball needs an argument" + exit 1 + fi + RESULTSTARBALL="$1" + shift + ;; + *) + echo "Unexpected argument '$1'" + exit 1 + ;; + esac +done + +if [ -z "$COVERITY_TOKEN" ]; then + echo "COVERITY_TOKEN environment variable not set" + exit 1 +fi + +if [ -z "$COVERITY_BUILD_CMD" ]; then + NPROC=$(nproc) + COVERITY_BUILD_CMD="make -j$NPROC" + echo "COVERITY_BUILD_CMD: using default '$COVERITY_BUILD_CMD'" +fi + +if [ -z "$COVERITY_TOOL_BASE" ]; then + echo "COVERITY_TOOL_BASE: using default /tmp/coverity-tools" + COVERITY_TOOL_BASE=/tmp/coverity-tools +fi + +if [ -z "$SRCDIR" ]; then + SRCDIR="$PWD" +fi + +PROJTOKEN="$COVERITY_TOKEN" +PROJNAME=QEMU +TARBALL=cov-int.tar.xz + + +if [ "$UPDATE_ONLY" = yes ]; then + # Just do the tools update; we don't need to check whether + # we are in a source tree or have upload rights for this, + # so do it before some of the command line and source tree checks. + update_coverity_tools + exit 0 +fi + +cd "$SRCDIR" + +echo "Checking this is a QEMU source tree..." +if ! [ -e "$SRCDIR/VERSION" ]; then + echo "Not in a QEMU source tree?" + exit 1 +fi + +# Fill in defaults used by the non-update-only process +if [ -z "$VERSION" ]; then + VERSION="$(git describe --always HEAD)" +fi + +if [ -z "$DESCRIPTION" ]; then + DESCRIPTION="$(git rev-parse HEAD)" +fi + +if [ -z "$COVERITY_EMAIL" ]; then + COVERITY_EMAIL="$(git config user.email)" +fi + +check_upload_permissions + +update_coverity_tools + +TOOLBIN="$(cd "$COVERITY_TOOL_BASE" && echo $PWD/coverity_tool/cov-analysis-*/bin)" + +if ! test -x "$TOOLBIN/cov-build"; then + echo "Couldn't find cov-build in the coverity build-tool directory??" + exit 1 +fi + +export PATH="$TOOLBIN:$PATH" + +cd "$SRCDIR" + +echo "Doing make distclean..." +make distclean + +echo "Configuring..." +# We configure with a fixed set of enables here to ensure that we don't +# accidentally reduce the scope of the analysis by doing the build on +# the system that's missing a dependency that we need to build part of +# the codebase. +./configure --disable-modules --enable-sdl --enable-gtk \ + --enable-opengl --enable-vte --enable-gnutls \ + --enable-nettle --enable-curses --enable-curl \ + --audio-drv-list=oss,alsa,sdl,pa --enable-virtfs \ + --enable-vnc --enable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png \ + --enable-xen --enable-brlapi \ + --enable-linux-aio --enable-attr \ + --enable-cap-ng --enable-trace-backends=log --enable-spice --enable-rbd \ + --enable-xfsctl --enable-libusb --enable-usb-redir \ + --enable-libiscsi --enable-libnfs --enable-seccomp \ + --enable-tpm --enable-libssh --enable-lzo --enable-snappy --enable-bzip2 \ + --enable-numa --enable-rdma --enable-smartcard --enable-virglrenderer \ + --enable-mpath --enable-libxml2 --enable-glusterfs \ + --enable-virtfs --enable-zstd + +echo "Making libqemustub.a..." +make libqemustub.a + +echo "Running cov-build..." +rm -rf cov-int +mkdir cov-int +cov-build --dir cov-int $COVERITY_BUILD_CMD + +echo "Creating results tarball..." +tar cvf - cov-int | xz > "$TARBALL" + +if [ ! -z "$RESULTSTARBALL" ]; then + echo "Copying results tarball to $RESULTSTARBALL..." + cp "$TARBALL" "$RESULTSTARBALL" +fi + +echo "Uploading results tarball..." + +if [ "$DRYRUN" = yes ]; then + echo "Dry run only, not uploading $TARBALL" + exit 0 +fi + +curl --form token="$PROJTOKEN" --form email="$COVERITY_EMAIL" \ + --form file=@"$TARBALL" --form version="$VERSION" \ + --form description="$DESCRIPTION" \ + https://scan.coverity.com/builds?project="$PROJNAME" + +echo "Done." From patchwork Tue Apr 14 16:26:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 185432 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1617923ilf; Tue, 14 Apr 2020 09:30:35 -0700 (PDT) X-Google-Smtp-Source: APiQypJ2/J9WB5IbFYM9wLKOnKQ2aQFabS4Sl/4a5H0BvsYPtIthhQ1o5IRbzgdZkYMWfX+9IG5u X-Received: by 2002:a05:620a:a99:: with SMTP id v25mr207044qkg.114.1586881835846; Tue, 14 Apr 2020 09:30:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586881835; cv=none; d=google.com; s=arc-20160816; b=f+gWFiFkjPy7T3r14arqQ/05V+6HlCs4EvUHJ20z+wqF/z6ZEOyN2ZSHE4VWFoehdE TKXDOIm8x7Ml+8aoSZpMcx3G77Uf/Lta8yDDT2rV8PN91JBAJVFajZ9WPfXxuYtKRWK3 oNDW9uuL5p2R9Z+pmNGtnWwrHeKFCzI+jZ/JwtT42wLB3INO12RNRAzkxi9uY8ilUhGB t5b0FZHJsKsLKlST5YXH4qA2LcRVlb7quOwrkNJo4HmcdT1X82795Rjw2novItQh0Xk7 tiRsnfS2aWDbqWfa2PweYadK8+wMZsp23QaCjXEf8CbtAOg3h22mcfZaShrigu6mtcXo f2OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=CYD2oYIO4KxGswH2zilZZk7dQlRMdgopLeP0MiqqWFk=; b=zDb8K3pKPIa7oiXfUeSB5Zril+pw8MjIwsIqbnDUjLE+odT3KNxe0lQAgynCnlb7SP DjrQrvbjqh0RbNavAf0r5YSIrDqE6AL+kklMdLW+sqeR11gcp89YWERz+QQalcqMX+7Q PwsGdviL3wB47+salG7K1eqzC7LafgDWIXhAcanzwUzYhmoRm78dYRkSMC2yxpfRLVAl LYjo7W4KbL/ITvUdgBnazRHBXxsmN51moOjGGP6PWXaUMBV9X2uzdSJu/5rufcuyhx8P zdS0NnC9lxsSONRqoUtvOj4iuJocUmtzeK2u3dHThoaEeAePs3MZ7+uN+IwPptVEc04f cxOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OcMM2nKc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l15si7804318qtb.61.2020.04.14.09.30.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Apr 2020 09:30:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OcMM2nKc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOSJ-0004PE-A6 for patch@linaro.org; Tue, 14 Apr 2020 12:30:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51683) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOOM-0005B8-9b for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOOF-0007BO-Q7 for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:30 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:39632) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOOOF-0007Ax-J5 for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:23 -0400 Received: by mail-wr1-x42b.google.com with SMTP id b11so3682124wrs.6 for ; Tue, 14 Apr 2020 09:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=CYD2oYIO4KxGswH2zilZZk7dQlRMdgopLeP0MiqqWFk=; b=OcMM2nKcs9HRm0oKtmmVAIZx1BBIPFcSTuxQVvAQL1UFI2+tsFKJTuFecTPiMhEUgI XNNrVMxn+o3ho9tbK026bwlr7lNEZwpfh9On43olfUm0Z/nlpPhXvyYRN2xY/ejo5hkX vKgDKDc1pzmp+VMi+ckn3p3yb/l/Ht8G5eI3n4uMACvdK8k6BH89E2qSBmsNPi9MMdj4 mEVPhSRULuLu0SRcETyyWF+8smSmUrM7DclmPMc7m0FIVkLNEYaQ4cHPiJAQm/jluQ9/ UOdCBQZqyev8digGI2IGKAf38ozJqGaPEUWquFPkC3GrRURB50MWLzfRqLexlAy6RN6u iOMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CYD2oYIO4KxGswH2zilZZk7dQlRMdgopLeP0MiqqWFk=; b=UOz+L+SIKnQY2w/8VfP8VoRk/A4/j7hbZ2TYO0vmfRvlkhk0dGXSoyJCCP+hzoadC+ HGciMZZk+6TrOkRZwxku9CBqQ7JJGMSZS4mh+2dfFHDWN0UpdgMu+ZkluWsDCjp5eD9b VQ1wnfyh2bMrVLQi5ue2m7hQp/jCguYYLwJdvjeBBkDLRWvJppmSXmZ1ISScp0K9aMCx Ws/eawUhb8EkxzUkybvRhcblwcnNhrOx0o+6sXzDg6nvJ7oaEvb6t1yUcA8jncZhBzWu qUdTxKh4HftLFkPdrMpFbEpgzlkSQaHtfYKYbvlSS0veI4T2tAAqxLGqMe/NNVyBsEcM Ni4Q== X-Gm-Message-State: AGi0Puaj424yZb0eLdFoUpKRQQwO/2NzlAjqxb4msHzGrikjSn28EvIq WxubkQmDsXrkC8LnpJgqK4qEhEAiLmKV7A== X-Received: by 2002:a5d:410a:: with SMTP id l10mr24153145wrp.355.1586881582013; Tue, 14 Apr 2020 09:26:22 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id i129sm20003802wmi.20.2020.04.14.09.26.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:26:21 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 06/12] scripts/coverity-scan: Add Docker support Date: Tue, 14 Apr 2020 17:26:07 +0100 Message-Id: <20200414162613.4479-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414162613.4479-1-peter.maydell@linaro.org> References: <20200414162613.4479-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42b 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Add support for running the Coverity Scan tools inside a Docker container rather than directly on the host system. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell Message-id: 20200319193323.2038-7-peter.maydell@linaro.org --- scripts/coverity-scan/coverity-scan.docker | 131 +++++++++++++++++++++ scripts/coverity-scan/run-coverity-scan | 90 ++++++++++++++ 2 files changed, 221 insertions(+) create mode 100644 scripts/coverity-scan/coverity-scan.docker -- 2.20.1 diff --git a/scripts/coverity-scan/coverity-scan.docker b/scripts/coverity-scan/coverity-scan.docker new file mode 100644 index 00000000000..a4f64d12834 --- /dev/null +++ b/scripts/coverity-scan/coverity-scan.docker @@ -0,0 +1,131 @@ +# syntax=docker/dockerfile:1.0.0-experimental +# +# Docker setup for running the "Coverity Scan" tools over the source +# tree and uploading them to the website, as per +# https://scan.coverity.com/projects/qemu/builds/new +# We do this on a fixed config (currently Fedora 30 with a known +# set of dependencies and a configure command that enables a specific +# set of options) so that random changes don't result in our accidentally +# dropping some files from the scan. +# +# We don't build on top of the fedora.docker file because we don't +# want to accidentally change or break the scan config when that +# is updated. + +# The work of actually doing the build is handled by the +# run-coverity-scan script. + +FROM fedora:30 +ENV PACKAGES \ + alsa-lib-devel \ + bc \ + bison \ + brlapi-devel \ + bzip2 \ + bzip2-devel \ + ccache \ + clang \ + curl \ + cyrus-sasl-devel \ + dbus-daemon \ + device-mapper-multipath-devel \ + findutils \ + flex \ + gcc \ + gcc-c++ \ + gettext \ + git \ + glib2-devel \ + glusterfs-api-devel \ + gnutls-devel \ + gtk3-devel \ + hostname \ + libaio-devel \ + libasan \ + libattr-devel \ + libblockdev-mpath-devel \ + libcap-devel \ + libcap-ng-devel \ + libcurl-devel \ + libepoxy-devel \ + libfdt-devel \ + libgbm-devel \ + libiscsi-devel \ + libjpeg-devel \ + libpmem-devel \ + libnfs-devel \ + libpng-devel \ + librbd-devel \ + libseccomp-devel \ + libssh-devel \ + libubsan \ + libudev-devel \ + libusbx-devel \ + libxml2-devel \ + libzstd-devel \ + llvm \ + lzo-devel \ + make \ + mingw32-bzip2 \ + mingw32-curl \ + mingw32-glib2 \ + mingw32-gmp \ + mingw32-gnutls \ + mingw32-gtk3 \ + mingw32-libjpeg-turbo \ + mingw32-libpng \ + mingw32-libtasn1 \ + mingw32-nettle \ + mingw32-nsis \ + mingw32-pixman \ + mingw32-pkg-config \ + mingw32-SDL2 \ + mingw64-bzip2 \ + mingw64-curl \ + mingw64-glib2 \ + mingw64-gmp \ + mingw64-gnutls \ + mingw64-gtk3 \ + mingw64-libjpeg-turbo \ + mingw64-libpng \ + mingw64-libtasn1 \ + mingw64-nettle \ + mingw64-pixman \ + mingw64-pkg-config \ + mingw64-SDL2 \ + ncurses-devel \ + nettle-devel \ + nss-devel \ + numactl-devel \ + perl \ + perl-Test-Harness \ + pixman-devel \ + pulseaudio-libs-devel \ + python3 \ + python3-sphinx \ + PyYAML \ + rdma-core-devel \ + SDL2-devel \ + snappy-devel \ + sparse \ + spice-server-devel \ + systemd-devel \ + systemtap-sdt-devel \ + tar \ + texinfo \ + usbredir-devel \ + virglrenderer-devel \ + vte291-devel \ + wget \ + which \ + xen-devel \ + xfsprogs-devel \ + zlib-devel +ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3 + +RUN dnf install -y $PACKAGES +RUN rpm -q $PACKAGES | sort > /packages.txt +ENV PATH $PATH:/usr/libexec/python3-sphinx/ +ENV COVERITY_TOOL_BASE=/coverity-tools +COPY run-coverity-scan run-coverity-scan +RUN --mount=type=secret,id=coverity.token,required ./run-coverity-scan --update-tools-only --tokenfile /run/secrets/coverity.token diff --git a/scripts/coverity-scan/run-coverity-scan b/scripts/coverity-scan/run-coverity-scan index d40b51969fa..2e067ef5cfc 100755 --- a/scripts/coverity-scan/run-coverity-scan +++ b/scripts/coverity-scan/run-coverity-scan @@ -29,6 +29,7 @@ # Command line options: # --dry-run : run the tools, but don't actually do the upload +# --docker : create and work inside a docker container # --update-tools-only : update the cached copy of the tools, but don't run them # --tokenfile : file to read Coverity token from # --version ver : specify version being analyzed (default: ask git) @@ -36,6 +37,8 @@ # --srcdir : QEMU source tree to analyze (default: current working dir) # --results-tarball : path to copy the results tarball to (default: don't # copy it anywhere, just upload it) +# --src-tarball : tarball to untar into src dir (default: none); this +# is intended mainly for internal use by the Docker support # # User-specifiable environment variables: # COVERITY_TOKEN -- Coverity token @@ -125,6 +128,7 @@ update_coverity_tools () { # Check user-provided environment variables and arguments DRYRUN=no UPDATE_ONLY=no +DOCKER=no while [ "$#" -ge 1 ]; do case "$1" in @@ -181,6 +185,19 @@ while [ "$#" -ge 1 ]; do RESULTSTARBALL="$1" shift ;; + --src-tarball) + shift + if [ $# -eq 0 ]; then + echo "--src-tarball needs an argument" + exit 1 + fi + SRCTARBALL="$1" + shift + ;; + --docker) + DOCKER=yes + shift + ;; *) echo "Unexpected argument '$1'" exit 1 @@ -212,6 +229,10 @@ PROJTOKEN="$COVERITY_TOKEN" PROJNAME=QEMU TARBALL=cov-int.tar.xz +if [ "$UPDATE_ONLY" = yes ] && [ "$DOCKER" = yes ]; then + echo "Combining --docker and --update-only is not supported" + exit 1 +fi if [ "$UPDATE_ONLY" = yes ]; then # Just do the tools update; we don't need to check whether @@ -221,8 +242,17 @@ if [ "$UPDATE_ONLY" = yes ]; then exit 0 fi +if [ ! -e "$SRCDIR" ]; then + mkdir "$SRCDIR" +fi + cd "$SRCDIR" +if [ ! -z "$SRCTARBALL" ]; then + echo "Untarring source tarball into $SRCDIR..." + tar xvf "$SRCTARBALL" +fi + echo "Checking this is a QEMU source tree..." if ! [ -e "$SRCDIR/VERSION" ]; then echo "Not in a QEMU source tree?" @@ -242,6 +272,66 @@ if [ -z "$COVERITY_EMAIL" ]; then COVERITY_EMAIL="$(git config user.email)" fi +# Run ourselves inside docker if that's what the user wants +if [ "$DOCKER" = yes ]; then + # build docker container including the coverity-scan tools + # Put the Coverity token into a temporary file that only + # we have read access to, and then pass it to docker build + # using --secret. This requires at least Docker 18.09. + # Mostly what we are trying to do here is ensure we don't leak + # the token into the Docker image. + umask 077 + SECRETDIR=$(mktemp -d) + if [ -z "$SECRETDIR" ]; then + echo "Failed to create temporary directory" + exit 1 + fi + trap 'rm -rf "$SECRETDIR"' INT TERM EXIT + echo "Created temporary directory $SECRETDIR" + SECRET="$SECRETDIR/token" + echo "$COVERITY_TOKEN" > "$SECRET" + echo "Building docker container..." + # TODO: This re-downloads the tools every time, rather than + # caching and reusing the image produced with the downloaded tools. + # Not sure why. + # TODO: how do you get 'docker build' to print the output of the + # commands it is running to its stdout? This would be useful for debug. + DOCKER_BUILDKIT=1 docker build -t coverity-scanner \ + --secret id=coverity.token,src="$SECRET" \ + -f scripts/coverity-scan/coverity-scan.docker \ + scripts/coverity-scan + echo "Archiving sources to be analyzed..." + ./scripts/archive-source.sh "$SECRETDIR/qemu-sources.tgz" + if [ "$DRYRUN" = yes ]; then + DRYRUNARG=--dry-run + fi + echo "Running scanner..." + # If we need to capture the output tarball, get the inner run to + # save it to the secrets directory so we can copy it out before the + # directory is cleaned up. + if [ ! -z "$RESULTSTARBALL" ]; then + RTARGS="--results-tarball /work/cov-int.tar.xz" + else + RTARGS="" + fi + # Arrange for this docker run to get access to the sources with -v. + # We pass through all the configuration from the outer script to the inner. + export COVERITY_EMAIL COVERITY_BUILD_CMD + docker run -it --env COVERITY_EMAIL --env COVERITY_BUILD_CMD \ + -v "$SECRETDIR:/work" coverity-scanner \ + ./run-coverity-scan --version "$VERSION" \ + --description "$DESCRIPTION" $DRYRUNARG --tokenfile /work/token \ + --srcdir /qemu --src-tarball /work/qemu-sources.tgz $RTARGS + if [ ! -z "$RESULTSTARBALL" ]; then + echo "Copying results tarball to $RESULTSTARBALL..." + cp "$SECRETDIR/cov-int.tar.xz" "$RESULTSTARBALL" + fi + echo "Docker work complete." + exit 0 +fi + +# Otherwise, continue with the full build and upload process. + check_upload_permissions update_coverity_tools From patchwork Tue Apr 14 16:26:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 185433 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1620327ilf; Tue, 14 Apr 2020 09:32:47 -0700 (PDT) X-Google-Smtp-Source: APiQypIYL16X8R7faD/vO/Cj/D8+/xTSwtg8fj6C7xwT/nJCfPiAD/hyWhcAnF2b90gvOl7X6ijM X-Received: by 2002:a37:404f:: with SMTP id n76mr21765770qka.442.1586881967659; Tue, 14 Apr 2020 09:32:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586881967; cv=none; d=google.com; s=arc-20160816; b=yGOlC7EVyGXcH0GfmJ0RCJRqD0buxIUStSTt2EFq83RI4zKM1SNAWSdLFx1q9EwqY2 3UQS33gXfp+b0obI3SELXoxYG0nE4zkjbfUnE1iehDyGl6UIL+oIyrUpOzVuqTiqJEbK ZYIizCPS2SSSCAhHA0trGMe79tRA1FXLexlHc0rvwHPO33d7bQ6M+59WEpcp8ftEH6nN 88EYOTSzClbGysk80HSN0gqfLGy6dGdF4Bdt1VtU/wd8vK6HxLEktVcLRVG8+LBiMtUw aWP9AKCIiu7ncrIdotW2jtvZAO0/TyhzU8xnnrZazw7iabZfmf0AikWE00YeZ+480dQJ DLKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=tQ88i9Gc2sOteI8WTccEItBNd95hLEm8yCcLQuCQWRs=; b=j4+wEo6USz9GsoRJcUTypGkFRXdHVwK/r7r4frscMn2y9i0BPjSsXgGoFg2yQdgYd6 joni6F/LZk26DVl+/WC16FirV0zcmurWUsjmjDmwzzVhEHh7Drl2qGfc52XI7MKMJnAk ETgpy8BHRFmqFPGkVROU1Ichzx4XttoZahsxQeHCMH/w0X1nmmP1gL5+ZWO62erW+Ivh NWeoaZKkHQsfZcv/i83W5AyD6iIGmLSGyWyUi6QwHJaZ69H6Eg0//Ly/O1c7MhxcMi7P jsQOtAibDZoTJCpS3780j4avB69g/SSN1uq12ibBLrh+Xe0JPwOzH1DL8GJ5xKi8E3ll LUww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gjdLmX2Z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bt12si3055963qvb.158.2020.04.14.09.32.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Apr 2020 09:32:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gjdLmX2Z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOUR-0008RO-3K for patch@linaro.org; Tue, 14 Apr 2020 12:32:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51687) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOOM-0005Ba-Mc for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOOG-0007C3-Sd for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:30 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:37823) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOOOG-0007Bh-Lz for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:24 -0400 Received: by mail-wr1-x429.google.com with SMTP id k1so7843857wrx.4 for ; Tue, 14 Apr 2020 09:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=tQ88i9Gc2sOteI8WTccEItBNd95hLEm8yCcLQuCQWRs=; b=gjdLmX2ZMSNfKyO6GAsBxlQitcL2Kqgf5lLVAoCFJ2eZiNNeyvoTZJf91i6eZb5fl8 jsRPZJo++deBi+JCQ0da839iSTRHM2j98T980mRx/Z+mjNUjVXdScyHXToDHePiJ+LTS mVuzJr+DpFTS5270ziGCcw0r87WAwkseDxI3RDrpANlmlYAd13KJmS0jy+MqZyaK10IY beoGm1VHXqX31hkmwhq8w03VCHtMHU9urXoeeV3xTc5waeM6C04Yn3iIgvE9MF+jegfQ naxdu4kKEUl5+056lg882j6bSeJD5IVxoGrM6k3wsempeQ1PiXvKkkNTpE7OaaW3Swhw Rw0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tQ88i9Gc2sOteI8WTccEItBNd95hLEm8yCcLQuCQWRs=; b=E2RgCNbCEXTG7E+B4FUMI1Kxz5myL6ubqCB6i/adPdOyQLh+3LsVPUCzNsLqU93dW8 cL2AUE8632DMhqeST81LUpbltiykeLjpr1GsL4Y7AB07wxawy1ydzS9tgweH0kgaZuF3 FyCPBBvwO+5ftnyI9Q+V7Ju/I9GKzTQg+COVB0612fr/geCgOsrzvenyIoVEqB0CB2RA 3tijZJg+l4V4VPTKO4hX0dgqXxh4vRRAh/EQ20sfIb//9L8rm1GOqEQYx6xvxnnCwijl ATQuP7T8kfPhVc9GKUhFymsDr8Jf8K0rqHC2fX2KCrIgiuHTwBBSiAKolGvWgQD1dvgL BCLQ== X-Gm-Message-State: AGi0PuZ1s4fsI4WewWQZsnTfHVTU8KnHdbh3FlpT/d3/VG/TZeP5Ym/t xYRBgUF+LOMENbYTsaDiLwLgitHwZNIaXA== X-Received: by 2002:adf:dd0c:: with SMTP id a12mr25575703wrm.144.1586881583254; Tue, 14 Apr 2020 09:26:23 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id i129sm20003802wmi.20.2020.04.14.09.26.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:26:22 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 07/12] docs: Improve our gdbstub documentation Date: Tue, 14 Apr 2020 17:26:08 +0100 Message-Id: <20200414162613.4479-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414162613.4479-1-peter.maydell@linaro.org> References: <20200414162613.4479-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::429 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The documentation of our -s and -gdb options is quite old; in particular it still claims that it will cause QEMU to stop and wait for the gdb connection, when this has not been true for some time: you also need to pass -S if you want to make QEMU not launch the guest on startup. Improve the documentation to mention this requirement in the executable's --help output, the documentation of the -gdb option in the manual, and in the "GDB usage" chapter. Includes some minor tweaks to these paragraphs of documentation since I was editing them anyway (such as dropping the description of our gdb support as "primitive"). Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Message-id: 20200403094014.9589-1-peter.maydell@linaro.org --- docs/system/gdb.rst | 22 +++++++++++++++------- qemu-options.hx | 24 ++++++++++++++++++------ 2 files changed, 33 insertions(+), 13 deletions(-) -- 2.20.1 diff --git a/docs/system/gdb.rst b/docs/system/gdb.rst index 639f814b32d..a40145fcf84 100644 --- a/docs/system/gdb.rst +++ b/docs/system/gdb.rst @@ -3,17 +3,25 @@ GDB usage --------- -QEMU has a primitive support to work with gdb, so that you can do -'Ctrl-C' while the virtual machine is running and inspect its state. +QEMU supports working with gdb via gdb's remote-connection facility +(the "gdbstub"). This allows you to debug guest code in the same +way that you might with a low-level debug facility like JTAG +on real hardware. You can stop and start the virtual machine, +examine state like registers and memory, and set breakpoints and +watchpoints. -In order to use gdb, launch QEMU with the '-s' option. It will wait for -a gdb connection: +In order to use gdb, launch QEMU with the ``-s`` and ``-S`` options. +The ``-s`` option will make QEMU listen for an incoming connection +from gdb on TCP port 1234, and ``-S`` will make QEMU not start the +guest until you tell it to from gdb. (If you want to specify which +TCP port to use or to use something other than TCP for the gdbstub +connection, use the ``-gdb dev`` option instead of ``-s``.) .. parsed-literal:: - |qemu_system| -s -kernel bzImage -hda rootdisk.img -append "root=/dev/hda" - Connected to host network interface: tun0 - Waiting gdb connection on port 1234 + |qemu_system| -s -S -kernel bzImage -hda rootdisk.img -append "root=/dev/hda" + +QEMU will launch but will silently wait for gdb to connect. Then launch gdb on the 'vmlinux' executable:: diff --git a/qemu-options.hx b/qemu-options.hx index 16debd03cb6..292d4e7c0ce 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -3680,14 +3680,26 @@ SRST ERST DEF("gdb", HAS_ARG, QEMU_OPTION_gdb, \ - "-gdb dev wait for gdb connection on 'dev'\n", QEMU_ARCH_ALL) + "-gdb dev accept gdb connection on 'dev'. (QEMU defaults to starting\n" + " the guest without waiting for gdb to connect; use -S too\n" + " if you want it to not start execution.)\n", + QEMU_ARCH_ALL) SRST ``-gdb dev`` - Wait for gdb connection on device dev (see - :ref:`gdb_005fusage`). Typical connections will likely be - TCP-based, but also UDP, pseudo TTY, or even stdio are reasonable - use case. The latter is allowing to start QEMU from within gdb and - establish the connection via a pipe: + Accept a gdb connection on device dev (see + :ref:`gdb_005fusage`). Note that this option does not pause QEMU + execution -- if you want QEMU to not start the guest until you + connect with gdb and issue a ``continue`` command, you will need to + also pass the ``-S`` option to QEMU. + + The most usual configuration is to listen on a local TCP socket:: + + -gdb tcp::3117 + + but you can specify other backends; UDP, pseudo TTY, or even stdio + are all reasonable use cases. For example, a stdio connection + allows you to start QEMU from within gdb and establish the + connection via a pipe: .. parsed-literal:: From patchwork Tue Apr 14 16:26:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 185431 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1617823ilf; Tue, 14 Apr 2020 09:30:30 -0700 (PDT) X-Google-Smtp-Source: APiQypKyNxQvpxIKozbr+NBAtqvGsV62fjaU41ph6NS5UmZiYxNd0fwvTKRZiDrdoShg2dOOwj8T X-Received: by 2002:ac8:6d06:: with SMTP id o6mr17371867qtt.165.1586881830048; Tue, 14 Apr 2020 09:30:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586881830; cv=none; d=google.com; s=arc-20160816; b=DrtaMkV9OgQfRF77/NO/nYaUlhHzzoERizokwFiIrU99gXLv80C3xQnrrmdDuNp8MZ Ol5yld9KiHulMeoYfw6Q21XhFFfs64Asl0Mme1JAyDv90aIcflJbgm6YQw97IT6uoVo+ IGo2mb3+b9vFIMFNwduiDktRSfUtw6MSL2xy8b2smAcZc3ZKN9FRhNO5/chOKbU/k2Ai 5tIHDhvUhOfF/gkhKc0o2TnJ5ogGWOqzphbrlU2QLp1rNm6SBJlRNpNbjI1KIS7BR2Xd W+TCXrTg5o89dPlVWseHGpszKuVk2N84KCxTYmnoNYpMTFf0O5YMhrRMb/bloLP+K3ZV H/Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=3GfCTfNzdj9dy1pa2ZHw7P0hlDvMSW+Y7bEI+7tRgbU=; b=r6qtpzYqMi0A/T16RPsTPVQAh4zHTe7Bu/e6ev69Ei5O+Vvve6/R7af3VekrmiuUsG mGIqGlllTu4Xnh8cSkB78lABXJZKA2mlQKmeKmRdRra2Cjde4RHt4KfobI56cgeBLw94 36iyQIUQF7JGDxKAjAahgvK20eX7buTvUJzMdV9KZUyctU3CRL3012+gjNvyzZMMp3Yr EAWNQI8+m57ZtSF9K8xzUPjV5apR0DwnERLs/akTrosYJyDY+kvZZxN39tukte8BGPXK 2ChTX8KndHgHQkrrKp7Ix+LQ38Tt2VK5F+YqTxf74OMnuwij+HorN6cFNlTlWUG2v3An 6gyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kbkZnarK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l10si7722282qti.6.2020.04.14.09.30.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Apr 2020 09:30:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kbkZnarK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOSD-000554-FP for patch@linaro.org; Tue, 14 Apr 2020 12:30:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51694) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOON-0005Dy-Ra for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOOI-0007Cc-0R for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:31 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:40622) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOOOH-0007CE-QB for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:25 -0400 Received: by mail-wr1-x435.google.com with SMTP id h26so3664328wrb.7 for ; Tue, 14 Apr 2020 09:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=3GfCTfNzdj9dy1pa2ZHw7P0hlDvMSW+Y7bEI+7tRgbU=; b=kbkZnarKZKoMu8TADfKifLPL6IFzKUW2Vod37uexqnAMlU8ITuuq8FiES+0YqvTT3N YNSfVeqKbMZxvbRzjqVK4X155boV+bUY9bkMDG6cOdabxwcfQkYyNhZAVhPF6YgjBJ1K 1XhTVN9kKmmdMvHppYAQKxI+FJHPAQ41grycF7k5s/heYIUlnrOEYtr2U/ADwKji0XRJ EmCqg3Bc8DA8flkqSsP6ZHfmAxtNrQM2EwQ2P+i/hhlrbImEP9qmXK1gfOhPXIZbqdZQ 0usYMWxaO9baTIhpEk9ym8bNWuw5q18TMRcnV/D7XrC4iz+XkSi9DgvY0l4kwofF5iSs i2qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3GfCTfNzdj9dy1pa2ZHw7P0hlDvMSW+Y7bEI+7tRgbU=; b=cMhEaPuFNPTWmGbKb6C166APe3GD93AEeQ0GzfSFVf7U7mqRbd2sW7TYuDWz76o7Od lRSlwUt8Jk41afLDkdfQieneR6+1yzDdhe4J+nlLB+8EfR+AuUCpDR9mlCl7vpcz5W69 dXOuJHnVXzfZM5x3RZMebPXBwcpQCDXzHZwCrEu5qg4L1nh9RuJ2o2lLcZbFchHqL8dY aUq78jt0cyfZI2Af2EtM7uqJ5SfgtqoQzNSXIZk8nEwW6usrULyd4JXzVEVm9yOsgYSq pPeNDiqa9t9dQltQ4jFlMLGrOFVqsWXo5ATm3kkwaOsS2fWGpGupmKvfVvcp2oh32vhz Xqog== X-Gm-Message-State: AGi0PuZRQ883XaUc7Eoc1ZEXhaKY1+KnepdoVQ/XYQHlyPAZdXtx5iIW 7lJ5jis7MS7eMP386kFMj55B+dHZwlUCYw== X-Received: by 2002:a5d:5085:: with SMTP id a5mr4866957wrt.394.1586881584533; Tue, 14 Apr 2020 09:26:24 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id i129sm20003802wmi.20.2020.04.14.09.26.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:26:23 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/12] configure: Honour --disable-werror for Sphinx Date: Tue, 14 Apr 2020 17:26:09 +0100 Message-Id: <20200414162613.4479-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414162613.4479-1-peter.maydell@linaro.org> References: <20200414162613.4479-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::435 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" If we are not making warnings fatal for compilation, make them non-fatal when building the Sphinx documentation also. (For instance Sphinx 3.0 warns about some constructs that older versions were happy with, which is a build failure if we use the warnings-as-errors flag.) This provides a workaround at least for LP:1872113. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20200411182934.28678-2-peter.maydell@linaro.org Reviewed-by: Alex Bennée --- configure | 9 ++++++++- Makefile | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/configure b/configure index 233c671aaa9..9b1f5b33e45 100755 --- a/configure +++ b/configure @@ -4928,6 +4928,12 @@ if check_include sys/kcov.h ; then kcov=yes fi +# If we're making warnings fatal, apply this to Sphinx runs as well +sphinx_werror="" +if test "$werror" = "yes"; then + sphinx_werror="-W" +fi + # Check we have a new enough version of sphinx-build has_sphinx_build() { # This is a bit awkward but works: create a trivial document and @@ -4936,7 +4942,7 @@ has_sphinx_build() { # sphinx-build doesn't exist at all or if it is too old. mkdir -p "$TMPDIR1/sphinx" touch "$TMPDIR1/sphinx/index.rst" - "$sphinx_build" -c "$source_path/docs" -b html "$TMPDIR1/sphinx" "$TMPDIR1/sphinx/out" >/dev/null 2>&1 + "$sphinx_build" $sphinx_werror -c "$source_path/docs" -b html "$TMPDIR1/sphinx" "$TMPDIR1/sphinx/out" >/dev/null 2>&1 } # Check if tools are available to build documentation. @@ -7631,6 +7637,7 @@ echo "INSTALL_PROG=$install -c -m 0755" >> $config_host_mak echo "INSTALL_LIB=$install -c -m 0644" >> $config_host_mak echo "PYTHON=$python" >> $config_host_mak echo "SPHINX_BUILD=$sphinx_build" >> $config_host_mak +echo "SPHINX_WERROR=$sphinx_werror" >> $config_host_mak echo "GENISOIMAGE=$genisoimage" >> $config_host_mak echo "CC=$cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then diff --git a/Makefile b/Makefile index 84ef8816000..8a9113e6663 100644 --- a/Makefile +++ b/Makefile @@ -1076,7 +1076,7 @@ sphinxdocs: $(MANUAL_BUILDDIR)/devel/index.html \ # Note the use of different doctree for each (manual, builder) tuple; # this works around Sphinx not handling parallel invocation on # a single doctree: https://github.com/sphinx-doc/sphinx/issues/2946 -build-manual = $(call quiet-command,CONFDIR="$(qemu_confdir)" $(SPHINX_BUILD) $(if $(V),,-q) -W -b $2 -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1-$2 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1") +build-manual = $(call quiet-command,CONFDIR="$(qemu_confdir)" $(SPHINX_BUILD) $(if $(V),,-q) $(SPHINX_WERROR) -b $2 -D version=$(VERSION) -D release="$(FULL_VERSION)" -d .doctrees/$1-$2 $(SRC_PATH)/docs/$1 $(MANUAL_BUILDDIR)/$1 ,"SPHINX","$(MANUAL_BUILDDIR)/$1") # We assume all RST files in the manual's directory are used in it manual-deps = $(wildcard $(SRC_PATH)/docs/$1/*.rst $(SRC_PATH)/docs/$1/*/*.rst) \ $(SRC_PATH)/docs/defs.rst.inc \ From patchwork Tue Apr 14 16:26:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 185434 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1620453ilf; Tue, 14 Apr 2020 09:32:55 -0700 (PDT) X-Google-Smtp-Source: APiQypLd+WYSNdSbb/ma5GeCnJA+VXldvatRbIwSuyJkL2kYJLJmBt6zvccbvwGFuhPKyGmJ6WwL X-Received: by 2002:a37:4015:: with SMTP id n21mr19974255qka.76.1586881975202; Tue, 14 Apr 2020 09:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586881975; cv=none; d=google.com; s=arc-20160816; b=eLnWAiCCRWGzLl6/JSk9pPqdcfYXQ/dOC7cvBkLPgrS8cdjiyH50MxKYZo3YgD2qmY kMlVWWGi1psA+YSMy9jA0+MFlchbWiVTeoRwAJj8ZQnfBRsPmi6dnhNJI3UNnQCeH7wx gXzP2hI2py4vnJg9Gu3Fn0T8mnuaTXYnHmCpmvdo5p66RZK73rX/nMGnHjHsxk0ZCdlu J2xIXmn7pWyCBzkMALO5ArSa/MXtIfIMbwkdcv1i14PUysoUiz2+TJT+nOMXgdNAZGLv Oo9hwPvYTlrspjkuXAaAJ0nFSB66NGeJPRtS1EO0/j0Fv5WNns2pPGsceU4VBpK05LRN GZHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=CT6aAVcPUz2WZ3lRhtbSp2EjDloFUvZAespPdqcpC9E=; b=lfTuv/2jdXosbsARpsiVpt5f1Cv3ml8dcG1lcD6M96A4JkfXsFu+BM7RNWKits8JAq xn1uNauWdsL1zSkWRZ/y6JGHzA8QMyWIg3VYbuJkbSYXEiRTGCXYIM7HIPJ4B6honCSJ f8J6i/naC1fkAuoVb1Sh0dU7YGDE+EX0oe4pIb3azvuCr3IsDorLaKt9TPPtHEySIueZ sc4GgMWQp+0PPapp4wv+wwcycZ3/VlU0SruPKwRSgHf1bnInd9KTBdRdcFpyjvbDgP8q b/UHBaphIrif6aUchX+80IqNZr+nCkSNBW9puuIKNU2m76ypjIPvELDuJJvJ2RcLVKbs Pmjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HjQ6P6C4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w20si7876348qtn.67.2020.04.14.09.32.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Apr 2020 09:32:55 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HjQ6P6C4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOUY-0007jK-Kg for patch@linaro.org; Tue, 14 Apr 2020 12:32:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51699) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOOP-0005HI-2a for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOOJ-0007D6-9J for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:32 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:40612) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOOOJ-0007Co-3g for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:27 -0400 Received: by mail-wr1-x42a.google.com with SMTP id h26so3664388wrb.7 for ; Tue, 14 Apr 2020 09:26:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=CT6aAVcPUz2WZ3lRhtbSp2EjDloFUvZAespPdqcpC9E=; b=HjQ6P6C4yF4NvN7JhraDlJHbmOouFej0kqSeTCysuSkPPIAodUe+opKqEXLf7d/uAM 2M7mGudwijJGz4nh8k693y61Cvmt3fMk1cOsSHPl1UqwAFwZrf1IPLbOSVYKXKMC+aEr iO8Euh4aKpE/YtyBzKTBAHcxMPHk1BwL0fIJguzsG9PpZfDc/kPahwEK9HbVF6QzgMuV jwoDYz8yyesPd/Hy0fHOxiYN6z+jg3FrGqA286wXE9pGvxqbJnpJih7MD1tOXmk4LMcb E04EEv41YlhjN0X8gZmKk9jmdIupAXKpG0xffdD8V+31+WH6q0rQVW+/jC51eY9ueDQw Y0RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CT6aAVcPUz2WZ3lRhtbSp2EjDloFUvZAespPdqcpC9E=; b=oFnW00WIO6XTN3aeEJdN0XxuD9BAa9HsphDjJFY+ywj5cMJAjhJlGOBWeibfNwjm/O VTI3lkZ7shoC7ouvR/5j4o8Ek26yNEzSHv9esOJUW2TXm0bk4eo3CKrYgkNEpOeD/cTv /tQNuhJtn9Kc9kizSkiUAZxXZfrVMmLrgVUP4vkhSovMpZ1fibZC26E8VLNOVbNybnjE EF4zwLpIo4FEBIr7630+xnCZ1eGR10Y5RxyoxHUxJBjLXVgh2Evwc4gqqS8iVLrYpPe+ 6bJU8VXgVP/KtXAvMxV6lcP9CHrgCplE/6bXE/MqtdIiqFpMMCYK1QLIDBeswc5sSiFc kp2Q== X-Gm-Message-State: AGi0PuYXD40x8p24psZ9hMggpSre+t0j6iRpoRUbMG+LW79XWSb11VJc 2IBrZuOL7KYgh8/rAlkO3UFCMceMvmq1zQ== X-Received: by 2002:adf:e691:: with SMTP id r17mr24723255wrm.421.1586881585571; Tue, 14 Apr 2020 09:26:25 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id i129sm20003802wmi.20.2020.04.14.09.26.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:26:24 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 09/12] scripts/kernel-doc: Add missing close-paren in c:function directives Date: Tue, 14 Apr 2020 17:26:10 +0100 Message-Id: <20200414162613.4479-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414162613.4479-1-peter.maydell@linaro.org> References: <20200414162613.4479-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42a 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When kernel-doc generates a 'c:function' directive for a function one of whose arguments is a function pointer, it fails to print the close-paren after the argument list of the function pointer argument, for instance in the memory API documentation: .. c:function:: void memory_region_init_resizeable_ram (MemoryRegion * mr, struct Object * owner, const char * name, uint64_t size, uint64_t max_size, void (*resized) (const char*, uint64_t length, void *host, Error ** errp) which should have a ')' after the 'void *host' which is the last argument to 'resized'. Older versions of Sphinx don't try to parse the argumnet to c:function, but Sphinx 3.0 does do this and will complain: /home/petmay01/linaro/qemu-from-laptop/qemu/docs/../include/exec/memory.h:834: WARNING: Error in declarator or parameters Invalid C declaration: Expecting "," or ")" in parameters, got "EOF". [error at 208] void memory_region_init_resizeable_ram (MemoryRegion * mr, struct Object * owner, const char * name, uint64_t size, uint64_t max_size, void (*resized) (const char*, uint64_t length, void *host, Error ** errp) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^ Add the missing close-paren. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20200411182934.28678-3-peter.maydell@linaro.org Reviewed-by: Alex Bennée --- scripts/kernel-doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/scripts/kernel-doc b/scripts/kernel-doc index af470eb3211..8dc30e01e58 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -853,7 +853,7 @@ sub output_function_rst(%) { if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) { # pointer-to-function - print $1 . $parameter . ") (" . $2; + print $1 . $parameter . ") (" . $2 . ")"; } else { print $type . " " . $parameter; } From patchwork Tue Apr 14 16:26:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 185428 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1616458ilf; Tue, 14 Apr 2020 09:29:05 -0700 (PDT) X-Google-Smtp-Source: APiQypJDC/WH6r1HS0ei+nouc2O37hY2iK5A1pII3+283TgcjEn7dxWFgaGcNFnfqKA3Xc4bFVEU X-Received: by 2002:a05:620a:127a:: with SMTP id b26mr10095038qkl.219.1586881745623; Tue, 14 Apr 2020 09:29:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586881745; cv=none; d=google.com; s=arc-20160816; b=sgIv20Fr8C6QOg8emjEoIJzDMt5Qh/pu8Wq49pmD+i1rq67DhqDLZWsG6vGOcHLupq Yo+P6mOjF8HJ8lsiOacOFBRIojYU81pKFQZaaCZcKVfwSEv1eCKwJrgK4lSv/IsFloSZ SbgLbFq5MryhxILz4ErpYboTBksyxvMdXetNgOkx3hLgT7Kj8SLMz8NC50EnG1cUvJEx q3UN1SGqjqZtN1Syvee8D3WtSaTvEHgCkIwA9LoGv6yMXt2+XL3PZRjgNgy441FfRUxM BtFnTOsacKgfMuj5tjmn24TmawAZut7zV89U03SEzGOabN5Z6CHlDM26+LeGCogwxCMq OGLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=qGeIMQxu3PilBoKo2MoV3NHkvFJQkVL7vf1SB9ePcU4=; b=R6LhFQSxq00uOeniLAbow19oB2Ii1Sj8semdBPn/jh3aJ2uBKEj41LHwCUFOBsttI6 tP+MB3FT+dfGISeG1uZgwIsS7nEc8FGdU6ceZu4SB7zNbbF1dA38Ges5bax9zYamTd4e 5WOotplAFDH/GFGgIrW0/CbGxZemP1qJ1r+ZqdeFVUcEyil8Q6sboPePDGSGR9tc7ja4 QY9GzcjaDVRKHz/pqtuCz/b2tYQi1xVo17zjK2c99bBvHLEu6f7JJwIwT3/U2YS20TIE GcZe75XnxNiB0reyaeKCPISO7Kvbiw6luxiNI6quAFPZJK3pW6vmC+5MmS75CDR4pJJM tZUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HOkfzDe9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k63si7521253qtd.139.2020.04.14.09.29.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Apr 2020 09:29:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HOkfzDe9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOQr-0000mZ-3u for patch@linaro.org; Tue, 14 Apr 2020 12:29:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51703) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOOQ-0005Ju-6O for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOOK-0007DM-4U for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:34 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:46994) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOOOJ-0007DA-Uj for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:28 -0400 Received: by mail-wr1-x443.google.com with SMTP id f13so15048008wrm.13 for ; Tue, 14 Apr 2020 09:26:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=qGeIMQxu3PilBoKo2MoV3NHkvFJQkVL7vf1SB9ePcU4=; b=HOkfzDe9OAZb+EK6qsQwwxdfm54o74IIqr7XfCaFq2v0irBwZZw6Wel1g8Vfvm/9yY ZYs7utHS5Z0D/Z0x/FWQ3OVF/ikVadxpX9fITDrNQ4tHGPFsvdTNXR4cbNaW7Daop3Ta RVeLiu+AUg8EelHyd/QVQSeJ/hL8BxqWjKJr1hLkzjGSZylIEPa5wZATl2Ar+Eo5eAKJ gFxXVvGLne75oHDCmggxY9BnZTJ7pA2TVi7kCIds3O+JyzHpErC+UenE7Kasso/qea3F hsrUhkWNLjIlfbk6hUVzfB74XRquBtPc4eUxQdkNsin34IYDGQORtQxFQRAiY3UTYGR3 3DGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qGeIMQxu3PilBoKo2MoV3NHkvFJQkVL7vf1SB9ePcU4=; b=dAIfHgjDXVv+xIGifx+6Dp7fq2VtfGE+QOLG6txJe/U6VyBDBnK1EkGS+cMcpp8RnV 2mH7c28U3DAfc2/YdH+gBGJk+l2Tl85uSXSK2KCLpFF378HnJKlDPF1dqzRxMcyG2Hd3 R/67Rx9vKx/HoPnFoGyjZR9wTv6dsgvu0hFpNYZpXeqGiTlRtn1Tl95ya7nRG7Nd2Sup Q7zFRnXVvWnqismdwZllWtskZGyFYD6deuTgg6ko4IV/NqxOvbuNst0esNDcYmMqAXUX /N5cYuYVu47oO4b1/YZ2qG6RoKsb0vyDcuKKKiIgD8U7ZQ7V+xJbwgzwZxeqbtHSt8G7 c65Q== X-Gm-Message-State: AGi0PuZY7AlG3GIpgK5qTjPUPWXOQFnsnfyk1LqzgsUfSk/itcJAE3yE GMHeoJPFTQab1KKHxNOyui39iDoQW3sEnQ== X-Received: by 2002:a5d:5707:: with SMTP id a7mr24549392wrv.108.1586881586529; Tue, 14 Apr 2020 09:26:26 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id i129sm20003802wmi.20.2020.04.14.09.26.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:26:26 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 10/12] kernel-doc: Use c:struct for Sphinx 3.0 and later Date: Tue, 14 Apr 2020 17:26:11 +0100 Message-Id: <20200414162613.4479-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414162613.4479-1-peter.maydell@linaro.org> References: <20200414162613.4479-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The kernel-doc Sphinx plugin and associated script currently emit 'c:type' directives for "struct foo" documentation. Sphinx 3.0 warns about this: /home/petmay01/linaro/qemu-from-laptop/qemu/docs/../include/exec/memory.h:3: WARNING: Type must be either just a name or a typedef-like declaration. If just a name: Error in declarator or parameters Invalid C declaration: Expected identifier in nested name, got keyword: struct [error at 6] struct MemoryListener ------^ If typedef-like declaration: Error in declarator or parameters Invalid C declaration: Expected identifier in nested name. [error at 21] struct MemoryListener ---------------------^ because it wants us to use the new-in-3.0 'c:struct' instead. Plumb the Sphinx version through to the kernel-doc script and use it to select 'c:struct' for newer versions than 3.0. Fixes: LP:1872113 Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée --- docs/sphinx/kerneldoc.py | 1 + scripts/kernel-doc | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/docs/sphinx/kerneldoc.py b/docs/sphinx/kerneldoc.py index 1159405cb92..3e879402064 100644 --- a/docs/sphinx/kerneldoc.py +++ b/docs/sphinx/kerneldoc.py @@ -99,6 +99,7 @@ class KernelDocDirective(Directive): env.note_dependency(os.path.abspath(f)) cmd += ['-export-file', f] + cmd += ['-sphinx-version', sphinx.__version__] cmd += [filename] try: diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 8dc30e01e58..030b5c8691f 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -71,6 +71,8 @@ Output selection (mutually exclusive): DOC: sections. May be specified multiple times. Output selection modifiers: + -sphinx-version VER Generate rST syntax for the specified Sphinx version. + Only works with reStructuredTextFormat. -no-doc-sections Do not output DOC: sections. -enable-lineno Enable output of #define LINENO lines. Only works with reStructuredText format. @@ -286,6 +288,7 @@ use constant { }; my $output_selection = OUTPUT_ALL; my $show_not_found = 0; # No longer used +my $sphinx_version = "0.0"; # if not specified, assume old my @export_file_list; @@ -436,6 +439,8 @@ while ($ARGV[0] =~ m/^--?(.*)/) { $enable_lineno = 1; } elsif ($cmd eq 'show-not-found') { $show_not_found = 1; # A no-op but don't fail + } elsif ($cmd eq 'sphinx-version') { + $sphinx_version = shift @ARGV; } else { # Unknown argument usage(); @@ -963,7 +968,16 @@ sub output_struct_rst(%) { my $oldprefix = $lineprefix; my $name = $args{'type'} . " " . $args{'struct'}; - print "\n\n.. c:type:: " . $name . "\n\n"; + # Sphinx 3.0 and up will emit warnings for "c:type:: struct Foo". + # It wants to see "c:struct:: Foo" (and will add the word 'struct' in + # the rendered output). + if ((split(/\./, $sphinx_version))[0] >= 3) { + my $sname = $name; + $sname =~ s/^struct //; + print "\n\n.. c:struct:: " . $sname . "\n\n"; + } else { + print "\n\n.. c:type:: " . $name . "\n\n"; + } print_lineno($declaration_start_line); $lineprefix = " "; output_highlight_rst($args{'purpose'}); From patchwork Tue Apr 14 16:26:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 185429 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1616779ilf; Tue, 14 Apr 2020 09:29:25 -0700 (PDT) X-Google-Smtp-Source: APiQypLeqYgOqUJ+6ATaP63knPslvU1xAwpnlPDzuJ8QZtGSG+5MKklRg4FdpfzyTfZrVWMKuCLV X-Received: by 2002:a37:9e92:: with SMTP id h140mr21663522qke.24.1586881765209; Tue, 14 Apr 2020 09:29:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586881765; cv=none; d=google.com; s=arc-20160816; b=yhHBz18/Sa+D4vhC2fsRd2/ZnaPePATxnu4cDqht7zh3lqrPlPRtEJ2F+eSS774BQY EJ6+Qc168n2w3fhXARdVtvRWqDZ1vhlDrke9UwFZsAAT7y5gjfFcZk6PcMZqhXvZbiJk zv9Gt3OTlRXM2nfRJbPO9j5tduRAb1MIP3xgYprFSKPU5lgQFFWa4PiRmZM3cygXAyyu D0ilghN9pnqnE+Zbdj1st8SgbixJCp3P59QZOghdy4n171d4OJc9ZuUulQa39wVsgAXI 3HMucoZtNf+zvMmJttm/6RM0Vq7o4tGFzImkPpdX+OJfiOyRBY8WIOkfnUOLpfDxlfh7 vgQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=xzNWaaDL+DDil6WrxdOdqg0SzbyTOIFf6u4kxUXo+R8=; b=DQLthbtTBzIK/bY2/xa2tfduubGRQn25zBKTsqmenLC5MiDDJoCOqylQ77bAWbdaAG ASmiubLRnWL/YKkyMOl70NMV73PlTkGP9mR1H182Bo/EwDt1zh+IvcxZ9sSLV1Ql0tfX BJoYopXCDgDmVSn8M5yPGJgAkc0l6oGn01d9kQh7ouAU3mNYGyMFAThTU3WoGNvNN/pc i8vc8B+Ya9nJsOLtTYNjP6gO/+kRNA4M5sr04JthDRh/rGWdwBggpbM4IAj1zAQ/P99L iIcxfbsJ3ITi7+CP3d+sj6wDJP5geHbz0VD9ctYEihgiZbOnVXmk1PJadO6mJS1d9k6s 2P9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p8FLOnJQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a19si8076415qkl.169.2020.04.14.09.29.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Apr 2020 09:29:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p8FLOnJQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOORA-0001Jn-HG for patch@linaro.org; Tue, 14 Apr 2020 12:29:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51706) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOOQ-0005KI-VA for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOOL-0007Dg-48 for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:34 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:35016) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOOOK-0007DQ-Uk for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:29 -0400 Received: by mail-wr1-x42e.google.com with SMTP id x18so10783076wrq.2 for ; Tue, 14 Apr 2020 09:26:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=xzNWaaDL+DDil6WrxdOdqg0SzbyTOIFf6u4kxUXo+R8=; b=p8FLOnJQlBKKGlqEkJaSOwVwWqxkc9kWdvzGo+dkhTod7kSnLZIltUfT4Szs94LBvg cphYOF23UXMOlofy8WrFTUnIAB9K9nxL0sGy/Ob0dz9aqHjXe6X0bbQEJi1hnDzJ+72Y uKt3HibFPTNPY/9KjwubMGVST4S3jXvktleZeasLn1K2YKuFHT0EB24lyepi/0VM2bue qDSuKYqa8U1hUFgn1qQOeqdv5U1kB5XViReNZajSsBByWI8gCuFpdzqzNv4iGYGs9EPX JfcvdH2WDlQ28wWD15PFUUHOCeWbFUM03+CQPSJ4xfwE2OjI8vlhHzIRca09bLsHEIGB 926A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xzNWaaDL+DDil6WrxdOdqg0SzbyTOIFf6u4kxUXo+R8=; b=sRNIL3nujIFqv1DG/lj2i1YjupQZMi89Cj3/y6ManVt773C9S+Gdj8Qj7BlMVC+4XS t6+sdJOxaHz+s/yMBmQ/3nxTb0NYHWeMdOLt6qT1Y1itmXkC6kTAYyl8V9HgApABqx7Q YVENXWc5cGISc/vBwxHlB/AQ61YyDJSozCfKasXifXVf/qcdqZvS9AGkb5VIXiS8We1Z hc2SjbDwPg6Uby44EIgxZoBenAYnqIuZdErdFyFLJG7w9HROFBdJEg+/kDhBOa7gSf1e y8f/hAz1rhLuqjJrADIivhXw4RC9Qjep9Vp1e21yHwUvIk17Jj5PhE5wkijt/qXmeqKy qXZg== X-Gm-Message-State: AGi0PubEVOSNjfyvFWP3LKNtEi1iTxMeE3IjmdWg4XDc2Uc6CVmaFPzZ N/Lg0NV/F5vqj/mQc+LqnC+b+l/2mnczjA== X-Received: by 2002:adf:e942:: with SMTP id m2mr24518353wrn.364.1586881587647; Tue, 14 Apr 2020 09:26:27 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id i129sm20003802wmi.20.2020.04.14.09.26.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:26:26 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 11/12] docs: Require Sphinx 1.6 or better Date: Tue, 14 Apr 2020 17:26:12 +0100 Message-Id: <20200414162613.4479-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414162613.4479-1-peter.maydell@linaro.org> References: <20200414162613.4479-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42e 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Versions of Sphinx older than 1.6 can't build all of our documentation, because they are too picky about the syntax of the argument to the option:: directive; see Sphinx bugs #646, #3366: https://github.com/sphinx-doc/sphinx/issues/646 https://github.com/sphinx-doc/sphinx/issues/3366 Trying to build with a 1.4.x Sphinx fails with docs/system/images.rst:4: SEVERE: Duplicate ID: "cmdoption-qcow2-arg-encrypt" and a 1.5.x Sphinx fails with docs/system/invocation.rst:544: WARNING: Malformed option description '[enable=]PATTERN', should look like "opt", "-opt args", "--opt args", "/opt args" or "+opt args" Update our needs_sphinx setting to indicate that we require at least 1.6. This will allow configure to fall back to "don't build the docs" rather than causing the build to fail entirely, which is probably what most users building on a host old enough to have such an old Sphinx would want; if they do want the docs then they'll have a useful indication of what they need to do (upgrade Sphinx!) rather than a confusing error message. In theory our distro support policy would suggest that we should support building on the Sphinx shipped in those distros, but: * EPEL7 has Sphinx 1.2.3 (which we've never supported!) * Debian Stretch has Sphinx 1.4.8 Trying to get our docs to work with Sphinx 1.4 is not tractable for the 5.0 release and I'm not sure it's worthwhile effort anyway; at least with this change the build as a whole now succeeds. Thanks to John Snow for doing the investigation and testing to confirm what Sphinx versions fail in what ways and what distros shipped what. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- docs/conf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/docs/conf.py b/docs/conf.py index 7768611e89c..d6e173ef77b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -59,8 +59,10 @@ sys.path.insert(0, os.path.join(qemu_docdir, "sphinx")) # If your documentation needs a minimal Sphinx version, state it here. # -# 1.3 is where the 'alabaster' theme was shipped with Sphinx. -needs_sphinx = '1.3' +# Sphinx 1.5 and earlier can't build our docs because they are too +# picky about the syntax of the argument to the option:: directive +# (see Sphinx bugs #646, #3366). +needs_sphinx = '1.6' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom From patchwork Tue Apr 14 16:26:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 185430 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1617386ilf; Tue, 14 Apr 2020 09:30:04 -0700 (PDT) X-Google-Smtp-Source: APiQypJVdEmuLe9F5xEcQRmPqdM7dyE7kcHYB+VFLX/OrI3ze0jIH2NvrJNCVDrr/rFfEjXQkTy/ X-Received: by 2002:a05:6214:727:: with SMTP id c7mr795928qvz.81.1586881804457; Tue, 14 Apr 2020 09:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586881804; cv=none; d=google.com; s=arc-20160816; b=kGu8lxA3kd01OzGNICIMV8qVSRfd5D9p0OU8EH3eeglrad2TfyCr6jYy3tEJ7gOqkU M3ZSRvXkJFiHLkxVRAhUZ3y/RPJGK2eOKwoN01l5mrxV0GR99bpaQv+u7Gk6gpJd2Liz i4OTF76IW0HJl4kFBXL711V3Zg2+vSL2SdcfurPkEmPvzhvwz99tMlGDu5HlIRQknB1T tHXnuyiQj1zCj5IHZMemz2f0jS1OnU9nUeLcDJElnDnAoymza4pnU91N5zZCMHz0nQSt FuJpx5GdMERWFzA05U3fDSAFO+XeQXMu66RlSgAzXn5h3mkW3C3dl26jJc5yF/Jd05P8 i/mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=on6om2BuBSGRUVifgjuA6roTR5aDCOVAu/rIcJHMwjY=; b=QYnHRja8bjSgu211LcuhoeytXyul5zBJukkWNCbFieac/BkCPltX3C6Icat/E3mRyf ya6yzMEPYbl2uU3Exflc2IyKZGqE09O6zyW4egqpf8soS64H8Rz2bTdqOzhIYUhdCPC0 RyLewklBVTl2uwfWO1yFACHS/dsBlZXeBWxA0qXpQFltPXWCRcSdl5zuKjqDm89P+SEY VIUyfelQ0K1FD4R4Bups4U0nT3x4ejo9CwaF0Uls94X3bOo64bBa7w8ftN///s9CBWvF SctMFQHKNDMnIQNauf6IfMdabtK3BFswcaUUrNd/J6heIIDRe9A1uMAmar0TRBDQ6Jdm xEzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X0TuT0aQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o2si2444172qkm.81.2020.04.14.09.30.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Apr 2020 09:30:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X0TuT0aQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOORn-0004BU-U6 for patch@linaro.org; Tue, 14 Apr 2020 12:30:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51713) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOOOR-0005M4-Nd for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOOOM-0007ER-50 for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:35 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:39644) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOOOL-0007Dp-U9 for qemu-devel@nongnu.org; Tue, 14 Apr 2020 12:26:30 -0400 Received: by mail-wr1-x441.google.com with SMTP id b11so3682561wrs.6 for ; Tue, 14 Apr 2020 09:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=on6om2BuBSGRUVifgjuA6roTR5aDCOVAu/rIcJHMwjY=; b=X0TuT0aQyZUWlhshx4MZ4QyeKNdTTjoXjWjQ7/dbGceLuYeL9CstQI2U/LoC9sKbSh Xkb6pDIEWJzYRdE2SWPEqu8IE7xyUi8liBWsMa2HbFCV0JLMP9mlFb/7gxPJCmJeJgtU kKD2IjGyTyBNdcafCoY/gK4NQQelbsxBl35BXrmQ+YOD7pbJpl3VOJEzUA9iIfquKFGH pQJFv8dfMhJX20Q7kAmVbYSw0hbWfZK1NfoNLQIdFT4SfH54T1XTjfAy6fJJCieS31nj 7nhG4MovcE4fgIJ1OW/Wle27eUr5ro+u4X04c4vnCnP+O9Carzn6C+PRu9BCwMWaagx9 UqkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=on6om2BuBSGRUVifgjuA6roTR5aDCOVAu/rIcJHMwjY=; b=BdmmilxJigM3tvBjzTKXduYzGcjvje7C7WTkjhN/ILJvifgiuYvNHviiQXgJB0JdWi CtsHDDJYFZD7nBcGO0bZjTuhWf5/+6So7JxRcop38cd9bYLtaid3XWoYveMsnN3TsdGl SYS5DEj3DA9q5X1MTaPxeuLCDVhBMQW4E5RjOW2jSCwmfXf48No6Xwh2WGPFNt/OTre+ 2nYMhtCi+vWUIvjsT7ABCwoo+HUoKCvZ6F62PHZxxLmHEBfiJBFy2qSqouyeXDndfF/P mq8PgfSouASDYLjU3AGGxm5FuiPZH1cAE+5J/Fvl5VBPF6RrWZ09+zbAjoPaW552ZIab EBCQ== X-Gm-Message-State: AGi0PuYC8jNef4gLXwqn2nZWNxV9IPDWqNQEcmYmBaForYWp7PH6ePgH MzanI1kviOP3eJ02U+b2GaoIxmSMeJj04g== X-Received: by 2002:adf:f5c4:: with SMTP id k4mr15019449wrp.294.1586881588674; Tue, 14 Apr 2020 09:26:28 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id i129sm20003802wmi.20.2020.04.14.09.26.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:26:28 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 12/12] Deprecate KVM support for AArch32 Date: Tue, 14 Apr 2020 17:26:13 +0100 Message-Id: <20200414162613.4479-13-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414162613.4479-1-peter.maydell@linaro.org> References: <20200414162613.4479-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The Linux kernel has dropped support for allowing 32-bit Arm systems to host KVM guests (kernel commit 541ad0150ca4aa663a2, which just landed upstream in the 5.7 merge window). Mark QEMU's support for this configuration as deprecated, so that we can delete that support code in 5.2. Signed-off-by: Peter Maydell Reviewed-by: Andrew Jones --- docs/system/deprecated.rst | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.20.1 diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index c633fe2beff..3142fac3865 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -336,6 +336,14 @@ The ``compat`` property used to set backwards compatibility modes for the processor has been deprecated. The ``max-cpu-compat`` property of the ``pseries`` machine type should be used instead. +KVM guest support on 32-bit Arm hosts (since 5.0) +''''''''''''''''''''''''''''''''''''''''''''''''' + +The Linux kernel has dropped support for allowing 32-bit Arm systems +to host KVM guests as of the 5.7 kernel. Accordingly, QEMU is deprecating +its support for this configuration and will remove it in a future version. +Running 32-bit guests on a 64-bit Arm host remains supported. + System emulator devices -----------------------