From patchwork Tue Jul 14 09:52:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 235517 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3582838ilg; Tue, 14 Jul 2020 02:53:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpiU7Vr5D/IwKMxS4zj2KjpJWILoOnFTj957liGHF9KhW2PpYC5iXDRmgai+i7bcFz7HWy X-Received: by 2002:a25:f20d:: with SMTP id i13mr6370464ybe.366.1594720416836; Tue, 14 Jul 2020 02:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594720416; cv=none; d=google.com; s=arc-20160816; b=ucm8atzd+tarpC/F5xWRXV+XXsxx0yM6YplzkR2LQZkCOXXggbc+xky/owyZ+GiCFY 8efPourj9ptNqgvII0iGDTo7LKpbdx9+ZtnxP0jvsVdRWyxyKwXsCS72tHuYQV4B04jr mDEb1PdS+Ia41oF2TaXUCUaNXOqOYLhrtwM7d0huVY95dolVOJQSmCyQ+V3sR6b0mvcp djAu5rzRQ/26sJBKKKLuqOrBAgol465mMRy2id22zCPSy3woU9/iK+m+5hrW6CxUT3NN tMhv0K2vWqJxBhumoHOx2FW2dF/C+1iM4+ebSYC+v6VyXuZkcbrhLhLQoLsFwKEFTGId t7vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=rpooH7rvGB3Q2o270AjlbKN5BMcUh/GjMl+HqsE1wCk=; b=IDKcpaq3nFKJcldGyKgV/H7ws8aJAMSHJWWl3Ru8MqV6wXvcbCgJMlszEOuJUUv+o+ 6emWGLx2rCyn0yZt/MwbPE2RbREefqjrDkk1K3cX0CQu832NGGVQJO+a1rX+YdO5Vlrr osrvew9OmfPVVFVe2DudLm5y3RdnT+TFHpnbsECkg+mMOfDXxpZi5pEMKpgPq4/2X9ME yjtE807i3pYIt46B6K/3P9RJ7/e2ORvhLKJAbk0lHjSM3VVsmFT9NzQkZ7R0+1928TgH lLEsDb/zaAvtQX9Gc0P0T6PWhZkSx2MpBfBQ4fziPptb9jiX1nqMaVQMEMwQYSc6b7l2 znbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=V924s+No; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f4si17049130ybp.103.2020.07.14.02.53.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Jul 2020 02:53:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=V924s+No; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:51960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvHd2-0003MW-8K for patch@linaro.org; Tue, 14 Jul 2020 05:53:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58364) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvHcL-0003Jq-Pu for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:52:53 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:36564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jvHcK-0003wT-1N for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:52:53 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 17so4413881wmo.1 for ; Tue, 14 Jul 2020 02:52:51 -0700 (PDT) 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=rpooH7rvGB3Q2o270AjlbKN5BMcUh/GjMl+HqsE1wCk=; b=V924s+NoRN+c6b6k3H1j7a91OPnoYYlgfOX4F1J7J6c+6rXCpcpBRBJXK/zuHJaWPu mdLEU7ePqDaPCvtdureyJSeX3KLP7zt5hB8Qic7VH/EIVPlIDr8kjBUD5zQAOJRxZFDq Ct4RzoaISAxsJBWmmP4KdqvpofILakBIrWJJaeDail+ogVnLZoW5MP2T5sjuNnNhTWmK nd5AM3+2aphsTQVStBCOBRad5MEfZImmXltPhJJgGy1iC0W0jLqkmuO7IAYgKopa/ann DBFi+cA5AitBlGXcQHn9iZxpZmQ+gR5P+iDjIEQw2a0h96JG73yCdoadQTCYbVg+oKM2 Eo5g== 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=rpooH7rvGB3Q2o270AjlbKN5BMcUh/GjMl+HqsE1wCk=; b=iJWAKIXB3+wp+66TqXg0vAZFDGixZk+zvh4DbU40TyOOQ4r0gpMACNqICTr9Q2CsEm xdvgHyRNVe3AswWXUsSfSovKwd+Vaw/falxCoOdTLizzoON8GKvLqJIMw3PSn6EYc4Gg Tn6TDIfFiP1ZH8XdoCTGwBkKknkPiN1Qg563JyUb9RIPef5gVm9oNW4vJm4+v9trbM6H g8MVOZDAB/2lOx5WOYwKCgGoty6ch2aUFrLsi+nPH0AY7t4ypEPeKvL8XbkfO9RFf8zD HvG5e45ZW9+/nAjbWXYXR8p/9cZn1tEvnXeIvS0c0fNTPkXGr0IAIlDWNVY8UmEG+mXT 7nhw== X-Gm-Message-State: AOAM5332TLW3+NNUe2pX2SRblo6SeC10Zr4IacadmONy4D8LzRg9BeaZ wp4v8AIHPotOZILi3h7W6SKPaA== X-Received: by 2002:a1c:48c5:: with SMTP id v188mr3384740wma.58.1594720370652; Tue, 14 Jul 2020 02:52:50 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a22sm3546965wmj.9.2020.07.14.02.52.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 02:52:48 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6259C1FF87; Tue, 14 Jul 2020 10:52:47 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 1/9] docs/devel: fix grammar in multi-thread-tcg Date: Tue, 14 Jul 2020 10:52:39 +0100 Message-Id: <20200714095247.19573-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200714095247.19573-1-alex.bennee@linaro.org> References: <20200714095247.19573-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Review comment came just too late ;-) Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Message-Id: <20200713200415.26214-9-alex.bennee@linaro.org> -- 2.20.1 diff --git a/docs/devel/multi-thread-tcg.rst b/docs/devel/multi-thread-tcg.rst index 42158b77c7..21483870db 100644 --- a/docs/devel/multi-thread-tcg.rst +++ b/docs/devel/multi-thread-tcg.rst @@ -107,7 +107,7 @@ including: - debugging operations (breakpoint insertion/removal) - some CPU helper functions - - linux-user spawning it's first thread + - linux-user spawning its first thread This is done with the async_safe_run_on_cpu() mechanism to ensure all vCPUs are quiescent when changes are being made to shared global From patchwork Tue Jul 14 09:52:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 235520 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3583804ilg; Tue, 14 Jul 2020 02:55:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzllByvXwB4053fOTlEwpxWdvzkuryIK/lzOio1fwuSsxW+QWhIugw7JVChOjJUVc7u8m07 X-Received: by 2002:a5b:1c4:: with SMTP id f4mr7092017ybp.472.1594720524306; Tue, 14 Jul 2020 02:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594720524; cv=none; d=google.com; s=arc-20160816; b=G9Ik2OeMjlmzgKNuLLS8lGKo0VJdyUNYahIhQw4qs4M2ke4B0FVCopjquuJXc2XRCl ssVpuxHjjBDg+VEVotB1aaOXbVc49MtozE9RiZQta0dZKddSqLx/+Lzeju/KD99xfZeC /9zxWChqZuMKMrVME1UJOx48YUb9HK8qDecFR/jdmHmvp4d7ngwZTkx2PMKsX5143AFd j4hcop++kT5TNicM3ucJeAhdKOgr6Q6CTS1YQAoEI/EuW7GR2nn5BSaVtg3O4tcDoklC Zq9m/edMZ9jqj1GsNlss3ClD12FmVHrlKZZkq4lhBhrvMsZrSHLrA/2bwtY2T5tLgiCA 0m8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=i/rZS2K2Az8C+lisjWwqZtaVxOPrNRDFcL8rDoPQEgQ=; b=urHZcfTJX+LqxeA6mCoIldT64ytYfW4cLiO3A58CRoPNXwVV4Q1yI99fPjvXWT9o00 /ckFcRkfQUUvz5oJKaNN67GyPn+JgiS/P/yX0GeMluKyDJeu2iCnUlZZdBHndF+5VHJh K8V8lOt6fio+joo95MTMGUkIP9UfcGOxddPIzKjI5ePfeXfz1E6+tzflYsV3lUf7JTBZ 1yB4WPYv6uxTW+UHEi4JYxiJPlO9M0roELa4vipjnXsswnvcIlw67taIDGbgp6kw7PvK cmp6W+PlQaFAPP0v3AZsj9XtaL4NFFo+AqBs5FOJUjfaY9eJXQ2uri6zcTQcq8iHglM8 GWLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=dXINzGG3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 184si11753573ybi.420.2020.07.14.02.55.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Jul 2020 02:55:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=dXINzGG3; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvHel-0006iE-OC for patch@linaro.org; Tue, 14 Jul 2020 05:55:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58386) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvHcN-0003Lk-8S for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:52:55 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:54158) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jvHcL-0003wi-GL for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:52:54 -0400 Received: by mail-wm1-x344.google.com with SMTP id j18so4145143wmi.3 for ; Tue, 14 Jul 2020 02:52:53 -0700 (PDT) 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=i/rZS2K2Az8C+lisjWwqZtaVxOPrNRDFcL8rDoPQEgQ=; b=dXINzGG3ag6LKDbkW4BjtgVmcpQ9NraO57pT0C9QAZziDLD7emdkHuf6Q2abfhtT5x yEj33N7okEGgOpXvmTmq+HkmVrQPFolV3RI/2k3nSV6KPXRAXO1z5k48LX1FeTTjGzyA vtpfG18DcyO90lrbMMAGTtoCKJXhcnFGditbhycA1oJzkm9eJx+enxRK0n7Lz+4+blDf Sfx0ZCiO1MJx9dXLqHxGc0bVER5k33M/MbXDMVIvv8kmWb0gs6sAJ+5QLwoWB/6R3twU dN5m+kkhaY6l9rokKo5JeaK0p6d0tFvrKRCDyMDvQRzaV2AxcRryr1cpjZm/nZk10tpk DtiA== 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=i/rZS2K2Az8C+lisjWwqZtaVxOPrNRDFcL8rDoPQEgQ=; b=W16Q3MHGq6YqARQkKyH66HAyRHNqqzhLhOgbW09+6wIWnkqvnawppWD9xCizbQXlV/ Sb3NllX80yNktr/egV+RObejYTMJ8qyZlKADIdBhDb/rklNad030Bz+b7iMeobk1ytJ2 Cb0eiGdcQdVq7gpobVreLrDRrZXz7cOXEAmXhS281M8pt6KOr7zrA+sqNC0nz+KEcvsy A3/gWEpnlJbnmsYyBWGoJe3Dm/eEoYl+NPIM1F9iPg1iUPMRiDQP12x48z08yjSu0QN7 OxxCmQzkNhFOjHCY2WYYLLXIJXtZF9k39SQaPGxwCJLhARknKjBh+G+s+FZc4gMhC72t i6+w== X-Gm-Message-State: AOAM530IKbVzG7gecn54iuLRGHNvybIaUDP3XKER7j8i57ed8wFNUAAC 2+zI/LSYuIIcvXL8K9uj55zoZA== X-Received: by 2002:a05:600c:2116:: with SMTP id u22mr3406458wml.82.1594720371966; Tue, 14 Jul 2020 02:52:51 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u8sm28169159wrt.28.2020.07.14.02.52.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 02:52:48 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7890E1FF8C; Tue, 14 Jul 2020 10:52:47 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 2/9] configure: remove all dependencies on a (re)configure Date: Tue, 14 Jul 2020 10:52:40 +0100 Message-Id: <20200714095247.19573-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200714095247.19573-1-alex.bennee@linaro.org> References: <20200714095247.19573-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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_Benn?= =?utf-8?b?w6ll?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Ma?= =?utf-8?q?thieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The previous code was brittle and missed cases such as the mipn32 variants which for some reason has the 64 bit syscalls. This leads to a number of binary targets having deps lines like: all.clang-sanitizer/mipsn32el-linux-user/linux-user/signal.d 140: /home/alex/lsrc/qemu.git/linux-user/mips64/syscall_nr.h \ 455:/home/alex/lsrc/qemu.git/linux-user/mips64/syscall_nr.h: all.clang-sanitizer/mipsn32el-linux-user/linux-user/syscall.d 146: /home/alex/lsrc/qemu.git/linux-user/mips64/syscall_nr.h \ 485:/home/alex/lsrc/qemu.git/linux-user/mips64/syscall_nr.h: which in turn would trigger the re-generation of syscall_nr.h in the source tree (thanks to generic %/syscall_nr.h rules). The previous code attempts to clean it out but misses edge cases but fails. After spending a day trying to understand how this was happening I'm unconvinced that there are not other such breakages possible with this "caching". As we add more auto-generated code to the build it is likely to trip up again. Apply a hammer to the problem. Fixes: 91e5998f18 (which fixes 5f29856b852d and 4d6a835dea47) Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200713200415.26214-2-alex.bennee@linaro.org> -- 2.20.1 diff --git a/configure b/configure index bc3b9ad931..e1de2f5b24 100755 --- a/configure +++ b/configure @@ -1955,23 +1955,20 @@ EOF exit 0 fi -# Remove old dependency files to make sure that they get properly regenerated -rm -f */config-devices.mak.d - # Remove syscall_nr.h to be sure they will be regenerated in the build # directory, not in the source directory for arch in alpha hppa m68k xtensa sh4 microblaze arm ppc s390x sparc sparc64 \ i386 x86_64 mips mips64 ; do # remove the file if it has been generated in the source directory rm -f "${source_path}/linux-user/${arch}/syscall_nr.h" - # remove the dependency files - for target in ${arch}*-linux-user ; do - test -d "${target}" && find "${target}" -type f -name "*.d" \ - -exec grep -q "${source_path}/linux-user/${arch}/syscall_nr.h" {} \; \ - -print | while read file ; do rm "${file}" "${file%.d}.o" ; done - done done +# Clean out all old dependency files. As more files are generated we +# run the risk of old dependencies triggering generation in the wrong +# places. Previous brittle attempts to be surgical tend to miss edge +# cases leading to wasted time and much confusion. +find -type f -name "*.d" -exec rm -f {} \; + if test -z "$python" then error_exit "Python not found. Use --python=/path/to/python" From patchwork Tue Jul 14 09:52:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 235519 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3583762ilg; Tue, 14 Jul 2020 02:55:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjAqYiRPkzm4JtG1Af2Mt8GZTQmdBpTxSYOmUg46OjnfIx4c2MME/eK0eA30V2IMA82QWZ X-Received: by 2002:a25:be11:: with SMTP id h17mr6448532ybk.179.1594720518092; Tue, 14 Jul 2020 02:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594720518; cv=none; d=google.com; s=arc-20160816; b=xogNsU+4aE+2roAykij4m5U70FQNJcJ8fQtBlZCE5AduKNMW+z5a/Wr8SFwhVfpGc+ THnD07FcsiZt5cSxm1uEnuJxAt32yquCp0Ci0Zrwn6ivrxHxLjN+rR06PHPZ81743nSq lgoPYSoUdg2SPjH7dekxR4ynBTgtVNOgkpjOb2U3/54Lb8D5C5bpQTRUduM5OHzcf4F2 XoZAD8Y9WgKEV+ljQejf3aEOABw9SrzzkMZqeYjFLSXkYv1IxbOp6BmVdwmht6c64gUy splaHsAEts9mkOqTC2T682H5eQjtIhqcfFFI8bHk4aRg7Kyln16n7tL11CFPp6mBcm7R yu5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=BBfEE2/nVgeVfVJMVyVYNC/Z05o6uaGLDngf+bqz22g=; b=iyUSjgROoZM00Fuyl1AtXm1eb/ZKFefri3LSqD5vLHdj4uraypx4XoL0F8O8oW1lJJ sjZtg+wzj9KFV4efaIC12eD969WGjUJc2FKuKi/03yIkb8qGyXnrQHswYP6SUvbTEEWM p/CkPoqnZzB4TCsreszS9ZJAvEfXPCH/wckYoUEga7Bt9N+U3+wMNrhWJ4QjpEjEUgWw z0OU+fZmLwzXQjyXDkgJ50wsj0gT7tiV5sxBz1suWjBAbm9JQVBRphKnRY3z7Tz+XeEE VYC8NRGAG1yuqnz6cq6/KwQbZMla7xH6fCa/LXVgs8yTkg2t65LoBLGngjS4Fs66gMdU N1FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=nDCxifch; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f6si9203684ybi.333.2020.07.14.02.55.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Jul 2020 02:55:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=nDCxifch; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvHef-0006ZI-GY for patch@linaro.org; Tue, 14 Jul 2020 05:55:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvHcO-0003NT-DE for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:52:56 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:55250) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jvHcM-0003wq-EY for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:52:56 -0400 Received: by mail-wm1-x335.google.com with SMTP id o8so4139097wmh.4 for ; Tue, 14 Jul 2020 02:52:54 -0700 (PDT) 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=BBfEE2/nVgeVfVJMVyVYNC/Z05o6uaGLDngf+bqz22g=; b=nDCxifchzh+MNerjmbmpwLmCRdVTHZjsUT/DO0kuD9Kf7UYae+7weRTeYzFIPtT5Zj lrMngcRaRtZdFXsqzV9vRTP6MUZDv0GYAMqcPJMqD0rYQWipLdsynFuzYC/yOf4Pznyl fUcuplsuRC6IH3trOAqa6ovBTTvcYNZiKfegXt3FV8sqX2Wklt09ooBO3hKGY7dIC/qD SxPq3pUvKB3YCkXkj/ohxYfoD+KY1OAsEJX1EZl23tsnjqi3aZNncoqkC1tpl+y+9yxJ kxVXegauHU1bHDJXUFvqWaSXdzvsO0nzItcnVaBoxMFMyCsKUIG9vlnWdC6XJun+zybR t0vg== 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=BBfEE2/nVgeVfVJMVyVYNC/Z05o6uaGLDngf+bqz22g=; b=tG4MhjDS7haohY4UNVLDj/+tlLqml/Qh2GppZLg9s07Vffqx/ims+D90Q7tVHMW3Sr hMViAvWpLjbEX+PbgGslEybUQDyHuIVdRQ4QIXmghfp5hLRkvXLeN9HyoSDqFF+qYLwK n5jxyNLMVolep+9d+o/+M6dDPgytoggSKvSnCShS18YJ1q6L1o9lvZYhAE4WOaP0PCi9 jC0uAf5++n6tH94XN2Z6IVKYlv5hqZNk8xMSC6F5RTvqx+OXA+QCBCDT0APdjhd6i2UB FNvoRMfLrKyRqIrmQoNAX+YiuUooYr1SOgxry9G94yj9Vk1Pomwxw99NWWa4wTPbd7j0 eBfw== X-Gm-Message-State: AOAM5339Cnv895QRPFzlQxxBo2Q/KHgbwWZX9I1wzq6S3+nG8/Aj0fZR AWZqFQ3HnQ+3eZoUZEmgWPCS0g== X-Received: by 2002:a1c:96ce:: with SMTP id y197mr3394116wmd.86.1594720373167; Tue, 14 Jul 2020 02:52:53 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f9sm28163988wru.47.2020.07.14.02.52.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 02:52:48 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 90D5F1FF8F; Tue, 14 Jul 2020 10:52:47 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 3/9] tests/docker: Remove the libssh workaround from the ubuntu 20.04 image Date: Tue, 14 Jul 2020 10:52:41 +0100 Message-Id: <20200714095247.19573-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200714095247.19573-1-alex.bennee@linaro.org> References: <20200714095247.19573-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, URIBL_BLOCKED=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: Fam Zheng , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth The libssh problem only exists in Ubuntu 18.04 - we can enable it in 20.04 again. Signed-off-by: Thomas Huth Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200713185237.9419-1-thuth@redhat.com> Message-Id: <20200713200415.26214-3-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dockerfiles/ubuntu2004.docker index f7aac840bf..8d10934a2a 100644 --- a/tests/docker/dockerfiles/ubuntu2004.docker +++ b/tests/docker/dockerfiles/ubuntu2004.docker @@ -65,9 +65,6 @@ RUN apt-get update && \ RUN dpkg -l $PACKAGES | sort > /packages.txt ENV FEATURES clang tsan pyyaml sdl2 -# https://bugs.launchpad.net/qemu/+bug/1838763 -ENV QEMU_CONFIGURE_OPTS --disable-libssh - # Apply patch https://reviews.llvm.org/D75820 # This is required for TSan in clang-10 to compile with QEMU. RUN sed -i 's/^const/static const/g' /usr/lib/llvm-10/lib/clang/10.0.0/include/sanitizer/tsan_interface.h From patchwork Tue Jul 14 09:52:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 235518 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3583515ilg; Tue, 14 Jul 2020 02:54:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/Q65rrLsv035RKBYZg3F0tZluw43QlZ+yEkBZAM9vEuntShrfDRUfoT/4/TGmN5klrZ3r X-Received: by 2002:a25:3b16:: with SMTP id i22mr6593125yba.66.1594720494569; Tue, 14 Jul 2020 02:54:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594720494; cv=none; d=google.com; s=arc-20160816; b=txBCmceEfh00aqr9NJRd5dgb1D5xeasyFiNC89EDDEO7hy+mY+8y1Lt+93kPNH92jD ljKa6YC5bccT2j9sElCQn7HrX1CBhj4jvtcGACSTA+ex7dA5/dgn+15mUsQZtrJQo0d7 X3PjYeXsvt7DLnYAhhKwLJNffrFO+7Bsut/iJdmw9f4egBqtH/BQjT3NAL79ZfSqWOxq /vb58I+HAztefRPINpFYJ1Xyb18Vmaf5E1qFaklbe66iJgPv/X7OpsyDd/EoQW6BEMQO wFBCj7kClrRY9mi/N92w3t29o88MsTfueVTiA7UJ/fFaKGOzQHhZywcDaRVdmvQ9pr1m ypxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=nLGL97rROnaKpdqPQWyvMY+ljMO7k5wyI/22+OUtb64=; b=BlvxYHki7SwHUXNLpiS13cVaV2rATWVbtHDd0KRAt/nxTHiK3fW97uJBOhisXdjELd OAslLrNSEUTEMka8tdl+zQEnqIOnIUrYcF8Dr0aO+//VrKMYfFwiOeiD8GMt6b/tz7Gj tXVr5pJtK1HGf6EIO5RHNgrSYBqIwQz9rtCOK+DrDrjRyeBAvF8WvK47b9AqVezJYvR6 +0JedTwWQmmtV2eFg+d2CVYmy2WuKPx0goanP2oh5ZDxprbUCFUPaxRRRJS6O/7Njzrf 0oeXzwRnAe6lUD6jiaRHUjYtzD6RYv2s3VJNUpWw9FkxoCHV8iR7UPcPJ8wG7GVxiJdE gNdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GNX5au0T; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t5si17397031ybp.39.2020.07.14.02.54.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Jul 2020 02:54:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GNX5au0T; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvHeI-0006pq-2P for patch@linaro.org; Tue, 14 Jul 2020 05:54:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvHcP-0003QK-W6 for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:52:58 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:39891) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jvHcO-0003x7-CW for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:52:57 -0400 Received: by mail-wm1-x32d.google.com with SMTP id w3so4417325wmi.4 for ; Tue, 14 Jul 2020 02:52:55 -0700 (PDT) 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=nLGL97rROnaKpdqPQWyvMY+ljMO7k5wyI/22+OUtb64=; b=GNX5au0Tkuw84VNUoSuRuStPXMs6wyxI01mUHNUAFw8dw8o+FM0pEx4ZYhjw6jktjW ICcnLfubwn0kIHZY90ONDs2v2smKsUMmZgv+bNKLaIjNESmIHNNNN++qQwLPTtFvAeBl 8jNhuuPkjOhNfxpSjwqZe7apRVSvQ47bVEQ8xccttKsG10hVL7RKmCDLZQw64V6gNhZK q8ghLehNHyUMK1UqYVGSeQ9WihpK65Fd8jVtPwdq87PO6Qwbkm3XsyfWchwmEaDccegR Eki28Bwi77GNWKHSnvGR7lydb9INM5LxiqzTJ4fLhtx+3eEzGgysoU+X81iSagVF9tI6 l5Rw== 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=nLGL97rROnaKpdqPQWyvMY+ljMO7k5wyI/22+OUtb64=; b=dzz25PwkVSFhsYc+YR/n/8zl+k0cEb3RmDufCayuGtKVCnMIcIVWrwBxAbyuk6/zzv LFlANbUz9XyBLaheWz6a+wXAyAiILPRpm13XdNDrVj2bqFD5LUVtNJ5PJ2vkdA+WMjTm wwxbAHiM7LvgJ6LTHGKT85bIatVesT2WzdFWMVSc9U3RaR+BxtesvSliA/FVyWg3wORX xEquKQTy4YwILCn37rY9PyfiWtxYSouGGSs5hcbUqnaddTNq9K5ZBAVO7Qhmxmy0A6xl roBTeUIGkgT9sw9cbkuraEaQkCvw4PQBcVgnVnLj1wX2bidZCEEwUVgDdkQUm9RQyBzD cGgw== X-Gm-Message-State: AOAM531i8eM0t3kbIzAvso4+4tSeyLsmam/H7NvTTZMud6Mg4c0iYNhK YXi6wEDw5wpQ5Q14CxAuTcscVw== X-Received: by 2002:a7b:c09a:: with SMTP id r26mr3391769wmh.176.1594720374959; Tue, 14 Jul 2020 02:52:54 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id x1sm27330282wrp.10.2020.07.14.02.52.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 02:52:52 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A53A41FF90; Tue, 14 Jul 2020 10:52:47 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 4/9] docker.py: fix fetching of FROM layers Date: Tue, 14 Jul 2020 10:52:42 +0100 Message-Id: <20200714095247.19573-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200714095247.19573-1-alex.bennee@linaro.org> References: <20200714095247.19573-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, URIBL_BLOCKED=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: Fam Zheng , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This worked on a system that was already bootstrapped because the stage 2 images already existed even if they wouldn't be used. What we should have pulled down was the FROM line containers first because building on gitlab doesn't have the advantage of using our build system to build the pre-requisite bits. We still pull the image we want to build just in case we can use the cached data. Signed-off-by: Alex Bennée Reviewed-by: Daniel P. Berrangé Tested-by: Philippe Mathieu-Daudé Message-Id: <20200713200415.26214-4-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 2d67bbd15a..c9f20d8d09 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -306,14 +306,18 @@ class Docker(object): checksum = _text_checksum(_dockerfile_preprocess(dockerfile)) if registry is not None: - # see if we can fetch a cache copy, may fail... - pull_args = ["pull", "%s/%s" % (registry, tag)] - if self._do(pull_args, quiet=quiet) == 0: + sources = re.findall("FROM qemu\/(.*)", dockerfile) + # Fetch any cache layers we can, may fail + for s in sources: + pull_args = ["pull", "%s/qemu/%s" % (registry, s)] + if self._do(pull_args, quiet=quiet) != 0: + registry = None + break + # Make substitutions + if registry is not None: dockerfile = dockerfile.replace("FROM qemu/", "FROM %s/qemu/" % (registry)) - else: - registry = None tmp_df = tempfile.NamedTemporaryFile(mode="w+t", encoding='utf-8', @@ -339,6 +343,8 @@ class Docker(object): build_args += ["--build-arg", "BUILDKIT_INLINE_CACHE=1"] if registry is not None: + pull_args = ["pull", "%s/%s" % (registry, tag)] + self._do(pull_args, quiet=quiet) cache = "%s/%s" % (registry, tag) build_args += ["--cache-from", cache] build_args += argv From patchwork Tue Jul 14 09:52:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 235516 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3582617ilg; Tue, 14 Jul 2020 02:53:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxr2sRWLFbM3oB8ciYQIH0+UyrAeQI5GrT8Cb/yD8RC9qPzQxfZxkyePir1cSERGKVOjNcs X-Received: by 2002:a25:4e45:: with SMTP id c66mr6256435ybb.333.1594720392802; Tue, 14 Jul 2020 02:53:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594720392; cv=none; d=google.com; s=arc-20160816; b=DoDlWPlw2uNzw9etdS4P5X2aiI+SV9J2Dcjc13rTmH5gfNcCpEId9Ae1H1UtiVRFXj q87btaYBP9mx8JFhmuUHI8iAsJXqvfTTtL1vW2bqLdacF3a8ezz81SKvXfszgpOTjJ1a 8uM+HWJXy28TZKT/jyVdhR8h7D+Jjgz/RIdYTzx9MXG0sLyOeITDV3llb37/hveQSwA4 GT0FikzKpPk/ibZPCdSoCgTPpNTSJIvWGDWC3FEIeGo7Q2+wWuY0zYKYTy672dw/o5KS 7RB2UxhzEbZ2sePy8G+Q3ih/HPYhgcDYEZ59o6WdIakV1tp141tk4fyAncifyWf9ti4m KF+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=5OziHlIm1D2m/j1XzyWy/gSoDZmDvA7wpzFEAFDGd5g=; b=M3LCxMjM2RqQo39p7+FK5/wI9p+brYlycAfGB0kvfCv+4km6v6jLHMPpSrqPJ8AJZR eR2QJ3DcMwR4Hufr1s31C5/H37b7+Fc7EX76Bf/lHdEwZ+COXqxNTDaFJQTTMNaU9QXS zRt9ubGraNRROWeofwhoPHTbY6DbLBH0CMfnzIHXSprg2/B4NP1Psc52gEgACn+NP8a0 3ayxZvX9mswASygcaQ2cl24M400BjrYh3tTpCXocGTPnLogG3sWeg2ItznZ3nmVKoDTZ a7AtS7/K68NeDEJrOtA2vDBA7sgPZQydLoDp6fqpZ8/EqHTN26M/4U4OWeSROB0fKnHQ BlMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jCcUTPPv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v84si17494166ybv.78.2020.07.14.02.53.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Jul 2020 02:53:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jCcUTPPv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvHce-0003Y2-7U for patch@linaro.org; Tue, 14 Jul 2020 05:53:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvHcS-0003WU-Jp for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:53:00 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:36957) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jvHcQ-0003xM-J0 for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:53:00 -0400 Received: by mail-wm1-x32a.google.com with SMTP id o2so4415749wmh.2 for ; Tue, 14 Jul 2020 02:52:58 -0700 (PDT) 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=5OziHlIm1D2m/j1XzyWy/gSoDZmDvA7wpzFEAFDGd5g=; b=jCcUTPPvgZOnaybzBkeGXp0lTT2PADB66MxUFM/Qxr1O08zRSlqvXpN2b4y4hLqKgW IMGps7a/fEdrpwtFUyZGSkHyU6bpXnzLufJ9M0RTAvgR7OHGLrTIo10TyGCp4nQ90IXT 8knugF88O6deJbUGtR7Mg6fZC9/mpu0vRfFt/XQtqg0WvaZ27xipf8KnWenkVd4n1TuQ j9Knsre6czKQF9H9C6ml/YPKxFmw+Py+thxWjglTM7q7rAca7HClMcxLAvbD1QZgnf8V GpMiPrLABJeEuXHADMNCO+RwG9jP2N5+ZMv7Yvi2puVOWQ91cckrn4Hl7eSi7CSKnGiO k8KA== 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=5OziHlIm1D2m/j1XzyWy/gSoDZmDvA7wpzFEAFDGd5g=; b=kMvlnA5mYSYe8t5WGaWffoAYktjwkuKHQ66G2zjCUA3yoyQudLNdrkmaaLJ7VUxWlT 54wpzKW17hhiBo17s6CES1KIYlLgo96iH9QAhz9V35+HQ2yye+w7c8TdYc2IexJ9usdt cgwK/qPQJEfoH7zeygb8dvzYU3jm4laHfVNiwCzvBZhdk5eZszmmu97TYcQ+C3Nyadhh Hgmezc9J9/P0DiyJPnuOMOpX0tYq41Le8UUYdPxfu7rTiFNHAZ9rSMRKuCzpYaz2w49E glftUkgUc19E6uA+SdHEpXORL4Fnezs63R2GSpM2inz04pD509hytp5tNcFEWtRJhXcO DKcw== X-Gm-Message-State: AOAM530b/s16Vd5xhfVO8RMysOltc0EUvmwIdaG4Nmh07dBjXqutJvEy ZnXUnkM3x1bIi8boTrYHlFCY9Q== X-Received: by 2002:a7b:c197:: with SMTP id y23mr3626146wmi.114.1594720377183; Tue, 14 Jul 2020 02:52:57 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u10sm3484318wml.29.2020.07.14.02.52.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 02:52:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BBD991FF91; Tue, 14 Jul 2020 10:52:47 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 5/9] gitlab-ci/containers: Add missing wildcard where we should look for changes Date: Tue, 14 Jul 2020 10:52:43 +0100 Message-Id: <20200714095247.19573-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200714095247.19573-1-alex.bennee@linaro.org> References: <20200714095247.19573-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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 , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth The tests/docker/* wildcard seems to only match the files that are directly in the tests/docker folder - but changes to the files in the directory tests/docker/dockerfiles are currently ignored. Seems like we need a separate entry to match the files in that folder. With this wildcard added, the stages now get re-run successfully when something in the dockerfiles has been changed. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20200713182235.30379-1-thuth@redhat.com> -- 2.20.1 diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml index f3c0ca4d61..8c89efeb6d 100644 --- a/.gitlab-ci.d/containers.yml +++ b/.gitlab-ci.d/containers.yml @@ -24,6 +24,7 @@ - changes: - .gitlab-ci.d/containers.yml - tests/docker/* + - tests/docker/dockerfiles/* - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - if: '$CI_COMMIT_REF_NAME == "testing/next"' From patchwork Tue Jul 14 09:52:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 235522 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3584444ilg; Tue, 14 Jul 2020 02:56:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv1SjVmzVYjg6khd16TVHI49dJyRRP45oCnHc4I6hkikAz0SguOvSYOSsihhEK6qAL2oND X-Received: by 2002:a25:d3c1:: with SMTP id e184mr6678193ybf.205.1594720591696; Tue, 14 Jul 2020 02:56:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594720591; cv=none; d=google.com; s=arc-20160816; b=foaLJQPyX6AnvQPo3w+0JCcPfZHqSAi/KBgSNksdJU5tKQDoLx9MX/4Lk6BwKrjFY4 re946HMs258fxuxjuRBNLHXsHdLo7KIX9mZ/jRX6Bih9H/5du7uQRgUUY9pqeoR4IVGb GFI5LdRa7oLjTynw7r5VCH7QMCw9sDevxCYnWUwaNxecBLVG/KTsJ8TgVaZpb+e87mub ryv4gvFEghj4p11WqRaPb/VW88DBGVeHlZ2eqBstLwmcAP3i8zGiQdJoiUw385JQs5Xf 4x8YJmjrGpYXgwT9alnoHtMMFqx7cHLtOgtayfC0sAWu204+k4f7gf824zqru3RFZAiz bx+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=xbQaeg14fVG/x3mzQ+QmQQFcjpCesKxKE93ltxY94OQ=; b=FDM00MHAXNWtQBpCkQqiXkn5OJJDyk+sX/8f27bYqsoGPMiN2PuTN4RrH5s0jIql1i 1WsOhCR/x/FXPoQsFz2mEX+9Lyp1/hmGcIBATXpa2Dx2ohYrpi9sDkmIRUq6wS00m1QW cczIsZn76Q9Q78bXH6vqBC85nfgGns7OnQweKk4cIK6t9jSwFnvr2hoO85BEU8lMWzUC qiXRiYRr45/P6O+oQjzDL5aClA4CuTJqSq3byDjcIavbxUq2DVP1SUKeL3OHGQtsNV4M 0VW3eoxt+z3/YbX89tYRTGEZjeG5vB8CyLQZnFen17mOD28r85BK5TJNu8ejbD0kN5Pj 6QWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=zbfJKwAZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c16si16723363ybq.491.2020.07.14.02.56.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Jul 2020 02:56:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=zbfJKwAZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvHfq-0001Z1-2A for patch@linaro.org; Tue, 14 Jul 2020 05:56:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvHcR-0003Sp-2S for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:52:59 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:36573) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jvHcP-0003xF-D6 for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:52:58 -0400 Received: by mail-wm1-x333.google.com with SMTP id 17so4414286wmo.1 for ; Tue, 14 Jul 2020 02:52:56 -0700 (PDT) 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=xbQaeg14fVG/x3mzQ+QmQQFcjpCesKxKE93ltxY94OQ=; b=zbfJKwAZy7C/AyGBtKFAgR7zFjWhZuw1Ifpa79cqZ5Yh1BfgYtmIZRLzz5U5GJcDKg 1X2IWywH1TAenMff2berAcvsTIhWrCqfU0o8NHe062xa2nBXwE+nZRmEn/a9W0xfdbcO uhjsJLBcSpZGcJy8g2cQN0CYqhKsxTdYpto4penjQbXvhWa0GlOcgkBvPfaF4ZeV9DTf a5VDn4oXK4Wrcw+rUHjHh7+l8aBiOBfisNboGQJNUl2sNsqo3xhwVgoOB8Ut+wSPGT3p 3ca/oyZ1cdO4yyt926LtYaHy37k+84PN9BGGX1mqtXDN+wOI4vHoAQQqw4nb50cYsFpo RzCA== 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=xbQaeg14fVG/x3mzQ+QmQQFcjpCesKxKE93ltxY94OQ=; b=L/ufIY/ZQDUnubu/BVbQXGSLvgTl2/Ovknz8VfEHPhcsY+icnQv/wwfAl0Ddp7gSy8 xYfrCzF3v45nNPRUOztCjOAmkG/jpVCO7BxdZuHt0mDVkXKsxOe2GeYeshGQG+zHtEwG sf0j+CRhknoFwlamTeEs6kcBsSN9SrwQRu4s1p+VE34vJxGHsZyJrY02WnkLwVhYDNso sGP5jYEQTevbFQbuMHM8sPMnJzzCZfvqINcdAkX49BDBgZ+zFQEVl4uluu7NRxPtC+QA TgSwCY5Eb3v22qjIFyo954bIlTVTF0tCjsSekW5KtZ7UhKDvOw45kdsRPQUxHx+yJzQv 3ITA== X-Gm-Message-State: AOAM532Pjb+ocsFWsCsqS4s1HWHKzUyUJkpLV2oC+uRBj5B2beKRVLBb gGyNXGs+kYIwXefkhIXZoP5hUA== X-Received: by 2002:a1c:9a81:: with SMTP id c123mr3341710wme.46.1594720376035; Tue, 14 Jul 2020 02:52:56 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id t2sm3561587wma.43.2020.07.14.02.52.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 02:52:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D137B1FF92; Tue, 14 Jul 2020 10:52:47 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 6/9] fpu/softfloat: fix up float16 nan recognition Date: Tue, 14 Jul 2020 10:52:44 +0100 Message-Id: <20200714095247.19573-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200714095247.19573-1-alex.bennee@linaro.org> References: <20200714095247.19573-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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_Benn?= =?utf-8?b?w6ll?= , qemu-devel@nongnu.org, Aurelien Jarno , LIU Zhiwei Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: LIU Zhiwei Signed-off-by: LIU Zhiwei Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20200712234521.3972-2-zhiwei_liu@c-sky.com> Message-Id: <20200713200415.26214-5-alex.bennee@linaro.org> -- 2.20.1 diff --git a/fpu/softfloat-specialize.inc.c b/fpu/softfloat-specialize.inc.c index 44f5b661f8..034d18199c 100644 --- a/fpu/softfloat-specialize.inc.c +++ b/fpu/softfloat-specialize.inc.c @@ -254,7 +254,7 @@ bool float16_is_quiet_nan(float16 a_, float_status *status) if (snan_bit_is_one(status)) { return (((a >> 9) & 0x3F) == 0x3E) && (a & 0x1FF); } else { - return ((a & ~0x8000) >= 0x7C80); + return ((a >> 9) & 0x3F) == 0x3F; } #endif } @@ -271,7 +271,7 @@ bool float16_is_signaling_nan(float16 a_, float_status *status) #else uint16_t a = float16_val(a_); if (snan_bit_is_one(status)) { - return ((a & ~0x8000) >= 0x7C80); + return ((a >> 9) & 0x3F) == 0x3F; } else { return (((a >> 9) & 0x3F) == 0x3E) && (a & 0x1FF); } From patchwork Tue Jul 14 09:52:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 235521 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3584354ilg; Tue, 14 Jul 2020 02:56:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcc7XxfR9uTkPhRo57YiCdoiP7yEv1sWAi23UOwBdNCSZO9CkxIBOXvM393c5XKbNz573l X-Received: by 2002:a25:2a81:: with SMTP id q123mr6421885ybq.223.1594720583306; Tue, 14 Jul 2020 02:56:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594720583; cv=none; d=google.com; s=arc-20160816; b=VJpbEde9AZ7+/eKPoGz3Cbzx+3MOB88FI64WV/KoCN9WWzCqvt9dBMNPuGGwBkrrRe gj7/mWiYYtjoczpSmCVdsFZJmhfzXsQh1kbE36bkeGhC0By1BYSzi3RN8IPAgqiJ5Wcz CXeXSBnfaqqkdBIa7Y3bTE8l8j9dIPARQ//eFMu7a2ecSyAl5Jaqt5P4CgfXBurfPn8W hf9uwJmWTz8+XwHTv6zCbXfpgZ0zeKWhsDWmrtBMN8dLbZ5qn85RgNF20AgAVc6OS/NP TCHdwDzE2y18hxzVdIAUuaKQIYIXRcMX+dADX0R3sGMDRQSjNJ37dHOG4RxPB0uCrNYl DQQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=V+m4RDPdg9U+KIn2pEcS3MKP2lWACszi+kXcKRp9FQM=; b=DCCxhd1QfwMQlNiCF0ymiZ9pVFhnFMhEoJ5RGF3Z8hiB/WCav4e5hxUx/URUYwZuv6 rZoTw3NgHP5uu17DZ8jcUqOy580opLA+H3zmrPjV0ekuXJ7X3A+Bat3ZvQmLWkVzgLA0 xlrgEgDuvub0YInbmJT9BKHBHi+qyJ9801M1Ogzo+MyqYsqE+UhPvEfPZ4gwNjkWA1N/ /qyyQ01WRwqAvm42YMttdI3pQ877IZaP69S5aVrIkEYyfFtqrBPtG73kdsPRGOKlGXn4 KydIff72AmWRUf9Cad4axSq9XJNTuox8wTs5zTYMtUzyQZg7PUL2Qr42XVNoPLffXaQD D32Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="HAfT/rP2"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h128si12926616ybb.275.2020.07.14.02.56.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Jul 2020 02:56:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="HAfT/rP2"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvHfh-0001Mp-4c for patch@linaro.org; Tue, 14 Jul 2020 05:56:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvHcT-0003Z8-Np for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:53:01 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:40611) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jvHcR-0003yD-S9 for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:53:01 -0400 Received: by mail-wr1-x42c.google.com with SMTP id f2so20457982wrp.7 for ; Tue, 14 Jul 2020 02:52:59 -0700 (PDT) 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=V+m4RDPdg9U+KIn2pEcS3MKP2lWACszi+kXcKRp9FQM=; b=HAfT/rP2joqyeWRIqkXnpz45G4d0CgKCxAFmJyYlm6rT4xcD/Ii0N9dVRlG9/YLgkb tVhqazQDPWVprmr8QjIP7AA+QlM2vmvhKDDyoxDutxQEdkOtPVEf3h/obHy6OOdHH8c6 karrwlKfWLdMyyBTabVKQARqiM9vBdHVgZRr/k596rsYIRI+5jMbbDxXt/y9NiPU5Mdk JPWRuVdYgOGmyqwo0bDeW82Ie9c5Abs20EVVhrwIs+RsqKOhJodkGhpSeK5mqM3/Wbk4 JzobYRRNgnhRObU8reI1rQXiQ65oKTvVhts75tBLS8G+DjYOYO07eKpbwKceGWQAUZee c4ow== 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=V+m4RDPdg9U+KIn2pEcS3MKP2lWACszi+kXcKRp9FQM=; b=rM16BvTahyZ7VfO25cAJRLkyWf1qURnWon/0amTU0LLaffs9EQ0ra4KqW9elAb/D/j GiHrIiawFf620gRR1iRdtlXmgdLeHdYxs/IgqbMDnM7ARINxAJuEemmNvzcPOCEVc4Ah xfqsHOrRisSVY3qiqUpdrRbJVMoIUxi21WmmFdU74FTTTckRar9xmVkbhSYnYHuex+Cx z5evuTcIwjhjYu7bZ0BV96YmoGUraLGf/l4VCPk6u8QFvHLAISdnuXgWjJJL/mLLAKef PBsuyGqLJGfRlL2CuuYS6wjGJHzqMl+nV4MqBPeWAmGHpegIDYQDGgcxjeNm9X7CPTxw ypWQ== X-Gm-Message-State: AOAM531u6YFgYRinJNMq/pZO94cHwfjhfr7hUU6jjHJAx41tzR+pPqTV 8fXh4PqOrFrr8rh2bCKWAGGn6A== X-Received: by 2002:adf:f3cd:: with SMTP id g13mr3953705wrp.45.1594720378394; Tue, 14 Jul 2020 02:52:58 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id j75sm18206267wrj.22.2020.07.14.02.52.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 02:52:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E6D991FF93; Tue, 14 Jul 2020 10:52:47 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 7/9] tests/plugins: don't unconditionally add -Wpsabi Date: Tue, 14 Jul 2020 10:52:45 +0100 Message-Id: <20200714095247.19573-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200714095247.19573-1-alex.bennee@linaro.org> References: <20200714095247.19573-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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 , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Not all compilers support the -Wpsabi (clang-9 in my case). To handle this gracefully we pare back the shared build machinery so the Makefile is relatively "standalone". We still take advantage of config-host.mak as configure has done a bunch of probing for us but that is it. Fixes: bac8d222a Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Message-Id: <20200713200415.26214-6-alex.bennee@linaro.org> -- 2.20.1 diff --git a/configure b/configure index e1de2f5b24..08eaa99d19 100755 --- a/configure +++ b/configure @@ -7112,6 +7112,9 @@ echo "GIT_UPDATE=$git_update" >> $config_host_mak echo "ARCH=$ARCH" >> $config_host_mak +echo "GLIB_CFLAGS=$glib_cflags" >> $config_host_mak +echo "GLIB_LDFLAGS=$glib_ldflags" >> $config_host_mak + if test "$default_devices" = "yes" ; then echo "CONFIG_MINIKCONF_MODE=--defconfig" >> $config_host_mak else diff --git a/tests/plugin/Makefile b/tests/plugin/Makefile index 3a50451428..e9348fde4a 100644 --- a/tests/plugin/Makefile +++ b/tests/plugin/Makefile @@ -1,9 +1,16 @@ +# -*- Mode: makefile -*- +# +# This Makefile example is fairly independent from the main makefile +# so users can take and adapt it for their build. We only really +# include config-host.mak so we don't have to repeat probing for +# cflags that the main configure has already done for us. +# + BUILD_DIR := $(CURDIR)/../.. include $(BUILD_DIR)/config-host.mak -include $(SRC_PATH)/rules.mak -$(call set-vpath, $(SRC_PATH)/tests/plugin) +VPATH += $(SRC_PATH)/tests/plugin NAMES := NAMES += bb @@ -17,11 +24,18 @@ NAMES += lockstep SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES))) -QEMU_CFLAGS += -fPIC -Wpsabi -QEMU_CFLAGS += -I$(SRC_PATH)/include/qemu +# The main QEMU uses Glib extensively so it's perfectly fine to use it +# in plugins (which many example do). +CFLAGS = $(GLIB_CFLAGS) +CFLAGS += -fPIC +CFLAGS += $(if $(findstring no-psabi,$(QEMU_CFLAGS)),-Wpsabi) +CFLAGS += -I$(SRC_PATH)/include/qemu all: $(SONAMES) +%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $< + lib%.so: %.o $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS) From patchwork Tue Jul 14 09:52:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 235523 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3584715ilg; Tue, 14 Jul 2020 02:56:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXfjtdKpVMDmOTM70R1bHc6GYzXx4CYT+GZdp2TejvC/yU5jg6ZxYMbRKa0r6iVapozkWd X-Received: by 2002:a25:32d6:: with SMTP id y205mr6634574yby.182.1594720617262; Tue, 14 Jul 2020 02:56:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594720617; cv=none; d=google.com; s=arc-20160816; b=BbGNaPvQdrC/m9kJA2k8T2U6dawqksU9jrJPNJ57rSZiKEm6S3Y7YcDwMJ5ogYq1t+ AaEbfuC6Z6B1VjAn8gHZIkjwVqswuUBWF1DQv7EfhmO6rKJqp1C2phQOJFcK0jMkQ3/A C0+Swu5aVBDNxMQI62w7gqG9x8ASoti6YdKBd+9uf/zQnlGpUpsnvPqgaFhJfutJsb/C urLJjLWyUs5PIR8FXlL7T8n41HkLw+wgLFee6YeceRhxRsUUwZYBRUwqnGeuwaSbb2SM rM4w7JkeitNe7J4Qf8qkwBlhjzO5UFyoC0MZ/a6ANNYDtIcQLmmKI5Asxbyu9SqN2D5l QTUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=uk7KvFXR8IFo8iPAcAdUbVxFh/eRiYGwB3cx2SHFrtg=; b=spwoklR317kkhR0lm5bmBEqL+5snSodzAJubqRifsy+LNW3wxykIgm4EQX0EOqAQFu Q7yxhwNf3OE7oyfayk0BHur4tNyQXJ2gi5vigfIP2q6SZVvFGdVnwEaXi8Q9+iuCBrH2 owSWpEGD91Ez3afXBcfB1rgTe+8Uu4skotbPIyW8PxkowRQ32u51vMfYsblkJpy/u569 Dv8bBYgVNixwDaSzcZLMmZ3LUIZYLdmDSKTB2gWraTUaLrRVDyKestHdHbPkZ2D6btQt xhCW8XFkrSz9igazrBEAUq7T/4tvu9oQyXSDmppt9Td+WF1y2tujixg/kNHqjdBX8l9I gToA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=KqsuWz4R; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d93si17872552ybi.258.2020.07.14.02.56.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Jul 2020 02:56:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=KqsuWz4R; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvHgG-0001Vc-LO for patch@linaro.org; Tue, 14 Jul 2020 05:56:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvHcV-0003dj-Fc for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:53:03 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:43060) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jvHcT-0003zI-EH for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:53:03 -0400 Received: by mail-wr1-x435.google.com with SMTP id j4so20514221wrp.10 for ; Tue, 14 Jul 2020 02:53:01 -0700 (PDT) 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=uk7KvFXR8IFo8iPAcAdUbVxFh/eRiYGwB3cx2SHFrtg=; b=KqsuWz4RyeSYbtwvg0OG3DF295WbB6/LGoKjwHgM5y4Dbb4KXfermhPulkR85iT40r 7vTdIgNuSMndtw0jhAemT1DMgCTosejAEbzH9hXXQyqOw7tydcGq3++rr5BW7eSXfDzQ NuLOJWu7SnmDnas1WpKLGCzb6qEWrlrIKLXY4GWprSDd4t8bTn3kv/nVitw0no8mK9L/ Kyo+Kj+qRIhsSv5rh4NW7oQUIaSSzez5yADYcd2ZCoalKMvPmAmjoT95yMb2TImf5JaS rCAsoX9VkDS744rKtY6876XXOiwN8UDk0/xA3lE4AZ9dr1EtNerFH5ov8TzNEmAKQIBL zpCg== 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=uk7KvFXR8IFo8iPAcAdUbVxFh/eRiYGwB3cx2SHFrtg=; b=kGnRFJsxqdTFPZu7KKcBuI/WPb0q2s4PhHP8FOxBsQjmmlIsUZgJ4EHAkQbigsPO9E IxWpUJaReuQ1LovHuJhIcL7QKQlLyUmWu0CTqZfYEKy7TrG5HfXLIc1s3XFzR1ep4JkF 0PE7JGKFCtVHSUfb58VqLG8xLOyUetAYPoe8Q89Q+zn9fDh2DP0R1cCvtYrLLhmpgC1I r9e9XsBSwE0KYQCPjKV/NxuYV1I5nP45p9lTt+3HSm7/DcX1GxP3revrbnDaXpVOa5/E gKqZ+PALNn3dr1muTHuyzqwfHtodG8+D3eDtPIaiWXP8M9hxsiiOperCUD823a0IaE0h YJzA== X-Gm-Message-State: AOAM530OLoPx1cy/ktX/zzx/3WTsYrBHEkSgYSVd+DQwg4AL0lp3x+VK IV1pyFOdpGggwaokoKj7GrA9oQ== X-Received: by 2002:adf:e811:: with SMTP id o17mr4423390wrm.53.1594720379981; Tue, 14 Jul 2020 02:52:59 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u23sm30487957wru.94.2020.07.14.02.52.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 02:52:53 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0D6C51FF96; Tue, 14 Jul 2020 10:52:48 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 8/9] cputlb: ensure we save the IOTLB data in case of reset Date: Tue, 14 Jul 2020 10:52:46 +0100 Message-Id: <20200714095247.19573-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200714095247.19573-1-alex.bennee@linaro.org> References: <20200714095247.19573-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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: Eduardo Habkost , Richard Henderson , qemu-devel@nongnu.org, Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Any write to a device might cause a re-arrangement of memory triggering a TLB flush and potential re-size of the TLB invalidating previous entries. This would cause users of qemu_plugin_get_hwaddr() to see the warning: invalid use of qemu_plugin_get_hwaddr because of the failed tlb_lookup which should always succeed. To prevent this we save the IOTLB data in case it is later needed by a plugin doing a lookup. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20200713200415.26214-7-alex.bennee@linaro.org> -- 2.20.1 diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 5542577d2b..8f145733ce 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -259,6 +259,18 @@ struct CPUWatchpoint { QTAILQ_ENTRY(CPUWatchpoint) entry; }; +#ifdef CONFIG_PLUGIN +/* + * For plugins we sometime need to save the resolved iotlb data before + * the memory regions get moved around by io_writex. + */ +typedef struct SavedIOTLB { + hwaddr addr; + MemoryRegionSection *section; + hwaddr mr_offset; +} SavedIOTLB; +#endif + struct KVMState; struct kvm_run; @@ -417,7 +429,11 @@ struct CPUState { DECLARE_BITMAP(plugin_mask, QEMU_PLUGIN_EV_MAX); +#ifdef CONFIG_PLUGIN GArray *plugin_mem_cbs; + /* saved iotlb data from io_writex */ + SavedIOTLB saved_iotlb; +#endif /* TODO Move common fields from CPUArchState here. */ int cpu_index; diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 15f5047bf1..427027a970 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -116,6 +116,7 @@ typedef struct QObject QObject; typedef struct QString QString; typedef struct RAMBlock RAMBlock; typedef struct Range Range; +typedef struct SavedIOTLB SavedIOTLB; typedef struct SHPCDevice SHPCDevice; typedef struct SSIBus SSIBus; typedef struct VirtIODevice VirtIODevice; diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 1e815357c7..d370aedb47 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1073,6 +1073,24 @@ static uint64_t io_readx(CPUArchState *env, CPUIOTLBEntry *iotlbentry, return val; } +/* + * Save a potentially trashed IOTLB entry for later lookup by plugin. + * + * We also need to track the thread storage address because the RCU + * cleanup that runs when we leave the critical region (the current + * execution) is actually in a different thread. + */ +static void save_iotlb_data(CPUState *cs, hwaddr addr, + MemoryRegionSection *section, hwaddr mr_offset) +{ +#ifdef CONFIG_PLUGIN + SavedIOTLB *saved = &cs->saved_iotlb; + saved->addr = addr; + saved->section = section; + saved->mr_offset = mr_offset; +#endif +} + static void io_writex(CPUArchState *env, CPUIOTLBEntry *iotlbentry, int mmu_idx, uint64_t val, target_ulong addr, uintptr_t retaddr, MemOp op) @@ -1092,6 +1110,12 @@ static void io_writex(CPUArchState *env, CPUIOTLBEntry *iotlbentry, } cpu->mem_io_pc = retaddr; + /* + * The memory_region_dispatch may trigger a flush/resize + * so for plugins we save the iotlb_data just in case. + */ + save_iotlb_data(cpu, iotlbentry->addr, section, mr_offset); + if (mr->global_locking && !qemu_mutex_iothread_locked()) { qemu_mutex_lock_iothread(); locked = true; @@ -1381,8 +1405,11 @@ void *tlb_vaddr_to_host(CPUArchState *env, abi_ptr addr, * in the softmmu lookup code (or helper). We don't handle re-fills or * checking the victim table. This is purely informational. * - * This should never fail as the memory access being instrumented - * should have just filled the TLB. + * This almost never fails as the memory access being instrumented + * should have just filled the TLB. The one corner case is io_writex + * which can cause TLB flushes and potential resizing of the TLBs + * loosing the information we need. In those cases we need to recover + * data from a copy of the io_tlb entry. */ bool tlb_plugin_lookup(CPUState *cpu, target_ulong addr, int mmu_idx, @@ -1406,8 +1433,13 @@ bool tlb_plugin_lookup(CPUState *cpu, target_ulong addr, int mmu_idx, data->v.ram.hostaddr = addr + tlbe->addend; } return true; + } else { + SavedIOTLB *saved = &cpu->saved_iotlb; + data->is_io = true; + data->v.io.section = saved->section; + data->v.io.offset = saved->mr_offset; + return true; } - return false; } #endif From patchwork Tue Jul 14 09:52:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 235524 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3585600ilg; Tue, 14 Jul 2020 02:58:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcKMFZJCOU6kGRxh2QEE8yR3RvJVE/Qtjxw89wwwOjY2WwhiH9OwovZyelPU4X9MUCKDCo X-Received: by 2002:a25:ae4f:: with SMTP id g15mr6718466ybe.441.1594720717967; Tue, 14 Jul 2020 02:58:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594720717; cv=none; d=google.com; s=arc-20160816; b=PDdGQ4TYG6hIL2BzuuLftp+CmjlQUjgQAUzKQU0iche38MbnpX4KiiOSEVTi14DW8f VcErGtS08mea7VGTqLy5HgvJYOdONhix3CaJRtFUOgsL0yjEjMAw/b0PIKQUhHzg0nQx tWx0xJRsSFnxblcXT1HQcHZU9J80Y42vssYEN/3BohE1GoVAz7f+n3xkGLDAVnWED8Bv zmVRydbo0jppme2l2P2UZB5E7rjQnfROLT9WvzB0Qwbdcap9M53IA7gq1HsUdCUrLAcc 5omQYbVS58xo83Mko13OgNSIjitHcH8uMsU3fsngZOiDQzLlUrIuQ8Ghu3r9je8bDXGD X5rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Qk3ABZq413c4i38F0xqHIViOGrZppkOMvKepCv8uPHk=; b=buaw/BSj0p4g5YSZtr5grFOYoUBcssXYaCGTLM/ztQ92jjES0PXYqhWctrdPegvmRh TF1K47jYDGqxMHprBkuNfa/qVyB6q5GxGrsRQefjY1A9RaDVLqnguWtGV32bLPnxtrvh v5VpS2eIGHD9svu2q01Q8tMwEtiEubasCTq1UuAKB1UwVo2LoTJDarFN52bsydIGfiX5 PiCQ7vnrHwqqQs/6oxyxtK6zJrFZVdJNfzNcg1JK7vBZauERpFhI3t5w0XlZhcrfhku8 cxyAkJCSGMusgI1Z/w84F3l0SAm2NtuRxtDja/4w/cw186tQ96bcyNHMni0GesBwpx80 cVvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Lx3Smhaa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n128si10500360yba.396.2020.07.14.02.58.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Jul 2020 02:58:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Lx3Smhaa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:46722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvHht-0004Yf-Dw for patch@linaro.org; Tue, 14 Jul 2020 05:58:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvHcW-0003fr-8V for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:53:04 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:43052) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jvHcU-0003zh-ET for qemu-devel@nongnu.org; Tue, 14 Jul 2020 05:53:03 -0400 Received: by mail-wr1-x42c.google.com with SMTP id j4so20514258wrp.10 for ; Tue, 14 Jul 2020 02:53:02 -0700 (PDT) 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=Qk3ABZq413c4i38F0xqHIViOGrZppkOMvKepCv8uPHk=; b=Lx3SmhaaqaTP2jWtLNDyloCEHO8D54gCtmrdZYTtd/Avt7x5mvkpFksjqy6Hx2oXHa RfE/O12//wuzgMRQmaVHnQRCURbHRApcWjb0uEz/VjGszCnre2unhWFVnzYLUoLwtdmg 9axHL0oTAIdTRuw/Lhi/cX+x5O6Kp/0z4v3U9b//24CVZhYFDE6+jTRWdFhBgSZbhwpk zvAzoqWxWSYBP1BojvT80KoxUQ5XaBWrjzDY9hLxOEfKb5QF4hQw+WDRI3758f4JyyAt esllrcVKxTziAye5aVVI7cwMu8jMphMZCxs0vUK9Pc0HRwlY/Bne4CLPM0nl9RFycXb4 owcA== 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=Qk3ABZq413c4i38F0xqHIViOGrZppkOMvKepCv8uPHk=; b=kZs++6Ld8OhMtoE36lqoFQ0/nzxzqtEWah1JEDKlZNfXLd4VKD2xh5dDBQ1qiFNW4T xKqBxm2skPaXm6xnhyj5JVU++w2V53iFEcCMambpcvmYctubPbiKHGVlY2cv8Lbt3A3W gv3BdlpEi3nqDANIwQGpadul6drOn6SaWam9Cx0Qary2xSkChvoFqiogL/MucDcF/T60 nBZxxaCM1ctxuaj07QSoCuDeZ/6O8ARvMD1KXeZF7/BUl6jdIi9AmG8ldlAwcLhzwy5N 1/rHf2V8fi32oVf6s54vzmUx4HPqdWXHe97vdV+Hk+UHm8iHmNEvh3U5gKMmDaxGRpRE ejAQ== X-Gm-Message-State: AOAM532CDxg86ReKKtTac1UQ/cBi63LtHlb9jdZc/MOYj/lVUCPoCCsf RZk3zRRJU2+2fmiCXHDqzQDEsQ== X-Received: by 2002:a5d:44d1:: with SMTP id z17mr4097874wrr.259.1594720381061; Tue, 14 Jul 2020 02:53:01 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p14sm30359670wrj.14.2020.07.14.02.52.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2020 02:52:55 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 22A311FF98; Tue, 14 Jul 2020 10:52:48 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 9/9] plugins: expand the bb plugin to be thread safe and track per-cpu Date: Tue, 14 Jul 2020 10:52:47 +0100 Message-Id: <20200714095247.19573-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200714095247.19573-1-alex.bennee@linaro.org> References: <20200714095247.19573-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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_Benn=C3=A9e?= , qemu-devel@nongnu.org, Dave Bort , Robert Foley Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" While there isn't any easy way to make the inline counts thread safe we can ensure the callback based ones are. While we are at it we can reduce introduce a new option ("idle") to dump a report of the current bb and insn count each time a vCPU enters the idle state. Signed-off-by: Alex Bennée Reviewed-by: Robert Foley Cc: Dave Bort Message-Id: <20200713200415.26214-8-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/plugin/bb.c b/tests/plugin/bb.c index df19fd359d..e4cc7fdd6e 100644 --- a/tests/plugin/bb.c +++ b/tests/plugin/bb.c @@ -16,24 +16,67 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; -static uint64_t bb_count; -static uint64_t insn_count; +typedef struct { + GMutex lock; + int index; + uint64_t bb_count; + uint64_t insn_count; +} CPUCount; + +/* Used by the inline & linux-user counts */ static bool do_inline; +static CPUCount inline_count; + +/* Dump running CPU total on idle? */ +static bool idle_report; +static GPtrArray *counts; +static int max_cpus; + +static void gen_one_cpu_report(CPUCount *count, GString *report) +{ + if (count->bb_count) { + g_string_append_printf(report, "CPU%d: " + "bb's: %" PRIu64", insns: %" PRIu64 "\n", + count->index, + count->bb_count, count->insn_count); + } +} static void plugin_exit(qemu_plugin_id_t id, void *p) { - g_autofree gchar *out = g_strdup_printf( - "bb's: %" PRIu64", insns: %" PRIu64 "\n", - bb_count, insn_count); - qemu_plugin_outs(out); + g_autoptr(GString) report = g_string_new(""); + + if (do_inline || !max_cpus) { + g_string_printf(report, "bb's: %" PRIu64", insns: %" PRIu64 "\n", + inline_count.bb_count, inline_count.insn_count); + } else { + g_ptr_array_foreach(counts, (GFunc) gen_one_cpu_report, report); + } + qemu_plugin_outs(report->str); +} + +static void vcpu_idle(qemu_plugin_id_t id, unsigned int cpu_index) +{ + CPUCount *count = g_ptr_array_index(counts, cpu_index); + g_autoptr(GString) report = g_string_new(""); + gen_one_cpu_report(count, report); + + if (report->len > 0) { + g_string_prepend(report, "Idling "); + qemu_plugin_outs(report->str); + } } static void vcpu_tb_exec(unsigned int cpu_index, void *udata) { - unsigned long n_insns = (unsigned long)udata; + CPUCount *count = max_cpus ? + g_ptr_array_index(counts, cpu_index) : &inline_count; - insn_count += n_insns; - bb_count++; + unsigned long n_insns = (unsigned long)udata; + g_mutex_lock(&count->lock); + count->insn_count += n_insns; + count->bb_count++; + g_mutex_unlock(&count->lock); } static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) @@ -42,9 +85,10 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) if (do_inline) { qemu_plugin_register_vcpu_tb_exec_inline(tb, QEMU_PLUGIN_INLINE_ADD_U64, - &bb_count, 1); + &inline_count.bb_count, 1); qemu_plugin_register_vcpu_tb_exec_inline(tb, QEMU_PLUGIN_INLINE_ADD_U64, - &insn_count, n_insns); + &inline_count.insn_count, + n_insns); } else { qemu_plugin_register_vcpu_tb_exec_cb(tb, vcpu_tb_exec, QEMU_PLUGIN_CB_NO_REGS, @@ -56,8 +100,35 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, int argc, char **argv) { - if (argc && strcmp(argv[0], "inline") == 0) { - do_inline = true; + int i; + + for (i = 0; i < argc; i++) { + char *opt = argv[i]; + if (g_strcmp0(opt, "inline") == 0) { + do_inline = true; + } else if (g_strcmp0(opt, "idle") == 0) { + idle_report = true; + } else { + fprintf(stderr, "option parsing failed: %s\n", opt); + return -1; + } + } + + if (info->system_emulation && !do_inline) { + max_cpus = info->system.max_vcpus; + counts = g_ptr_array_new(); + for (i = 0; i < max_cpus; i++) { + CPUCount *count = g_new0(CPUCount, 1); + g_mutex_init(&count->lock); + count->index = i; + g_ptr_array_add(counts, count); + } + } else if (!do_inline) { + g_mutex_init(&inline_count.lock); + } + + if (idle_report) { + qemu_plugin_register_vcpu_idle_cb(id, vcpu_idle); } qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans);