From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616596521; cv=none; d=zohomail.com; s=zohoarc; b=K2VUDynC8M3C1VCyps2kbFJxvs14BfyQzLDhOJ+2rzZPJpFL6Pa+LPLT8DEVJxTSHFxUlUqN60Yb+o+P25/VZ+Ze8rVUidboW4pTUVk1R8hrspdfCzC2VcqboRes49rTeORvbzyQ5vqQeMukby/Sek4TqJlXGSZw912IsEQDfew= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616596521; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SZD7khucdGcSc+2blD6LJsOrnrnjjxBS/+7VFFzHNQM=; b=Ms3ScKMUyjpnFww9HcJV3Ki+/mXANJUOtxf1V+Ov7grjF6qWIzy6EyfxuF5D14hv2G5TEBytYMnANtBFgbO40xur1nX6MEUbc0POnmuM4L5xGoisCarx1Ey8+xId7jBVxwzi179V61JdWqHMuWp6jL297JYVboYmoMjHBY6vv60= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161659652189190.86000124322527; Wed, 24 Mar 2021 07:35:21 -0700 (PDT) Received: from localhost ([::1]:56378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4bP-0002tN-Qh for importer@patchew.org; Wed, 24 Mar 2021 10:35:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4Wi-0006EF-9T for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:28 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:40859) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4Wf-0007Gv-MH for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:28 -0400 Received: by mail-wm1-x334.google.com with SMTP id y124-20020a1c32820000b029010c93864955so1305239wmy.5 for ; Wed, 24 Mar 2021 07:30:25 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u2sm3525600wrp.12.2021.03.24.07.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:30:22 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C652B1FF87; Wed, 24 Mar 2021 14:30:21 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SZD7khucdGcSc+2blD6LJsOrnrnjjxBS/+7VFFzHNQM=; b=ZO9bLnNXlkbd0inXyl3/CIme+EGPn3P3JvTOlpaEzvZaJto3P4uPuLAh2ms8wFCNBW YMXzxcK2vvOKurQj+eAzd9G+dvWvwwQ6ORuKR5+KrvJGgiWNr7M7tGsOzw8Yuvk8NbQ1 6+0rviZcRsDgyYaWKAUcnbe/bLdikF0Vse/KAmSNW9g4xi0eAI5YglFuASG7rE1ia2oL omM182IN9XVhPObN91Ju4nXQ2mHp003UqTWRtpXtvtFeFKoDUyx9AuU7/wAFs4AG5gk4 9dWhDjzjuGXZx6ennWtKdkCY+7/oNb+A5OUFsA69UFi7B2o/pr6qHXGQZOqTsMtvIedW LAaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SZD7khucdGcSc+2blD6LJsOrnrnjjxBS/+7VFFzHNQM=; b=Fw6RYla/F+boXr8+4TAc2QYvSF8cVm5gaIkRVpyghXuJBcuIFyFjh2Luz2qTY/duKX QcfNLwrrV9nl9nKB5nH4Gq1J3Gi+cMxUG6Iwiw7PfLOnLK0rHu/m7pRncQDhESWUPRQL gMUO5h58Wepuq6qfDxpCYPN2mPtIDHrLT/jxhAsSStjBZVsgeKUK2I4SdlpaG2vB+NwD mKqdsvlQhSJFjSew10q+be2SRbybjm727SBgnloStRk5hxGYnbk42Bq5Wv1v2OEIv+H2 E9YDnwTyttzR2O0ICyQl/JjqAP/EZPs95hYsuU4I5Cu6R1fW/t6munlWb7NrFsyg8dEI kr4Q== X-Gm-Message-State: AOAM530m8j+XJdV9CpomwwTJ/gZi69GZxvFhN5k17cQ2JL6ITsuIzVyc C0KimZLdU5kyZHW9fjyijSIrSw== X-Google-Smtp-Source: ABdhPJw7kVXwgksjRY+cz/jFLBk6gghwX0T0QTNLkbHwTKCE/dlwW74jQYsLNJNVeTWWilJ8MzYelw== X-Received: by 2002:a1c:a74b:: with SMTP id q72mr3213874wme.158.1616596223886; Wed, 24 Mar 2021 07:30:23 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 01/22] scripts/kernel-doc: strip QEMU_ from function definitions Date: Wed, 24 Mar 2021 14:30:00 +0000 Message-Id: <20210324143021.8560-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Some packaged versions of Sphinx (fedora33/alpine so far) have issues with the annotated C code that kernel-doc spits out. Without knowing about things like QEMU_PLUGIN_EXPORT it chokes trying to understand the code. Evidently this is a problem for the kernel as well as the long stream of regex substitutions we add to in this patch can attest. Fortunately we have a fairly common format for all our compiler shenanigans as applied to functions so lets just filter them all out. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Message-Id: <20210323165308.15244-2-alex.bennee@linaro.org> diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 4b19851b2d..240923d509 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1745,6 +1745,9 @@ sub dump_function($$) { )+ \)\)\s+//x; =20 + # Strip QEMU specific compiler annotations + $prototype =3D~ s/QEMU_[A-Z_]+ +//; + # Yes, this truly is vile. We are looking for: # 1. Return type (may be nothing if we're looking at a macro) # 2. Function name --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616596347; cv=none; d=zohomail.com; s=zohoarc; b=d6IALOPTVxxa+oEDrNVqx5EvrGeYliybtcs4pWHMijG+0Z17R7iDV5RWTr9fbLGNK+sHZbUiDyTR8rCWVFi+a5TEghaDr86X7JhY9ezRhHeyqv41bcDrORkk6J9FgmcXrm7TOTMeRZhvHLWTRWXIPaTVjJNmuFVPnfYbG/mh7Yw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616596347; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LoR6KdJgI9L3QJjbSS34AyLS8mbG6iWvfcan+tzTXxg=; b=f5Cn3SUK77fzWtZivDdhrvY/6lyTC1HZMhufecSlV0Bk4pvvSYqY3iXSmyvsTH6OjrCweN4Cl0F6N1rnOTMQoSr0URAelRGeO3hJwpr+H4BtcM3XacSiv0rRPAXnHGksIhqvHTLLtaBkqeQaipEYC6x/O2Dn0l+IMhnax1MMuvM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616596347069407.84807586681313; Wed, 24 Mar 2021 07:32:27 -0700 (PDT) Received: from localhost ([::1]:48054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4Yb-0007vJ-Q1 for importer@patchew.org; Wed, 24 Mar 2021 10:32:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4Wi-0006F1-Tt for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:29 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:41826) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4Wh-0007IN-9N for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:28 -0400 Received: by mail-wm1-x333.google.com with SMTP id t5-20020a1c77050000b029010e62cea9deso1334067wmi.0 for ; Wed, 24 Mar 2021 07:30:26 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id j123sm2746986wmb.1.2021.03.24.07.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:30:22 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DCE5C1FF8C; Wed, 24 Mar 2021 14:30:21 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LoR6KdJgI9L3QJjbSS34AyLS8mbG6iWvfcan+tzTXxg=; b=nGw+qVQeuntjzJRrP+ha2+vzGueFH1oxODHuM4U/yBZLNXyiVKr78QaRvWLGaT4s8n 0AKJcv6yyJyzd/VMKC9W0LkkOIQxDhOOcSDrHefwr/PX15hvAf/2jyZRQoywhoq7BkP8 i/gr3TKmyCSrRifhO05CfdBjQf6KYYmuFgXbhj2snLw/UvyVoqxNKB+b8xA23+Kg1SXW EBKeF5LYiHT7PqrqqG/B3d6x/V4U+mCV6+dlPncPr7KKdHr9ec6unDJN5LNa0et6CtTw 6gP1u46Znqc/cLFDw2UqFHXsEa7WWfsRaZRqytZzEYZ0kE6rmlOEf+1vQw/Wc+QSCUV1 Sx+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LoR6KdJgI9L3QJjbSS34AyLS8mbG6iWvfcan+tzTXxg=; b=eapeWSPXUw1mpYgkuK3LJTkG5UQgW6SVo0874k/v55+fvfe7WhMwJvtobmoZkj5Jx6 K42YkbA3MnwVHyhoUhWx5860z29YFJw0qkFae3L7yhKDqSsfd0V4Cx9lUANHZcIjFt3o 3a/hRes6EJFYUlW1BCI6cUYabxVe3LjwjVGqa9mP06ESe4geeagIWBG2NkGsyk9W4ize lLEn2j+tP/QSoV+PpmZyNep2tLbp6ylQU/v3dOft/XupMRoc0TiomZmTbw3bCvYVKYem WnZbb/DaNoVy/NdTXQgzAcwRMIglARtGFFVrTKpHAEit9LmnGj87e3fjUp3DcNvOO8Nz UVEQ== X-Gm-Message-State: AOAM5315LA1Yc1E0oYh0ZWCD4jA2etWFYJVwf9bvWDP4jbPs/ee6QAF/ cNGLQaZ4xRVpWmFs+f3E+ZsAAq4Yir2DFOY0 X-Google-Smtp-Source: ABdhPJz3do60GupdtH7XbItJcFDmcmhYpFJlKYi4iywX1wBckYSs9n0AvZxxJWobBH/lYzDrsS2Kow== X-Received: by 2002:a7b:cd8f:: with SMTP id y15mr3266788wmj.185.1616596225927; Wed, 24 Mar 2021 07:30:25 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 02/22] docs/devel: include the plugin API information from the headers Date: Wed, 24 Mar 2021 14:30:01 +0000 Message-Id: <20210324143021.8560-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aaron Lindsay , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We have kerneldoc tags for the headers so we might as well extract them into our developer documentation whilst we are at it. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Aaron Lindsay Message-Id: <20210323165308.15244-3-alex.bennee@linaro.org> diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 39ce86ed96..18c6581d85 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -63,6 +63,11 @@ valid during the lifetime of the callback so it is impor= tant that any information that is needed is extracted during the callback and saved by the plugin. =20 +API +=3D=3D=3D + +.. kernel-doc:: include/qemu/qemu-plugin.h + Usage =3D=3D=3D=3D=3D =20 --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616596370; cv=none; d=zohomail.com; s=zohoarc; b=T9yCXiN6rY7g35lPv3+LAnAoQ1jB5MjjAmtgXuT1uykjhao8+Ecbx/sTXbmJDGkc6qwdD1eFkjWGKWjn1ovU/iBfnNyBxtX3nDT0rZxYZK8awrzkJQ1S96bkUFtwfVt2ETg4L5vXs+wvL5tEeHAEe2Y0i0MpjwEMiuiCqEwtOvg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616596370; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kLzVba92sB3FPFp388sRp+Thx4lW+oVZeKfAa3xPR1Q=; b=DfjmzjA3xCZW+A4Fdowfps0DHm3dAQhC3DZIIKzX4Ez6c3cpXOTpqiLq1StEtkwcTYDsULRod5g6wCk4tdz3Fj65NGop/7THL8R4BvqTW7zkQPyzmqHO/DJqpnmiV1JhrVeWUeqms+eUEy5ZkrFrnjAl2pCgA+NBLbnL66XPplU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616596370212282.18457959464035; Wed, 24 Mar 2021 07:32:50 -0700 (PDT) Received: from localhost ([::1]:48356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4Yz-00082W-0Q for importer@patchew.org; Wed, 24 Mar 2021 10:32:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4Wk-0006Hx-UX for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:30 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:52854) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4Wj-0007KC-26 for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:30 -0400 Received: by mail-wm1-x334.google.com with SMTP id d191so13009972wmd.2 for ; Wed, 24 Mar 2021 07:30:28 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w6sm3410048wrl.49.2021.03.24.07.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:30:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F0EDB1FF8F; Wed, 24 Mar 2021 14:30:21 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kLzVba92sB3FPFp388sRp+Thx4lW+oVZeKfAa3xPR1Q=; b=adnG4M9CBykaDOtOvvr58emmLoAdPbBEwvf1Ill/6WfuUlotqVMemiATHnYKMT3Yni aVLGy0JQsv61e8RZzBZgxN9xQ5N7usT0BKe3GU4nVXk7e0mX6ixDsTFSeaABore8YC0R HVzlzprcLeZIwXySCWM4VRqP1tg7hYRawVtiH/JB2wC/kU0RhkPKujyiTonKqIMGQL6G 5X7kzbcYPAZ3qCXKq9ucUWg5roOg4+tmvy2OSurolC1uA+OK+o1lUEWqWqHUoCbsBoo6 sMAPgxfG8gEaAVNHEkOdmDs9+1O6Ud8vT3K8MX/kL6NLG6oAKoVlhcTJ1rBYgo/SIRLm wZZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kLzVba92sB3FPFp388sRp+Thx4lW+oVZeKfAa3xPR1Q=; b=Y1N8YiEFoD0YSwz4lF6BJ6rBiX628uFtnrRkhPDocU6bZLQCjhm33Gy5Tbxe//zrQ4 TUuDNjKgwRSMN1i75o3ioIXYt7dMV1U7PRAijJ6V73RSjvUvmjQi50sTuis7oixgU4k8 jZmvDFFdUwkBS1TPdSLhdZSaXcKUaCKgJEuGtdwDcdqkZKOjGvGWHteh+ERgODj/nHj1 +2w/VMQaTUNQ+FI/YgRaNqEsKAYIWwPD8yH2WrCWArIZ4Iv2xt34PwuzTvn8bHysHecN H5MbKRiU0NMyx/uVcI4tx20j+wm1tQWhKm54rGzzE24WqzM5qJ/OxmOw4gQk8R1LMe4Y XjTw== X-Gm-Message-State: AOAM530FvelZjnYdwh1WRge2tHV/6pzpAUW8t696tnr5PfZPRcpeKvzY MmlMyQ+5kDJI1ebNGWOUs0dQFw== X-Google-Smtp-Source: ABdhPJwqDJ9jr2T2R+l5b6m4DeZsVC/w7Ps0ME7YenKLhP23aGOW7RWaJSNg6Ue2OiSz5psxs55jHA== X-Received: by 2002:a1c:7d4e:: with SMTP id y75mr3266665wmc.168.1616596227741; Wed, 24 Mar 2021 07:30:27 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 03/22] docs/devel: expand style section of memory management Date: Wed, 24 Mar 2021 14:30:02 +0000 Message-Id: <20210324143021.8560-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This aims to provide a bit more guidance for those who take on one of our "clean up memory allocation" bite-sized tasks. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Message-Id: <20210323165308.15244-4-alex.bennee@linaro.org> diff --git a/docs/devel/style.rst b/docs/devel/style.rst index 8b0bdb3570..260e3263fa 100644 --- a/docs/devel/style.rst +++ b/docs/devel/style.rst @@ -385,17 +385,37 @@ avoided. Low level memory management =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D =20 -Use of the malloc/free/realloc/calloc/valloc/memalign/posix_memalign +Use of the ``malloc/free/realloc/calloc/valloc/memalign/posix_memalign`` APIs is not allowed in the QEMU codebase. Instead of these routines, -use the GLib memory allocation routines g_malloc/g_malloc0/g_new/ -g_new0/g_realloc/g_free or QEMU's qemu_memalign/qemu_blockalign/qemu_vfree -APIs. - -Please note that g_malloc will exit on allocation failure, so there -is no need to test for failure (as you would have to with malloc). -Calling g_malloc with a zero size is valid and will return NULL. - -Prefer g_new(T, n) instead of g_malloc(sizeof(T) ``*`` n) for the following +use the GLib memory allocation routines +``g_malloc/g_malloc0/g_new/g_new0/g_realloc/g_free`` +or QEMU's ``qemu_memalign/qemu_blockalign/qemu_vfree`` APIs. + +Please note that ``g_malloc`` will exit on allocation failure, so +there is no need to test for failure (as you would have to with +``malloc``). Generally using ``g_malloc`` on start-up is fine as the +result of a failure to allocate memory is going to be a fatal exit +anyway. There may be some start-up cases where failing is unreasonable +(for example speculatively loading a large debug symbol table). + +Care should be taken to avoid introducing places where the guest could +trigger an exit by causing a large allocation. For small allocations, +of the order of 4k, a failure to allocate is likely indicative of an +overloaded host and allowing ``g_malloc`` to ``exit`` is a reasonable +approach. However for larger allocations where we could realistically +fall-back to a smaller one if need be we should use functions like +``g_try_new`` and check the result. For example this is valid approach +for a time/space trade-off like ``tlb_mmu_resize_locked`` in the +SoftMMU TLB code. + +If the lifetime of the allocation is within the function and there are +multiple exist paths you can also improve the readability of the code +by using ``g_autofree`` and related annotations. See :ref:`autofree-ref` +for more details. + +Calling ``g_malloc`` with a zero size is valid and will return NULL. + +Prefer ``g_new(T, n)`` instead of ``g_malloc(sizeof(T) * n)`` for the foll= owing reasons: =20 * It catches multiplication overflowing size_t; @@ -409,8 +429,8 @@ Declarations like =20 are acceptable, though. =20 -Memory allocated by qemu_memalign or qemu_blockalign must be freed with -qemu_vfree, since breaking this will cause problems on Win32. +Memory allocated by ``qemu_memalign`` or ``qemu_blockalign`` must be freed= with +``qemu_vfree``, since breaking this will cause problems on Win32. =20 String manipulation =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @@ -485,6 +505,8 @@ In addition, QEMU assumes that the compiler does not us= e the latitude given in C99 and C11 to treat aspects of signed '<<' as undefined, as documented in the GNU Compiler Collection manual starting at version 4.0. =20 +.. _autofree-ref: + Automatic memory deallocation =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D =20 --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616596370; cv=none; d=zohomail.com; s=zohoarc; b=gjTsrnNWP5h3nXIMVLOvAVgBHfxCWwsD3s1W1PQJiQMcYboO6gJpO3WNtnt6z3XfeDSU3jg1ZT8G5glJMpluO9epwPr8KL/uQY18Ezo51sG32KYpYsE8lGe4/dIK1IBLECH/rfBCVfDUISP1apceQZd+aP+h9YuxcuqFi6kd4Zc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616596370; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PaDgr+5ItkcZ/CJQx3dfdKXW7BWt6FoKuOekenfvtes=; b=JUdqahPihV17b3kXANHQ9Tf+6jsRb66xmMMZqQxxjt0mbMrm8cKIVuQKAvgIm9Adft1JQPhcmaJCoqtz8SBxfMCefqBByM0LXdutjv/qXimAlwOgp5ggkRpy5ZqGp1yeyS8lHIwVNhFV67NCucmmm88qyYmt+Yn2p+l2sNOguqQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616596370641988.848743824129; Wed, 24 Mar 2021 07:32:50 -0700 (PDT) Received: from localhost ([::1]:48412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4Yz-00083r-En for importer@patchew.org; Wed, 24 Mar 2021 10:32:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4Wm-0006KH-Hd for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:32 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:34679) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4Wk-0007Kp-Mb for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:32 -0400 Received: by mail-wr1-x429.google.com with SMTP id j7so24687465wrd.1 for ; Wed, 24 Mar 2021 07:30:30 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s9sm3047150wmh.31.2021.03.24.07.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:30:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1229F1FF90; Wed, 24 Mar 2021 14:30:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PaDgr+5ItkcZ/CJQx3dfdKXW7BWt6FoKuOekenfvtes=; b=ubQNhG8kVhkRLawbFS2Plko7ii6srVsy2TwMG4fHzSl69bEncBO0EtqgicFg6/4vSP YjnxQMW0Y7eUpabKd8YIJRfNj9ooqzbTY0CAKLvCJ3FdxvUMwrn6A9Vlx3cS3pSXo3PV IeFg/JbM3WwcJ4nsRv6iMZwxKdGw1lm55IoExS2gsmQm32hEr90m76waOxA5L+P5cgRy +TTs0XoHegJw0/t2wilef1zyC0XfM51zeE9nmzl6RgfKMUheMS/4aA7axIy0oQJQ2Rvk iDBzK+0TIg/XCksCzmrHAKVlgMmhYBIH+md967ywh6qVsnmKTzwhciizXmVTFrK2i/Fs kl+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PaDgr+5ItkcZ/CJQx3dfdKXW7BWt6FoKuOekenfvtes=; b=BvDGT8bNXbj/SmydovYhOcxokSMbOdtEVIBvf5Xr2+l5lQV7Df0ktsUwmGqllfNqvA JitUpgaPvPiHsWJw0CIgG9+tWGlRldM9ZbxFFuC0YTt6NE3kMBu2epJx8JTrCwMGrLa/ M/8IOexQoORA2mgGSHf8/clicQG2MKSq19lhrK/4SJF57sZzxf+tr/uwhZvIeXvcGJIz iOE85B8z+ybXzGpXTLxBJKwFFtJfkiK72LDTI2pvPq22VvjcMResBg5rNGOIsv+EmO8E K2BrRVW3m6hU/EEPomzTWOML9aT5ERMVRmXn9L0/n58/gAKUl6Rw249JglxrrkT94NUy vaxg== X-Gm-Message-State: AOAM533RabbKXWDz5Z6x7FJ/ocAMXJUT3FqYGvgUmIYrVNSdAwFm7Klu pKb3iqXkwhOfXHlQnC2hAnUwuA== X-Google-Smtp-Source: ABdhPJxBg0AwpKtSBhvioA1oQsnd6FwR7oZxpjJL2ZBBiGtoN8/Q0Tx7f/boawfJnsgd/YwpVg4Rbg== X-Received: by 2002:a5d:4e43:: with SMTP id r3mr3730027wrt.280.1616596229376; Wed, 24 Mar 2021 07:30:29 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 04/22] tools/virtiofsd: include --socket-group in help Date: Wed, 24 Mar 2021 14:30:03 +0000 Message-Id: <20210324143021.8560-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Connor Kuehl , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, Stefan Hajnoczi , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) I confused myself wandering if this had been merged by looking at the help output. It seems fuse_opt doesn't automagically add to help output so lets do it now. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Connor Kuehl Reviewed-by: Stefan Hajnoczi Updates: f6698f2b03 ("tools/virtiofsd: add support for --socket-group") Message-Id: <20210323165308.15244-5-alex.bennee@linaro.org> diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lowleve= l.c index 1aa26c6333..58e32fc963 100644 --- a/tools/virtiofsd/fuse_lowlevel.c +++ b/tools/virtiofsd/fuse_lowlevel.c @@ -2450,6 +2450,7 @@ void fuse_lowlevel_help(void) printf( " -o allow_root allow access by root\n" " --socket-path=3DPATH path for the vhost-user socket\n" + " --socket-group=3DGRNAME name of group for the vhost-user= socket\n" " --fd=3DFDNUM fd number of vhost-user socket\n" " --thread-pool-size=3DNUM thread pool size limit (default = %d)\n", THREAD_POOL_SIZE); --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616596704; cv=none; d=zohomail.com; s=zohoarc; b=jC/ifYmv2rMnS257Y4P7EBMYYsbV9Cr9LHPVXejqWZYL2SAy7zhUGhQMmPk3FdiuEGg0+E9qQe3IqYnsAXZHhgpLgFvXLC2g+IjTR/YrqK114FN/7WEJ+eGMMwobuC7+YC+2jUsL540BEOuk+f4tuA/TzXYcdZp2bvboqGGpjGI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616596704; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LbNG8pxBZeg2tueV/MXMEFWuxawjlIZ4kqf9FTBm5JU=; b=i/Km9cLrRhU4D1bTCaHgb2B62LhUPqLnN88LluNfRW14HGSt3TQgyIXMOfi2YPibpt/3JuGgneYbyU+Zw8Ncw+v+h4L+BQcUNsZ6yMO0cTlle7dtghGEWTc6W1OtzkXF/htsdguKwKmnqNUM//PnhJB052g0yB2ZzqEosCCNFuY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616596704559358.56686462126993; Wed, 24 Mar 2021 07:38:24 -0700 (PDT) Received: from localhost ([::1]:36660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4eM-0006QF-6P for importer@patchew.org; Wed, 24 Mar 2021 10:38:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4Wq-0006T4-Oo for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:36 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:46024) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4Wl-0007L0-Pb for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:36 -0400 Received: by mail-wr1-x42c.google.com with SMTP id 14so1443540wrz.12 for ; Wed, 24 Mar 2021 07:30:31 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b15sm2898718wmd.41.2021.03.24.07.30.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:30:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3AC651FF91; Wed, 24 Mar 2021 14:30:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LbNG8pxBZeg2tueV/MXMEFWuxawjlIZ4kqf9FTBm5JU=; b=wk+XNnQSptklNLyMVD8uRXuwftdTfpVboeoQKNLeaEFTZd7Kq6m/B7y51fbUxTVAq2 RvQ3tk5DBdIJ4GjHcuUffuTufNJaPEg13UH7NCsaUDxNGVgiKYtHxDufp05u83Qr+/G7 xhKhX1A/E/X2ARSaohupoPEvHA396xO+/dnscMOx+4YHKPLtGreRxASgTDYugeRhvHMV OEngfA53FYpJZAbbABEtv5KnOPXrPVLXSbf3k7XfqpyiycqJv57/C6XrA81b4QOr4QLY vEXDXstOCeD/wBWrxBp10GZA5s3MEf2LAlrX4WpN/eraof9j18SKq3jPx1hrT7q2bAj8 CIbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LbNG8pxBZeg2tueV/MXMEFWuxawjlIZ4kqf9FTBm5JU=; b=Tuvp4ffNPRuMsNZyKN7RTePF5MrlNjZHaxqrgO3JpJAc9uJ+A+EFPBzEgEZlXjCEW0 fe7FeEKH0NlJet61aCdNtqjyHhpTmn0XJD3noDmtHjzWrIkxULu+Pc70vOxjGYNDddDe utLqZoYDCt14hZZdim/BSma6uaZ2q5hypULUSzHp3iHTFiv5r1OSQvMuqxdTBGKD6aj4 VuwarWZr+1gkt/zsg/G9J6PZe9OFfoiSzMxqHvE3o7heBZVLyJzflRVabdHpwYMwztJt qHfaLYP2jkNLVmiarf8+ZKgwT5v3i55nsEw+5ECw4nBYMUerJlSzPqGywKuaraUqL205 PUwg== X-Gm-Message-State: AOAM5333T1zVvbJNdKY05qpfGo/4OG5jGztfPU8ot2OPu5qns9EDVBTK pRdKC3pgM88TdR3C8IykvI7fZw== X-Google-Smtp-Source: ABdhPJy6EOB+cp+f099fQ5mJpquM90hex73TVlnMopeATJLL7mK6A8QiXf4RYnYuwVTqzOtoGc6Dtg== X-Received: by 2002:adf:f0cb:: with SMTP id x11mr3734548wro.206.1616596230264; Wed, 24 Mar 2021 07:30:30 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 05/22] semihosting: move semihosting tests to multiarch Date: Wed, 24 Mar 2021 14:30:04 +0000 Message-Id: <20210324143021.8560-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , "open list:ARM TCG CPUs" , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) It may be arm-compat-semihosting but more than one architecture uses it so lets move the tests into the multiarch area. We gate it on the feature and split the semicall.h header between the arches. Also clean-up a bit of the Makefile messing about to one common set of runners. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Message-Id: <20210323165308.15244-6-alex.bennee@linaro.org> diff --git a/tests/tcg/aarch64/semicall.h b/tests/tcg/aarch64/semicall.h new file mode 100644 index 0000000000..8a3fce35c5 --- /dev/null +++ b/tests/tcg/aarch64/semicall.h @@ -0,0 +1,18 @@ +/* + * Semihosting Tests - AArch64 helper + * + * Copyright (c) 2019 + * Written by Alex Benn=C3=A9e + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +uintptr_t __semi_call(uintptr_t type, uintptr_t arg0) +{ + register uintptr_t t asm("x0") =3D type; + register uintptr_t a0 asm("x1") =3D arg0; + asm("hlt 0xf000" + : "=3Dr" (t) + : "r" (t), "r" (a0)); + return t; +} diff --git a/tests/tcg/arm/semicall.h b/tests/tcg/arm/semicall.h index d4f6818192..ad8ac51310 100644 --- a/tests/tcg/arm/semicall.h +++ b/tests/tcg/arm/semicall.h @@ -1,5 +1,5 @@ /* - * Semihosting Tests + * Semihosting Tests - ARM Helper * * Copyright (c) 2019 * Written by Alex Benn=C3=A9e @@ -7,13 +7,8 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ =20 -#define SYS_WRITE0 0x04 -#define SYS_READC 0x07 -#define SYS_REPORTEXC 0x18 - uintptr_t __semi_call(uintptr_t type, uintptr_t arg0) { -#if defined(__arm__) register uintptr_t t asm("r0") =3D type; register uintptr_t a0 asm("r1") =3D arg0; #ifdef __thumb__ @@ -23,13 +18,5 @@ uintptr_t __semi_call(uintptr_t type, uintptr_t arg0) #endif asm(SVC : "=3Dr" (t) : "r" (t), "r" (a0)); -#else - register uintptr_t t asm("x0") =3D type; - register uintptr_t a0 asm("x1") =3D arg0; - asm("hlt 0xf000" - : "=3Dr" (t) - : "r" (t), "r" (a0)); -#endif - return t; } diff --git a/tests/tcg/riscv64/semicall.h b/tests/tcg/riscv64/semicall.h new file mode 100644 index 0000000000..f8c88f32dc --- /dev/null +++ b/tests/tcg/riscv64/semicall.h @@ -0,0 +1,22 @@ +/* + * Semihosting Tests - RiscV64 Helper + * + * Copyright (c) 2021 + * Written by Alex Benn=C3=A9e + * + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +uintptr_t __semi_call(uintptr_t type, uintptr_t arg0) +{ + register uintptr_t t asm("a0") =3D type; + register uintptr_t a0 asm("a1") =3D arg0; + asm(".option norvc\n\t" + ".balign 16\n\t" + "slli zero, zero, 0x1f\n\t" + "ebreak\n\t" + "srai zero, zero, 0x7\n\t" + : "=3Dr" (t) + : "r" (t), "r" (a0)); + return t; +} diff --git a/tests/tcg/arm/semiconsole.c b/tests/tcg/multiarch/arm-compat-s= emi/semiconsole.c similarity index 93% rename from tests/tcg/arm/semiconsole.c rename to tests/tcg/multiarch/arm-compat-semi/semiconsole.c index 6ef0bd2450..1d82efc589 100644 --- a/tests/tcg/arm/semiconsole.c +++ b/tests/tcg/multiarch/arm-compat-semi/semiconsole.c @@ -7,6 +7,8 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ =20 +#define SYS_READC 0x07 + #include #include #include "semicall.h" diff --git a/tests/tcg/arm/semihosting.c b/tests/tcg/multiarch/arm-compat-s= emi/semihosting.c similarity index 85% rename from tests/tcg/arm/semihosting.c rename to tests/tcg/multiarch/arm-compat-semi/semihosting.c index 33faac9916..b3fd16cd12 100644 --- a/tests/tcg/arm/semihosting.c +++ b/tests/tcg/multiarch/arm-compat-semi/semihosting.c @@ -7,12 +7,15 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ =20 +#define SYS_WRITE0 0x04 +#define SYS_REPORTEXC 0x18 + #include #include "semicall.h" =20 int main(int argc, char *argv[argc]) { -#if defined(__arm__) +#if UINTPTR_MAX =3D=3D UINT32_MAX uintptr_t exit_code =3D 0x20026; #else uintptr_t exit_block[2] =3D {0x20026, 0}; diff --git a/MAINTAINERS b/MAINTAINERS index 10ed6d7624..554be84b32 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3286,6 +3286,7 @@ M: Alex Benn=C3=A9e S: Maintained F: semihosting/ F: include/semihosting/ +F: tests/tcg/multiarch/arm-compat-semi/ =20 Multi-process QEMU M: Elena Ufimtseva diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index 24d75a5801..cab8c6b3a2 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -32,6 +32,9 @@ all: -include ../../../config-host.mak -include ../config-$(TARGET).mak +ifeq ($(CONFIG_USER_ONLY),y) +-include $(SRC_PATH)/default-configs/targets/$(TARGET).mak +endif =20 # for including , in command strings COMMA :=3D , diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile= .target index bf53ad0087..56e48f4b34 100644 --- a/tests/tcg/aarch64/Makefile.target +++ b/tests/tcg/aarch64/Makefile.target @@ -41,24 +41,6 @@ AARCH64_TESTS +=3D mte-1 mte-2 mte-3 mte-4 mte-%: CFLAGS +=3D -march=3Darmv8.5-a+memtag endif =20 -# Semihosting smoke test for linux-user -AARCH64_TESTS +=3D semihosting -run-semihosting: semihosting - $(call run-test,$<,$(QEMU) $< 2> $<.err, "$< on $(TARGET_NAME)") - -run-plugin-semihosting-with-%: - $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \ - -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \ - $(call strip-plugin,$<) 2> $<.err, \ - "$< on $(TARGET_NAME) with $*") - -AARCH64_TESTS +=3D semiconsole -run-semiconsole: semiconsole - $(call skip-test, $<, "MANUAL ONLY") - -run-plugin-semiconsole-with-%: - $(call skip-test, $<, "MANUAL ONLY") - ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_SVE),) # System Registers Tests AARCH64_TESTS +=3D sysregs diff --git a/tests/tcg/arm/Makefile.target b/tests/tcg/arm/Makefile.target index ec95156562..5ab59ed6ce 100644 --- a/tests/tcg/arm/Makefile.target +++ b/tests/tcg/arm/Makefile.target @@ -29,37 +29,31 @@ run-fcvt: fcvt $(call run-test,fcvt,$(QEMU) $<,"$< on $(TARGET_NAME)") $(call diff-out,fcvt,$(ARM_SRC)/fcvt.ref) =20 +ifeq ($(CONFIG_ARM_COMPATIBLE_SEMIHOSTING),y) + # Semihosting smoke test for linux-user -ARM_TESTS +=3D semihosting semihosting: CFLAGS +=3D -mthumb -run-semihosting: semihosting - $(call run-test,$<,$(QEMU) $< 2> $<.err, "$< on $(TARGET_NAME)") =20 ARM_TESTS +=3D semihosting-arm -semihosting-arm: CFLAGS +=3D -marm +semihosting-arm: CFLAGS +=3D -marm -I$(SRC_PATH)/tests/tcg/$(TARGET_NAME) semihosting-arm: semihosting.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) =20 run-semihosting-arm: semihosting-arm $(call run-test,$<,$(QEMU) $< 2> $<.err, "$< on $(TARGET_NAME)") =20 -run-plugin-semihosting-with-%: +run-plugin-semihosting-arm-with-%: $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \ -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \ $(call strip-plugin,$<) 2> $<.err, \ "$< on $(TARGET_NAME) with $*") =20 -ARM_TESTS +=3D semiconsole semiconsole-arm +ARM_TESTS +=3D semiconsole-arm =20 semiconsole: CFLAGS +=3D -mthumb -run-semiconsole: semiconsole - $(call skip-test, $<, "MANUAL ONLY") =20 -run-plugin-semiconsole-with-%: - $(call skip-test, $<, "MANUAL ONLY") - -semiconsole-arm: CFLAGS +=3D -marm -semiconsole-arm: semiconsole.c +semiconsole-arm: CFLAGS +=3D -marm -I$(SRC_PATH)/tests/tcg/$(TARGET_NAME) +semiconsole-arm: semihosting.c $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) =20 run-semiconsole-arm: semiconsole-arm @@ -68,6 +62,8 @@ run-semiconsole-arm: semiconsole-arm run-plugin-semiconsole-arm-with-%: $(call skip-test, $<, "MANUAL ONLY") =20 +endif + ARM_TESTS +=3D commpage =20 TESTS +=3D $(ARM_TESTS) diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Make= file.target index abbdb2e126..a3a751723d 100644 --- a/tests/tcg/multiarch/Makefile.target +++ b/tests/tcg/multiarch/Makefile.target @@ -69,6 +69,37 @@ run-gdbstub-%: endif EXTRA_RUNS +=3D run-gdbstub-sha1 run-gdbstub-qxfer-auxv-read =20 +# ARM Compatible Semi Hosting Tests +# +# Despite having ARM in the name we actually have several +# architectures that implement it. We gate the tests on the feature +# appearing in config. +# +ifeq ($(CONFIG_ARM_COMPATIBLE_SEMIHOSTING),y) +VPATH +=3D $(MULTIARCH_SRC)/arm-compat-semi + +# Add -I path back to TARGET_NAME for semicall.h +semihosting: CFLAGS+=3D-I$(SRC_PATH)/tests/tcg/$(TARGET_NAME) + +run-semihosting: semihosting + $(call run-test,$<,$(QEMU) $< 2> $<.err, "$< on $(TARGET_NAME)") + +run-plugin-semihosting-with-%: + $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \ + -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \ + $(call strip-plugin,$<) 2> $<.err, \ + "$< on $(TARGET_NAME) with $*") + +semiconsole: CFLAGS+=3D-I$(SRC_PATH)/tests/tcg/$(TARGET_NAME) + +run-semiconsole: semiconsole + $(call skip-test, $<, "MANUAL ONLY") + +run-plugin-semiconsole-with-%: + $(call skip-test, $<, "MANUAL ONLY") + +TESTS +=3D semihosting semiconsole +endif =20 # Update TESTS TESTS +=3D $(MULTIARCH_TESTS) --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616596536; cv=none; d=zohomail.com; s=zohoarc; b=NAFquQdWGPcs9BwFVyS0obxjc/TuajOqhz65DCCJyfN7VPmcywm9er6l1oCJ7LxXabCA3JiWAUKj89jngO+PpZZUzTrJSDGrhDvsAaYpGpPQkrTgM6wGBpU6ksYmBGL0yVpYPmILwSP+uHWKvQjYZa/mhK0PlT3XcZUpKvRyF6Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616596536; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xPK6HS62SnTfNvabHBBC22/tzKk4JYeDFr2rp0SujyI=; b=NwMTj2QligMViuTwYXH95IeH8I97Bbaa8WSTiyfsXq2Q5sJou9WfDuOdGT57HwFCN1pHLzRKeo/242e8iIsKXwMDCkJslmlVnzTz11hAFO1tz2Ntlktl1ekNzw38Yhiql0D6MwurfRFm1lYRIf5fI5geGLUOB14jZAyL/FCcICg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616596535755148.45710419680336; Wed, 24 Mar 2021 07:35:35 -0700 (PDT) Received: from localhost ([::1]:56902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4bX-000369-2O for importer@patchew.org; Wed, 24 Mar 2021 10:35:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4Ws-0006Vg-40 for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:38 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:33603) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4Wq-0007NF-74 for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:37 -0400 Received: by mail-wm1-x32d.google.com with SMTP id w203-20020a1c49d40000b029010c706d0642so2817710wma.0 for ; Wed, 24 Mar 2021 07:30:35 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q15sm3321553wrr.58.2021.03.24.07.30.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:30:26 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5124E1FF92; Wed, 24 Mar 2021 14:30:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xPK6HS62SnTfNvabHBBC22/tzKk4JYeDFr2rp0SujyI=; b=yE2FcFsYrYJT31CK77sFtSy/8Z8nIY9K3pnoZP0NT/54cp4ApXVbG+vftDaW/B1sxl EAqOgmFtXarpLWT3bh2barFHmjKksv6PAsKleENXvcG0lL6+Jh/h5p0ihAbSdSJ2LSWe EXEs0ETuPF6/wOH6AVQuJe/77lH+eriFe6WRQPya7ppdxZGNGKl+pPNrrL5QyUJ0EXYl cgGCLL035s1Q6uhu0D7zl5ektQgA7DKdyYL9SOPSVqUksxJCEAOYVfGi+v/8FlI5wCNd YdA8nFGxe4DOqIYFdh34A4IFQnwSZNd653j+Ozm+gEphK++Pad9OLrRXwc6G0Q1H2/yb WDeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xPK6HS62SnTfNvabHBBC22/tzKk4JYeDFr2rp0SujyI=; b=khCPq5bvndpXToGz/N45o62aSiNQsHUDC63wQL3Ycd0uFgM4/rnYur9wv7pzX1qSKG NXR8kie7aegIY+h24RNPFOS400038de046GjaSrC6Z10BbLC9MlXC2WESdw0d9/trs20 uChzIp35HZPsqBO/hVe9LUM7K29G3L8yxAjPtOqrPG394aMOL9zh8UoYHlOROGyqb0f5 9tvdDA/Q56cJnkTwzIJCrUWQX2GpU0ZiTnQ0M15hoykpbdMfv06QdWzJo074Nd+IHghj GClcolwqwyyBqfzjKj2xKhOTPCbtTaY9MNVmNOnJblWEvSfT8rD6jbuu7ab+PJNPiipc rYAQ== X-Gm-Message-State: AOAM532aNyMddTaKCYWeraMSHYRCIQv2rRk4OTDzKLh9Px6jns71SBc3 lwUXPOF4XGEqGF4ynGMBWlbupw== X-Google-Smtp-Source: ABdhPJwkoN8nBRkQ9piqjkMI+UgmAFOOfzzfzmQtEX3iledI9adoBeIKG29njRg979UCI0oxjWLHSw== X-Received: by 2002:a05:600c:4ba2:: with SMTP id e34mr3263525wmp.121.1616596234789; Wed, 24 Mar 2021 07:30:34 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 06/22] semihosting/arm-compat-semi: unify GET/SET_ARG helpers Date: Wed, 24 Mar 2021 14:30:05 +0000 Message-Id: <20210324143021.8560-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Keith Packard , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) >>>From the semihosting point of view what we want to know is the current mode of the processor. Unify this into a single helper and allow us to use the same GET/SET_ARG helpers for the rest of the code. Having the helper will also be useful later. Note: we aren't currently testing riscv32 due to missing toolchain for check-tcg tests. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Peter Maydell Reviewed-by: Keith Packard Message-Id: <20210323165308.15244-7-alex.bennee@linaro.org> diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index 94950b6c56..0f0e129a7c 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -767,15 +767,28 @@ static const GuestFDFunctions guestfd_fns[] =3D { }, }; =20 -/* Read the input value from the argument block; fail the semihosting - * call if the memory read fails. +/* + * Read the input value from the argument block; fail the semihosting + * call if the memory read fails. Eventually we could use a generic + * CPUState helper function here. */ -#ifdef TARGET_ARM +static inline bool is_64bit_semihosting(CPUArchState *env) +{ +#if defined(TARGET_ARM) + return is_a64(env); +#elif defined(TARGET_RISCV) + return !riscv_cpu_is_32bit(env); +#else +#error un-handled architecture +#endif +} + + #define GET_ARG(n) do { \ - if (is_a64(env)) { \ + if (is_64bit_semihosting(env)) { \ if (get_user_u64(arg ## n, args + (n) * 8)) { \ errno =3D EFAULT; \ - return set_swi_errno(cs, -1); \ + return set_swi_errno(cs, -1); \ } \ } else { \ if (get_user_u32(arg ## n, args + (n) * 4)) { \ @@ -786,41 +799,10 @@ static const GuestFDFunctions guestfd_fns[] =3D { } while (0) =20 #define SET_ARG(n, val) \ - (is_a64(env) ? \ + (is_64bit_semihosting(env) ? \ put_user_u64(val, args + (n) * 8) : \ put_user_u32(val, args + (n) * 4)) -#endif =20 -#ifdef TARGET_RISCV - -/* - * get_user_ual is defined as get_user_u32 in softmmu-semi.h, - * we need a macro that fetches a target_ulong - */ -#define get_user_utl(arg, p) \ - ((sizeof(target_ulong) =3D=3D 8) ? \ - get_user_u64(arg, p) : \ - get_user_u32(arg, p)) - -/* - * put_user_ual is defined as put_user_u32 in softmmu-semi.h, - * we need a macro that stores a target_ulong - */ -#define put_user_utl(arg, p) \ - ((sizeof(target_ulong) =3D=3D 8) ? \ - put_user_u64(arg, p) : \ - put_user_u32(arg, p)) - -#define GET_ARG(n) do { \ - if (get_user_utl(arg ## n, args + (n) * sizeof(target_ulong))) { \ - errno =3D EFAULT; \ - return set_swi_errno(cs, -1); \ - } \ - } while (0) - -#define SET_ARG(n, val) \ - put_user_utl(val, args + (n) * sizeof(target_ulong)) -#endif =20 /* * Do a semihosting call. --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616596539; cv=none; d=zohomail.com; s=zohoarc; b=KQKDYZ/RyGEaSFlec97sMpsP9edTrd1pVBUBRVBI9rcw1MaeymAJewWhXbv81icE37MTy1tLvw0cNhLmVpo9IQjXFuImwLQT+d5rircxXzQEZDj4q9hVZ2/hN7A3kjMvl/jyY/8BzJv7bX9nSh3FECLYyUV/lW7Nn1excVX2B8A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616596539; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6sNcGE+fxfYDvF8wTWBRRUANizKHbS8OY1p/YPeXwYg=; b=nCi/HmS3+yCl1lf5R9X33Hu+fuvKUl/HU7X6BQIKWYrsDrm56SMxOIF0HVRUjjbXBUztt441TXhy/j+CbsM5Oe4WhsBbRXSlNUtfgWSPVtaWwlvriEAmnd5Kp6V93t5KbF0ECVCRFi9P8IUtLNb53F6e+q/b710Dz70byDTmdwU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616596539771842.341675193465; Wed, 24 Mar 2021 07:35:39 -0700 (PDT) Received: from localhost ([::1]:57744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4bi-0003QP-6e for importer@patchew.org; Wed, 24 Mar 2021 10:35:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4Wq-0006Rd-3J for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:36 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:42879) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4Wn-0007Mr-CI for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:35 -0400 Received: by mail-wr1-x42e.google.com with SMTP id x13so24655521wrs.9 for ; Wed, 24 Mar 2021 07:30:32 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v14sm3234965wrd.48.2021.03.24.07.30.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:30:26 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6598B1FF93; Wed, 24 Mar 2021 14:30:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6sNcGE+fxfYDvF8wTWBRRUANizKHbS8OY1p/YPeXwYg=; b=q1D5XAJXxz/IjI2QtEcZ6MaZFNkIOgUblNX80XEri///tovh+QEARHnbDk7QZlnp/O 01JEtIdsVLeLaRMF8mPHOhm9JlUTp/4iePTRreiTVc2R4oLGLVpX9AYmgexeKB4OZCG0 +lk7MNz7h7CO1z/aUErKjmgtzB430MEU23pTqCIKl7bpZCFROoTzDTotKSMVuWk4yRwl XFSU1vkmxNZ3l/m36i2GQc6V8Z+tAhnPMI+auZcB1/kSf6ErhfiN9zJSsWPJwWLF7od6 BZXfDZthZbKBX7/dbnClsDPfWWQut5NWoIQg0Iya8MzytXExTI95OL7xBo7TBVwuoGym ry9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6sNcGE+fxfYDvF8wTWBRRUANizKHbS8OY1p/YPeXwYg=; b=mGI86L+khHIH7GbT1PTwudEB4iEkh2BWVdEjZbS3MI/9OZymiiHWSkxhadmpgb/rde CrFMEv+CHk+ERPE4l0diYXlIKxLluug0zINZPGN+5zIzOdQzIx2quPo3L/8JX/Rdi2Lt z/oN/GNeBlDiPdcFtTtnA65an+4JhwJv36Js2L8ENfN0wPqp8ByOegQqyzh05hSZJbrx 90qmXCR+63y9YKe7+CXJAhG2A1z1ZaXm2rNcuh9CRy16gJF64yryDBNvkMgJkTGYZBdm ygz+BoXqFKCfYJH94FEPVbpZD44g+qdzZm98ajfeeO/zOKuYKKGE/N651UQdcl7+Yz1n okjQ== X-Gm-Message-State: AOAM530XRlHnReiHEW/qFxvI8bLeagUepnWt79iEf0PCW04xzK2B8899 fnJ4LoedhsnnTUNj6IaHUiMagkXJtJ2VLep5 X-Google-Smtp-Source: ABdhPJyhHCKpu26GCsjevqQCDNNB00XBR1PhsWlGycDMT6kQyfuI8miLAEdwOqLTJjH4V8ro9oojsw== X-Received: by 2002:adf:e392:: with SMTP id e18mr3941538wrm.189.1616596231935; Wed, 24 Mar 2021 07:30:31 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 07/22] semihosting/arm-compat-semi: don't use SET_ARG to report SYS_HEAPINFO Date: Wed, 24 Mar 2021 14:30:06 +0000 Message-Id: <20210324143021.8560-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bug 1915925 <1915925@bugs.launchpad.net>, Keith Packard , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) As per the spec: the PARAMETER REGISTER contains the address of a pointer to a four-field data block. So we need to follow arg0 and place the results of SYS_HEAPINFO there. Fixes: 3c37cfe0b1 ("semihosting: Change internal common-semi interfaces to = use CPUState *") Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Peter Maydell Cc: Bug 1915925 <1915925@bugs.launchpad.net> Cc: Keith Packard Bug: https://bugs.launchpad.net/bugs/1915925 Message-Id: <20210323165308.15244-8-alex.bennee@linaro.org> diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index 0f0e129a7c..fe079ca93a 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -1214,7 +1214,11 @@ target_ulong do_common_semihosting(CPUState *cs) for (i =3D 0; i < ARRAY_SIZE(retvals); i++) { bool fail; =20 - fail =3D SET_ARG(i, retvals[i]); + if (is_64bit_semihosting(env)) { + fail =3D put_user_u64(retvals[i], arg0 + i * 8); + } else { + fail =3D put_user_u32(retvals[i], arg0 + i * 4); + } =20 if (fail) { /* Couldn't write back to argument block */ --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616596939; cv=none; d=zohomail.com; s=zohoarc; b=AIcc2vTH5kn1pBZw1/pwsBhmIgmwh/JXYNxf+aKJDR4rvRttO6wtu4LwZ+bkV+tzba+pByXwtZzMb/+ybW6alMVTbfHK84nzVQR6d9jpd6cugwVG0HEpW2Y6TzcwpCtx8u6KJEYi420Dkvf9EZhZEoIbv83Erf2GX8G+Uc815nQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616596939; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ma50U0tSPKQlNSM/2UIXylhE0jwIndZoBnvcG4UWEO8=; b=VEokyCC2ygp9H95ow+FeWLpO5YJ5yW9KCyVY06nwzjBlZyPszmF8O+Cegs9rHwhHyunT5z/uI0dGuuGN89Vw4ZCmtBYTiS++i4p5Kr0K7unHDCRRGfosvm7e9AiqIDNhCNtkOWJGVOKoaESmwBMncThAd9S9+m4gS9jG3tVNonQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616596939970543.4898311460711; Wed, 24 Mar 2021 07:42:19 -0700 (PDT) Received: from localhost ([::1]:49498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4iB-0003CU-5v for importer@patchew.org; Wed, 24 Mar 2021 10:42:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4Ww-0006dG-0O for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:42 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:52846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4Wo-0007Mx-0n for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:41 -0400 Received: by mail-wm1-x32b.google.com with SMTP id d191so13010135wmd.2 for ; Wed, 24 Mar 2021 07:30:33 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u4sm3488701wrm.24.2021.03.24.07.30.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:30:26 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7A04D1FF96; Wed, 24 Mar 2021 14:30:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ma50U0tSPKQlNSM/2UIXylhE0jwIndZoBnvcG4UWEO8=; b=N8xKYFeyoAcogtXdsFkVQaPlupP2THGf6rpxHeV1qksM8QCEiC/YLuZPpiX8cXEmRu 8mrqyffuXXTekUyIMKPOuqUgQLeLUSmQm+rsJVr6WoIk6r/zQclBDwuddhCWeh/C0EI+ kwwCUz4gjurDsqdQstUKIyhwbg9uBVoOcsTmHcAOGwvIiEdadS9Ax7M9oiavSSDrniGN QFGxmDKE6Aa6igv+YeK/o3Bjs3QzzifIQiBpmD4Tzvv0LdhrQKWi11CfWYO822O1hKG6 YwYDl5k76NhE0QLnFYdsnfSjy1qfIRyS+19YvvvVh1jbtINWgPjW+UKneI81Ft39Hp4a 8MSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ma50U0tSPKQlNSM/2UIXylhE0jwIndZoBnvcG4UWEO8=; b=W9qK2t+zH37j+C1dE0wEBhWUo7zdlnyIfajjNFeHK3z9y77cH/Y/eIB+M9tBApUTB9 y7+nhYBcHABBjx0ilth+cnbNQMhINvp4V17anZPEP8U5PyqtIbe6tSDcJJRQBsiitO16 Ao3emP98uK8rQ9h25r9Ctd6w/e/+iHC2Dnekx5fYSGILSLBDW9mTtzzRuiyM7NiO02zf XF56rwCw3vDyACSvkF1BeCvAF/EclEOi53l27Wi82UAli14Wnr60abVyoYIXS4k+BRly ADNpWNPgu+j51r++pVY5fuuVmH4IeLWDvDjgmRdMgpZD/AU7nPWu3LH9OW+i9ZeIBf1F gWPw== X-Gm-Message-State: AOAM532d2MNVc+cJY+lCHUMoiEpixS06IXQZSXQRWfWDcbIkNzjph6lj 0C+8If2M6sszxz9SCHXuVvjkWA== X-Google-Smtp-Source: ABdhPJxvFmYfcUjveb0lFCpuh44af9LsCMfDDHoaCyBM2Izox+zswyBfpt+AhD/NBbF4II7VoWfBYw== X-Received: by 2002:a1c:6543:: with SMTP id z64mr3248739wmb.50.1616596232560; Wed, 24 Mar 2021 07:30:32 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 08/22] linux-user/riscv: initialise the TaskState heap/stack info Date: Wed, 24 Mar 2021 14:30:07 +0000 Message-Id: <20210324143021.8560-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Alistair Francis , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Arguably the target_cpu_copy_regs function for each architecture is misnamed as a number of the architectures also take the opportunity to fill out the TaskState structure. This could arguably be factored out into common code but that would require a wider audit of the architectures. For now just replicate for riscv so we can correctly report semihosting information for SYS_HEAPINFO. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Acked-by: Alistair Francis Message-Id: <20210323165308.15244-9-alex.bennee@linaro.org> diff --git a/linux-user/riscv/cpu_loop.c b/linux-user/riscv/cpu_loop.c index 6767f941e8..74a9628dc9 100644 --- a/linux-user/riscv/cpu_loop.c +++ b/linux-user/riscv/cpu_loop.c @@ -135,4 +135,9 @@ void target_cpu_copy_regs(CPUArchState *env, struct tar= get_pt_regs *regs) error_report("Incompatible ELF: RVE cpu requires RVE ABI binary"); exit(EXIT_FAILURE); } + + ts->stack_base =3D info->start_stack; + ts->heap_base =3D info->brk; + /* This will be filled in on the first SYS_HEAPINFO call. */ + ts->heap_limit =3D 0; } --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616596854; cv=none; d=zohomail.com; s=zohoarc; b=SUC7/yA0yDoPTr/on/TAarq4GySpmRg7fxULA5U4oz9xyQIxpU+3lbyz1TzESR41Lbi2ZAvQjOuqzsp0zx0bF6WpFdJsTwSYZk4ujvutTInHQDv8J+xNacQ305alrPoa48M2XNOknSLARdLjpkm5h9W4En2gfXpDKWMEbIWwobQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616596854; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=N0CjjwpIsCiA1S6uAh8eizahoCBP1Ilxlznoe0kQyms=; b=BKZnqbVsfQcUq2oHfWNZJnJN5Jxp5zyoQX7JFqlus+BdWoYbwSsidK2dGGjyNK3ZbwD4xmPfc5BuckVWq9naLT410+3CqrNOdSu5VDykAHHm+VkIMifi9gbYOmLVYNS/yLOc4FbrG/tb32Jw3hVqk8aPEj3gOy5bnxDGhSIGeB8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616596854080777.3452962078533; Wed, 24 Mar 2021 07:40:54 -0700 (PDT) Received: from localhost ([::1]:45948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4gn-0001lP-1g for importer@patchew.org; Wed, 24 Mar 2021 10:40:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4X2-0006gK-R2 for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:50 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:39788) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4Wy-0007Sa-6R for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:48 -0400 Received: by mail-wr1-x42c.google.com with SMTP id e18so24679172wrt.6 for ; Wed, 24 Mar 2021 07:30:43 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e6sm3524155wrw.60.2021.03.24.07.30.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:30:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 908671FF98; Wed, 24 Mar 2021 14:30:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=N0CjjwpIsCiA1S6uAh8eizahoCBP1Ilxlznoe0kQyms=; b=vOkw/zbLap2x+zA5/zQSlqry+41cNf/WmO62+1zpsjb5uEg3quh91GjMg4hUkwh9I+ Y0zFb2PzZP3wkp8vJ/AEbuVokmO6QgXN1pwwuERHHxLd36EGd0+v8yN3GuRmjVuddZ6u dLKJeYx/oteF1ztyxF5IeYHeiWutJN8JV8uUfKJFiErfWmeGMlkh3jyDnhve0JgAc0p4 Zc5nt9GVTvlEcWm8wyYAOL18wLKI2FXGaQZaFOxHr5R18X1X7RwEIy13xGGCwpxutqJL ZyKDXe7LUtaxqaJqnnGrmyWAV+9iL24dKTpJnrLyTRPY9IWBUvxJTiR7YYSfADfBJKFx 3iPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=N0CjjwpIsCiA1S6uAh8eizahoCBP1Ilxlznoe0kQyms=; b=FUEa0d4xvoZVbAyTOjx0s3VOuxrEwc0MKKtRayi7KtZxWcsP5Z6WaqjmnEgFQFLLUI ez+alsd3KLG4bTjbnu7Lcd6RwRYln9AsAWkrK3HuAB9rkUmmBcVku6huX03cszTpT6+L FSS5AUb3pF10V4uG4Ad29ilrREp7jH2Q/nDpL9s7opSjRawKqkA+7OIvrJ4Q6mkRLCup FV2TT5Tdt+Joj+SxXIaVzNDGQMejw2GA7MVjbuKen5cxte1fEAdgm+9Psd4SYsaLCTDn ZX8WFEVJUsJ1PE5NU1okXmWJmKekXZQS1AYtyFLlAoGTopSZ54xNs48zIMzi+297EZyV wqUw== X-Gm-Message-State: AOAM531cZoK74gKAANV0owAnAvRVxf3m37dMhkKT2TEZEi57992iK7Py 9BX83WZcyfJ0fJVCkENO31wuvw== X-Google-Smtp-Source: ABdhPJz6Kc9MJ26tDolNB3qypac4bvbw3GJsMladudQdMlM1ZqusPk13Br8aQzBSVOPo0/xHL/ZPGw== X-Received: by 2002:a5d:640b:: with SMTP id z11mr3716466wru.327.1616596242345; Wed, 24 Mar 2021 07:30:42 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 09/22] tests/tcg: add HeapInfo checking to semihosting test Date: Wed, 24 Mar 2021 14:30:08 +0000 Message-Id: <20210324143021.8560-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Query the SYS_HEAPINFO semicall and do some basic verification of the information via libc calls. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Message-Id: <20210323165308.15244-10-alex.bennee@linaro.org> diff --git a/tests/tcg/multiarch/arm-compat-semi/semihosting.c b/tests/tcg/= multiarch/arm-compat-semi/semihosting.c index b3fd16cd12..8627eee3cf 100644 --- a/tests/tcg/multiarch/arm-compat-semi/semihosting.c +++ b/tests/tcg/multiarch/arm-compat-semi/semihosting.c @@ -8,9 +8,13 @@ */ =20 #define SYS_WRITE0 0x04 +#define SYS_HEAPINFO 0x16 #define SYS_REPORTEXC 0x18 =20 #include +#include +#include +#include #include "semicall.h" =20 int main(int argc, char *argv[argc]) @@ -21,8 +25,57 @@ int main(int argc, char *argv[argc]) uintptr_t exit_block[2] =3D {0x20026, 0}; uintptr_t exit_code =3D (uintptr_t) &exit_block; #endif + struct { + void *heap_base; + void *heap_limit; + void *stack_base; + void *stack_limit; + } info; + void *ptr_to_info =3D (void *) &info; =20 - __semi_call(SYS_WRITE0, (uintptr_t) "Hello World"); + __semi_call(SYS_WRITE0, (uintptr_t) "Checking HeapInfo\n"); + + memset(&info, 0, sizeof(info)); + __semi_call(SYS_HEAPINFO, (uintptr_t) &ptr_to_info); + + if (info.heap_base =3D=3D NULL || info.heap_limit =3D=3D NULL) { + printf("null heap: %p -> %p\n", info.heap_base, info.heap_limit); + exit(1); + } + + /* Error if heap base is above limit */ + if ((uintptr_t) info.heap_base >=3D (uintptr_t) info.heap_limit) { + printf("heap base %p >=3D heap_limit %p\n", + info.heap_base, info.heap_limit); + exit(2); + } + + if (info.stack_base =3D=3D NULL || info.stack_limit) { + printf("null stack: %p -> %p\n", info.stack_base, info.stack_limit= ); + exit(3); + } + + /* check our local variables are indeed inside the reported stack */ + if (ptr_to_info > info.stack_base) { + printf("info appears to be above stack: %p > %p\n", ptr_to_info, + info.stack_base); + exit(4); + } else if (ptr_to_info < info.stack_limit) { + printf("info appears to be outside stack: %p < %p\n", ptr_to_info, + info.stack_limit); + exit(5); + } + + if (ptr_to_info > info.heap_base && ptr_to_info < info.heap_limit) { + printf("info appears to be inside the heap: %p in %p:%p\n", + ptr_to_info, info.heap_base, info.heap_limit); + exit(6); + } + + printf("heap: %p -> %p\n", info.heap_base, info.heap_limit); + printf("stack: %p -> %p\n", info.stack_base, info.stack_limit); + + __semi_call(SYS_WRITE0, (uintptr_t) "Passed HeapInfo checks"); __semi_call(SYS_REPORTEXC, exit_code); /* if we get here we failed */ return -1; --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616596754; cv=none; d=zohomail.com; s=zohoarc; b=SgVDRoXKGr/oXa7PI0njhMjc7TUSuY/KJTUuTruRiVhut/tXusRYYM8s8/cEJpvs6o6x/0B0G+x5s+ygI+vSVBSA14sR2XHfyNNHtF7m/ZDjMMVItRRHCD6AClv4TIBPdw7dDjj3B0h8ihj2zoygclGBIqidGlQVIWdz6KOIaJc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616596754; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iTIRV2au7uDnVgnh+e3nvQfcgQFM6RJm5G7qLpBLBrw=; b=T0IcLmZuZrV27uDdERSFsNxwM6jJI0063Nd6X3SxOVEDJ5d4LDzthMURYrrC9Q8Ba6yuRnZdW4fHGm6BM2iZOSOuLKLhvG9EZnboXu+28+wS4+gZvPmPJrdGf245dZyuKV9fNWYoznmxl62GSQ2AGNhz9xpF8PTZAPJLu8Ljolo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616596754472157.3242791139919; Wed, 24 Mar 2021 07:39:14 -0700 (PDT) Received: from localhost ([::1]:40926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4fB-000895-D0 for importer@patchew.org; Wed, 24 Mar 2021 10:39:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4Wv-0006cb-0M for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:41 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:39788) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4Ws-0007PD-TB for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:40 -0400 Received: by mail-wr1-x42d.google.com with SMTP id e18so24678876wrt.6 for ; Wed, 24 Mar 2021 07:30:38 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n8sm2158632wrm.70.2021.03.24.07.30.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:30:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A79801FF99; Wed, 24 Mar 2021 14:30:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iTIRV2au7uDnVgnh+e3nvQfcgQFM6RJm5G7qLpBLBrw=; b=i4NTPUhL3a3RmbczQKpO0xNOgJ9+C6oZXifouVcFPbRqWNhGE9rYbTvVjY0Ie94iqC I7UrJB68sw3tfw/1Vb4UYrZFdRsMv7+fhOpNL9Q3Sw/Wm0cqRQa+WNc1pAnYvsAFHil2 YWiyBLq5iljKiL7U/Pi3mcyeVk2fsikJBgedjdgM4zyAgFACEk/JCtUFl2nGcZ7jlqwY pOQLrJ8IeoYCKlJsdvfDGDLFmQ01I1thSqj2SW2ib872Nb54QaghEpMikcPhqGfCEWDi PtYHPDULnS2n1HpBfGERqbtRuPdZ7afOr7/bWVInyJ19VVZVw/m4tgz7trRNoCoyANR7 zIyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iTIRV2au7uDnVgnh+e3nvQfcgQFM6RJm5G7qLpBLBrw=; b=XelBy3I18mY4C58SiXtscXa9WAl1tGhgZKYC6q3sN68KrXZz79Sr4ni9t6YIXqTnIu KIBEa+hRt2ZwBCkzW4c3kOSYIQHpabveCLa4gq1t2iho7/WUyTgAxe8AiPijDzZla6kN U8w8sXyT0JmiklIRbVt7t+tjnJ8pc1nGYHOpEMCzgbpjKyeq2VQ2pWhYe2tqXi1pslqY 1nUjYZire/aQafbacSs2FHuXJMgklXmQMVQw0zVYgD8PZFMZRX4lwYq0FEOt7Em59LGe XvD2J4nGCEarXm2ZAHwbFGFAE+2yZC6X12Z3PaKK720ZstUQjohfJ/mZuiCqR4ANhMf+ ZGsQ== X-Gm-Message-State: AOAM530qGPIVqxsqgulqqvI7xXHJEV8bvtDSDNNYzS5JmhOYxankcqBZ FPFd3ebbG+qME1YwiIMkULXFhF7imtyIs3oL X-Google-Smtp-Source: ABdhPJzj5Is3KVSghUfCgZ7rg+FDI9Vy9lMnOdWCD3YYaIB8deLm6Zv+r3N+exNuk//VqzeHEs/Vaw== X-Received: by 2002:adf:b355:: with SMTP id k21mr3896250wrd.156.1616596237423; Wed, 24 Mar 2021 07:30:37 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 10/22] gitlab-ci.yml: Merge the trace-backend testing into other jobs Date: Wed, 24 Mar 2021 14:30:09 +0000 Message-Id: <20210324143021.8560-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Thomas Huth Our gitlab-ci got quite slow in the past weeks, due to the immense amount of jobs that we have, so we should try to reduce the number of jobs. There is no real good reason for having separate jobs just to test the trace backends, we can do this just fine in other jobs, too. Signed-off-by: Thomas Huth Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo Message-Id: <20210319095726.45965-1-thuth@redhat.com> Message-Id: <20210323165308.15244-11-alex.bennee@linaro.org> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f65cb11c4d..f746d5fbea 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -87,7 +87,7 @@ build-system-alpine: TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu moxie-softmmu microblazeel-softmmu mips64el-softmmu MAKE_CHECK_ARGS: check-build - CONFIGURE_ARGS: --enable-docs + CONFIGURE_ARGS: --enable-docs --enable-trace-backends=3Dlog,simple,sys= log artifacts: expire_in: 2 days paths: @@ -605,7 +605,7 @@ tsan-build: variables: IMAGE: ubuntu2004 CONFIGURE_ARGS: --enable-tsan --cc=3Dclang-10 --cxx=3Dclang++-10 --dis= able-docs - --enable-fdt=3Dsystem --enable-slirp=3Dsystem + --enable-trace-backends=3Dust --enable-fdt=3Dsystem --enable-sli= rp=3Dsystem TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user MAKE_CHECK_ARGS: bench V=3D1 =20 @@ -702,6 +702,7 @@ build-coroutine-sigaltstack: variables: IMAGE: ubuntu2004 CONFIGURE_ARGS: --with-coroutine=3Dsigaltstack --disable-tcg + --enable-trace-backends=3Dftrace MAKE_CHECK_ARGS: check-unit =20 # Most jobs test latest gcrypt or nettle builds @@ -739,31 +740,6 @@ crypto-only-gnutls: MAKE_CHECK_ARGS: check =20 =20 -# We don't need to exercise every backend with every front-end -build-trace-multi-user: - <<: *native_build_job_definition - needs: - job: amd64-ubuntu2004-container - variables: - IMAGE: ubuntu2004 - CONFIGURE_ARGS: --enable-trace-backends=3Dlog,simple,syslog --disable-= system - -build-trace-ftrace-system: - <<: *native_build_job_definition - needs: - job: amd64-ubuntu2004-container - variables: - IMAGE: ubuntu2004 - CONFIGURE_ARGS: --enable-trace-backends=3Dftrace --target-list=3Dx86_6= 4-softmmu - -build-trace-ust-system: - <<: *native_build_job_definition - needs: - job: amd64-ubuntu2004-container - variables: - IMAGE: ubuntu2004 - CONFIGURE_ARGS: --enable-trace-backends=3Dust --target-list=3Dx86_64-s= oftmmu - # Check our reduced build configurations build-without-default-devices: <<: *native_build_job_definition --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616596846; cv=none; d=zohomail.com; s=zohoarc; b=Ez+70VZMtbLFWHG1M6aNjVfICvKCbxGOi679caaTYjEdduwwLHpmZ1NN9JS4lZd5Gq+shMNjJa9HgHCyy+FsRW92bM/2WisgyaXewrqE/5LCAmNq98KPcIZjCu1/tYo3UpdhOp3B4TZt3h/FxwFSnrd80f9OJtsKNP9fK7PPOs8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616596846; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EQ6CyjRWV4zJk3tXYM7i3XWmVgXsciBwzt1eUVUQ5Yg=; b=kgrft3MrNzxGqyERY7eTY7LavXYqyjIDNEcTCJwDRO0hBgrx0MayoU2XOid2xv81e/65LqEXLSQnpZa5EyTY5zFMuMXbDLdCfaKLk5aY154NyV73dl8iVnh03PcV9toan8jBe/go7QmFzXDU4OTp4/A5v04ElDicUf9omI29bP0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616596846438579.1274754342627; Wed, 24 Mar 2021 07:40:46 -0700 (PDT) Received: from localhost ([::1]:45202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4gf-0001TA-Mu for importer@patchew.org; Wed, 24 Mar 2021 10:40:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4Wu-0006bd-Ex for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:40 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:33422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4Ws-0007Oa-5h for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:40 -0400 Received: by mail-wr1-x434.google.com with SMTP id o16so24691179wrn.0 for ; Wed, 24 Mar 2021 07:30:37 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u23sm2759517wmn.26.2021.03.24.07.30.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:30:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BEF8E1FF9A; Wed, 24 Mar 2021 14:30:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EQ6CyjRWV4zJk3tXYM7i3XWmVgXsciBwzt1eUVUQ5Yg=; b=u+Z2H6T3gA4RnkbRTn66m4SURlRxJddVo7Uxi2L07Gxbv29vfX4zHngCptcjLGrzMP 3uXD6CpmuHvp/M474UeefnbW8+6asA7R0n6xaEF5c4Cgfi0m14ZwEgINBUva8gq62OXZ eOE+v5ua0LLR5d5f5Ed63tk7QrZ4ShaAcuP2yXhOKC86OnkXMkPP6k6NO7r2/T25r6bO ge/9Y2JGvN8N8+lsCqvKnRWJxpViHhgNqY+0l5Xbc6oXitnK247iw3Ld4sxcwuR82X1g hcUAgAPUvvQ+ax+Z3oOiD1wG+QUKMUEGPvI4Ib5BprnKUH1wp/nxiLKm00biSP0PFBfg 6xHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EQ6CyjRWV4zJk3tXYM7i3XWmVgXsciBwzt1eUVUQ5Yg=; b=mFseNNInqK/21IAotyp1xWrM2CJiWFmyENBdJSSNznumAoTWB8uDNj4+PDQ2KpOshZ MsYIZUZr0Tkk074rnrRrFrM4Et85K19JtKgLOh8A4ddos92iaM/cbnnuPwUFQIaOHScR ZOjmopQ95kA7Q2WePZB5QEpI8RznVXKBdl6OTsFZZOaUeOqzUWFAqyaNykh3ZsTqfABy vwkP6wGOUEpmf/mn9/AvpPj0HnK7Rq2qOtRnGsogBJY9ZZ+finN5lKySD9kvLfNTz2kd s3CuAiVAVESYzN387Pj/s9ts6n8TtzI/FekOjIcyvZbxO3EgbOtmo/xu2072gSw41bTV Zdog== X-Gm-Message-State: AOAM533pQtEUf3t1lsRaZXfjr54PgvTsZg+m0BO3c36IbcvFAlnAgLBV MSALeyqW+f1PfofBA3P5/68GPg== X-Google-Smtp-Source: ABdhPJzH4fnE0FLQDGokWe55VUZMtn3jjs5Zu+zY2UrKmDHdBaoFtXG4qjc3Z0TSRcfIcH0Svh+blw== X-Received: by 2002:a5d:6684:: with SMTP id l4mr3767163wru.381.1616596236749; Wed, 24 Mar 2021 07:30:36 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 11/22] configure: Don't use the __atomic_*_16 functions for testing 128-bit support Date: Wed, 24 Mar 2021 14:30:10 +0000 Message-Id: <20210324143021.8560-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Thomas Huth The test for 128-bit atomics is causing trouble with FreeBSD 12.2 and --enable-werror: cc -Werror -fPIE -DPIE -std=3Dgnu99 -Wall -m64 -mcx16 -D_GNU_SOURCE -D_FIL= E_OFFSET_BITS=3D64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decl= s -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-co= mmon -fwrapv -Wold-style-definition -Wtype-limits -Wformat-security -Wforma= t-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendi= f-labels -Wexpansion-to-defined -Wno-initializer-overrides -Wno-missing-inc= lude-dirs -Wno-shift-negative-value -Wno-string-plus-int -Wno-typedef-redef= inition -Wno-tautological-type-limit-compare -fstack-protector-strong -o co= nfig-temp/qemu-conf.exe config-temp/qemu-conf.c -pie -Wl,-z,relro -Wl,-z,no= w -m64 -fstack-protector-strong config-temp/qemu-conf.c:4:7: error: implicit declaration of function '__at= omic_load_16' is invalid in C99 [-Werror,-Wimplicit-function-declaration] y =3D __atomic_load_16(&x, 0); ^ config-temp/qemu-conf.c:5:3: error: implicit declaration of function '__at= omic_store_16' is invalid in C99 [-Werror,-Wimplicit-function-declaration] __atomic_store_16(&x, y, 0); ^ config-temp/qemu-conf.c:5:3: note: did you mean '__atomic_load_16'? config-temp/qemu-conf.c:4:7: note: '__atomic_load_16' declared here y =3D __atomic_load_16(&x, 0); ^ config-temp/qemu-conf.c:6:3: error: implicit declaration of function '__at= omic_compare_exchange_16' is invalid in C99 [-Werror,-Wimplicit-function-de= claration] __atomic_compare_exchange_16(&x, &y, x, 0, 0, 0); ^ 3 errors generated. Looking for they way we are using atomic functions in QEMU, we are not using these functions with the _16 suffix anyway. Switch to the same functions that we use in the include/qemu/atomic.h header. Signed-off-by: Thomas Huth Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Richard Henderson Acked-by: Paolo Bonzini Message-Id: <20210317110512.583747-2-thuth@redhat.com> Message-Id: <20210323165308.15244-12-alex.bennee@linaro.org> diff --git a/configure b/configure index edf9dc8985..535e6a9269 100755 --- a/configure +++ b/configure @@ -4779,9 +4779,9 @@ if test "$int128" =3D "yes"; then int main(void) { unsigned __int128 x =3D 0, y =3D 0; - y =3D __atomic_load_16(&x, 0); - __atomic_store_16(&x, y, 0); - __atomic_compare_exchange_16(&x, &y, x, 0, 0, 0); + y =3D __atomic_load(&x, 0); + __atomic_store(&x, y, 0); + __atomic_compare_exchange(&x, &y, x, 0, 0, 0); return 0; } EOF --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616596535; cv=none; d=zohomail.com; s=zohoarc; b=AiLIq94LvMexlNaqc4ydVhzgI4myWLUI2lEawQBAeB5z2SsxM1P/ud10Zb5FntLXqn/LN4xam0EgNGavA5oKufNTCuYzHerTwZ7lhvTuwhtcqch5qvdKE8VVK9nJpFPLro3BZWV5M46Q6pryFjM1u+MgBkeIpVSfxYuz8r9/m7U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616596535; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=npU6r7xZSGyA8GLtc47RoK9WHIJiinn1HgWpSszKGrI=; b=aQv9pboJXkgcwhYD51nZdPR7li0XV4B3JDhS7HdSwMNgt0PWiRHVn9zuQ47xwVpQhCMx/O006kibjI1geCP2BbXEbUG9qIR23fIU0VorNtmVeDUfpBhNrPM3hMgfPitouTq1c2FIMErOp3c8NlDYJsncOsPhNC5emTIhylcGvxE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616596535439180.57827922526997; Wed, 24 Mar 2021 07:35:35 -0700 (PDT) Received: from localhost ([::1]:57444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4be-0003JG-89 for importer@patchew.org; Wed, 24 Mar 2021 10:35:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4X0-0006fr-Sa for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:48 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:40589) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4Wy-0007Sj-8v for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:46 -0400 Received: by mail-wr1-x42b.google.com with SMTP id v11so24655068wro.7 for ; Wed, 24 Mar 2021 07:30:43 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p6sm3419861wru.2.2021.03.24.07.30.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:30:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D43EE1FF9B; Wed, 24 Mar 2021 14:30:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=npU6r7xZSGyA8GLtc47RoK9WHIJiinn1HgWpSszKGrI=; b=pRKAgewOPsKbYrGmNBZqECTHNdIR5UKiefbQHVahw/0zhBgVIKZXhpwjsRq+SVNfOs JMBLj/mgtGRGE9Bq4J8c+5uTXTSpvowunuJZB9XQxJCpIOfXCEL+ye6M7mCXGOa+rnRu AHAkPgROwYrqIwdQsLbamlB+isxVDTRw4QUNAEL3ODaT8ucad9i9o8Gs77vUlzJC70tI q7pCM9DlmWRO4exclcpVw62d1fov4Q6JS4VHyUru0JcnESE6fi4/VfrJKSoDS+33RpHK SF+JNJC4HQ9aVSwQQj3jPqEjREgM6cT02E3ncFdPqjHLgH27xMEcqiT3fMK7wx7mfXF7 KgGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=npU6r7xZSGyA8GLtc47RoK9WHIJiinn1HgWpSszKGrI=; b=bZ5E5upi2pSB52p1r4YD/232nBunIMJhYtDz1/PBGdX3SnW1GSNClO3u+cFm7Otk71 AdDoHZvmYziv7FtDQt4E7HupoQaF2j42PbVGlRpBPvPwM9ItWgeDaZrIQAC5TcelmB1Y x2RQtClXzxhAIn1fwzNO7lIGWObx6ju0jNtzMhpO3VtYs90a00b4zAjLJZrASTQHyqfD 6SNQfBAR3axeSVm9d/Lrmg9KS3Btsm/aDkUat8qFOumyR+mF7GZ3V8WoQ8Cf7dP/4hSe DTbaDWjfj1w8hyJWMgtpSdL1CA78i8EYWrhbRYXnwG6jCNJNxJ4FFq8aq+3z7pmPtFK6 TNTQ== X-Gm-Message-State: AOAM532BnPnB3SjLk0LwIuLwD65n5vJvKaamlNTvVm9yPSUtA3mEYVUo LcaVIwDVsVPiguSWOkNIiYweDw== X-Google-Smtp-Source: ABdhPJxyLRw7fkObyXK5FIw9jimmk5i+bhZa87ApFr8+poX+41OQ2jD2aDU93izPw4T7mlZRufS2Fw== X-Received: by 2002:a05:6000:1acb:: with SMTP id i11mr3920246wry.68.1616596242956; Wed, 24 Mar 2021 07:30:42 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 12/22] cirrus.yml: Update the FreeBSD task to version 12.2 Date: Wed, 24 Mar 2021 14:30:11 +0000 Message-Id: <20210324143021.8560-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Ed Maste , qemu-devel@nongnu.org, Yonggang Luo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Li-Wen Hsu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Thomas Huth FreeBSD version 12.1 is out of service now, and the task in the Cirrus-CI is failing. Update to 12.2 to get it working again. Unfortunately, there is a bug in libtasn1 that triggers with the new version of Clang that is used there (see this thread for details: https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg00739.html ), so we have to disable gnutls for now to make it work again. We can enable it later again once libtasn1 has been fixed in FreeBSD. Signed-off-by: Thomas Huth Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210319101402.48871-1-thuth@redhat.com> Message-Id: <20210323165308.15244-13-alex.bennee@linaro.org> diff --git a/.cirrus.yml b/.cirrus.yml index bc40a0550d..f53c519447 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,7 +3,7 @@ env: =20 freebsd_12_task: freebsd_instance: - image_family: freebsd-12-1 + image_family: freebsd-12-2 cpu: 8 memory: 8G install_script: @@ -13,7 +13,10 @@ freebsd_12_task: script: - mkdir build - cd build - - ../configure --enable-werror || { cat config.log meson-logs/meson-lo= g.txt; exit 1; } + # TODO: Enable gnutls again once FreeBSD's libtasn1 got fixed + # See: https://gitlab.com/gnutls/libtasn1/-/merge_requests/71 + - ../configure --enable-werror --disable-gnutls + || { cat config.log meson-logs/meson-log.txt; exit 1; } - gmake -j$(sysctl -n hw.ncpu) - gmake -j$(sysctl -n hw.ncpu) check V=3D1 =20 --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616596716; cv=none; d=zohomail.com; s=zohoarc; b=h2Ryr0CX7wwhD4PB9eqOzjdi10qBOFUxzwoJ6IqZQ//X6MCHIBABBpGKvDsbXMAcEqTNZhlfo4pl9xF4ZKGr2PB+DnS1C6mRvIV0Zx0QbfA50s8Vmnkrmn2CO8Az9aN6ODpLP3TdEIC5rJQYXt9O2HDrUXvvzFNupxvuhtlaIec= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616596716; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Z+eNxdVqj9XwdqB3itCU8v+02JuB6rI1ammJaGntp3g=; b=R/+iX4//cufwFg+tIx9Ax3V142dOsnDQzbs+zKjH66nrnB7WgyJs4SCic3/DgO+pTKunhzTshG+r6lioO8QH3SyjKCceqm1Ir+vzVOS9LgXe0XB+Qg3SdNKAj1r+oMRw4h4zEY94AqI2upewIDjxe5nlc6mSuQYUjr5nGJ1+jNI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616596716144549.5415512831751; Wed, 24 Mar 2021 07:38:36 -0700 (PDT) Received: from localhost ([::1]:37292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4eZ-0006fQ-D6 for importer@patchew.org; Wed, 24 Mar 2021 10:38:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4Wz-0006fN-1u for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:46 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:40597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4Wv-0007RG-NV for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:44 -0400 Received: by mail-wr1-x434.google.com with SMTP id v11so24654904wro.7 for ; Wed, 24 Mar 2021 07:30:41 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b15sm2898987wmd.41.2021.03.24.07.30.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:30:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EC5B51FF9C; Wed, 24 Mar 2021 14:30:22 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Z+eNxdVqj9XwdqB3itCU8v+02JuB6rI1ammJaGntp3g=; b=b/VF5N3sZPhu1u9I+Vd8cQ0+hbmk4kfe8a8DivCRf4/C3YE0oTJrv07HmasidQZG4I fglb5BUPnppyN6IiVxp/ocYQGS1tc+yXZ0SoF3i5URJJz3SZcyM65veiqL3PmJgM9Uaj INm0FDI7wdhFlnhsUWWLbosdlCQCIig3HkCjQbDiN3hLdgwyTJklX6LB5UflG8CS1SA0 6dS4jUcvk2WdktivCccreHRU5G3wBEa1ESngSB557x5eC/mGPFdnjEddeAGs6jqeTi8u KANyhUwmqxqOzudgaTPO9eTQIbNkkMi7sT8f0+sg34j8ubtZYu8GmDr1u4qBjbb4j7wT 75aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Z+eNxdVqj9XwdqB3itCU8v+02JuB6rI1ammJaGntp3g=; b=XhKbCrHuXJfINUL6OjG1qXEBWS63TaXGIP3RcutjnMlecIfe1UQZgIE1niRcXQxa+j infKqoVSxHsRnW8QggVqvOhIn+P3HN2Xj6RajWSq/EY58kslctMhLdQRHhPOsfxwkYOC vzIxeLta65fDy+tw13uI07R4NE5/I2ai99qfLyCw3nh1Hyt8uzaq1pSWmsbV9UKRqIQq 4eXvVrdSVKPVaW4CiRp2N4P36QgLSaLkUyGzHEvl/BSwsXWY5DkIsXCb5Q2fNGE2Ykz6 lobEEa7gQWd1PBqN4R0mZM98GBoyDsM4BJHyzKXw3zrlsr4LcweIRGLWMgmkmQxbg9H9 GunA== X-Gm-Message-State: AOAM533Nm+a6jpRdfF3Xn7ZkfOUGx8iaif2TjjKKGZjbcn24pNhkn7sg ER9qYHs0Tn7Ua0Va5VydL1ZhcQ== X-Google-Smtp-Source: ABdhPJwq3TDPCodTS2VEJUBv2vX1md74OiWDdAtU8jSgsnXzDMQRT8DTO8Wo2d4wXPQlYYBC6OBWXg== X-Received: by 2002:adf:c3c8:: with SMTP id d8mr3784686wrg.167.1616596240293; Wed, 24 Mar 2021 07:30:40 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 13/22] utils: Tighter tests for qemu_strtosz Date: Wed, 24 Mar 2021 14:30:12 +0000 Message-Id: <20210324143021.8560-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Eric Blake Our tests were not validating the return value in all cases, nor was it guaranteeing our documented claim that 'res' is unchanged on error. For that matter, it wasn't as thorough as the existing tests for qemu_strtoi() and friends for proving that endptr and res are sanely set. Enhancing the test found one case where we violated our documentation: namely, when failing with EINVAL when endptr is NULL, we shouldn't modify res. Signed-off-by: Eric Blake Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth Message-Id: <20210317143325.2165821-2-eblake@redhat.com> Message-Id: <20210323165308.15244-14-alex.bennee@linaro.org> diff --git a/tests/unit/test-cutils.c b/tests/unit/test-cutils.c index e025b54c05..5908de4fd0 100644 --- a/tests/unit/test-cutils.c +++ b/tests/unit/test-cutils.c @@ -1952,9 +1952,11 @@ static void test_qemu_strtosz_simple(void) const char *str; const char *endptr; int err; - uint64_t res =3D 0xbaadf00d; + uint64_t res; =20 str =3D "0"; + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 0); @@ -1962,6 +1964,8 @@ static void test_qemu_strtosz_simple(void) =20 /* Leading 0 gives decimal results, not octal */ str =3D "08"; + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 8); @@ -1969,46 +1973,61 @@ static void test_qemu_strtosz_simple(void) =20 /* Leading space is ignored */ str =3D " 12345"; + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 12345); g_assert(endptr =3D=3D str + 6); =20 + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, NULL, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 12345); =20 str =3D "9007199254740991"; /* 2^53-1 */ + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 0x1fffffffffffff); g_assert(endptr =3D=3D str + 16); =20 str =3D "9007199254740992"; /* 2^53 */ + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 0x20000000000000); g_assert(endptr =3D=3D str + 16); =20 str =3D "9007199254740993"; /* 2^53+1 */ + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 0x20000000000001); g_assert(endptr =3D=3D str + 16); =20 str =3D "18446744073709549568"; /* 0xfffffffffffff800 (53 msbs set) */ + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 0xfffffffffffff800); g_assert(endptr =3D=3D str + 20); =20 str =3D "18446744073709550591"; /* 0xfffffffffffffbff */ + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 0xfffffffffffffbff); g_assert(endptr =3D=3D str + 20); =20 str =3D "18446744073709551615"; /* 0xffffffffffffffff */ + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 0xffffffffffffffff); @@ -2020,21 +2039,27 @@ static void test_qemu_strtosz_hex(void) const char *str; const char *endptr; int err; - uint64_t res =3D 0xbaadf00d; + uint64_t res; =20 str =3D "0x0"; + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 0); g_assert(endptr =3D=3D str + 3); =20 str =3D "0xab"; + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 171); g_assert(endptr =3D=3D str + 4); =20 str =3D "0xae"; + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 174); @@ -2053,44 +2078,60 @@ static void test_qemu_strtosz_units(void) const char *e =3D "1E"; int err; const char *endptr; - uint64_t res =3D 0xbaadf00d; + uint64_t res; =20 /* default is M */ + endptr =3D NULL; + res =3D 0xbaadf00d; err =3D qemu_strtosz_MiB(none, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, MiB); g_assert(endptr =3D=3D none + 1); =20 + endptr =3D NULL; + res =3D 0xbaadf00d; err =3D qemu_strtosz(b, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 1); g_assert(endptr =3D=3D b + 2); =20 + endptr =3D NULL; + res =3D 0xbaadf00d; err =3D qemu_strtosz(k, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, KiB); g_assert(endptr =3D=3D k + 2); =20 + endptr =3D NULL; + res =3D 0xbaadf00d; err =3D qemu_strtosz(m, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, MiB); g_assert(endptr =3D=3D m + 2); =20 + endptr =3D NULL; + res =3D 0xbaadf00d; err =3D qemu_strtosz(g, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, GiB); g_assert(endptr =3D=3D g + 2); =20 + endptr =3D NULL; + res =3D 0xbaadf00d; err =3D qemu_strtosz(t, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, TiB); g_assert(endptr =3D=3D t + 2); =20 + endptr =3D NULL; + res =3D 0xbaadf00d; err =3D qemu_strtosz(p, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, PiB); g_assert(endptr =3D=3D p + 2); =20 + endptr =3D NULL; + res =3D 0xbaadf00d; err =3D qemu_strtosz(e, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, EiB); @@ -2102,9 +2143,11 @@ static void test_qemu_strtosz_float(void) const char *str; int err; const char *endptr; - uint64_t res =3D 0xbaadf00d; + uint64_t res; =20 str =3D "0.5E"; + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, EiB / 2); @@ -2112,6 +2155,8 @@ static void test_qemu_strtosz_float(void) =20 /* For convenience, a fraction of 0 is tolerated even on bytes */ str =3D "1.0B"; + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 1); @@ -2119,6 +2164,8 @@ static void test_qemu_strtosz_float(void) =20 /* An empty fraction is tolerated */ str =3D "1.k"; + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 1024); @@ -2126,6 +2173,8 @@ static void test_qemu_strtosz_float(void) =20 /* For convenience, we permit values that are not byte-exact */ str =3D "12.345M"; + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, (uint64_t) (12.345 * MiB + 0.5)); @@ -2140,67 +2189,91 @@ static void test_qemu_strtosz_invalid(void) uint64_t res =3D 0xbaadf00d; =20 str =3D ""; + endptr =3D NULL; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); g_assert(endptr =3D=3D str); =20 str =3D " \t "; + endptr =3D NULL; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); g_assert(endptr =3D=3D str); =20 str =3D "crap"; + endptr =3D NULL; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); g_assert(endptr =3D=3D str); =20 str =3D "inf"; + endptr =3D NULL; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); g_assert(endptr =3D=3D str); =20 str =3D "NaN"; + endptr =3D NULL; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); g_assert(endptr =3D=3D str); =20 /* Fractional values require scale larger than bytes */ str =3D "1.1B"; + endptr =3D NULL; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); g_assert(endptr =3D=3D str); =20 str =3D "1.1"; + endptr =3D NULL; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); g_assert(endptr =3D=3D str); =20 /* No floating point exponents */ str =3D "1.5e1k"; + endptr =3D NULL; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); g_assert(endptr =3D=3D str); =20 str =3D "1.5E+0k"; + endptr =3D NULL; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); g_assert(endptr =3D=3D str); =20 /* No hex fractions */ str =3D "0x1.8k"; + endptr =3D NULL; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); g_assert(endptr =3D=3D str); =20 /* No negative values */ str =3D "-0"; + endptr =3D NULL; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); g_assert(endptr =3D=3D str); =20 str =3D "-1"; + endptr =3D NULL; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); g_assert(endptr =3D=3D str); } =20 @@ -2209,48 +2282,72 @@ static void test_qemu_strtosz_trailing(void) const char *str; const char *endptr; int err; - uint64_t res =3D 0xbaadf00d; + uint64_t res; =20 str =3D "123xxx"; + endptr =3D NULL; + res =3D 0xbaadf00d; err =3D qemu_strtosz_MiB(str, &endptr, &res); + g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 123 * MiB); g_assert(endptr =3D=3D str + 3); =20 + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, NULL, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); =20 str =3D "1kiB"; + endptr =3D NULL; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 1024); g_assert(endptr =3D=3D str + 2); =20 + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, NULL, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); =20 str =3D "0x"; + endptr =3D NULL; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); + g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 0); g_assert(endptr =3D=3D str + 1); =20 + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, NULL, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); =20 str =3D "0.NaN"; + endptr =3D NULL; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); + g_assert_cmpint(res, =3D=3D, 0); g_assert(endptr =3D=3D str + 2); =20 + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, NULL, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); =20 str =3D "123-45"; + endptr =3D NULL; + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, &endptr, &res); + g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 123); g_assert(endptr =3D=3D str + 3); =20 + res =3D 0xbaadf00d; err =3D qemu_strtosz(str, NULL, &res); g_assert_cmpint(err, =3D=3D, -EINVAL); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); } =20 static void test_qemu_strtosz_erange(void) @@ -2261,13 +2358,17 @@ static void test_qemu_strtosz_erange(void) uint64_t res =3D 0xbaadf00d; =20 str =3D "18446744073709551616"; /* 2^64; see strtosz_simple for 2^64-1= */ + endptr =3D NULL; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, -ERANGE); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); g_assert(endptr =3D=3D str + 20); =20 str =3D "20E"; + endptr =3D NULL; err =3D qemu_strtosz(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, -ERANGE); + g_assert_cmpint(res, =3D=3D, 0xbaadf00d); g_assert(endptr =3D=3D str + 3); } =20 @@ -2276,15 +2377,19 @@ static void test_qemu_strtosz_metric(void) const char *str; int err; const char *endptr; - uint64_t res =3D 0xbaadf00d; + uint64_t res; =20 str =3D "12345k"; + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz_metric(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 12345000); g_assert(endptr =3D=3D str + 6); =20 str =3D "12.345M"; + endptr =3D str; + res =3D 0xbaadf00d; err =3D qemu_strtosz_metric(str, &endptr, &res); g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 12345000); diff --git a/util/cutils.c b/util/cutils.c index c442882b88..b425ed6570 100644 --- a/util/cutils.c +++ b/util/cutils.c @@ -362,7 +362,6 @@ static int do_strtosz(const char *nptr, const char **en= d, } } =20 - *result =3D val; retval =3D 0; =20 out: @@ -371,6 +370,9 @@ out: } else if (*endptr) { retval =3D -EINVAL; } + if (retval =3D=3D 0) { + *result =3D val; + } =20 return retval; } --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616597020; cv=none; d=zohomail.com; s=zohoarc; b=lHaGTct5aW8lY8ye6//2ZeAkLXSg22ifxC5zTubEJccnNM7kOvFmivrpVLfbjgJHfX7Qab3H7fpFkSCI8MeXaLodO/1X8eYSTB7dBC3V1mGQv/0lFTCQor2DtkR6ehjil06CZETuONr79CnvFdQuK/EEX9F3nzWGz1p1wB9TA8Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616597020; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AfuU0XAxoVYMVMyAnGddSWe2J1DQfdiLrSJW8lizDJE=; b=IVXvO9v8oR8nQMMXafpt2meGkh4UqICH1XLllNZVUajXbbWLkTms/73eTnOLWmadmlLsFm/TGdsZRv1NP0qeMMQIJRmIAu7FYhTTjb1MrwMtjiCk3euBF1+FEtJCkCnoj+bOt/HDioIbcVMoG/Qc5O4jJeJr/8seaUoNakrpzLg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16165970207349.069417649460547; Wed, 24 Mar 2021 07:43:40 -0700 (PDT) Received: from localhost ([::1]:53908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4jT-00053f-2Q for importer@patchew.org; Wed, 24 Mar 2021 10:43:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4Wx-0006ez-5A for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:44 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:34485) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4Wv-0007Qs-0F for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:30:42 -0400 Received: by mail-wm1-x330.google.com with SMTP id n11-20020a05600c4f8bb029010e5cf86347so2804572wmq.1 for ; Wed, 24 Mar 2021 07:30:40 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w132sm2584902wmg.39.2021.03.24.07.30.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:30:34 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 10A061FF9D; Wed, 24 Mar 2021 14:30:23 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AfuU0XAxoVYMVMyAnGddSWe2J1DQfdiLrSJW8lizDJE=; b=yuUe7QYHdFmKYc4VZGe+F4kPCyMeJTraSrBT6+1s5u9AsWRpyCs6OColnnxmLQaKMZ 4JMpWdMCOt8eEmrabNbBzHkfCzFUPMBQYpYKoNNVI5VsWNjcGtLN+W5RBjTwCykEqBy2 A6J8IQtv7MG5NtpZxWEQ/JP5Vz/uZ3v7D5yYRdXT3YDGWgtQFylnAzBQxtPZT7Mw11Ab K3sf68TGZumNKCGQ6KXnTBOiiLXM90u/q1LnHIKCxryflFr+kGBlVzp8LR1IZnAvO73U PrefQsd+xGbi0XUaPn61gxdlwhInpeif8ghElJzSaTWRfYxMbsYJQieb5VV7BRmIJn4+ 2UMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AfuU0XAxoVYMVMyAnGddSWe2J1DQfdiLrSJW8lizDJE=; b=AmZp0J39a3kVJ9BaDQoephqAXSmsM91O6U8CKL+RP2H4aqTFu65TD8ngx9WfBcwikk 3LBfeYI+07kcmnefSIq1h0OMb2uPKjSeunWRJsIod6PqX8GBbOUs5aLlmxGgF5glnbZC EwbnbSxcWRBuAIumSN6rUuwN7pXm4UgCaDG5t0kNOmKQjzSMFnhsl7Ad+64C4JeobaQ/ 0FBFciKe1dYk8iLwCCOojFMl7jo1jCpDKdqE0hZHkAN9B3FsqWT7aJFyDoWIUC23uwNI y5PrpU3nTRBNyblfOjHWbC94atWwT2OOCP7BLRb0eycZtAQ1omFJKYmwSml0IO7ODA/s n0Ig== X-Gm-Message-State: AOAM532MwPQbKTp6cFqL4iHUp871IACcudo70lfIQVlpga0/E7CleMnJ Yet2/hEdPUmTkl5RV4PvTvnIug== X-Google-Smtp-Source: ABdhPJwcOflJW+rLGzj4xdDuW7EiPJxwLqZ+xV6VVkj1N8TvkMh3rd4BuJjuiIGJ5i7qteu2E115Wg== X-Received: by 2002:a05:600c:198d:: with SMTP id t13mr3303353wmq.73.1616596239541; Wed, 24 Mar 2021 07:30:39 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 14/22] utils: Work around mingw strto*l bug with 0x Date: Wed, 24 Mar 2021 14:30:13 +0000 Message-Id: <20210324143021.8560-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Eric Blake Mingw recognizes that "0x" has value 0 without setting errno, but fails to advance endptr to the trailing garbage 'x'. This in turn showed up in our recent testsuite additions for qemu_strtosz (commit 1657ba44b4 utils: Enhance testsuite for do_strtosz()); adjust our remaining tests to show that we now work around this windows bug. This patch intentionally fails check-syntax for use of strtol. Signed-off-by: Eric Blake Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth Message-Id: <20210317143325.2165821-3-eblake@redhat.com> Message-Id: <20210323165308.15244-15-alex.bennee@linaro.org> diff --git a/tests/unit/test-cutils.c b/tests/unit/test-cutils.c index 5908de4fd0..98671f1ac3 100644 --- a/tests/unit/test-cutils.c +++ b/tests/unit/test-cutils.c @@ -378,6 +378,15 @@ static void test_qemu_strtoi_hex(void) g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 0x123); g_assert(endptr =3D=3D str + strlen(str)); + + str =3D "0x"; + res =3D 999; + endptr =3D &f; + err =3D qemu_strtoi(str, &endptr, 16, &res); + + g_assert_cmpint(err, =3D=3D, 0); + g_assert_cmpint(res, =3D=3D, 0); + g_assert(endptr =3D=3D str + 1); } =20 static void test_qemu_strtoi_max(void) @@ -669,6 +678,15 @@ static void test_qemu_strtoui_hex(void) g_assert_cmpint(err, =3D=3D, 0); g_assert_cmphex(res, =3D=3D, 0x123); g_assert(endptr =3D=3D str + strlen(str)); + + str =3D "0x"; + res =3D 999; + endptr =3D &f; + err =3D qemu_strtoui(str, &endptr, 16, &res); + + g_assert_cmpint(err, =3D=3D, 0); + g_assert_cmphex(res, =3D=3D, 0); + g_assert(endptr =3D=3D str + 1); } =20 static void test_qemu_strtoui_max(void) @@ -955,6 +973,15 @@ static void test_qemu_strtol_hex(void) g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 0x123); g_assert(endptr =3D=3D str + strlen(str)); + + str =3D "0x"; + res =3D 999; + endptr =3D &f; + err =3D qemu_strtol(str, &endptr, 16, &res); + + g_assert_cmpint(err, =3D=3D, 0); + g_assert_cmpint(res, =3D=3D, 0); + g_assert(endptr =3D=3D str + 1); } =20 static void test_qemu_strtol_max(void) @@ -1244,6 +1271,15 @@ static void test_qemu_strtoul_hex(void) g_assert_cmpint(err, =3D=3D, 0); g_assert_cmphex(res, =3D=3D, 0x123); g_assert(endptr =3D=3D str + strlen(str)); + + str =3D "0x"; + res =3D 999; + endptr =3D &f; + err =3D qemu_strtoul(str, &endptr, 16, &res); + + g_assert_cmpint(err, =3D=3D, 0); + g_assert_cmphex(res, =3D=3D, 0); + g_assert(endptr =3D=3D str + 1); } =20 static void test_qemu_strtoul_max(void) @@ -1528,6 +1564,15 @@ static void test_qemu_strtoi64_hex(void) g_assert_cmpint(err, =3D=3D, 0); g_assert_cmpint(res, =3D=3D, 0x123); g_assert(endptr =3D=3D str + strlen(str)); + + str =3D "0x"; + endptr =3D &f; + res =3D 999; + err =3D qemu_strtoi64(str, &endptr, 16, &res); + + g_assert_cmpint(err, =3D=3D, 0); + g_assert_cmpint(res, =3D=3D, 0); + g_assert(endptr =3D=3D str + 1); } =20 static void test_qemu_strtoi64_max(void) @@ -1815,6 +1860,15 @@ static void test_qemu_strtou64_hex(void) g_assert_cmpint(err, =3D=3D, 0); g_assert_cmphex(res, =3D=3D, 0x123); g_assert(endptr =3D=3D str + strlen(str)); + + str =3D "0x"; + endptr =3D &f; + res =3D 999; + err =3D qemu_strtou64(str, &endptr, 16, &res); + + g_assert_cmpint(err, =3D=3D, 0); + g_assert_cmphex(res, =3D=3D, 0); + g_assert(endptr =3D=3D str + 1); } =20 static void test_qemu_strtou64_max(void) diff --git a/util/cutils.c b/util/cutils.c index b425ed6570..ee908486da 100644 --- a/util/cutils.c +++ b/util/cutils.c @@ -396,9 +396,22 @@ int qemu_strtosz_metric(const char *nptr, const char *= *end, uint64_t *result) * Helper function for error checking after strtol() and the like */ static int check_strtox_error(const char *nptr, char *ep, - const char **endptr, int libc_errno) + const char **endptr, bool check_zero, + int libc_errno) { assert(ep >=3D nptr); + + /* Windows has a bug in that it fails to parse 0 from "0x" in base 16 = */ + if (check_zero && ep =3D=3D nptr && libc_errno =3D=3D 0) { + char *tmp; + + errno =3D 0; + if (strtol(nptr, &tmp, 10) =3D=3D 0 && errno =3D=3D 0 && + (*tmp =3D=3D 'x' || *tmp =3D=3D 'X')) { + ep =3D tmp; + } + } + if (endptr) { *endptr =3D ep; } @@ -465,7 +478,7 @@ int qemu_strtoi(const char *nptr, const char **endptr, = int base, } else { *result =3D lresult; } - return check_strtox_error(nptr, ep, endptr, errno); + return check_strtox_error(nptr, ep, endptr, lresult =3D=3D 0, errno); } =20 /** @@ -524,7 +537,7 @@ int qemu_strtoui(const char *nptr, const char **endptr,= int base, *result =3D lresult; } } - return check_strtox_error(nptr, ep, endptr, errno); + return check_strtox_error(nptr, ep, endptr, lresult =3D=3D 0, errno); } =20 /** @@ -566,7 +579,7 @@ int qemu_strtol(const char *nptr, const char **endptr, = int base, =20 errno =3D 0; *result =3D strtol(nptr, &ep, base); - return check_strtox_error(nptr, ep, endptr, errno); + return check_strtox_error(nptr, ep, endptr, *result =3D=3D 0, errno); } =20 /** @@ -613,7 +626,7 @@ int qemu_strtoul(const char *nptr, const char **endptr,= int base, if (errno =3D=3D ERANGE) { *result =3D -1; } - return check_strtox_error(nptr, ep, endptr, errno); + return check_strtox_error(nptr, ep, endptr, *result =3D=3D 0, errno); } =20 /** @@ -639,7 +652,7 @@ int qemu_strtoi64(const char *nptr, const char **endptr= , int base, QEMU_BUILD_BUG_ON(sizeof(int64_t) !=3D sizeof(long long)); errno =3D 0; *result =3D strtoll(nptr, &ep, base); - return check_strtox_error(nptr, ep, endptr, errno); + return check_strtox_error(nptr, ep, endptr, *result =3D=3D 0, errno); } =20 /** @@ -668,7 +681,7 @@ int qemu_strtou64(const char *nptr, const char **endptr= , int base, if (errno =3D=3D ERANGE) { *result =3D -1; } - return check_strtox_error(nptr, ep, endptr, errno); + return check_strtox_error(nptr, ep, endptr, *result =3D=3D 0, errno); } =20 /** @@ -708,7 +721,7 @@ int qemu_strtod(const char *nptr, const char **endptr, = double *result) =20 errno =3D 0; *result =3D strtod(nptr, &ep); - return check_strtox_error(nptr, ep, endptr, errno); + return check_strtox_error(nptr, ep, endptr, false, errno); } =20 /** --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616597711; cv=none; d=zohomail.com; s=zohoarc; b=k9Bai81j1YdW0xIbbzTxpCzG82d2Q00x4HjD8k8sx+ZKs1lGCIHvLv0mYNwGVfuUOJ1LrWIQRIcevVGQbCyaIvklbCqxlslVrbJ0wUIPsp6IyHGN59ws8Wutp6KwkfxYvFeQ2fqzKkVLQmjA/oz1Wvq8KwIZoRgET4OV876PZs8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616597711; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=J/FXnYHxF99XSKiPCq/PPY58O6zMCmVG8ygc3pMoNMc=; b=Wh1pCQDVabWLG52UCpA32vn3SJkBunP6rbohM6VW2f6hHw+zpPfJlqGoCbYDIvuXWdCTxYG74VNi80YZxBWNBUiQjPToO0UKnD62HD19NJbb0X2VuUjZyBo8pysycDBUfmzZuRuXiA8XSpcCRdGfzcuR8FXvuapvNJGSLAXCAYE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616597711411206.2907384396657; Wed, 24 Mar 2021 07:55:11 -0700 (PDT) Received: from localhost ([::1]:59098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4uW-0002Cg-GK for importer@patchew.org; Wed, 24 Mar 2021 10:55:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4f9-0000Qw-B9 for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:11 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:43807) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4f6-0003S0-2t for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:11 -0400 Received: by mail-wr1-x42b.google.com with SMTP id x7so2238954wrw.10 for ; Wed, 24 Mar 2021 07:39:07 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r11sm3470853wrm.26.2021.03.24.07.38.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:39:03 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2680F1FF9E; Wed, 24 Mar 2021 14:30:23 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J/FXnYHxF99XSKiPCq/PPY58O6zMCmVG8ygc3pMoNMc=; b=ONsd0TYm5Q/iPi/E6G86ZwK4lJ0zTyF/Oui0hG/tl7350t03aUrAGV8LEp1qAiKgK2 gmZ+HHehEdRKZN6egBZ/slCbnAF/sGlRSTis0JrsnD9p2g1pSF3QXEqKO51aEmSGL2u+ //qCoAxdOQRQMxFDzl9KlUw+7XV6AmiuTbTD/h/lM0oYXMfFvip5/NwuaYCIukbOm3ts Nmmirl2jpCtcDVCWqU1+ZrDJkvoQ6rVY/YJWkySLuSaU1lnaPFp4caLd2TRMJeL6JLXY 1+VA7S0awbIvHi8ippbwIhThcTSxXym3eqkH6EyDTs6qAeHR4t5uV5MXs/LbANtX2kSg LhhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J/FXnYHxF99XSKiPCq/PPY58O6zMCmVG8ygc3pMoNMc=; b=UYPsYGXyld927FgO1o3JhR+W25bQWZE3KWaZV1YuI1Hl2a3BB8nSd12JggKXOS+v7I 5W1QNc71ZBzrXK8WA8GIg+7okyX7LnV/ssS14fiz0WCD+/ynx/Vs6uBKggSPJNrox2k3 5g9vAgyXlKqYH8S1HixoiUuICWLA+VnzyW28TjEEMkll4/EJoPJf+VwttoHB9V48oQ38 TrlHH2v+6CmYQn9rdUcefBJz02HDYWYLlusXwDycYA2aYi6HdfRzX0BWRWJzfKJUI0nW iPGdQ/kZFxpPRjfoTIgiU/nQ8EHtnIgmZtgHEh2lDrQuwR1lfqOsOQS+UK9XovZxw/O8 gpLw== X-Gm-Message-State: AOAM530TtG6hxJB3oyUIw1cSqvNG3R0DmULGveU1jXW+o+/0wc9AAgri 8Y4d+FM6/WH1Ae2aKiI0qhc05Q== X-Google-Smtp-Source: ABdhPJziTbSSnyXpka6lP+gcR6WDtpJAZFqymZQAf0X0KiJR+UHHfiCrLl5sJ5WbvHp+7Vqd9rn1bg== X-Received: by 2002:a5d:550b:: with SMTP id b11mr3899577wrv.313.1616596746593; Wed, 24 Mar 2021 07:39:06 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 15/22] gitlab: extend timeouts for CFI builds Date: Wed, 24 Mar 2021 14:30:14 +0000 Message-Id: <20210324143021.8560-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) These builds are running very close to the default build limit and as they are already pared down the only other option is to extend the timeout a little to give some breathing room. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth Reviewed-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210323165308.15244-16-alex.bennee@linaro.org> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f746d5fbea..9ffbaa7ffb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -502,6 +502,7 @@ build-cfi-aarch64: --enable-safe-stack --enable-slirp=3Dgit TARGETS: aarch64-softmmu MAKE_CHECK_ARGS: check-build + timeout: 70m artifacts: expire_in: 2 days paths: @@ -538,6 +539,7 @@ build-cfi-ppc64-s390x: --enable-safe-stack --enable-slirp=3Dgit TARGETS: ppc64-softmmu s390x-softmmu MAKE_CHECK_ARGS: check-build + timeout: 70m artifacts: expire_in: 2 days paths: @@ -574,6 +576,7 @@ build-cfi-x86_64: --enable-safe-stack --enable-slirp=3Dgit TARGETS: x86_64-softmmu MAKE_CHECK_ARGS: check-build + timeout: 70m artifacts: expire_in: 2 days paths: --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616597560; cv=none; d=zohomail.com; s=zohoarc; b=eAxbYg6UGtYkDjjlpmnO7QghfIqpEpvsDKPsM49S6CklKDY3y5XmSoaLDErOT+45BKIge7jCirV1dm6Ghl7OBSYj37v8VvwiZb53lI7JckP54E46ariEMuUp7DPhd1qo225M2drx1yWtMWTpofZDz4MyxxU+0ZZU9W8gyh28VvY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616597560; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Y6jHpz4FecCSC+FwcChPhRloSKRaxaISexMbz45msss=; b=B8xJJiQ32MLAfVKX0dwo7wRhEBw/t2rarumNriRb7MPH1k+u1xKSUQRG5ZUMRzIhE9Yl0g75df2A09v6J+ooYZJflmpHTaWxLN81pABdTDRxVD9or0yaf2cD2HJuA7NCDPXZ06JkQQBh/liIriE/et5Tqra/vO/DpgooaGrkzgA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616597560973442.6566064285089; Wed, 24 Mar 2021 07:52:40 -0700 (PDT) Received: from localhost ([::1]:51980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4sB-0007gf-4T for importer@patchew.org; Wed, 24 Mar 2021 10:52:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4f4-0000CQ-4t for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:06 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:40906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4f0-0003Ou-Or for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:05 -0400 Received: by mail-wm1-x32e.google.com with SMTP id y124-20020a1c32820000b029010c93864955so1321639wmy.5 for ; Wed, 24 Mar 2021 07:39:02 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k13sm3714848wri.27.2021.03.24.07.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:38:56 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 401B61FF7E; Wed, 24 Mar 2021 14:30:23 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Y6jHpz4FecCSC+FwcChPhRloSKRaxaISexMbz45msss=; b=Ja4y9P2CmAEu8kWqsU/GZzgogLXI46BXAzYVbD5Y8X1u+S449cRlQGx8DH2TUxY2aB MryLzOZ+sWM1wjt4zBg6783INd4+TKrYL6weEkaHKQCpMMfdi1pDvOSfxbXwjXVTYB+E RcNu6kiIPNfxO7qLeBLVoLkZkkBsx8tEn9sJBItkhKZhXiv7Q9iPeYUAgX7goAhuaJBO nwBunoT9IMe2xhHUrzFINugVXBZb5EA2O2uhVjzh9ClSdoUC+QPoKDglikV+1pCEzFOR dXbKuJodK+sqXQzOW1R6O1ptZiH7HAlITHmINX2nBLXt/igFh71RSY9P0mgb+CXtOAME Nf+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Y6jHpz4FecCSC+FwcChPhRloSKRaxaISexMbz45msss=; b=OCEf7i2SGuVx3HdGlSKslXH9aHvNcBSYpq6+Rpl93u9+tV+sICIn/Xk3u0XDHdiN8J Sg3T0r2IbBX6uAJwC2O+a+9gl1651vNtJbOf1yqoJObpdNPca8CJAcLPoYqLg/5oMIUH HIeRFgTb+FYu7ZRqbqzPzAzecnqtoDExoUuy7p6Qwz412r8OuZwt9lztc8qsqIcA+Mam LJG+CEjuZNzt6tfzrCie8MEoJdmzO2lapS1SdDc2D3lb35Ufhsp23ZTzsfNtDajX208A z9JO//DamqUOLfvnJnWya/f033d25Dhrfluq7ORtIyYfiBt87zAJSPk7qzYaopjhIbYD xroA== X-Gm-Message-State: AOAM530Pdncy6qbV7huSBwafWHQGtNc9cGFuA/NMGt6ctjjJSiv3lsrI aUzxbc2TxW3nRdFNXkD/VAHxnA== X-Google-Smtp-Source: ABdhPJx9ti58q3tTvx9S+I86H74lEIvDfBQavOujRF6Y3kq18rCxYT2fnnHcabK6w7ClDwjiH3uf/Q== X-Received: by 2002:a05:600c:3515:: with SMTP id h21mr3317745wmq.9.1616596741240; Wed, 24 Mar 2021 07:39:01 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 16/22] qdev: define list of archs with virtio-pci or virtio-ccw Date: Wed, 24 Mar 2021 14:30:15 +0000 Message-Id: <20210324143021.8560-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , Cornelia Huck , qemu-devel@nongnu.org, Laurent Vivier , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Laurent Vivier This is used to define virtio-*-pci and virtio-*-ccw aliases rather than substracting the CCW architecture from all the others. Signed-off-by: Laurent Vivier Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Cornelia Huck Message-Id: <20210319202335.2397060-2-laurent@vivier.eu> Message-Id: <20210323165308.15244-17-alex.bennee@linaro.org> diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h index 54f069d491..0c90706516 100644 --- a/include/sysemu/arch_init.h +++ b/include/sysemu/arch_init.h @@ -35,4 +35,12 @@ extern const uint32_t arch_type; int kvm_available(void); int xen_available(void); =20 +/* default virtio transport per architecture */ +#define QEMU_ARCH_VIRTIO_PCI (QEMU_ARCH_ALPHA | QEMU_ARCH_ARM | \ + QEMU_ARCH_HPPA | QEMU_ARCH_I386 | \ + QEMU_ARCH_MIPS | QEMU_ARCH_PPC | \ + QEMU_ARCH_RISCV | QEMU_ARCH_SH4 | \ + QEMU_ARCH_SPARC | QEMU_ARCH_XTENSA) +#define QEMU_ARCH_VIRTIO_CCW (QEMU_ARCH_S390X) + #endif diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index 8dc656becc..0b40c97c6e 100644 --- a/softmmu/qdev-monitor.c +++ b/softmmu/qdev-monitor.c @@ -60,34 +60,31 @@ static const QDevAlias qdev_alias_table[] =3D { { "ES1370", "es1370" }, /* -soundhw name */ { "ich9-ahci", "ahci" }, { "lsi53c895a", "lsi" }, - { "virtio-9p-ccw", "virtio-9p", QEMU_ARCH_S390X }, - { "virtio-9p-pci", "virtio-9p", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-balloon-ccw", "virtio-balloon", QEMU_ARCH_S390X }, - { "virtio-balloon-pci", "virtio-balloon", - QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-blk-ccw", "virtio-blk", QEMU_ARCH_S390X }, - { "virtio-blk-pci", "virtio-blk", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-gpu-ccw", "virtio-gpu", QEMU_ARCH_S390X }, - { "virtio-gpu-pci", "virtio-gpu", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-input-host-ccw", "virtio-input-host", QEMU_ARCH_S390X }, - { "virtio-input-host-pci", "virtio-input-host", - QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-iommu-pci", "virtio-iommu", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X= }, - { "virtio-keyboard-ccw", "virtio-keyboard", QEMU_ARCH_S390X }, - { "virtio-keyboard-pci", "virtio-keyboard", - QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-mouse-ccw", "virtio-mouse", QEMU_ARCH_S390X }, - { "virtio-mouse-pci", "virtio-mouse", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X= }, - { "virtio-net-ccw", "virtio-net", QEMU_ARCH_S390X }, - { "virtio-net-pci", "virtio-net", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-rng-ccw", "virtio-rng", QEMU_ARCH_S390X }, - { "virtio-rng-pci", "virtio-rng", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-scsi-ccw", "virtio-scsi", QEMU_ARCH_S390X }, - { "virtio-scsi-pci", "virtio-scsi", QEMU_ARCH_ALL & ~QEMU_ARCH_S390X }, - { "virtio-serial-ccw", "virtio-serial", QEMU_ARCH_S390X }, - { "virtio-serial-pci", "virtio-serial", QEMU_ARCH_ALL & ~QEMU_ARCH_S39= 0X }, - { "virtio-tablet-ccw", "virtio-tablet", QEMU_ARCH_S390X }, - { "virtio-tablet-pci", "virtio-tablet", QEMU_ARCH_ALL & ~QEMU_ARCH_S39= 0X }, + { "virtio-9p-ccw", "virtio-9p", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-9p-pci", "virtio-9p", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-balloon-ccw", "virtio-balloon", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-balloon-pci", "virtio-balloon", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-blk-ccw", "virtio-blk", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-blk-pci", "virtio-blk", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-gpu-ccw", "virtio-gpu", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-gpu-pci", "virtio-gpu", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-input-host-ccw", "virtio-input-host", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-input-host-pci", "virtio-input-host", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-iommu-pci", "virtio-iommu", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-keyboard-ccw", "virtio-keyboard", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-keyboard-pci", "virtio-keyboard", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-mouse-ccw", "virtio-mouse", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-mouse-pci", "virtio-mouse", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-net-ccw", "virtio-net", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-net-pci", "virtio-net", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-rng-ccw", "virtio-rng", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-rng-pci", "virtio-rng", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-scsi-ccw", "virtio-scsi", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-scsi-pci", "virtio-scsi", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-serial-ccw", "virtio-serial", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-serial-pci", "virtio-serial", QEMU_ARCH_VIRTIO_PCI}, + { "virtio-tablet-ccw", "virtio-tablet", QEMU_ARCH_VIRTIO_CCW }, + { "virtio-tablet-pci", "virtio-tablet", QEMU_ARCH_VIRTIO_PCI }, { } }; =20 --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616597428; cv=none; d=zohomail.com; s=zohoarc; b=Bx0nRCycmDRWmP9njxY27l4Er6RbZW98n+8PzgB8ur28eq617Y+HdONMVbMVcSN54unCV2LzaVQPItl2BqEmPLMzD1dY4Do6JedKfdKNJZsVuV0QTGutNEEwQ8U0OIAbeMPzYXFlohuV2x0vAVx7a4Ji7BlyRoOWJBXwNiqXFNI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616597428; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LYtY8WstaP7kuj1GgptrAmRoMMv/ADLOwkzOGpAVJtI=; b=A+QfLs1ibGfA7znP473VYWtroNKs71qfrGs4ZWf2aYPUBf7c+VF7EZPsJJwmubxAqxz4sXLimYom8mjI9/ehLB23OJhdF4KozsA1I07ICxV/SUMhXCu6iQBEkVd9YAcFrRhbPqOuZM28NjJvfdLuZWV4olhWbE7b3FMvUQt7NWU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161659742835239.41976178416087; Wed, 24 Mar 2021 07:50:28 -0700 (PDT) Received: from localhost ([::1]:44796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4q3-0004b8-BS for importer@patchew.org; Wed, 24 Mar 2021 10:50:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4f7-0000K4-1l for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:09 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:40687) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4f2-0003Qb-Pp for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:08 -0400 Received: by mail-wr1-x433.google.com with SMTP id v11so24684309wro.7 for ; Wed, 24 Mar 2021 07:39:04 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id j20sm2664934wmp.30.2021.03.24.07.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:38:56 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 57DDC1FF9F; Wed, 24 Mar 2021 14:30:23 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LYtY8WstaP7kuj1GgptrAmRoMMv/ADLOwkzOGpAVJtI=; b=FF3JMkf21WzUKirBnvrpbZOXU2adk8wVK070JInTbEddMbeeDtGnmf29eoNmWaeWbC 8Y6Cyu7Nwsh3wXLFuBPUJcvA56iuYkIRN+3cjs+mEK/AutCLz3icE1m5YP1Je/odqFcV qiQotswVEb5xy+PjOHniOiIsWyVdibLANFvrZuhZgkojpqqegtOLaHdPU39GfEn99WQH DOWlvb2cw9pNwrofXG6E7f9YaKB3g5xS8aPsT3grHtRPXG9fOH9wzct1YJTj8GMluMHq OcntVhIYU0xaysHgPUZBC0C183sNczaXpilTzbG32lJ2TrNyfVq4G8rq2G4ug8pVi/M9 27FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LYtY8WstaP7kuj1GgptrAmRoMMv/ADLOwkzOGpAVJtI=; b=dVgdwIkPU7wC3Lh2Dv64jn7y/l3gG52VkJI7SErCaUmiOugjvcL5NM1BK9AyYoGMDM cTHmqaanNwByUZEy4/+aMBtZHaZCIMt7D1/IZQoR6Wn+C4961uymIkUHwq/zxRXSxTWn vFt2uqcF6aHr8NMcUm+YvCgnUweHx00fRntGWeSHjpnUDOGpGlbyV5K/O1qBlFNTrxDr XRGSQAaG/1CWokE6iDCSbP1N/KgsYotTCbEvf2+Q5MYejLzGNSiGpa0M70NvxmPHm/fm bi+ZulcDSd0X3orBy61mdMZNNdDPNhY/zLDBeWUOV2jdx6YeJ5NVfjWM4SGmclcJb7sq u86A== X-Gm-Message-State: AOAM530aJ3/MlkS58HDAsF+6+1vgpzo6XvBMRnhsVhLlz003LKmyeK/z MMegBSsh1Vv5IbLCje+4u+La0g== X-Google-Smtp-Source: ABdhPJyEDpcnJtnfiVhQzafaGytaviq53sqYChqewXrUZOBQeknNOWptGfOWeytxMO2ngERsjtVY+Q== X-Received: by 2002:a5d:4710:: with SMTP id y16mr3919750wrq.344.1616596743365; Wed, 24 Mar 2021 07:39:03 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 17/22] m68k: add the virtio devices aliases Date: Wed, 24 Mar 2021 14:30:16 +0000 Message-Id: <20210324143021.8560-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , Cornelia Huck , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Laurent Vivier Similarly to 5f629d943cb0 ("s390x: fix s390 virtio aliases"), define the virtio aliases. This allows to start machines with virtio devices without knowledge of the implementation type. For instance, we can use "-device virtio-scsi" on m68k, s390x or PC, and the device will be respectively "virtio-scsi-device", "virtio-scsi-ccw" or "virtio-scsi-pci". This already exists for s390x and -ccw interfaces, add them for m68k and MMIO (-device) interfaces. Signed-off-by: Laurent Vivier Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cornelia Huck Message-Id: <20210319202335.2397060-3-laurent@vivier.eu> Message-Id: <20210323165308.15244-18-alex.bennee@linaro.org> diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h index 0c90706516..16da279696 100644 --- a/include/sysemu/arch_init.h +++ b/include/sysemu/arch_init.h @@ -42,5 +42,6 @@ int xen_available(void); QEMU_ARCH_RISCV | QEMU_ARCH_SH4 | \ QEMU_ARCH_SPARC | QEMU_ARCH_XTENSA) #define QEMU_ARCH_VIRTIO_CCW (QEMU_ARCH_S390X) +#define QEMU_ARCH_VIRTIO_MMIO (QEMU_ARCH_M68K) =20 #endif diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index 0b40c97c6e..a9955b97a0 100644 --- a/softmmu/qdev-monitor.c +++ b/softmmu/qdev-monitor.c @@ -60,29 +60,41 @@ static const QDevAlias qdev_alias_table[] =3D { { "ES1370", "es1370" }, /* -soundhw name */ { "ich9-ahci", "ahci" }, { "lsi53c895a", "lsi" }, + { "virtio-9p-device", "virtio-9p", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-9p-ccw", "virtio-9p", QEMU_ARCH_VIRTIO_CCW }, { "virtio-9p-pci", "virtio-9p", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-balloon-device", "virtio-balloon", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-balloon-ccw", "virtio-balloon", QEMU_ARCH_VIRTIO_CCW }, { "virtio-balloon-pci", "virtio-balloon", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-blk-device", "virtio-blk", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-blk-ccw", "virtio-blk", QEMU_ARCH_VIRTIO_CCW }, { "virtio-blk-pci", "virtio-blk", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-gpu-device", "virtio-gpu", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-gpu-ccw", "virtio-gpu", QEMU_ARCH_VIRTIO_CCW }, { "virtio-gpu-pci", "virtio-gpu", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-input-host-device", "virtio-input-host", QEMU_ARCH_VIRTIO_MM= IO }, { "virtio-input-host-ccw", "virtio-input-host", QEMU_ARCH_VIRTIO_CCW }, { "virtio-input-host-pci", "virtio-input-host", QEMU_ARCH_VIRTIO_PCI }, { "virtio-iommu-pci", "virtio-iommu", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-keyboard-device", "virtio-keyboard", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-keyboard-ccw", "virtio-keyboard", QEMU_ARCH_VIRTIO_CCW }, { "virtio-keyboard-pci", "virtio-keyboard", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-mouse-device", "virtio-mouse", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-mouse-ccw", "virtio-mouse", QEMU_ARCH_VIRTIO_CCW }, { "virtio-mouse-pci", "virtio-mouse", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-net-device", "virtio-net", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-net-ccw", "virtio-net", QEMU_ARCH_VIRTIO_CCW }, { "virtio-net-pci", "virtio-net", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-rng-device", "virtio-rng", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-rng-ccw", "virtio-rng", QEMU_ARCH_VIRTIO_CCW }, { "virtio-rng-pci", "virtio-rng", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-scsi-device", "virtio-scsi", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-scsi-ccw", "virtio-scsi", QEMU_ARCH_VIRTIO_CCW }, { "virtio-scsi-pci", "virtio-scsi", QEMU_ARCH_VIRTIO_PCI }, + { "virtio-serial-device", "virtio-serial", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-serial-ccw", "virtio-serial", QEMU_ARCH_VIRTIO_CCW }, { "virtio-serial-pci", "virtio-serial", QEMU_ARCH_VIRTIO_PCI}, + { "virtio-tablet-device", "virtio-tablet", QEMU_ARCH_VIRTIO_MMIO }, { "virtio-tablet-ccw", "virtio-tablet", QEMU_ARCH_VIRTIO_CCW }, { "virtio-tablet-pci", "virtio-tablet", QEMU_ARCH_VIRTIO_PCI }, { } --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616597402; cv=none; d=zohomail.com; s=zohoarc; b=G86vtNy55bOhrEZxmV8/MqOpnkDPN3XnAYUEP0jHDpUahXsRBxF0C8SPpwQeBuSy7sP1LClbOwlT82IBWD1iu8NubQs4cTGm12i4k2mab18kuWp29ewkG7DrhBTmqAhxUkKilxfU11Qc3pVVmWF3uKEUMQT9Tf81sS9W/k1yGbM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616597402; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MGgvFyxsPVyUauSOkbs2e+OMiesteGJSjt/ekiCpmdg=; b=a0utJBZx1Fcuy8nl2OgQqFRabIpFpHns7CmzMw5v478bIZHMOE4es14MsZgKkwj+Y9WD9s+Phhq5NaY+KrWoBi2Jlf5v0dZ8FACl39t/drzYDfB2JuhkuymurH4YHngONWLuID+n0hp3LlgvTuMES26dhehGhLj8R/H18Ex5D48= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616597402072240.29862875212063; Wed, 24 Mar 2021 07:50:02 -0700 (PDT) Received: from localhost ([::1]:44074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4pb-0004Hz-FT for importer@patchew.org; Wed, 24 Mar 2021 10:50:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4ey-0008RV-Vf for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:00 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:42966) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4ex-0003MZ-7p for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:00 -0400 Received: by mail-wr1-x42c.google.com with SMTP id x13so24684538wrs.9 for ; Wed, 24 Mar 2021 07:38:58 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s9sm3080311wmh.31.2021.03.24.07.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:38:56 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6D9621FFA5; Wed, 24 Mar 2021 14:30:23 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MGgvFyxsPVyUauSOkbs2e+OMiesteGJSjt/ekiCpmdg=; b=aCWZ8ZLL1iUerulpZzY/6LCPja/CmOgTTCg3Z5KaKX+vovtghj07T+D/BHiBwQUKB1 GH+F0THMa38wpF9KlnpJLB23S8pMGE9mZoOth706UwdhZvI+oy/ew7FWlJmWiCN1rsz6 O/O9sMluitdJs3mAhAvvehx3vt2wltzaHvTQfYi9qIwHH9D9l6vMZifKI8TxFMAcZIEw Xt8rrSmTPXPdTNsebk4NhdG87ZIBVfq2PrYg9PDGULPcFxfXDc/h6hpO5UHoB49WlY+A f16KLUhwTnP1ERv3cgyPfh68Az3xtamaWO1n5Ei1CJb4WtgfqFgjQbeCJeNgvq3Q8QTK fdTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MGgvFyxsPVyUauSOkbs2e+OMiesteGJSjt/ekiCpmdg=; b=Q6tHcqhangm69BU41X+PjwB1k+1pi3TzY7lVm1K0c9knEj+N3waRhJh8iaIPJ0Olg7 75cr4Cf04NNj3wSkYtuKd43Q8Ieqt7RjuOatuNChAPqxYK4S8SQs/17ERMoM91f0gzMQ ainqB8muX/1Vj7XNX7oQ3qEPpuYmfhIIVSh6m0wRCQJ5WU+VJcmxtyLk/Vdv62L5sHCY SHEaTZhOyF6GTKdXDaPcfdfPA1YFOLOeLF3KmkoDwir/DgmTHJmIPe2NIs8EpKJqSFIW UcAp4GERxNUk3EV6Toyuk5+4qti6PHVwwQvpSdnN+fHDw6licVwqO1/hT1QR+AMPKU1m dEaQ== X-Gm-Message-State: AOAM531gJdnnzy3WJyg+widXyWtV7v+Wul6x7mrwIxYpddOdGvhlTiSk ZmxYwIPIyXqMUwBEXLrZXclcuA== X-Google-Smtp-Source: ABdhPJzHUK22H5jOD5mqA6k58dLQ+uAxfur0psqb/VmpG/5aFqGeBA2fDpLolHgVPX7JzLIPCZ0ODg== X-Received: by 2002:a5d:4286:: with SMTP id k6mr3810165wrq.278.1616596737470; Wed, 24 Mar 2021 07:38:57 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 18/22] blockdev: with -drive if=virtio, use generic virtio-blk Date: Wed, 24 Mar 2021 14:30:17 +0000 Message-Id: <20210324143021.8560-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "open list:Block layer core" , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, Markus Armbruster , Max Reitz , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Laurent Vivier Rather than checking if the machine is an s390x to use virtio-blk-ccw instead of virtio-blk-pci, use the alias virtio-blk that is set to the expected target. This also enables the use of virtio-blk-device for targets without PCI or CCW. Signed-off-by: Laurent Vivier Signed-off-by: Alex Benn=C3=A9e Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Markus Armbruster Message-Id: <20210319202335.2397060-4-laurent@vivier.eu> Message-Id: <20210323165308.15244-19-alex.bennee@linaro.org> diff --git a/blockdev.c b/blockdev.c index 621cc3b7c4..a57590aae4 100644 --- a/blockdev.c +++ b/blockdev.c @@ -962,11 +962,7 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfac= eType block_default_type, QemuOpts *devopts; devopts =3D qemu_opts_create(qemu_find_opts("device"), NULL, 0, &error_abort); - if (arch_type =3D=3D QEMU_ARCH_S390X) { - qemu_opt_set(devopts, "driver", "virtio-blk-ccw", &error_abort= ); - } else { - qemu_opt_set(devopts, "driver", "virtio-blk-pci", &error_abort= ); - } + qemu_opt_set(devopts, "driver", "virtio-blk", &error_abort); qemu_opt_set(devopts, "drive", qdict_get_str(bs_opts, "id"), &error_abort); } --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616597229; cv=none; d=zohomail.com; s=zohoarc; b=nYybsyTm6uCMGA2BRO2eGM0HYm7IBDP+y8f6/lzBMQNa8bUbbaX/QVKY9O40wKBzQ0MVq9OuiP6dmcDgSA+ZFPLS5gv97fmm7GI9MSnRR5USZv8OZk/M0AQcVC6SY9+qiWfk0fwi/AjwrNr3ra3dmdcPxRDhKW3hCOnAv/pxvSU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616597229; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XksdYAKamza61JCIXgkeNsgm0T3+uDsF6mEoMCxikEk=; b=C4yCknsaIjvuWH1J/Wg/Kqrg9jKlAXdT2kOG856j5Pql9VsLwIh3c5TgBoPR4LRX3xfC642wEYPry8eQs+p/aUY0FzZ9zZFv05Zk6SnmEc1splt5ZOLxJ2v4FfUp8ZVPQOAtDOyvQie3eTh4GLf+dqtmmjCmqc/KWRiEgE3C1ec= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616597229795242.62818843943046; Wed, 24 Mar 2021 07:47:09 -0700 (PDT) Received: from localhost ([::1]:36374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4mq-000172-Vg for importer@patchew.org; Wed, 24 Mar 2021 10:47:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4f4-0000DI-Gu for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:06 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:34771) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4f0-0003Om-6i for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:06 -0400 Received: by mail-wr1-x429.google.com with SMTP id j7so24718109wrd.1 for ; Wed, 24 Mar 2021 07:39:01 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id m9sm3507775wro.52.2021.03.24.07.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:38:56 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9AC551FFA6; Wed, 24 Mar 2021 14:30:23 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XksdYAKamza61JCIXgkeNsgm0T3+uDsF6mEoMCxikEk=; b=sQ317gBIdAIhZ8O1mS8Uy1gYxqiBxjOv7JONf+QtUsdNayBYFYVxbur5ntBmkX8alh Wmkm6VINrmF7ya5XmB63An51h+O7OMJwoN5rUEtzMgxTYbRmyDTe0AC7IPe0OKG0W2aP 57PEZ2MufbpSpSFiINf0X2StaelNgQ0L4i5WVlF0R8H94+Bcu2kNh9i2WEW6mVHfUFF+ LQwu+PnCT5cip9852AQOK4GXbPPYR0Qp2dQUSaNIuP2nam6uVkWs43ANnCtZus3ulzIP K6ZDySbsLjjXbv9WS0LJrxw2NBswDuz+3JpahSJbzdCJisLs8oy5bEuua5PaaFoVL+DL /HfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XksdYAKamza61JCIXgkeNsgm0T3+uDsF6mEoMCxikEk=; b=H26yRvaay+spP6iYAydRvcoPDnG3Hsi+Y/oDbsKokt0A3BkESlwerHCJwRWQjlBFp5 XxE6tKTU9tggUN1RfWKuK+PsLGZ+/8uc/aHigpVq4WK674q+8i26WmEqoxygCnScdPsZ Hda6x3ILWsQsEh8nO/dyA1T/u2mPpPeH0o77fYOSa/+zVyp9/NKEUQc7MZbS0iSE9+Lt U53bje8T4ClxVA+JjvEnJfvDeLmfj/8FF6m8iCAtMejls+T+/dAU9fkzGD/OerX7Ndd9 aXNXoYfOLzsvVqdhGDsCnabr+IikV5XjY/T9ySDlo3ynYAH6cooLyn+a2GinXvTQjg4y mPaQ== X-Gm-Message-State: AOAM531IT3Aow27zlR1wt/j5X7DM4xQLoQGv40yJPrsPldJLb5auGI+S 3qOYEOVk/haY5t6Cz4YbrKOuAw== X-Google-Smtp-Source: ABdhPJyoVPlW02/gQwzajws7+bcT0cuNTpKBXFZfVU0bxMXBfPMgOwTMT6/TJBO0I3gDMTOw96nqPQ== X-Received: by 2002:adf:ed87:: with SMTP id c7mr3927680wro.9.1616596740504; Wed, 24 Mar 2021 07:39:00 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 19/22] iotests: Revert "iotests: use -ccw on s390x for 040, 139, and 182" Date: Wed, 24 Mar 2021 14:30:18 +0000 Message-Id: <20210324143021.8560-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Thomas Huth , "open list:Block layer core" , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cornelia Huck , qemu-devel@nongnu.org, Laurent Vivier , "open list:S390 general arch..." , Max Reitz , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Laurent Vivier Commit f1d5516ab583 introduces a test in some iotests to check if the machine is a s390-ccw-virtio and to select virtio-*-ccw rather than virtio-*-pci. We don't need that because QEMU already provides aliases to use the correct virtio interface according to the machine type. This patch removes all virtio-*-pci and virtio-*-ccw to use virtio-* instead and remove get_virtio_scsi_device(). This also enables virtio-mmio devices (virtio-*-device) Signed-off-by: Laurent Vivier Signed-off-by: Alex Benn=C3=A9e Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cornelia Huck Message-Id: <20210319202335.2397060-5-laurent@vivier.eu> Message-Id: <20210323165308.15244-20-alex.bennee@linaro.org> diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040 index 336ff7c4f2..ba7cb34ce8 100755 --- a/tests/qemu-iotests/040 +++ b/tests/qemu-iotests/040 @@ -89,7 +89,7 @@ class TestSingleDrive(ImageCommitTestCase): qemu_io('-f', 'raw', '-c', 'write -P 0xab 0 524288', backing_img) qemu_io('-f', iotests.imgfmt, '-c', 'write -P 0xef 524288 524288',= mid_img) self.vm =3D iotests.VM().add_drive(test_img, "node-name=3Dtop,back= ing.node-name=3Dmid,backing.backing.node-name=3Dbase", interface=3D"none") - self.vm.add_device(iotests.get_virtio_scsi_device()) + self.vm.add_device('virtio-scsi') self.vm.add_device("scsi-hd,id=3Dscsi0,drive=3Ddrive0") self.vm.launch() self.has_quit =3D False diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index f92161d8ef..333cc81818 100755 --- a/tests/qemu-iotests/051 +++ b/tests/qemu-iotests/051 @@ -119,17 +119,7 @@ echo echo =3D=3D=3D Device without drive =3D=3D=3D echo =20 -case "$QEMU_DEFAULT_MACHINE" in - s390-ccw-virtio) - virtio_scsi=3Dvirtio-scsi-ccw - ;; - *) - virtio_scsi=3Dvirtio-scsi-pci - ;; -esac - -run_qemu -device $virtio_scsi -device scsi-hd | - sed -e "s/$virtio_scsi/VIRTIO_SCSI/" +run_qemu -device virtio-scsi -device scsi-hd =20 echo echo =3D=3D=3D Overriding backing file =3D=3D=3D diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out index de4771bcb3..437053c839 100644 --- a/tests/qemu-iotests/051.out +++ b/tests/qemu-iotests/051.out @@ -72,7 +72,7 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,node-name=3Dfoo= #12: Invalid node name =20 =3D=3D=3D Device without drive =3D=3D=3D =20 -Testing: -device VIRTIO_SCSI -device scsi-hd +Testing: -device virtio-scsi -device scsi-hd QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -device scsi-hd: drive property not set =20 diff --git a/tests/qemu-iotests/051.pc.out b/tests/qemu-iotests/051.pc.out index a28e3fc124..e95bd42b8d 100644 --- a/tests/qemu-iotests/051.pc.out +++ b/tests/qemu-iotests/051.pc.out @@ -72,7 +72,7 @@ QEMU_PROG: -drive file=3DTEST_DIR/t.qcow2,node-name=3Dfoo= #12: Invalid node-name: 'fo =20 =3D=3D=3D Device without drive =3D=3D=3D =20 -Testing: -device VIRTIO_SCSI -device scsi-hd +Testing: -device virtio-scsi -device scsi-hd QEMU X.Y.Z monitor - type 'help' for more information (qemu) QEMU_PROG: -device scsi-hd: drive property not set =20 diff --git a/tests/qemu-iotests/068 b/tests/qemu-iotests/068 index 03e03508a6..54e49c8ffa 100755 --- a/tests/qemu-iotests/068 +++ b/tests/qemu-iotests/068 @@ -49,11 +49,9 @@ IMG_SIZE=3D128K case "$QEMU_DEFAULT_MACHINE" in s390-ccw-virtio) platform_parm=3D"-no-shutdown" - hba=3Dvirtio-scsi-ccw ;; *) platform_parm=3D"" - hba=3Dvirtio-scsi-pci ;; esac =20 @@ -61,7 +59,7 @@ _qemu() { $QEMU $platform_parm -nographic -monitor stdio -serial none \ -drive if=3Dnone,id=3Ddrive0,file=3D"$TEST_IMG",format=3D"$IMGFM= T" \ - -device $hba,id=3Dhba0 \ + -device virtio-scsi,id=3Dhba0 \ -device scsi-hd,drive=3Ddrive0 \ "$@" |\ _filter_qemu | _filter_hmp diff --git a/tests/qemu-iotests/093 b/tests/qemu-iotests/093 index 7745cb04b6..93274dc8cb 100755 --- a/tests/qemu-iotests/093 +++ b/tests/qemu-iotests/093 @@ -371,8 +371,7 @@ class ThrottleTestGroupNames(iotests.QMPTestCase): class ThrottleTestRemovableMedia(iotests.QMPTestCase): def setUp(self): self.vm =3D iotests.VM() - self.vm.add_device("{},id=3Dvirtio-scsi".format( - iotests.get_virtio_scsi_device())) + self.vm.add_device("{},id=3Dvirtio-scsi".format('virtio-scsi')) self.vm.launch() =20 def tearDown(self): diff --git a/tests/qemu-iotests/139 b/tests/qemu-iotests/139 index e79b3c21fd..178b1ee230 100755 --- a/tests/qemu-iotests/139 +++ b/tests/qemu-iotests/139 @@ -26,18 +26,13 @@ import time =20 base_img =3D os.path.join(iotests.test_dir, 'base.img') new_img =3D os.path.join(iotests.test_dir, 'new.img') -if iotests.qemu_default_machine =3D=3D 's390-ccw-virtio': - default_virtio_blk =3D 'virtio-blk-ccw' -else: - default_virtio_blk =3D 'virtio-blk-pci' =20 class TestBlockdevDel(iotests.QMPTestCase): =20 def setUp(self): iotests.qemu_img('create', '-f', iotests.imgfmt, base_img, '1M') self.vm =3D iotests.VM() - self.vm.add_device("{},id=3Dvirtio-scsi".format( - iotests.get_virtio_scsi_device())) + self.vm.add_device("{},id=3Dvirtio-scsi".format('virtio-scsi')) self.vm.launch() =20 def tearDown(self): @@ -93,7 +88,7 @@ class TestBlockdevDel(iotests.QMPTestCase): self.checkBlockDriverState(node, expect_error) =20 # Add a device model - def addDeviceModel(self, device, backend, driver =3D default_virtio_bl= k): + def addDeviceModel(self, device, backend, driver =3D 'virtio-blk'): result =3D self.vm.qmp('device_add', id =3D device, driver =3D driver, drive =3D backend) self.assert_qmp(result, 'return', {}) diff --git a/tests/qemu-iotests/182 b/tests/qemu-iotests/182 index 55a0384c08..fcd1d796eb 100755 --- a/tests/qemu-iotests/182 +++ b/tests/qemu-iotests/182 @@ -46,26 +46,17 @@ _supported_proto file =20 size=3D32M =20 -case "$QEMU_DEFAULT_MACHINE" in - s390-ccw-virtio) - virtioblk=3Dvirtio-blk-ccw - ;; - *) - virtioblk=3Dvirtio-blk-pci - ;; -esac - _make_test_img $size =20 echo "Starting QEMU" _launch_qemu -drive file=3D$TEST_IMG,if=3Dnone,id=3Ddrive0,file.locking=3D= on \ - -device $virtioblk,drive=3Ddrive0 + -device virtio-blk,drive=3Ddrive0 =20 echo echo "Starting a second QEMU using the same image should fail" echo 'quit' | $QEMU -nographic -monitor stdio \ -drive file=3D$TEST_IMG,if=3Dnone,id=3Ddrive0,file.locking=3Don \ - -device $virtioblk,drive=3Ddrive0 2>&1 | _filter_testdir 2>&1 | + -device virtio-blk,drive=3Ddrive0 2>&1 | _filter_testdir 2>&1 | _filter_qemu | sed -e '/falling back to POSIX file/d' \ -e '/locks can be lost unexpectedly/d' diff --git a/tests/qemu-iotests/238 b/tests/qemu-iotests/238 index 8a10af57f1..38bd3744e6 100755 --- a/tests/qemu-iotests/238 +++ b/tests/qemu-iotests/238 @@ -26,14 +26,12 @@ from iotests import log =20 iotests.script_initialize() =20 -virtio_scsi_device =3D iotests.get_virtio_scsi_device() - vm =3D iotests.VM() vm.launch() =20 log(vm.qmp('blockdev-add', node_name=3D'hd0', driver=3D'null-co', read_zer= oes=3DTrue)) log(vm.qmp('object-add', qom_type=3D'iothread', id=3D'iothread0')) -log(vm.qmp('device_add', id=3D'scsi0', driver=3Dvirtio_scsi_device, iothre= ad=3D'iothread0')) +log(vm.qmp('device_add', id=3D'scsi0', driver=3D'virtio-scsi', iothread=3D= 'iothread0')) log(vm.qmp('device_add', id=3D'scsi-hd0', driver=3D'scsi-hd', drive=3D'hd0= ')) log(vm.qmp('block_set_io_throttle', id=3D'scsi-hd0', bps=3D0, bps_rd=3D0, = bps_wr=3D0, iops=3D1000, iops_rd=3D0, iops_wr=3D0, conv_keys=3DFalse)) diff --git a/tests/qemu-iotests/240 b/tests/qemu-iotests/240 index ab077f4ceb..9b281e1dc0 100755 --- a/tests/qemu-iotests/240 +++ b/tests/qemu-iotests/240 @@ -42,7 +42,7 @@ class TestCase(iotests.QMPTestCase): iotests.log('=3D=3DUnplug a SCSI disk and then plug it again=3D=3D= ') self.vm.qmp_log('blockdev-add', driver=3D'null-co', read_zeroes=3D= True, node_name=3D'hd0') self.vm.qmp_log('object-add', qom_type=3D'iothread', id=3D"iothrea= d0") - self.vm.qmp_log('device_add', id=3D'scsi0', driver=3Diotests.get_v= irtio_scsi_device(), iothread=3D'iothread0', filters=3D[iotests.filter_qmp_= virtio_scsi]) + self.vm.qmp_log('device_add', id=3D'scsi0', driver=3D'virtio-scsi'= , iothread=3D'iothread0', filters=3D[iotests.filter_qmp_virtio_scsi]) self.vm.qmp_log('device_add', id=3D'scsi-hd0', driver=3D'scsi-hd',= drive=3D'hd0') self.vm.qmp_log('device_del', id=3D'scsi-hd0') self.vm.event_wait('DEVICE_DELETED') @@ -55,7 +55,7 @@ class TestCase(iotests.QMPTestCase): iotests.log('=3D=3DAttach two SCSI disks using the same block devi= ce and the same iothread=3D=3D') self.vm.qmp_log('blockdev-add', driver=3D'null-co', read_zeroes=3D= True, node_name=3D'hd0', read_only=3DTrue) self.vm.qmp_log('object-add', qom_type=3D'iothread', id=3D"iothrea= d0") - self.vm.qmp_log('device_add', id=3D'scsi0', driver=3Diotests.get_v= irtio_scsi_device(), iothread=3D'iothread0', filters=3D[iotests.filter_qmp_= virtio_scsi]) + self.vm.qmp_log('device_add', id=3D'scsi0', driver=3D'virtio-scsi'= , iothread=3D'iothread0', filters=3D[iotests.filter_qmp_virtio_scsi]) =20 self.vm.qmp_log('device_add', id=3D'scsi-hd0', driver=3D'scsi-hd',= drive=3D'hd0') self.vm.qmp_log('device_add', id=3D'scsi-hd1', driver=3D'scsi-hd',= drive=3D'hd0') @@ -73,8 +73,8 @@ class TestCase(iotests.QMPTestCase): self.vm.qmp_log('object-add', qom_type=3D'iothread', id=3D"iothrea= d0") self.vm.qmp_log('object-add', qom_type=3D'iothread', id=3D"iothrea= d1") =20 - self.vm.qmp_log('device_add', id=3D'scsi0', driver=3Diotests.get_v= irtio_scsi_device(), iothread=3D'iothread0', filters=3D[iotests.filter_qmp_= virtio_scsi]) - self.vm.qmp_log('device_add', id=3D'scsi1', driver=3Diotests.get_v= irtio_scsi_device(), iothread=3D'iothread1', filters=3D[iotests.filter_qmp_= virtio_scsi]) + self.vm.qmp_log('device_add', id=3D'scsi0', driver=3D'virtio-scsi'= , iothread=3D'iothread0', filters=3D[iotests.filter_qmp_virtio_scsi]) + self.vm.qmp_log('device_add', id=3D'scsi1', driver=3D'virtio-scsi'= , iothread=3D'iothread1', filters=3D[iotests.filter_qmp_virtio_scsi]) =20 self.vm.qmp_log('device_add', id=3D'scsi-hd0', driver=3D'scsi-hd',= drive=3D'hd0', bus=3D"scsi0.0") self.vm.qmp_log('device_add', id=3D'scsi-hd1', driver=3D'scsi-hd',= drive=3D'hd0', bus=3D"scsi1.0") @@ -99,7 +99,7 @@ class TestCase(iotests.QMPTestCase): self.vm.qmp_log('nbd-server-add', device=3D'hd0') =20 self.vm.qmp_log('object-add', qom_type=3D'iothread', id=3D"iothrea= d0") - self.vm.qmp_log('device_add', id=3D'scsi0', driver=3Diotests.get_v= irtio_scsi_device(), iothread=3D'iothread0', filters=3D[iotests.filter_qmp_= virtio_scsi]) + self.vm.qmp_log('device_add', id=3D'scsi0', driver=3D'virtio-scsi'= , iothread=3D'iothread0', filters=3D[iotests.filter_qmp_virtio_scsi]) self.vm.qmp_log('device_add', id=3D'scsi-hd0', driver=3D'scsi-hd',= drive=3D'hd0') =20 if __name__ =3D=3D '__main__': diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257 index 7cd2520829..c72c82a171 100755 --- a/tests/qemu-iotests/257 +++ b/tests/qemu-iotests/257 @@ -292,7 +292,7 @@ def test_bitmap_sync(bsync_mode, msync_mode=3D'bitmap',= failure=3DNone): log('--- Preparing image & VM ---\n') drive0 =3D Drive(img_path, vm=3Dvm) drive0.img_create(iotests.imgfmt, SIZE) - vm.add_device("{},id=3Dscsi0".format(iotests.get_virtio_scsi_devic= e())) + vm.add_device("{},id=3Dscsi0".format('virtio-scsi')) vm.launch() =20 file_config =3D { @@ -449,7 +449,7 @@ def test_backup_api(): log('--- Preparing image & VM ---\n') drive0 =3D Drive(img_path, vm=3Dvm) drive0.img_create(iotests.imgfmt, SIZE) - vm.add_device("{},id=3Dscsi0".format(iotests.get_virtio_scsi_devic= e())) + vm.add_device("{},id=3Dscsi0".format('virtio-scsi')) vm.launch() =20 file_config =3D { diff --git a/tests/qemu-iotests/307 b/tests/qemu-iotests/307 index 9008974346..c7685347bc 100755 --- a/tests/qemu-iotests/307 +++ b/tests/qemu-iotests/307 @@ -40,13 +40,11 @@ with iotests.FilePath('image') as img, \ =20 iotests.log('=3D=3D=3D Launch VM =3D=3D=3D') =20 - virtio_scsi_device =3D iotests.get_virtio_scsi_device() - vm.add_object('iothread,id=3Diothread0') vm.add_blockdev(f'file,filename=3D{img},node-name=3Dfile') vm.add_blockdev(f'{iotests.imgfmt},file=3Dfile,node-name=3Dfmt') vm.add_blockdev('raw,file=3Dfile,node-name=3Dro,read-only=3Don') - vm.add_device(f'id=3Dscsi0,driver=3D{virtio_scsi_device},iothread=3Dio= thread0') + vm.add_device(f'id=3Dscsi0,driver=3Dvirtio-scsi,iothread=3Diothread0') vm.launch() =20 vm.qmp_log('nbd-server-start', diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 90d0b62523..1e9e6a066e 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -234,11 +234,6 @@ def qemu_io_silent_check(*args): stderr=3Dsubprocess.STDOUT) return exitcode =3D=3D 0 =20 -def get_virtio_scsi_device(): - if qemu_default_machine =3D=3D 's390-ccw-virtio': - return 'virtio-scsi-ccw' - return 'virtio-scsi-pci' - class QemuIoInteractive: def __init__(self, *args): self.args =3D qemu_io_args_no_fmt + list(args) --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616597055; cv=none; d=zohomail.com; s=zohoarc; b=oFcx6Om+t1XR+8kCqxCh3ZtooXDkrQT61jk39dYawINjR9kBxGe/tQQzfhIuG7HxxVp47knC5KHdThe2KZmXFtHnT9YMwvUDMmcGLasGTxZOJsbSOtSnZ3Cb0tVuyAeuWZLd3hg6csPBGr6jdZ/GsTFbl6QffwDHvMYZHiLtpDo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616597055; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=+kUQYhzIpYJedPSa1pUwupzboguGi6iQwNCx5cgFBSM=; b=EiDgVvJJnv1t8Kuu6KAXr+F3dHHsFRIYIhXRAUVWTwCm2r7AXdMoxE3u3yOwCG8/TTN01v6iLM8BgJkg7M3vsoNZ9uDddqiUiVKCQEq6J7KPUBkEuHqxnQixon3eJsq+99nG0HES90Hy1QkWo0W/xWGQPJC0PR42Czh/bLwQiqM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616597055000747.1510907054582; Wed, 24 Mar 2021 07:44:15 -0700 (PDT) Received: from localhost ([::1]:55108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4k2-0005Xd-39 for importer@patchew.org; Wed, 24 Mar 2021 10:44:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4f0-0008VN-NQ for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:02 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:37704) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4ex-0003NB-L9 for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:02 -0400 Received: by mail-wm1-x32d.google.com with SMTP id f22-20020a7bc8d60000b029010c024a1407so1340092wml.2 for ; Wed, 24 Mar 2021 07:38:59 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a8sm2534265wmm.46.2021.03.24.07.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:38:56 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B0CB31FFA9; Wed, 24 Mar 2021 14:30:23 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+kUQYhzIpYJedPSa1pUwupzboguGi6iQwNCx5cgFBSM=; b=XYKWiFiMwOe/P4IPvxODhvJWe394eaNO0TGMcfeofKmHnI7PSl+vaT7qdJ5UDQR5D8 IYXDD3qdLwUHv0ZLv8Z4cAftRF74BUUo6/NLy3SNouIKD2jhFxaeDlQSJ1h2Ctj+SrSS UVZcEV1Z4iITU/VCqoeU1M6MukF4ZouUAdxc/Srj5SYNov/7i1qlPfdqJz86St4crLBT Nlr/LrNxr3Vg+f05c9IOHnyRJqgjewcTOSh4sp6akVzeUCAe/WsjPm+ZfrnQsofV+vVS GSlIkXps6YMdWI/S5SEXVlLiMi5kyu693grHsgsyTqs+eA+IwizEZ3OnHTvE1Uv4ezOu NlDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+kUQYhzIpYJedPSa1pUwupzboguGi6iQwNCx5cgFBSM=; b=eYv6HelVD22VwFu6tXdR3KS09d1Yabw03O5qt1SYZ49P20ghWeAGuqKHPS5F3Vjpmv Nhda006eajd/1EX+k9H4yVPWh1LK710XQ6G7nXgWeU7OiC5GUeYLHl1hPC9vnxUx1cDY fRMNpwqZoJ8u13yT07OpDm4NVkY3p9/K4lDsq9A9GdfMxTDuWbNVtYvhISeMFFEGQfGp 7b8bg6K3lrDpiJyThkdHTCNPIdZETdlLIy6EBSJsuml67OQvMJuHHWs52oi8uGmIbDQ8 WS0usF3jmKssIFhyi/4kCAccsS1FJxEZc6oafMqyJ8QMjSZtaif9aGg6w+bY9kQSAwfg X1Hw== X-Gm-Message-State: AOAM531TtLHfggaki0fBwOkoMKbOhwhpmusVk3/HEw7uKOozkZZsZU/Y hLY27saLTV0Qp63RTUElPHJXHg== X-Google-Smtp-Source: ABdhPJwYpCddi91wNbvn0q3wyqvwPS243Zb/duKTgPlRJinQm/iB6+ZqqDJwLjlQ+tSuSIq1AQqbXA== X-Received: by 2002:a05:600c:b57:: with SMTP id k23mr3167995wmr.145.1616596738220; Wed, 24 Mar 2021 07:38:58 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 20/22] iotests: test m68k with the virt machine Date: Wed, 24 Mar 2021 14:30:19 +0000 Message-Id: <20210324143021.8560-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "open list:Block layer core" , Cornelia Huck , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Max Reitz , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Laurent Vivier This allows to cover the virtio tests with a 32bit big-endian virtio-mmio machine. Signed-off-by: Laurent Vivier Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cornelia Huck Message-Id: <20210319202335.2397060-6-laurent@vivier.eu> Message-Id: <20210323165308.15244-21-alex.bennee@linaro.org> diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py index 1fbec854c1..6d27712617 100644 --- a/tests/qemu-iotests/testenv.py +++ b/tests/qemu-iotests/testenv.py @@ -208,6 +208,7 @@ def __init__(self, imgfmt: str, imgproto: str, aiomode:= str, ('arm', 'virt'), ('aarch64', 'virt'), ('avr', 'mega2560'), + ('m68k', 'virt'), ('rx', 'gdbsim-r5f562n8'), ('tricore', 'tricore_testboard') ) --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616597515; cv=none; d=zohomail.com; s=zohoarc; b=GUteU19Z0ovrH0tc7V2Df6krz8U3LE8eihLTYfJKGoTlqZHiFmL0VD9BTk0iSaao1SedcFrW59TPIRsXzQuJPsDgX4Zl+kslKoHFRBQVkjtLjoFgHzlT7BgllFYNVGfkJf3AGsScDBqD1gbf0nt21VfP6WhzrcOLDZKGUoO/qnI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616597515; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6V3I/617iDbb/+WUozJNJUkeoG1NJQtGMXaybo4P6+c=; b=NpyrpexRllMfJ2vXez3CtC7gX50oveBsVAGgBasnWCzpaITaC9rMMwH/XCjIDbAkP+0aQ6jsu4mBf6nVwIWMeGd7DxNQ++euix8qpIVG0BDkxMkdh+GXL/g9vXMDgojtWvTIS58tHmFE/VO7mk4OYQa+ZUDS6QGTSLSilBYVcNs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616597515171456.2232539377185; Wed, 24 Mar 2021 07:51:55 -0700 (PDT) Received: from localhost ([::1]:48312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4rS-0006Bo-FR for importer@patchew.org; Wed, 24 Mar 2021 10:51:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4f5-0000GI-KW for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:07 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:55251) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4f3-0003RS-PQ for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:07 -0400 Received: by mail-wm1-x32e.google.com with SMTP id k128so10637696wmk.4 for ; Wed, 24 Mar 2021 07:39:05 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u23sm2785424wmn.26.2021.03.24.07.38.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:39:03 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CBA431FFAA; Wed, 24 Mar 2021 14:30:23 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6V3I/617iDbb/+WUozJNJUkeoG1NJQtGMXaybo4P6+c=; b=NCR7iikvhLuh6qliDuePFeWVUUAc9nmNHSO65l1JEm6yqwmuFRDpnLQPO49cElPBde dE6D3/kw4t5Rwc95T2NL7j8JK82hMqDev/Drb/Ksx4xsJSrQqZsv5k/R+HclJawL5y5B CpFizT7FIjTJdaBAo/Q4sHesJqcag3n9P+Xf/p876Op9T0gqmnXRuz2ZONZ2x83B10Pd 6HDAXM0V4T2P/B1m5jfkUpPN0Ni6RVtu218DjbWSBPqpP9sRsPUP2sf5/MKUsSi/M8Y8 iFvF5+k/eXRV70ZbVmDCV9fL1sAd8CIPrqkzOo9XXuSkHHb1tIM5+3+YTwQb8xBcue6g iM4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6V3I/617iDbb/+WUozJNJUkeoG1NJQtGMXaybo4P6+c=; b=kDtgpoCy1PGhRIof495HUarpKxgEpbneOoyziA7M9Asy7/mwVu/0ZC2SEqdQQa//kc vxlMeIuBnNpNqOnOjOm/uyy/P3SHhTEfXr7e4C8R9xiDBut0p7pzzHTxgnqpOKJXNMfS KAFdDEZ7apT5ghIqW2mRlcOrOOYkDTfnSZUXIGWI9S/qia+oHjOuW/SH7iEnOi0F/z2t DNM1d+D4+yV9qDFy8K2QhMFZD9mlOfUUifyqAgiKTm9/Fx4pdBS3Sb0k1fHJWeShitpg jLEc06+v4al4906NixO+RGBGilcKKLXSad3h3wvDTndWK+VQqwrXppiBk0AC21XoVHa9 0k3Q== X-Gm-Message-State: AOAM532E8WJ34rcTkf2OYEgtbHTv4QoJrov+ixSBfeeTkkYAIbvBwGBd E3urxfR01b/ptnX4LihAMQkxcA== X-Google-Smtp-Source: ABdhPJy+LNMVsKrBZthp4zaZsCtvTqcCQmlARuEgEy1OZ/9gBxd2xmropCIzskn5UJfgtnCG/k2LmQ== X-Received: by 2002:a1c:bc56:: with SMTP id m83mr3294863wmf.174.1616596744436; Wed, 24 Mar 2021 07:39:04 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 21/22] iotests: iothreads need ioeventfd Date: Wed, 24 Mar 2021 14:30:20 +0000 Message-Id: <20210324143021.8560-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Thomas Huth , "open list:Block layer core" , qemu-devel@nongnu.org, Max Reitz , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Laurent Vivier And ioeventfd are only available with virtio-scsi-pci or virtio-scsi-ccw, use the alias but add a rule to require virtio-scsi-pci or virtio-scsi-ccw for the tests that use iothreads. Signed-off-by: Laurent Vivier Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth Message-Id: <20210319202335.2397060-7-laurent@vivier.eu> Message-Id: <20210323165308.15244-22-alex.bennee@linaro.org> diff --git a/tests/qemu-iotests/127 b/tests/qemu-iotests/127 index 98e8e82a82..32edc3b068 100755 --- a/tests/qemu-iotests/127 +++ b/tests/qemu-iotests/127 @@ -44,7 +44,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _supported_fmt qcow2 _supported_proto file fuse =20 -_require_devices virtio-scsi scsi-hd +_require_devices scsi-hd +_require_one_device_of virtio-scsi-pci virtio-scsi-ccw =20 IMG_SIZE=3D64K =20 diff --git a/tests/qemu-iotests/256 b/tests/qemu-iotests/256 index 8d82a1dd86..13666813bd 100755 --- a/tests/qemu-iotests/256 +++ b/tests/qemu-iotests/256 @@ -24,6 +24,8 @@ import os import iotests from iotests import log =20 +iotests._verify_virtio_scsi_pci_or_ccw() + iotests.script_initialize(supported_fmts=3D['qcow2']) size =3D 64 * 1024 * 1024 =20 @@ -61,8 +63,8 @@ with iotests.FilePath('img0') as img0_path, \ log('--- Preparing images & VM ---\n') vm.add_object('iothread,id=3Diothread0') vm.add_object('iothread,id=3Diothread1') - vm.add_device('virtio-scsi-pci,id=3Dscsi0,iothread=3Diothread0') - vm.add_device('virtio-scsi-pci,id=3Dscsi1,iothread=3Diothread1') + vm.add_device('virtio-scsi,id=3Dscsi0,iothread=3Diothread0') + vm.add_device('virtio-scsi,id=3Dscsi1,iothread=3Diothread1') iotests.qemu_img_create('-f', iotests.imgfmt, img0_path, str(size)) iotests.qemu_img_create('-f', iotests.imgfmt, img1_path, str(size)) vm.add_drive(img0_path, interface=3D'none') diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 65cdba5723..7f49c9716d 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -977,5 +977,18 @@ _require_devices() done } =20 +_require_one_device_of() +{ + available=3D$($QEMU -M none -device help | \ + grep ^name | sed -e 's/^name "//' -e 's/".*$//') + for device + do + if echo "$available" | grep -q "$device" ; then + return + fi + done + _notrun "$* not available" +} + # make sure this script returns success true diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 1e9e6a066e..5af0182895 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -1146,6 +1146,11 @@ def _verify_virtio_blk() -> None: if 'virtio-blk' not in out: notrun('Missing virtio-blk in QEMU binary') =20 +def _verify_virtio_scsi_pci_or_ccw() -> None: + out =3D qemu_pipe('-M', 'none', '-device', 'help') + if 'virtio-scsi-pci' not in out and 'virtio-scsi-ccw' not in out: + notrun('Missing virtio-scsi-pci or virtio-scsi-ccw in QEMU binary') + =20 def supports_quorum(): return 'quorum' in qemu_img_pipe('--help') --=20 2.20.1 From nobody Mon Apr 29 09:50:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1616597568; cv=none; d=zohomail.com; s=zohoarc; b=MHVJODwPELjtwpVqAlS9EORpS3aky0EHUOHDXt69R8tV8n+1ym/G7ZEwYhMYidmN55wIE/nqIy3MJ7yd71F39u88Olys6iu/fYc+SaZvhRPD7S50ukAN+xAtlhofZBSOdXnAozTGs8OkU0Jp6nsJ/aeAklwKIcJJoprITzbZubw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616597568; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oPq46WkfMIfhC+35R00H1uei8HDXcw6U7w4p2WsTbhg=; b=QgP+iDO1GkoAAhSPqFynNzNFuepHv2TghJRnbNWULO0sRt/m+sYvW/TM4VkfwB6b3/xRSJIbhznfe0z0XqlsQj971oHGevQqZMfdJGlp9ghEzdPBsSy8Y1CwojdA2gjW1pPNU4SKkIrxZ/6Jo9f84O4hAU4PGws1MIf2MCAuVg4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616597568311393.83304847952047; Wed, 24 Mar 2021 07:52:48 -0700 (PDT) Received: from localhost ([::1]:52634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lP4sJ-0007xD-HW for importer@patchew.org; Wed, 24 Mar 2021 10:52:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lP4f8-0000ON-GS for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:10 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:33503) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lP4f6-0003Sv-H2 for qemu-devel@nongnu.org; Wed, 24 Mar 2021 10:39:10 -0400 Received: by mail-wr1-x42b.google.com with SMTP id o16so24720910wrn.0 for ; Wed, 24 Mar 2021 07:39:08 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f7sm2553789wmq.11.2021.03.24.07.38.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Mar 2021 07:39:03 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E35CC1FFAB; Wed, 24 Mar 2021 14:30:23 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oPq46WkfMIfhC+35R00H1uei8HDXcw6U7w4p2WsTbhg=; b=nB2cswVC45QUTOKs/4MngkHLUP/iy5f+QR35lPRFBcwaJY61goUkgW86cAFOOdqDIf K1D/nP2G5BEt5OpC5DDIIWafkG8TBaY533VnCLmEoP7CuO5gEQwPEu+xtRbmb65Q7Rxn iCyIjPc90vZE5ugHD04PTOCvkRKoAtlpSRQiuE4ACI7yaw0rV33rFmnLR6x+/gvh9aBe XIRQJ72k6ygOJYKqGmI6BuztCvzFsQ8nnDFEyvDXmzAWsdf80fhmDIcC3tEUGnzRPmzG aZzAokG/cBB3wwSb2gt1L25YzSMdIFK6qUazo0Nqi4JPjdUOosldlF+N5/C4+qolV+0H zDIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oPq46WkfMIfhC+35R00H1uei8HDXcw6U7w4p2WsTbhg=; b=QCM7CCt/Lmgmw4RiLbJrseArfpnoe0AVcsGOFyMScKWF0aQwDsbt64tzER2ioEtEIs T9VMgB6SVsaNetaXO+znuMgzKDWQYwykBkjyKygMkawzuD007iTszltENgU5+r4nS6Ae AekP0Z93GP9woW38EK1FpgQZgJGgVnubQ+8trQc/yxfBUR948iaw/a9malgolPZGL9tw AATpEZfxnHvehtr4oGfuMN7z1Xt0hTxrXa5CtfAsFabXKp3CCn2idI3EOfk6I8KpROYw RS4Bnc/prIfXjfuQGtbqlcOBgI90hS81ABguDYQS49tY94LDseYerwWWqxyBCPEtAPEq IPtg== X-Gm-Message-State: AOAM532kpFQXD+Cyvs3VR5DAqStMH4dB0XeaeYiP5jF9IuMTBfgWlN5d RphPfho6NTrOaANQ9BuV7MhJHg== X-Google-Smtp-Source: ABdhPJy/XJ+TFC2vFjQJa6Vaze831+EtsdTwIkiQTB9W5/kwH6zMpviZcmvo5d+WMdjmKcskWLO3Aw== X-Received: by 2002:a5d:6ccb:: with SMTP id c11mr3932320wrc.122.1616596747280; Wed, 24 Mar 2021 07:39:07 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 22/22] gitlab: default to not building the documentation Date: Wed, 24 Mar 2021 14:30:21 +0000 Message-Id: <20210324143021.8560-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210324143021.8560-1-alex.bennee@linaro.org> References: <20210324143021.8560-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) In d0f26e68a0 ("gitlab: force enable docs build in Fedora, Ubuntu, Debian") we made sure we can build the documents on more than one system. However we don't want to build documents all the time as it's a waste of cycles (and energy). So lets reduce the total amount of documentation we build while still keeping coverage of at least one build on each supported target. Fixes: a8a3abe0b3 ("gitlab: move docs and tools build across from Travis") Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Willian Rampazzo Reviewed-by: Thomas Huth Message-Id: <20210323165308.15244-23-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/crossbuilds.yml b/.gitlab-ci.d/crossbuilds.yml index d5098c986b..2d95784ed5 100644 --- a/.gitlab-ci.d/crossbuilds.yml +++ b/.gitlab-ci.d/crossbuilds.yml @@ -6,10 +6,10 @@ - mkdir build - cd build - PKG_CONFIG_PATH=3D$PKG_CONFIG_PATH - ../configure --enable-werror $QEMU_CONFIGURE_OPTS --disable-user - --target-list-exclude=3D"arm-softmmu cris-softmmu i386-softmmu - microblaze-softmmu mips-softmmu mipsel-softmmu mips64-softmmu - ppc-softmmu sh4-softmmu xtensa-softmmu" + ../configure --enable-werror --disable-docs $QEMU_CONFIGURE_OPTS + --disable-user --target-list-exclude=3D"arm-softmmu cris-softmmu + i386-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu + mips64-softmmu ppc-softmmu sh4-softmmu xtensa-softmmu" - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS =20 # Job to cross-build specific accelerators. @@ -25,8 +25,8 @@ - mkdir build - cd build - PKG_CONFIG_PATH=3D$PKG_CONFIG_PATH - ../configure --enable-werror $QEMU_CONFIGURE_OPTS --disable-tools - --enable-${ACCEL:-kvm} $ACCEL_CONFIGURE_OPTS + ../configure --enable-werror --disable-docs $QEMU_CONFIGURE_OPTS + --disable-tools --enable-${ACCEL:-kvm} $ACCEL_CONFIGURE_OPTS - make -j$(expr $(nproc) + 1) all check-build =20 .cross_user_build_job: @@ -36,7 +36,8 @@ - mkdir build - cd build - PKG_CONFIG_PATH=3D$PKG_CONFIG_PATH - ../configure --enable-werror $QEMU_CONFIGURE_OPTS --disable-system + ../configure --enable-werror --disable-docs $QEMU_CONFIGURE_OPTS + --disable-system - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS =20 cross-armel-system: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9ffbaa7ffb..3480d79db3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,9 +23,9 @@ include: - cd build - if test -n "$TARGETS"; then - ../configure --enable-werror $CONFIGURE_ARGS --target-list=3D"$TAR= GETS" ; + ../configure --enable-werror --disable-docs $CONFIGURE_ARGS --targ= et-list=3D"$TARGETS" ; else - ../configure --enable-werror $CONFIGURE_ARGS ; + ../configure --enable-werror --disable-docs $CONFIGURE_ARGS ; fi || { cat config.log meson-logs/meson-log.txt && exit 1; } - if test -n "$LD_JOBS"; then @@ -119,7 +119,7 @@ build-system-ubuntu: job: amd64-ubuntu2004-container variables: IMAGE: ubuntu2004 - CONFIGURE_ARGS: --enable-fdt=3Dsystem --enable-slirp=3Dsystem + CONFIGURE_ARGS: --enable-docs --enable-fdt=3Dsystem --enable-slirp=3Ds= ystem TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu moxie-softmmu microblazeel-softmmu mips64el-softmmu MAKE_CHECK_ARGS: check-build @@ -607,7 +607,7 @@ tsan-build: job: amd64-ubuntu2004-container variables: IMAGE: ubuntu2004 - CONFIGURE_ARGS: --enable-tsan --cc=3Dclang-10 --cxx=3Dclang++-10 --dis= able-docs + CONFIGURE_ARGS: --enable-tsan --cc=3Dclang-10 --cxx=3Dclang++-10 --enable-trace-backends=3Dust --enable-fdt=3Dsystem --enable-sli= rp=3Dsystem TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user MAKE_CHECK_ARGS: bench V=3D1 @@ -619,7 +619,7 @@ build-deprecated: job: amd64-debian-user-cross-container variables: IMAGE: debian-all-test-cross - CONFIGURE_ARGS: --disable-docs --disable-tools + CONFIGURE_ARGS: --disable-tools MAKE_CHECK_ARGS: build-tcg TARGETS: ppc64abi32-linux-user lm32-softmmu unicore32-softmmu artifacts: --=20 2.20.1