From patchwork Mon May 17 16:09:54 2021 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: 440144 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1230578jac; Mon, 17 May 2021 09:14:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKomEgouo+YOvYIQxIsMlodj3DA068hj4U6Vp0kn/3NxdSD+2SHfjagCsRQaD8aLvOzssr X-Received: by 2002:a2e:86cc:: with SMTP id n12mr130472ljj.457.1621268071173; Mon, 17 May 2021 09:14:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268071; cv=none; d=google.com; s=arc-20160816; b=qE0nqxhmCBuznEbxfMBAhoxE/jSGNW1O32bHIIwJPYq1XF84bg8MyBrxlt0FZXue5U kqmkfKk6GXyOs/C/xjnhL6Wo9cOQteXIeyz4foktdT5sIXN9Whys1xy/gZWMXcVMBCOA K0nTtl9bvKZrwHgS3pverRE+K1Ds+GsqK38gaF/8fqaTD3VBZLp02Do5Bjcs7eoIftoc jw9a5RvH3zZL9ML7kKfEUdD5HaYmps8i7Azgm+0lNdIgoVrgq3emFO/lDGo8TRyGvnhM aSMCgeAC0g28Xrcq5ObSQPDDtYomgvnWHgzHpvQ6sz7j1eBPwqhmE9xZNxPE2/niB24O mTrA== 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=xSw+oi8MLoOzgRk09Ky3eK57lKOiggJ0N972/xwvHIQ=; b=dGOLA7yEHfQ4vxCQy9rFMJomtfRZjOGqYMZ8F9xxg0MobA5g3q1RzJl3vJ1etA4/vc Z9OeU/wMlXR45wHHtJ1C/DgY7I5NNU1l3TneQBNwRGO6ZygYaA9pEuxLv4YhiDubmaKp a3ghqgEs5ErVvBsVlmGYCbI/xKkA8BjIny0yJOGT8Jy/IawcNukjYItWBNaJdECelHiC 7bxQfwA6h3XJvK4agelEkMDute5yH9X9z+3G0N30lfeEh8dkQePnszfPeMCbddslms9O e2IatdxeO/+C9CZgdHx/raIDlHpKu/YeYDPJ1Bsz5tfYQqZ/ni1oWg6I8RUA/CBs2mAV CYKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JN1KAQLa; 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 o3si18089168lfr.406.2021.05.17.09.14.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:14: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=JN1KAQLa; 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]:41184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifsz-0005Sd-RZ for patch@linaro.org; Mon, 17 May 2021 12:14:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifp8-0007GC-HN for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:30 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:43774) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifp5-0005q1-1N for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:30 -0400 Received: by mail-wm1-x32f.google.com with SMTP id b19-20020a05600c06d3b029014258a636e8so3929981wmn.2 for ; Mon, 17 May 2021 09:10:26 -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=xSw+oi8MLoOzgRk09Ky3eK57lKOiggJ0N972/xwvHIQ=; b=JN1KAQLaTNP151E9NIl4mWhbWmcj2ADi2gvAX9S/8hwKRM21YmgfMZ80G0oj/ky9X9 gfMKy/Ltewne+pZbftRWIEEVnsbQ25ahAbPLhitsp2i62WkVLkinVtkR5WVwaQkUga4s DVVVem52/MQgckqrXogbpvAYbZERwkOZbOEndm9tZaCMsTy/fRWjjm3kMe9zZfUCV53E SHEPRW1ZCkNWN2efbx+KwLgmuNhLRNsb+dTk/SrgEzH6WCAeWtj8z40Inaj140qR2qdP K1DGByfAYTSZNmmR4DFB9ZnBBfQnlbIlbcvp5Hk3ahgqyEp6+zoBrz/4KBtyyk3KebvN GhbQ== 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=xSw+oi8MLoOzgRk09Ky3eK57lKOiggJ0N972/xwvHIQ=; b=Jm5AWkekvY+SLXKUwZlK4DV1PCyR/ocobEP4aPPRkApfyBVWhOplAOz2LxrQCIFNUm hNGrNmXKjVyWW9h47kyIvgDiQy9OEmmTjVFRvC/jPgjBb8uCM4Qh3i6puqrYg+g3+AQq y5hRX2EurXEwUEF+jurCQ4yeiV3kRmjXD2UtKusD/4GcZ6ri4AAElOMwXE8OEtjGGlpc C7mdZu3U8Qns1YgyoWktOeSeM4ath4FQ1vNDcXirvaJt46voKZDzckPzFeE005DRkXIK OsyNo1JFGTGlxeX+L12hlLuVpXnUl7DiCwqZo1RFJY9yjSKWu2fFmDMl868WputKtcZa eXSQ== X-Gm-Message-State: AOAM531YJhH8ntqcUJnJdBhlRdfrqOkfahob1LJzJJOUPYcE9pUQpCTE 7inBiSFfQpnSDnb4p2nPCAGIXw== X-Received: by 2002:a7b:c091:: with SMTP id r17mr647836wmh.85.1621267825395; Mon, 17 May 2021 09:10:25 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o11sm3613813wrq.93.2021.05.17.09.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:23 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1DB201FF87; Mon, 17 May 2021 17:10:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 01/29] tests/docker: fix copying of executable in "update" Date: Mon, 17 May 2021 17:09:54 +0100 Message-Id: <20210517161022.13984-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.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_Mathieu-Daud?= =?utf-8?b?w6k=?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We have the same symlink chasing problem when doing an "update" operation. Fix that. Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo Inspired-by: 5e33f7fead ("tests/docker: better handle symlinked libs") Message-Id: <20210512102051.12134-3-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index d28df4c140..0435a55d10 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -548,7 +548,14 @@ def run(self, args, argv): libs = _get_so_libs(args.executable) if libs: for l in libs: - tmp_tar.add(os.path.realpath(l), arcname=l) + so_path = os.path.dirname(l) + name = os.path.basename(l) + real_l = os.path.realpath(l) + try: + tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) + except FileNotFoundError: + print("Couldn't add %s/%s to archive" % (so_path, name)) + pass # Create a Docker buildfile df = StringIO() From patchwork Mon May 17 16:09:55 2021 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: 440143 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1229939jac; Mon, 17 May 2021 09:13:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMJgmDQe9JEwle5iWoTJ31pvVD9m+ajCgzbQrxwkBcqMSwvf7x/vm04yyfkuMdqi4MApRH X-Received: by 2002:a2e:9116:: with SMTP id m22mr184482ljg.176.1621268027240; Mon, 17 May 2021 09:13:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268027; cv=none; d=google.com; s=arc-20160816; b=ZzC3nTg38vfc+LUV3W+IdYjrqy0lm2Pgzrvraps1ra0r4omEq656+1LrYirkopgpzb 67SsoF1ZSw93czjUxOldkpUBEkemJ3Di1vcKNpA0W7uKsKiKiO+nl0VII/eHehehVeVF 8XzFD2KsaldtGf3m09n2cETbkiX+X16nujKnsMozqXmNsYPw8VvQmuaz5Mr2SbfZGQS9 j97xKUFG1b/yq/dY2k7lhetxF57FWQxxtiv10lyraMgWfcRBm+4TkMw43Ytz/48dgKwA i7JYJIsQ7bfZAqmAdafPXG+nHGs+E7k/yioCrznMG4LItQ/iwkU6hpD6u3JjrNNJWbSs pfNA== 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=2w+lSoGUeb8mcgLQ+RwoP+3nXJnqsEfRl/hSUtUI2kg=; b=VleP6siR7UYgi4WDAGoGtLN9DjdOwP/LhWFhUO1tbsEpCjqOpMdOZapHkMZf+HjuBR BPWgqDBYd7mqWVFPA4y8ZUaWcq4J71HwdBf6ccPtCSVgPL/6j6HXWz+Getg0vhJgP7xF nDl1FT/FBhMGCJaTfDDF9m8OCpRkn9m2s87XY1r9WOuijU70YfMb8lpgAycu3jHqi7kF Cuzq4Qz6oDnn3coeyHr7Cr9WPVr2eCX8u66QR/Nu/uJQFMw4si07/+tkBGjfIdjwd1W2 FsY8PtyFt8IybVpUZsOcSazo+LzFgAIvPiM9LvsabUkpGNRKi5zqVuyGpgp+YLNqEk+9 ENiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UC7KpDFh; 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 u5si17353174lji.192.2021.05.17.09.13.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:13:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UC7KpDFh; 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]:38304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifsH-00036a-Pa for patch@linaro.org; Mon, 17 May 2021 12:13:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifp9-0007HU-1Z for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:31 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:45882) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifp6-0005tp-QD for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:30 -0400 Received: by mail-wm1-x329.google.com with SMTP id s5-20020a7bc0c50000b0290147d0c21c51so3920615wmh.4 for ; Mon, 17 May 2021 09:10:28 -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=2w+lSoGUeb8mcgLQ+RwoP+3nXJnqsEfRl/hSUtUI2kg=; b=UC7KpDFhJ78bOWVkqXOpjsLrb2eJ8qr83DdSdBiu5Z/HWxWMDv1L2OFExJYZ0/Lu6Q cKwSX7DybMXspWqhMDqESzUh8ok6u5HCywYMcvPELXH22U3kjMELAAzMh8/zmlL2sfIT iDgLgRuyOLHG6mL7abgwHpSTZ+O+72rD5ejpCP/HRSPC85rSws0pCIkco7pRFyWIXPak v5GiPMHN9maoBmxLqXTHjZCUETa1uoPudvK2KPIiHh58Fm04G2KB44wayVKdTsMWw8fZ R4xW2CXC2T/gNt3UCmDdB1tm8O17hktw1rOOoawbh1haMzbuDPoUPb7xEA2mJHu6rQxy 9Qtw== 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=2w+lSoGUeb8mcgLQ+RwoP+3nXJnqsEfRl/hSUtUI2kg=; b=OpWpZ1C+JXOcYo61/f6ZnRZ4BM3g7O5gfT2UoFlnTKhTSZWx4jAZ6LegXFCJbx2Czr mVNVGSd81giLUYDyW963ycpf3x/SC3uyyBLV5l8ktTBBWA4h8+YVIoYuLr8Bp2mCDlju s55vF+62GuLFdcM7NNNG2NM+SUSYNqvS/Dyo1BFdNE1yq1rBU140EGDL30NEjLLaffw1 KA/o+08H+vlijX0A2T5UoyDq54wR+i5P7+w/DQ4ikf6Ml2AXqwjKPh9PJyha+7FMvsN+ Kf2Ylg76DqUscS8ktd2tCTT1YyaYjD7T/WAH84y+YrNGODTe5ACtRR/mFdx7UHhinDq5 H+Vg== X-Gm-Message-State: AOAM530Q1E48YX3ouraBdW6/aAxvnAoIzVQ9QqDWo1FNHpYnku8g1UnH lEe0nXR8cVLX/pnNE+7ULw33Ww== X-Received: by 2002:a1c:e156:: with SMTP id y83mr608422wmg.89.1621267827471; Mon, 17 May 2021 09:10:27 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r11sm12029418wrp.46.2021.05.17.09.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:23 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 36DCA1FF8C; Mon, 17 May 2021 17:10:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 02/29] tests/docker: make executable an optional argument to "update" Date: Mon, 17 May 2021 17:09:55 +0100 Message-Id: <20210517161022.13984-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.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_Mathieu-Daud?= =?utf-8?b?w6k=?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We're going to extend the abilities of the command shortly. Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo Message-Id: <20210512102051.12134-4-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 9f464cb92c..820423d718 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -248,7 +248,7 @@ docker-run: docker-qemu-src $(if $(EXECUTABLE), \ $(call quiet-command, \ $(DOCKER_SCRIPT) update \ - $(IMAGE) $(EXECUTABLE), \ + $(IMAGE) --executable $(EXECUTABLE), \ " COPYING $(EXECUTABLE) to $(IMAGE)")) $(call quiet-command, \ $(DOCKER_SCRIPT) run \ diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 0435a55d10..9b3425fec2 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -523,7 +523,7 @@ class UpdateCommand(SubCommand): def args(self, parser): parser.add_argument("tag", help="Image Tag") - parser.add_argument("executable", + parser.add_argument("--executable", help="Executable to copy") def run(self, args, argv): @@ -532,35 +532,37 @@ def run(self, args, argv): tmp = tempfile.NamedTemporaryFile(suffix="dckr.tar.gz") tmp_tar = TarFile(fileobj=tmp, mode='w') - # Add the executable to the tarball, using the current - # configured binfmt_misc path. If we don't get a path then we - # only need the support libraries copied - ff, enabled = _check_binfmt_misc(args.executable) - - if not enabled: - print("binfmt_misc not enabled, update disabled") - return 1 - - if ff: - tmp_tar.add(args.executable, arcname=ff) - - # Add any associated libraries - libs = _get_so_libs(args.executable) - if libs: - for l in libs: - so_path = os.path.dirname(l) - name = os.path.basename(l) - real_l = os.path.realpath(l) - try: - tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) - except FileNotFoundError: - print("Couldn't add %s/%s to archive" % (so_path, name)) - pass - # Create a Docker buildfile df = StringIO() df.write(u"FROM %s\n" % args.tag) - df.write(u"ADD . /\n") + + if args.executable: + # Add the executable to the tarball, using the current + # configured binfmt_misc path. If we don't get a path then we + # only need the support libraries copied + ff, enabled = _check_binfmt_misc(args.executable) + + if not enabled: + print("binfmt_misc not enabled, update disabled") + return 1 + + if ff: + tmp_tar.add(args.executable, arcname=ff) + + # Add any associated libraries + libs = _get_so_libs(args.executable) + if libs: + for l in libs: + so_path = os.path.dirname(l) + name = os.path.basename(l) + real_l = os.path.realpath(l) + try: + tmp_tar.add(real_l, arcname="%s/%s" % (so_path, name)) + except FileNotFoundError: + print("Couldn't add %s/%s to archive" % (so_path, name)) + pass + + df.write(u"ADD . /\n") df_bytes = BytesIO(bytes(df.getvalue(), "UTF-8")) From patchwork Mon May 17 16:09:56 2021 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: 440147 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1232041jac; Mon, 17 May 2021 09:16:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTkAOyLddO0rgn4ebzeVfRODK7wY6ti2wT8X2U2SGNpvMaU9vfbteoSlUtPWGIQg0DrTue X-Received: by 2002:a6b:5015:: with SMTP id e21mr643143iob.104.1621268171619; Mon, 17 May 2021 09:16:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268171; cv=none; d=google.com; s=arc-20160816; b=O4nmfOV+Z85iNKPWOr/W6yJ+SIpUYyvgnTRDqMfdf8LEFAUMNiTTBq+3cmfGy64HK/ 748E/8sFLHk/Ag555PJojpkPArLq59rlLJnTewKRRA44K1qLlYxKK1xzYMz4aMinC1Lq udDUkSM9KmFMnR1s0VJXWcvuI56NKlIV2eLgedlgmNuetQq3ehFwcSqNzpade/OVwDmH zhpATC6WDmjmH2rkmNzwEe1g+BhqGK+aC3hbcjAVKBlH1vL7skSyml9YhMKHqWolvOir BpGOfL9cJfNS4ufrlzPDMfbstIW8fchcpa0UL1CJDQh+JYBfFzQGDIQTnmUgGyDKb6w+ BVMw== 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=4anbRy9FviqkY8a40nrkWVmNlHFbOTFzQrhdJnRiGmo=; b=SJeJ72dl7HFkc/PpNAm/YzGL6rbCB/9X1WkJtPqNgFwfVvtFnOXxDX103Gbq+Svr+H uSf+ITbOOkuzMLfiTaqtVvZ1dAqNZd4MBcZxmdtTauvzVr71ZEG99c75R0O1ffp2nLrE RDjVJG9FZfWUW1g9eKHEglGCHUeVEioG1u8qCP1NoXAYnaOwdJV+baeuev7xHxhLi0DX NKgvcXOMcttCIoyulXp+jw+/ccL2VIYfSStJ0XXDlLl5/5GBOKW8v1pSXlSJ3pYIqG3/ ExpxFYnqFaCJ5jvTrHyUQC/V5PwMOGg4wgBwqr5FQPxp9fTbDpFkgrxolGRi9sXg1QrR se/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=L2Hj3uu7; 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 s8si17495424iop.88.2021.05.17.09.16.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:16:11 -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=L2Hj3uu7; 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]:48576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifud-00026L-2i for patch@linaro.org; Mon, 17 May 2021 12:16:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpA-0007KZ-7k for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:32 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:45777) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifp7-0005ue-If for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:31 -0400 Received: by mail-wr1-x432.google.com with SMTP id h4so6982479wrt.12 for ; Mon, 17 May 2021 09:10:29 -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=4anbRy9FviqkY8a40nrkWVmNlHFbOTFzQrhdJnRiGmo=; b=L2Hj3uu7QaFy58CFLBAx+cwEsGdP7c2BHHyypLdfGb/iRj4x9NLRLvu9htIwosKqwi nn9amdVgnS1W1aqCCG7NUT7iahvX0i5Ac350GCwienQ3nNfCGPu8Xwlm0MdnrB8E/Kq8 BBhBhC7Eccygdxg/Eb3uym64g0ONh8yZA9mveuV84jOyhkdPdNQTat2KyhyrbH6e3uLE 7TFu/C+xprKPitYo5HxwR7PP+l2PASGupkIEJdR4cN9bDYsBWkkffSfFrX2nKaiA+l7h zfW/JXybJIreC6e4hNpaHLUet5tJB+ROVMrnX+CamFGJNl9vUcHL4l55Ud0UyCh3z8J9 iwjQ== 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=4anbRy9FviqkY8a40nrkWVmNlHFbOTFzQrhdJnRiGmo=; b=ntSCTgUCIpOlSFKmjgX7G19CsUINtJ5cjlthuYzHRK3VK5/e5k/hf7R1E6N40KmQwj 5z2Gy/u0AJTV3vImTg7eKRd1Mj3unduYoybVDO4yM/uUxPW2O18X/RyseoVEsSVFcEdN OOq62rM63/ym5Uu9hKrlJ4eG+hUj6iESklZkm5M3TYEYo601VUDir83kC4+Y+JeQb9Rz KQypD56CxiGucs4nqRXTFtxfTXTPePcdcJRucYkr7DqMCI4FIYIsTWlrLUWjcA+Xa+C0 73Nq49Bp8fXih017jja7jwehnX99KnsmEav4E004hM44bVatKdX2i4hx4OgjQLm3PwJN cTFQ== X-Gm-Message-State: AOAM533ujf2wjC9vDIiFTlID/ZMsWZ0iFSoTcv69QaiSS35ykQ3oVs3E wsxcaVz0/6lz9hauR+AU6v+z2A== X-Received: by 2002:a05:6000:551:: with SMTP id b17mr540007wrf.32.1621267828193; Mon, 17 May 2021 09:10:28 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h14sm488057wmb.1.2021.05.17.09.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4EDC61FF8F; Mon, 17 May 2021 17:10:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 03/29] tests/docker: allow "update" to add the current user Date: Mon, 17 May 2021 17:09:56 +0100 Message-Id: <20210517161022.13984-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x432.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_Mathieu-Daud?= =?utf-8?b?w6k=?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The current user functionality is used for cross compiling to avoid complications with permissions when building test programs. However for images that come from the registry we still need the ability to add the user after the fact. Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo Message-Id: <20210512102051.12134-5-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 9b3425fec2..7a14058801 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -517,7 +517,7 @@ def run(self, args, argv): class UpdateCommand(SubCommand): - """ Update a docker image with new executables. Args: """ + """ Update a docker image. Args: """ name = "update" def args(self, parser): @@ -525,6 +525,9 @@ def args(self, parser): help="Image Tag") parser.add_argument("--executable", help="Executable to copy") + parser.add_argument("--add-current-user", "-u", dest="user", + action="store_true", + help="Add the current user to image's passwd") def run(self, args, argv): # Create a temporary tarball with our whole build context and @@ -564,6 +567,13 @@ def run(self, args, argv): df.write(u"ADD . /\n") + if args.user: + uid = os.getuid() + uname = getpwuid(uid).pw_name + df.write("\n") + df.write("RUN id %s 2>/dev/null || useradd -u %d -U %s" % + (uname, uid, uname)) + df_bytes = BytesIO(bytes(df.getvalue(), "UTF-8")) df_tar = TarInfo(name="Dockerfile") From patchwork Mon May 17 16:09:57 2021 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: 440150 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1234710jac; Mon, 17 May 2021 09:19:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3vLK26a9T2BUwWqdZvGjOjXyE+Cab4oeiruFc3KlaOdRw5S5/pTbcQXZchOdcd8RLmXgM X-Received: by 2002:a05:6e02:ed2:: with SMTP id i18mr443028ilk.22.1621268357495; Mon, 17 May 2021 09:19:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268357; cv=none; d=google.com; s=arc-20160816; b=KFgq95uNL5UqiLVrmrrb3l8NVjkJ4Cgn8jvwpipDhf3c9VuFfxsaQ/XevrHM2lYAkm I58Ng8u03VmLH5V6fdLQgARPszSuRfAmLJXXP/14lHPHxZAH6/RQnRAsewtEF3/bsT0F buulFuni80KfVvE1K+qmbIUzt32AR/2mH7rd59E4PmU1I68Tr6nZAdRyzBseSvRAIjES A63HU/jyzT+R5kxxrN/NExnLQ8sBIJ2DkuWrZHMzg2QYlzJ7bsWJlo9V9QeSRllu3riT RCFlH6S6Ngt/YY+6boodcI2WgbB9oz4lr5ctI9ozIcGUV4GQ4nJ3DlgoXzAIeU/ZK5+b pYQw== 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=uUMKiPKMAS7O1QKMD26oNu3/VNnJ7Kibrl6YvpCZrWU=; b=khck66OHF6iRAXz4xOlA6DD2a0OpiZCWj/8RXPzMO7QYMphOkKtTFOO7ia3BbmKbvB oXqZwQyc7ErVGW+xOVmr9kVQhWj+HWQevB14rDBAF2nLQHyx4OidwnkVlC391vuw13I7 SGy81ILddMGlxIB6hxZzf4FwY8nVUz8DFpSxuebawc0SFKWbD8Gm/sefnakjzRj45PCm UjYhyn6LhT/v/4mQIq6y9E8tyHrVhoHO+bka8oEj2gKmRFtQJ2fH//ErAXkw4PTYxB1M 76yl3n0hYuXnOVN+bwEs/39gAGoyi3JQ9O5fmDGFKruknm1pRwkEiSLYliAIlDuZioLB KCXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JAx6hmmR; 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 b12si5063344iob.37.2021.05.17.09.19.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:19:17 -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=JAx6hmmR; 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]:55024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifxc-0006Yt-TR for patch@linaro.org; Mon, 17 May 2021 12:19:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpB-0007NQ-NY for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:34 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:45770) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifp9-0005yE-If for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:33 -0400 Received: by mail-wr1-x42a.google.com with SMTP id h4so6982606wrt.12 for ; Mon, 17 May 2021 09:10:31 -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=uUMKiPKMAS7O1QKMD26oNu3/VNnJ7Kibrl6YvpCZrWU=; b=JAx6hmmRmYi4Gg34VzXPFAKHVTHLMKGhQaB8C7EbsSTOrVqrwXzBe1zQsCT8gyIhH4 boWYo020crllYJPBfyIFejhnjUCgVRxukKE/AiRba+yam+VaQLwhrEb8bFxlGtmDLtrR RbgNRrgfZcc8uDHoLAxzdq910O5kwYqMaUcMSwtpYVPdC7prW4cIRAiKy6YoTroxjRDI 3WB6Vaw0LcRpdU1qzr+6Ag/xLx5rcssnYGVna94W32rFTVcblSqO58ExaQjrlXILpIqe jU1eZILtcPBY1MRaRiCD+pefm2TuJjeGN5V4xL9ZPSCCjeVDppyCmeFkPcq0zaSeCdbv veJg== 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=uUMKiPKMAS7O1QKMD26oNu3/VNnJ7Kibrl6YvpCZrWU=; b=CSlmSzPiInSh9XzPR2xh3Z7z7Q6NqyHZFWydIMpQwIbd+ToDWmYxxUI3MPYXto5Rz0 xLOAaFyGxLleknVvB38Fz4cSmh09aP6WxwfsJmoKFEGlEwhKEvVd2xTNjCL6ur1tZsLm O4GieY6FOJPbjzE4n+ke+4Hb5c/KVMPc75qno3VTa+pPBOEdFpuhYqBIyE6vIwJnrKTD FX11kcJDa3yYG8iofUcfr5wx2vc8KqUvjqYq9qsQYXDgoRqFyQW9lqH6Oi1922jO5c06 Katu60eOF0muZ5Apa3vJAvLw7luF/cSsjiaD/0z3v4RgMs921zcG5NGpECH5fbt4zQrw viVA== X-Gm-Message-State: AOAM5306WEO1HafE/8ASzmyGs20sjriuUiYPf0HEZoYrSzOg81XJYk6l 7gDJFgDNxlkUmv1sTLnm/mPFVw== X-Received: by 2002:a5d:64e5:: with SMTP id g5mr557215wri.30.1621267830225; Mon, 17 May 2021 09:10:30 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f7sm14896092wmq.30.2021.05.17.09.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 65E1C1FF90; Mon, 17 May 2021 17:10:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 04/29] tests/docker: add "fetch" sub-command Date: Mon, 17 May 2021 17:09:57 +0100 Message-Id: <20210517161022.13984-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.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_Mathieu-Daud?= =?utf-8?b?w6k=?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This simply wraps up fetching a build from the registry and tagging it as the local build. Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo Message-Id: <20210512102051.12134-6-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 7a14058801..4d9bb7c7ed 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -515,6 +515,23 @@ def run(self, args, argv): return 0 +class FetchCommand(SubCommand): + """ Fetch a docker image from the registry. Args: """ + name = "fetch" + + def args(self, parser): + parser.add_argument("tag", + help="Local tag for image") + parser.add_argument("registry", + help="Docker registry") + + def run(self, args, argv): + dkr = Docker() + dkr.command(cmd="pull", quiet=args.quiet, + argv=["%s/%s" % (args.registry, args.tag)]) + dkr.command(cmd="tag", quiet=args.quiet, + argv=["%s/%s" % (args.registry, args.tag), args.tag]) + class UpdateCommand(SubCommand): """ Update a docker image. Args: """ From patchwork Mon May 17 16:09:58 2021 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: 440145 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1231723jac; Mon, 17 May 2021 09:15:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgS3V0497Gvva1LvTRjWjwvn9zWJMnDer2uyDCMWgEAqn40DkumB9CTTAH+vLdOOViREXx X-Received: by 2002:a6b:fb0f:: with SMTP id h15mr651655iog.24.1621268146721; Mon, 17 May 2021 09:15:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268146; cv=none; d=google.com; s=arc-20160816; b=tRvrF09KKdgJ3Yt+8yMbgemSnnPdYSuX0sZ3OLHTxRtURDjGMM848MZTja8nRSfHP4 yPJr5op8odtR0tYzPF8dqaU9YV3g5JFYeBaPiG6xMTUN9QjoZgZm0b/nwUpiF3yxqCwp qR/gOd6LwTyt9i4L1WaYuayAnjIbCN5abNLPP91u/T/f8y5EO8YUmObjiiP31EypGXmh OevefgMYwCHgy8kxX7AfduMP7+CsRhaVQ1KcN3fnuP7ZzqDJjr5nPZTyHYDbkPPg4+zy B2GwPXl4DmgDJ/LEixNENv7rcFV4rIs+snFbb9GieGsoFRI7EimKps6dRj1dlxFEMQSF 2/MA== 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=8rfnchD5SVmgU5vx+Rd3nLxyXpMSnbLzOfkJSsDmY2E=; b=iVR/iVG++d5DQXuhSE4F3EbPcYmflK/jp47LXG1LM9UIq69rF2foeMNIociQ3Bo1E5 YkupNSMsRTmd3ImZKHysR23MePVcH4oTJ5NATgSdtxTHJL7WXk2X0vpupunbdp3cpxCm VUtz+aBIy5UiXgafUjXDBeXy7U7B22vChkn6S96FwMUG15MGXh1KfOf8TpJf/GJMW7xz vkWQrTJD95anhV2i5oYRxqB/q6H0qhl13/oSZtIPNCqxn5vMPHbPIJsn1xY5U7+CDpDA QkoxRefHMqCuhadpVhT+jHH5y1CgwlE9Pqnp/EsW7TiXMffMLWxnmjq35MxneK7MkaZq W8eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZgjcyiX5; 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 k10si18628305iow.62.2021.05.17.09.15.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:15:46 -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=ZgjcyiX5; 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]:45528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifuE-0008M3-4F for patch@linaro.org; Mon, 17 May 2021 12:15:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpU-0007Ua-8s for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:55 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:37883) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpD-00061w-FT for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:47 -0400 Received: by mail-wr1-x42f.google.com with SMTP id q5so7020357wrs.4 for ; Mon, 17 May 2021 09:10:34 -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=8rfnchD5SVmgU5vx+Rd3nLxyXpMSnbLzOfkJSsDmY2E=; b=ZgjcyiX5iozkT1sQY69udHEGh4oY5tzQ1eNgXiBeTvP0IOr06jvzh7mKW4RAmgufyd EzU7sECOIFisv+WcWLSgtsd6Tmp+Wdb+Kcpm63li9cOTMHMOmjjr/qRPDsVf88ytEqJV fevEVh7vp736a0kpchNoLSTxD3MDnS6bRTE/sioKzmad7uPkhOxU46Adaecy6jluiby7 dZ7Vo/TpQtNgtKd7KS/xbs3pV3S72itrVhGa3iNcLF/D5/mZ1toqIUwzN4BhVkVg0Rcp W/yg59A/7KiWJj+07BqWZEuHgGdbUmOMNG3tk3vhbAwLzNZaPRgOiC22VE35mgqZIsyv /MVw== 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=8rfnchD5SVmgU5vx+Rd3nLxyXpMSnbLzOfkJSsDmY2E=; b=Z79i+Bw+5odiosufVAx/QzvnCcj31bfp22VN1Y4DhgcRCRzA6ghm/eIKf0Di9t+s3R 3aH5bSPY9ibevYo6cw7qXLTYpXAZjWs01K/UAl7oH51xyCUiH5OPH5lCfWOsnDistyi+ kXo7uJhwSrHves4IAQ+ByeiPt2EHt+QpqvfPRNwMtwPY/5zgSTF2N09sH1ARLY0RsrAp Buh1c2G6oq6DLex0B4nyiSvLli/UdW8m6eejgqWMglj2/0CzempvCsA1+XCkiXlIJivk OxGaik80N2MPF1KkaNp+3jQXOPe1gLWNS11PnRpvOQcWhkMkSQKhia4K6w5xSYqqnFKu lsRQ== X-Gm-Message-State: AOAM533I7zUaP40xEcL1dhumABFMs/0x8QEDydJpNdw3JIcQSH2zKOeP vsYJYY0ZiSu3JwyQCjyV6yH2jA== X-Received: by 2002:a5d:46c5:: with SMTP id g5mr515406wrs.33.1621267833877; Mon, 17 May 2021 09:10:33 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id i11sm18318413wrq.26.2021.05.17.09.10.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 846021FF91; Mon, 17 May 2021 17:10:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 05/29] docker: Add Hexagon image Date: Mon, 17 May 2021 17:09:58 +0100 Message-Id: <20210517161022.13984-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.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: Alessandro Di Federico , Brian Cain , Thomas Huth , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This image is a little special because it takes a long time to build. As such most users don't want to be doing that and just pull random binaries from the ether as intended by the container gods. This involves someone with credentials and a beefy machine running: make docker-image-debian-hexagon-cross V=1 NOCACHE=1 J=30 docker tag qemu/debian-hexagon-cross registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cross docker push registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cross With a suitable binary in the "cloud" a normal user will run: make docker-image-debian-hexagon-cross or have it run for them through the dependency mechanism of our over-engineered makefiles and get the binary they wanted. There are a few wrinkles of course including needing to tweak the final image to have the credentials of the user so we can actually do our cross compiles. Signed-off-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé Reviewed-by: Willian Rampazzo Cc: Alessandro Di Federico Cc: Philippe Mathieu-Daudé Cc: Brian Cain Message-Id: <20210512102051.12134-7-alex.bennee@linaro.org> -- 2.20.1 diff --git a/MAINTAINERS b/MAINTAINERS index 78561a223f..7572859317 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -197,6 +197,8 @@ F: linux-user/hexagon/ F: tests/tcg/hexagon/ F: disas/hexagon.c F: default-configs/targets/hexagon-linux-user.mak +F: docker/dockerfiles/debian-hexagon-cross.docker +F: docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh HPPA (PA-RISC) TCG CPUs M: Richard Henderson diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 820423d718..8967ecf118 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -148,6 +148,28 @@ docker-image-debian-s390x-cross: docker-image-debian10 docker-image-debian-sh4-cross: docker-image-debian10 docker-image-debian-sparc64-cross: docker-image-debian10 +# +# The build rule for hexagon-cross is special in so far for most of +# the time we don't want to build it. While dockers caching does avoid +# this most of the time sometimes we want to force the issue. +# +docker-image-debian-hexagon-cross: $(DOCKER_FILES_DIR)/debian-hexagon-cross.docker + $(if $(NOCACHE), \ + $(call quiet-command, \ + $(DOCKER_SCRIPT) build -t qemu/debian-hexagon-cross -f $< \ + $(if $V,,--quiet) --no-cache \ + --registry $(DOCKER_REGISTRY) --extra-files \ + $(DOCKER_FILES_DIR)/debian-hexagon-cross.docker.d/build-toolchain.sh, \ + "BUILD", "debian-hexagon-cross"), \ + $(call quiet-command, \ + $(DOCKER_SCRIPT) fetch $(if $V,,--quiet) \ + qemu/debian-hexagon-cross $(DOCKER_REGISTRY), \ + "FETCH", "debian-hexagon-cross") \ + $(call quiet-command, \ + $(DOCKER_SCRIPT) update $(if $V,,--quiet) \ + qemu/debian-hexagon-cross --add-current-user, \ + "PREPARE", "debian-hexagon-cross")) + # Specialist build images, sometimes very limited tools docker-image-debian-tricore-cross: docker-image-debian10 docker-image-debian-all-test-cross: docker-image-debian10 diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker b/tests/docker/dockerfiles/debian-hexagon-cross.docker new file mode 100644 index 0000000000..d5dc299dc1 --- /dev/null +++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker @@ -0,0 +1,45 @@ +# +# Docker Hexagon cross-compiler target +# +# This docker target is used for building hexagon tests. As it also +# needs to be able to build QEMU itself in CI we include it's +# build-deps. It is also a "stand-alone" image so as not to be +# triggered by re-builds on other base images given it takes a long +# time to build. +# +FROM qemu/debian10 + +# Install common build utilities +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt install -y --no-install-recommends \ + bison \ + cmake \ + flex \ + lld \ + rsync \ + wget + +ENV TOOLCHAIN_INSTALL /usr/local +ENV ROOTFS /usr/local + +ENV LLVM_URL https://github.com/llvm/llvm-project/archive/bfcd21876adc3498065e4da92799f613e730d475.tar.gz +ENV MUSL_URL https://github.com/quic/musl/archive/aff74b395fbf59cd7e93b3691905aa1af6c0778c.tar.gz +ENV LINUX_URL https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.18.tar.xz + +ADD build-toolchain.sh /root/hexagon-toolchain/build-toolchain.sh + +RUN cd /root/hexagon-toolchain && ./build-toolchain.sh + +FROM debian:buster-slim +# Duplicate deb line as deb-src +RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list +# Install QEMU build deps for use in CI +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy git ninja-build && \ + DEBIAN_FRONTEND=noninteractive eatmydata \ + apt build-dep -yy --arch-only qemu +COPY --from=0 /usr/local /usr/local +ENV PATH $PATH:/usr/local/bin/ diff --git a/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh b/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh new file mode 100755 index 0000000000..19b1c9f83e --- /dev/null +++ b/tests/docker/dockerfiles/debian-hexagon-cross.docker.d/build-toolchain.sh @@ -0,0 +1,141 @@ +#!/bin/bash + +set -e + +BASE=$(readlink -f ${PWD}) + +TOOLCHAIN_INSTALL=$(readlink -f "$TOOLCHAIN_INSTALL") +ROOTFS=$(readlink -f "$ROOTFS") + +TOOLCHAIN_BIN=${TOOLCHAIN_INSTALL}/bin +HEX_SYSROOT=${TOOLCHAIN_INSTALL}/hexagon-unknown-linux-musl +HEX_TOOLS_TARGET_BASE=${HEX_SYSROOT}/usr + +function cdp() { + DIR="$1" + mkdir -p "$DIR" + cd "$DIR" +} + +function fetch() { + DIR="$1" + URL="$2" + TEMP="$(readlink -f "$PWD/tmp.tar.gz")" + wget --quiet "$URL" -O "$TEMP" + cdp "$DIR" + tar xaf "$TEMP" --strip-components=1 + rm "$TEMP" + cd - +} + +build_llvm_clang() { + fetch "$BASE/llvm-project" "$LLVM_URL" + cdp "$BASE/build-llvm" + + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=${TOOLCHAIN_INSTALL} \ + -DLLVM_ENABLE_LLD=ON \ + -DLLVM_TARGETS_TO_BUILD="Hexagon" \ + -DLLVM_ENABLE_PROJECTS="clang;lld" \ + "$BASE/llvm-project/llvm" + ninja all install + cd ${TOOLCHAIN_BIN} + ln -sf clang hexagon-unknown-linux-musl-clang + ln -sf clang++ hexagon-unknown-linux-musl-clang++ + ln -sf llvm-ar hexagon-unknown-linux-musl-ar + ln -sf llvm-objdump hexagon-unknown-linux-musl-objdump + ln -sf llvm-objcopy hexagon-unknown-linux-musl-objcopy + ln -sf llvm-readelf hexagon-unknown-linux-musl-readelf + ln -sf llvm-ranlib hexagon-unknown-linux-musl-ranlib + + # workaround for now: + cat < hexagon-unknown-linux-musl.cfg +-G0 --sysroot=${HEX_SYSROOT} +EOF +} + +build_clang_rt() { + cdp "$BASE/build-clang_rt" + cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DLLVM_CONFIG_PATH="$BASE/build-llvm/bin/llvm-config" \ + -DCMAKE_ASM_FLAGS="-G0 -mlong-calls -fno-pic --target=hexagon-unknown-linux-musl " \ + -DCMAKE_SYSTEM_NAME=Linux \ + -DCMAKE_C_COMPILER="${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang" \ + -DCMAKE_ASM_COMPILER="${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang" \ + -DCMAKE_INSTALL_PREFIX=${HEX_TOOLS_TARGET_BASE} \ + -DCMAKE_CROSSCOMPILING=ON \ + -DCMAKE_C_COMPILER_FORCED=ON \ + -DCMAKE_CXX_COMPILER_FORCED=ON \ + -DCOMPILER_RT_BUILD_BUILTINS=ON \ + -DCOMPILER_RT_BUILTINS_ENABLE_PIC=OFF \ + -DCMAKE_SIZEOF_VOID_P=4 \ + -DCOMPILER_RT_OS_DIR= \ + -DCAN_TARGET_hexagon=1 \ + -DCAN_TARGET_x86_64=0 \ + -DCOMPILER_RT_SUPPORTED_ARCH=hexagon \ + -DLLVM_ENABLE_PROJECTS="compiler-rt" \ + "$BASE/llvm-project/compiler-rt" + ninja install-compiler-rt +} + +build_musl_headers() { + fetch "$BASE/musl" "$MUSL_URL" + cd "$BASE/musl" + make clean + CC=${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang \ + CROSS_COMPILE=hexagon-unknown-linux-musl \ + LIBCC=${HEX_TOOLS_TARGET_BASE}/lib/libclang_rt.builtins-hexagon.a \ + CROSS_CFLAGS="-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target=hexagon-unknown-linux-musl" \ + ./configure --target=hexagon --prefix=${HEX_TOOLS_TARGET_BASE} + PATH=${TOOLCHAIN_BIN}:$PATH make CROSS_COMPILE= install-headers + + cd ${HEX_SYSROOT}/.. + ln -sf hexagon-unknown-linux-musl hexagon +} + +build_kernel_headers() { + fetch "$BASE/linux" "$LINUX_URL" + mkdir -p "$BASE/build-linux" + cd "$BASE/linux" + make O=../build-linux ARCH=hexagon \ + KBUILD_CFLAGS_KERNEL="-mlong-calls" \ + CC=${TOOLCHAIN_BIN}/hexagon-unknown-linux-musl-clang \ + LD=${TOOLCHAIN_BIN}/ld.lld \ + KBUILD_VERBOSE=1 comet_defconfig + make mrproper + + cd "$BASE/build-linux" + make \ + ARCH=hexagon \ + CC=${TOOLCHAIN_BIN}/clang \ + INSTALL_HDR_PATH=${HEX_TOOLS_TARGET_BASE} \ + V=1 \ + headers_install +} + +build_musl() { + cd "$BASE/musl" + make clean + CROSS_COMPILE=hexagon-unknown-linux-musl- \ + AR=llvm-ar \ + RANLIB=llvm-ranlib \ + STRIP=llvm-strip \ + CC=clang \ + LIBCC=${HEX_TOOLS_TARGET_BASE}/lib/libclang_rt.builtins-hexagon.a \ + CFLAGS="-G0 -O0 -mv65 -fno-builtin -fno-rounding-math --target=hexagon-unknown-linux-musl" \ + ./configure --target=hexagon --prefix=${HEX_TOOLS_TARGET_BASE} + PATH=${TOOLCHAIN_BIN}/:$PATH make CROSS_COMPILE= install + cd ${HEX_TOOLS_TARGET_BASE}/lib + ln -sf libc.so ld-musl-hexagon.so + ln -sf ld-musl-hexagon.so ld-musl-hexagon.so.1 + cdp ${HEX_TOOLS_TARGET_BASE}/../lib + ln -sf ../usr/lib/ld-musl-hexagon.so.1 +} + +build_llvm_clang +build_kernel_headers +build_musl_headers +build_clang_rt +build_musl From patchwork Mon May 17 16:09:59 2021 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: 440149 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1233613jac; Mon, 17 May 2021 09:17:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXSBxT4TRylEqA2vg91tNo3rWmZnm30C9nLS7JIUCo/ymxJPMNnw9lURq6KOHCt+X3SGxA X-Received: by 2002:a05:6e02:1985:: with SMTP id g5mr400408ilf.103.1621268276101; Mon, 17 May 2021 09:17:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268276; cv=none; d=google.com; s=arc-20160816; b=n0mLMVwWp97JW2k8DkJ/thcCy626XYpp8aoGEpPdTC+c/cWI5J2bvZ96fE/wX8+zyT m2oeNR6eFNcqQ9sZX47BaYu0BVD35NPLP7k6bQmyl+gIpHvpkcs1kjcEjQVVUPv6mz/Y PhTap8u2TWh0B7RzIOYOGTRAzt97gDZYhjViWEIqn033cX9SUJZbpalwuchaTzeyMDeh G3+hUWPCOd/s6g/rzz7KOp3asgy6KKSmamfeakERWyp1xnjjc4bDmS4FXFWIZovYvwma jnzYHeLtja7ZKw52V+VbTn/QrqGPaAiepJbjyQ2kmw2Dho/RNMsfzyeVcsmDBGyXuKkn fPiA== 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=8WpVHuD4UB9TOqFcf5IX/GBrauc6iTp1wyZlgKWXCkQ=; b=lBXpUanFSEtuSYtJmmDg75ZldwMOvLuJ9hoL0K/9Yvc4cgb6hw3QOmduvaIwTormPS VyT5p1twxLIOacLqR8MZMUXO1JiskQvulkhRDlioSazXG8u7q+Sp+IV36IpfKR7cJGG2 T4C+oczmI7YEeJ4YhJVRAe38LDQtdd5+3me+cehiVFAUR9hxcPKEqp0w5UcK1c/EhgD3 GzFQr/+teePBu8ttwoX71TLzccD9cnday5zi76pajVUezbRDFvWlFAVRZcx+kzb8eT6e q23n1g8yo3Gtj7h1d7oIjS3QAqvTPfRbwDir6UKHS27Och4hrEPKgHIQDWrL0R9n/Zm8 Jw6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=KYVwM8F9; 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 t12si20196925jaj.66.2021.05.17.09.17.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:17:56 -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=KYVwM8F9; 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]:52812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifwJ-00050U-Ii for patch@linaro.org; Mon, 17 May 2021 12:17:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpa-0007Xc-9G for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:58 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:43865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpH-000636-CB for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:57 -0400 Received: by mail-wr1-x42c.google.com with SMTP id p7so3279533wru.10 for ; Mon, 17 May 2021 09:10:37 -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=8WpVHuD4UB9TOqFcf5IX/GBrauc6iTp1wyZlgKWXCkQ=; b=KYVwM8F97qIUIsPqi26bfep7FzlixrOAqigZZzY8fmb08udEXvRt2TDsTLBQxsjGz4 U08p1SXjGj9LjwiCOMl1XOqyQzhZXZ+Nd5rvvrNyPiCuCgduSvlJh6z+AJtqmZKdyEPe 1IL/z+h1lL8rWcaO6zEm7GuLg0GHu3A4AJsMxYswRn+GeJjecIiARlKPs9bRL2SUjp6p V7PS7ayzSajsq2cLTbfSai0J1t16QMGmletVCGhN9HsQr8eRsmLOUDMhrIyrN+9BU2gy fI3pA/BaM+RmTaaEJoK7uYTnl3/8v2RU2tHzGKveMjZKWT8VeJ9RQO5QkiFj0fezqfch krpA== 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=8WpVHuD4UB9TOqFcf5IX/GBrauc6iTp1wyZlgKWXCkQ=; b=l24SAf4cDVgPYKZYqSQ+p+rW+Zm6id029mgBu1s+S4h6Xy7R1mNULIDLmZ4Cdr7IE8 Adii5lJFefzOSIZJRC4tyS4ETjJKPnJ88uwC7V5hgFIrBUzp+qHfbxkWClJA13ZD/N+k 2Yi6neQkGugNgDtqYWFFXzGy+c+j2Ia1tAgvbiK7CCNWzPGhCMAoYJzAMjkRT/bYT/hI hNe2CCtjcmfHa4oSjkW/xxfmJdKm/7y+15Sy3mYtaHd5rSZH2Kl2h+AEQRQf63VHfFTF /2TC3L8zF8WgVur4iiGsqdkIk7v/4QjYvXkBfdScHSIWH36TdiTrQZicJpRxpmkQYPGT /QTg== X-Gm-Message-State: AOAM532VsQ6lJkUo+sdLTiJheW+Da//hQgw+P50ud1V39+UFth/IZTA6 gmUTA+LIQ89D+ux60/zlLbR7ReYe8+vjjw== X-Received: by 2002:a5d:4ed1:: with SMTP id s17mr537097wrv.204.1621267836666; Mon, 17 May 2021 09:10:36 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e10sm18282107wrw.20.2021.05.17.09.10.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9BA7E1FF92; Mon, 17 May 2021 17:10:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 06/29] tests/tcg: Use Hexagon Docker image Date: Mon, 17 May 2021 17:09:59 +0100 Message-Id: <20210517161022.13984-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-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-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: Alessandro Di Federico , =?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: Alessandro Di Federico [PMD: Split from 'Add Hexagon Docker image' patch] [AJB: add container_hosts] Signed-off-by: Alessandro Di Federico Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210228222314.304787-5-f4bug@amsat.org> Message-Id: <20210512102051.12134-8-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 8f20ce065d..cf6062a15f 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -128,6 +128,11 @@ for target in $target_list; do container_image=fedora-cris-cross container_cross_cc=cris-linux-gnu-gcc ;; + hexagon-*) + container_hosts=x86_64 + container_image=debian-hexagon-cross + container_cross_cc=hexagon-unknown-linux-musl-clang + ;; hppa-*) container_hosts=x86_64 container_image=debian-hppa-cross From patchwork Mon May 17 16:10:00 2021 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: 440153 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1237744jac; Mon, 17 May 2021 09:23:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1glIzgzYeMNSZ/ZyY/N82y6h8sowq/nIloiCt3jzFWLXVEN0H+3s7vjwPNgXcuDSXlweO X-Received: by 2002:a5e:dd47:: with SMTP id u7mr639430iop.62.1621268587354; Mon, 17 May 2021 09:23:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268587; cv=none; d=google.com; s=arc-20160816; b=0iR29q/QHI3+g/Euua9l5HJnW26gRYjZANZywOMEOpadsihdUBeYWCzJK0RTO8rLkx UyKE9e+cRBCUwHd2gz1aZLG5GBHhJtcOLn2jY7lDizELMx7doq89c1X1ijcaNOZWkmf9 DXNqWhpBLiL5C0CbLb0OEruQN56ojGM6uRioHHCCtmthUnev86t4PaV+Q/6ZxVcnk+1R +ZPEmlXGERzdc774p6BT95nvHoyZnXwSID5f1UN0oXfyh5NvfMNFhuS0GpFygcM2+K99 w5s+rFgmqKuGungrbu46WpJo+pGtUrBvdJGYODaHKEtXzmEifo7YJfxaGyYCyndew+gc c7kQ== 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=PiPNYXgOmLbPMws4gHtVxogCzpWnu6jZf/k608Pm9yg=; b=ZnqJGX5YtPuJ2Jm1FyUy47sd1Or/aEKWJStwnB5AwbJThPyO+AOdppjtCqA75SKLOD NbckCrbV1qTy0jOs8MSCyJwkWBCEqdPFGHpQsUo2txfP7fgFhv2CVP5J3lnnzJzLPdFs QeU9ZudO1LMMMShw7myaPTW4slkKn64iVcQdeVP9D7q8IjPsWtl7vB85znIECEijY/vq 6/TIELBYmBlKtIyyO32p9F8FgPcBHez2M8lMqV8L05sc+xBCzdT0BVxlOueg5lss8yeD O5RmGqHxPFktDifER0M84zYDDuRFuQnFMRDTwFzbunJ69fa/Oisjf37QyXby5eslhP/9 yIzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rH8l4uM3; 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 k7si18159800ilo.146.2021.05.17.09.23.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:23:07 -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=rH8l4uM3; 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]:33982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig1K-0003XM-Hz for patch@linaro.org; Mon, 17 May 2021 12:23:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpU-0007Ub-9l for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:55 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:37887) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpH-00062X-0x for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:50 -0400 Received: by mail-wr1-x433.google.com with SMTP id q5so7020393wrs.4 for ; Mon, 17 May 2021 09:10:35 -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=PiPNYXgOmLbPMws4gHtVxogCzpWnu6jZf/k608Pm9yg=; b=rH8l4uM3jPu+mjPwHekJj52AaRJKOljROrAOSa6hSQm2iwYU8EFlw1EEkPlGm6gqv6 H7sSaGLpZ4bxbE744R0ftCyoT9snvcL818SzLk8yGalMdZCikSakh/4vpvp6sh0XYNTk 3+B3CgH+4HkXkSevBGRRq/Ff2H5cD3M+0egNXj9rN+LjY37WJbf5ozCFSLVGwm/mKSg5 iUj3H1182vBRlVnFCuN6LmU2XGNHSSo8Rr9UEiV4RgYlGt6MX2XtFH0eBCJXJ0lei3yG nE25m8vmMg+1vikb7JtybvFf13HFuZUpBBeDy83vRQOsS1s/8QnO7iL28aaPh7OuS1pQ x8zw== 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=PiPNYXgOmLbPMws4gHtVxogCzpWnu6jZf/k608Pm9yg=; b=BoBfKwHxMkbaKM1aPhPknkmVcxDF/vFPg37sGX3cwA6EuWeLVerWFHTCYrnD26r0+d fwczwCVCdyvgkhxIxNIu/dXg2rZNju8lF9RYxm41I1uT9QdG9cpIsiet4mWB0sAOO6Sk 2UzVHBLemUxBIiEAyNs4BmYajU48astU9q5pMqEykg/dMNmfQoNVts7CAiDpXNp3dYc1 pDUrJG0YwcJYXJyX8HXkIO7PdyDvDYhEC2dX7uRsu4UZ/CoSgmwfiV2+/yVRqiUwt6iy adc8M5T6WjIbwWGQxxz0exOIU0R6a3bafxJWkyW93xlwFoxZoIrsCmzHa8gLLMI8AKw+ bpsw== X-Gm-Message-State: AOAM5325oIEthJSHsso7zL7FXycVsVdOPFhuug9B1tWrtqIfQ7i3l7BP X4EWD+DiwbONGLabcqu5S2jIvQ== X-Received: by 2002:a5d:4b08:: with SMTP id v8mr540380wrq.122.1621267834737; Mon, 17 May 2021 09:10:34 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id p2sm12663099wrj.10.2021.05.17.09.10.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B71B41FF93; Mon, 17 May 2021 17:10:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 07/29] tests/docker: Added libbpf library to the docker files. Date: Mon, 17 May 2021 17:10:00 +0100 Message-Id: <20210517161022.13984-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=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: Andrew Melnychenko , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= , Willian Rampazzo , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Andrew Melnychenko The series of patches for eBPF RSS adds libbpf dependency for qemu. https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg08887.html With this patch, libbpf added: Alpine - added libbpf-dev Centos 8 - added libbpf-devel Fedora - added libbpf-devel Signed-off-by: Andrew Melnychenko Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210406082947.672708-2-andrew@daynix.com> Message-Id: <20210512102051.12134-11-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker index 0ac46ddd91..7eeecacc46 100644 --- a/tests/docker/dockerfiles/alpine.docker +++ b/tests/docker/dockerfiles/alpine.docker @@ -20,6 +20,7 @@ ENV PACKAGES \ gnutls-dev \ gtk+3.0-dev \ libaio-dev \ + libbpf-dev \ libcap-ng-dev \ libjpeg-turbo-dev \ libnfs-dev \ diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerfiles/centos8.docker index a8c6c528b0..efc1349cc8 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -14,6 +14,7 @@ ENV PACKAGES \ git \ glib2-devel \ libaio-devel \ + libbpf-devel \ libepoxy-devel \ libfdt-devel \ libgcrypt-devel \ diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index d8fa16372d..0979c0e1f4 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -32,6 +32,7 @@ ENV PACKAGES \ libcurl-devel \ libepoxy-devel \ libfdt-devel \ + libbpf-devel \ libiscsi-devel \ libjpeg-devel \ libpmem-devel \ From patchwork Mon May 17 16:10:01 2021 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: 440146 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1231979jac; Mon, 17 May 2021 09:16:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz81b697fBIHXHzlRSSYTTLj7NfVzkYYBvOQ6bg4Ucz3GmJyeuG/2I6Bi4TlKiLhPys/o5O X-Received: by 2002:a05:6638:344e:: with SMTP id q14mr762317jav.47.1621268167360; Mon, 17 May 2021 09:16:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268167; cv=none; d=google.com; s=arc-20160816; b=YhFwS99nMAnoVfgpf+Yikv7iFKr7a5i5iz62IkAnsP7+tnJMtJM2I6FMFx6GT0JE4o 29sYxvnjAnk83dFbnobKSQdMqhLjyg5RCrAQRmRxZzo1IvxyHYgpDHnUIGQMMhi88Ooa d1JAyQKIrfTG46B1Lc5Vj/vExRUcU6j3D7XXyyUeplNz5xa+QWZK30RTt9YWMz+C5U+6 hKN6wQt6WMJnoFeI4lPVOa7RmmfYnp/ZP/N8aFmLS5UOkJuDEHZ1h8NEoqscs4coK7IY p9xlpLskKtHNfLTv3z3Hx32kuyV66MWHWsRAwiGUpIt+mqEehfjN6SXyElolfagXUIlv Royg== 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=SOwWByj9Hv79uAoR3pk2Na/zMM2B+Ft68GAsD76YMDs=; b=dvyMip1YwJMOX9BvUpAqiuiXn4GaTTsop51bsgyqnNWmzA6MuA6FJDbBlMckIE8cVz VjD2y/Sks/SpqqI8NSkUjtck6f+guc/XlnIUY/nM7/pN2gSA6SE6SDtuuJT0dxc57sDQ ukRk2R+GsdZI6Xvfg+0i4gd415j5hWe3lkaG8lTbicB541fFN+qMemqYT6dD1dK2xbJB BhNy+5AOi9VY0bP1fm5j/20O9BfTb1dZPwGNH8WHDHEHZvDK0NZ1I+dfxa8TyNo8X6AH ZTyz+7a8PC0Xtd18dCuoN+3+9Tm80wYG1VSCbOd/f4TiWUoEM1qklgTeVyrneUFdr9K0 gOow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=m5kdpHyu; 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 o2si5029274jaa.70.2021.05.17.09.16.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:16:07 -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=m5kdpHyu; 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]:46446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifuY-0000X8-Ll for patch@linaro.org; Mon, 17 May 2021 12:16:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpD-0007Og-8o for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:35 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:56273) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpA-0005yu-GN for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:34 -0400 Received: by mail-wm1-x32d.google.com with SMTP id b7so3302951wmh.5 for ; Mon, 17 May 2021 09:10:32 -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=SOwWByj9Hv79uAoR3pk2Na/zMM2B+Ft68GAsD76YMDs=; b=m5kdpHyuVO9axp0VY4KcVWIAZKdDSOoPpTS5FT6SsGp/fN12q54Nn4g8GytekdU9zB pp2zWoPcJ5djDLV+Wu9LucUT0TU95cXSn7iHvJdrfyZY1kfp/NyeB7c8akzSJUEo//hP 7S2beQU2N2nE3eBGUfELN6rIqBrGv53a1mRMkxLTZuycpN1LM0yYFYl3scR9qLY6W7YU Q2Jwlnr8cmgEFAGYjxtW8zhGfw/Kbx7qrdhoSyKryvso0v8sSX8VCsHlMRgBO2UbxxQT r699VrVQ67knWBTg8GNRWOCaY5C0pcW/foQckM+zMxMZjmT98uKDJ/FO/4BBIh/8LpIz BUrg== 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=SOwWByj9Hv79uAoR3pk2Na/zMM2B+Ft68GAsD76YMDs=; b=KX/9ujvHQyMSjuEkvdgUxMVHOYIpce4S+xwvor7Yfhdx8U6WaZdNyGizZSOnJvZEHY KvoyN6AyPOyUbni6pSgt2TRrkTMQQYqgvWW8e7LXN2yYWSPd3yf6l9H0KCxG8/fuCmgp MpF9J+MQc8Tm7AWf9KCAFYsnG2k5bHTNBDhXSE1pFOeY2PbxBpoyk5N/2VV6JpxbXBas ZctU8ah5KTLUK3QmKOwj577wAvjYMjxehjK1PzPYjupYioP9pNaaDtgmC4fmPhte9/RQ Bspu0ZAv6PkO1W54xZq5coZ0Pv57TwETBOTil6sfeROQnnwzPy8okKAyiSS549WtlMvP tekg== X-Gm-Message-State: AOAM530ksfyjXQxZV9k+Be4m/kwFd8qCjqbFtqybrYWTsCk8sYyLhTM7 YWHdEJZHwXxCEVCvdqsEX8VYOA== X-Received: by 2002:a05:600c:190e:: with SMTP id j14mr371904wmq.145.1621267831082; Mon, 17 May 2021 09:10:31 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g11sm17805818wri.59.2021.05.17.09.10.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CDE5B1FF96; Mon, 17 May 2021 17:10:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 08/29] tests/tcg: Run timeout cmds using --foreground Date: Mon, 17 May 2021 17:10:01 +0100 Message-Id: <20210517161022.13984-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-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-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: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , 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" From: Bastian Koppelmann when trying to run successful short tests from the Makefile timeout would not terminate. Rather it would wait until the time runs out. Excerpt from the manpage: --foreground when not running timeout directly from a shell prompt, allow COMMAND to read from the TTY and get TTY signals; in this mode, chil‐ dren of COMMAND will not be timed out Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-3-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-13-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index cab8c6b3a2..b29fae4630 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -43,9 +43,10 @@ quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1)) # $1 = test name, $2 = cmd, $3 = desc ifdef CONFIG_USER_ONLY -run-test = $(call quiet-command, timeout $(TIMEOUT) $2 > $1.out,"TEST",$3) +run-test = $(call quiet-command, timeout --foreground $(TIMEOUT) $2 > $1.out, \ + "TEST",$3) else -run-test = $(call quiet-command, timeout $(TIMEOUT) $2,"TEST",$3) +run-test = $(call quiet-command, timeout --foreground $(TIMEOUT) $2,"TEST",$3) endif # $1 = test name, $2 = reference From patchwork Mon May 17 16:10:02 2021 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: 440141 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1227602jac; Mon, 17 May 2021 09:11:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrRpOzmBe/Xv1k/VgWN8IKIzl1BBwiV1ipSTQwDev1cJ01vFbS3jDne5sBoWCurAfYCbfm X-Received: by 2002:a05:6402:438d:: with SMTP id o13mr940703edc.324.1621267878367; Mon, 17 May 2021 09:11:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621267878; cv=none; d=google.com; s=arc-20160816; b=Vb6vrOE1g1lR79/xQzeAlMvYuCZPCHzONJpZ6wPfIYagWAewmImoLFcvWl7cdgocKo DVNrSPBAso/wsRH9EAuZQyay4Wc3YvxPHKcRIeB1Vp4CGKo8DIq0YCPYOvV89KA7UbIy xdUP735Kd3kThuThOktMh2Mfx9GAyqZkM7OJfgcAaDCItq0YzBo5HaoilgAEfVqyE/8N We3sOlsoO2QulUKCDzNmRg3AMNfjDWFcrHN/YhI1qsoHtAQx3m8jE7B+SQ12mH3wPhmN gIoB8XcGeokKa9bVu1IlvRgeXA+dzAFEnHF5Racm1ocfERw4WrtMOlBnBfbYzl9qE9E+ kVTg== 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=SN2pEUHlY9UiJaausTK9VQJ7/OcH1YFojzLo0i1fIEQ=; b=AzaiDcAnUGCglc3yXf0Xa5klLqLq/Bv4vPvTPFtkxc6/jhzBJHFBRKjUm+PY2L6G8y XaGkNlxGU+sN4FeGsVpEZ2PjmsVYIRTSjnyjR/G6fu9uOWdAEJO5z+8eRME8716bpDBX WkX6tX+k4vUpFcI2hOKZFGKs8BvJ1eOo77YwlpYkuWbQhNULbeGVqDQOZgydLPRe2xx4 aBkB5TU/DnwUtblcQ1AQ2BrvDTvN+4EMioooR5xl47s9tytORhm/Em3JwR1gnnV+ariu 0LZniL5XS5o+/ghjQQXR5zdyGQ+aMwL8ygGL6NxQdUYypMzGqy6d2UP7UURoKSMu9L7X iJPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=TxVDft7F; 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 z18si15067899edl.459.2021.05.17.09.11.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:11: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=TxVDft7F; 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]:32974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifps-0007bc-WA for patch@linaro.org; Mon, 17 May 2021 12:11:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpa-0007Xs-Bw for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:58 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:46978) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpN-00065F-3D for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:58 -0400 Received: by mail-wm1-x329.google.com with SMTP id h3-20020a05600c3503b0290176f13c7715so2312484wmq.5 for ; Mon, 17 May 2021 09:10:41 -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=SN2pEUHlY9UiJaausTK9VQJ7/OcH1YFojzLo0i1fIEQ=; b=TxVDft7FpV9158woGT8B3acaklDn3YiPvTTQX4I62uEQ1tCz8ybA/FP4imvUdqF6Bs rLjYA3Jvo4st3NWfZQcOQXIoOiL2W8qW/kuqGxrGuEy5wYwZ9pioJrI6UYcDql7mvlRG LxYnQBCEllbxKTuzxxjLGsqP6VhFvZBo4Kz2Lb5YsiuMbY8fNbsTeB9D0gTxdNSGyeL2 vtLXKh/kQwwk+Vd/DE8sScm2pHzoOYgN+OPQa85Dxzml7z9gMbWqBxNzjLSmCfujnrZw 6sQVcnzaN/qNhebHQfyQ1nL3cm5Ilu0ECXPoHem2C7L/Tjw7Wn4z7rUl3TUoSD2D52xp K9Sg== 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=SN2pEUHlY9UiJaausTK9VQJ7/OcH1YFojzLo0i1fIEQ=; b=kbjumGRlasCFKdMY8nz72NkuVvgpTCAKXFM9bHJU1dJA9MBaq3o3JHoAtXnCQ1/0yE eQcf6Kk3dQOPGm9BW3e38O2mA2v/cEFt7xCZ/Vzah4UM5PjmlHbWJOQ5wY2TXYfn17jk 6FnQLyNjSGghzZpit9pWCqveYbPdD2a61D34izN0gll8obKzGUYpsY2MKAcSA7IAfNuh AeSqv4YjSBtXg8S6EUsoBOFs8j6bNZL3uMGK3Mw5Mpo6gdKBIlQjipvw2xgduPO2CHiV yJ8rw4seOdclGDbDKiJtLGcTzXmv1qjZ5G2Dkf3wwopStALpetM47/iyULZsTNoG4KzF 7N/Q== X-Gm-Message-State: AOAM532XKtKaMfKtmJ1eIUTZ7KrsaI6k2gPvYWfQOhUffdeMwuZoy+1A /ZDN6XVuW+OOnmC+91xaW3K1LA== X-Received: by 2002:a1c:50:: with SMTP id 77mr371044wma.111.1621267840993; Mon, 17 May 2021 09:10:40 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id l22sm20897197wmq.28.2021.05.17.09.10.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EAAE81FF98; Mon, 17 May 2021 17:10:23 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 09/29] hw/tricore: Add testdevice for tests in tests/tcg/ Date: Mon, 17 May 2021 17:10:02 +0100 Message-Id: <20210517161022.13984-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.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: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann this device is used to verify the correctness of regression tests by allowing guests to write their exit status to this device. This is then used by qemu to exit using the written status. Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Reviewed-by: Alex Bennée Message-Id: <20210305170045.869437-4-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-14-alex.bennee@linaro.org> -- 2.20.1 diff --git a/include/hw/tricore/tricore_testdevice.h b/include/hw/tricore/tricore_testdevice.h new file mode 100644 index 0000000000..2c56c51bcb --- /dev/null +++ b/include/hw/tricore/tricore_testdevice.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2018-2021 Bastian Koppelmann Paderborn University + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + + +#ifndef HW_TRICORE_TESTDEV_H +#define HW_TRICORE_TESTDEV_H + +#include "hw/sysbus.h" +#include "hw/hw.h" + +#define TYPE_TRICORE_TESTDEVICE "tricore_testdevice" +#define TRICORE_TESTDEVICE(obj) \ + OBJECT_CHECK(TriCoreTestDeviceState, (obj), TYPE_TRICORE_TESTDEVICE) + +typedef struct { + /* */ + SysBusDevice parent_obj; + + /* */ + MemoryRegion iomem; + +} TriCoreTestDeviceState; + +#endif diff --git a/hw/tricore/tricore_testboard.c b/hw/tricore/tricore_testboard.c index 51658d9e37..b6810e3be0 100644 --- a/hw/tricore/tricore_testboard.c +++ b/hw/tricore/tricore_testboard.c @@ -27,6 +27,7 @@ #include "hw/loader.h" #include "elf.h" #include "hw/tricore/tricore.h" +#include "hw/tricore/tricore_testdevice.h" #include "qemu/error-report.h" @@ -56,6 +57,7 @@ static void tricore_testboard_init(MachineState *machine, int board_id) { TriCoreCPU *cpu; CPUTriCoreState *env; + TriCoreTestDeviceState *test_dev; MemoryRegion *sysmem = get_system_memory(); MemoryRegion *ext_cram = g_new(MemoryRegion, 1); @@ -87,6 +89,12 @@ static void tricore_testboard_init(MachineState *machine, int board_id) memory_region_add_subregion(sysmem, 0xf0050000, pcp_data); memory_region_add_subregion(sysmem, 0xf0060000, pcp_text); + test_dev = g_new(TriCoreTestDeviceState, 1); + object_initialize(test_dev, sizeof(TriCoreTestDeviceState), + TYPE_TRICORE_TESTDEVICE); + memory_region_add_subregion(sysmem, 0xf0000000, &test_dev->iomem); + + tricoretb_binfo.ram_size = machine->ram_size; tricoretb_binfo.kernel_filename = machine->kernel_filename; diff --git a/hw/tricore/tricore_testdevice.c b/hw/tricore/tricore_testdevice.c new file mode 100644 index 0000000000..a1563aa568 --- /dev/null +++ b/hw/tricore/tricore_testdevice.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2018-2021 Bastian Koppelmann Paderborn University + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#include "qemu/osdep.h" +#include "hw/sysbus.h" +#include "hw/qdev-properties.h" +#include "hw/tricore/tricore_testdevice.h" + +static void tricore_testdevice_write(void *opaque, hwaddr offset, + uint64_t value, unsigned size) +{ + exit(value); +} + +static uint64_t tricore_testdevice_read(void *opaque, hwaddr offset, + unsigned size) +{ + return 0xdeadbeef; +} + +static void tricore_testdevice_reset(DeviceState *dev) +{ +} + +static const MemoryRegionOps tricore_testdevice_ops = { + .read = tricore_testdevice_read, + .write = tricore_testdevice_write, + .valid = { + .min_access_size = 4, + .max_access_size = 4, + }, + .endianness = DEVICE_NATIVE_ENDIAN, +}; + +static void tricore_testdevice_init(Object *obj) +{ + TriCoreTestDeviceState *s = TRICORE_TESTDEVICE(obj); + /* map memory */ + memory_region_init_io(&s->iomem, OBJECT(s), &tricore_testdevice_ops, s, + "tricore_testdevice", 0x4); +} + +static Property tricore_testdevice_properties[] = { + DEFINE_PROP_END_OF_LIST() +}; + +static void tricore_testdevice_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc = DEVICE_CLASS(klass); + + device_class_set_props(dc, tricore_testdevice_properties); + dc->reset = tricore_testdevice_reset; +} + +static const TypeInfo tricore_testdevice_info = { + .name = TYPE_TRICORE_TESTDEVICE, + .parent = TYPE_SYS_BUS_DEVICE, + .instance_size = sizeof(TriCoreTestDeviceState), + .instance_init = tricore_testdevice_init, + .class_init = tricore_testdevice_class_init, +}; + +static void tricore_testdevice_register_types(void) +{ + type_register_static(&tricore_testdevice_info); +} + +type_init(tricore_testdevice_register_types) diff --git a/hw/tricore/meson.build b/hw/tricore/meson.build index 77ff6fd137..47e36bb077 100644 --- a/hw/tricore/meson.build +++ b/hw/tricore/meson.build @@ -1,5 +1,6 @@ tricore_ss = ss.source_set() tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tricore_testboard.c')) +tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tricore_testdevice.c')) tricore_ss.add(when: 'CONFIG_TRIBOARD', if_true: files('triboard.c')) tricore_ss.add(when: 'CONFIG_TC27X_SOC', if_true: files('tc27x_soc.c')) From patchwork Mon May 17 16:10:03 2021 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: 440154 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1238773jac; Mon, 17 May 2021 09:24:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJya4j/rJui4Fu6TJZoULcPeA7IKDaiuNVNyRcZ2TwtlWS/Zgqf7txBiYk9cOLcLaRF0fDjk X-Received: by 2002:a2e:bc24:: with SMTP id b36mr209051ljf.35.1621268658114; Mon, 17 May 2021 09:24:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268658; cv=none; d=google.com; s=arc-20160816; b=bR8Krn5a67AkXks2xB9kw+KSI2nLONblj+/PhD6jsHdvFYlJOiKSQhua59hg8edMpF Fey407kK5ji6T3/ssuUo9HwM65HbFRNc87/W13WqNtUDUructz8gXg2NwFLmE39Lm5CS /oVZgU796vwHKB5AywySagi3R/nXjYEgQUwZ9/oWJ41Obpm4kZwSZNmVVgJLRMXs7scY 6uviHrTp6eyimqF7DYWOURgC6WseLVkYaAtJn8hip2CzIKqkmuEDvAWzjyhukOqRRzzm YI8qQ9K7ETPdFZyUCwuJIRFT+YzkonXPcso6u8gA/yDYKJVWwSMRMPb+BuOLfViRR4Lt D1+A== 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=8fhgplKrAIwPeJiS0d/uA6DCmsrrVSQ43uYZZyDSgQE=; b=mUcL8MmN0Xm+rWzJwd33BYxmvhWPZifBGGutYdthwWghsXIEcKq+vGE4iToWpVR/TU TXvmqNw3amYA1DixTiPpUBhHNuiQe9k9lqO6ocfvb2xr7IS4eOeLWIpDje4HfDkHwtA8 CRDL4YnY2Gyvb314NNVzNFiHZDKkn3U6g3RCiP47IbXtWcMbJL/dfjJzEXYzQbjE5Aq8 CH1mpGoO2hNWV7uwGFkDyBQLlffusFBi7kSHiP28OoUtKmx/JDf+LE0IL5wF1R9gZjPP BvEPux6U2sX7I57IlecZQMDL74hDItE3uYVD1DV3UZKpOXPhjNO8LL3kyAoELvR1WLI9 bxcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NHnK492d; 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 y32si16959738lje.352.2021.05.17.09.24.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:24: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=NHnK492d; 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]:39456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig2S-0007Ol-R1 for patch@linaro.org; Mon, 17 May 2021 12:24:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpf-0007iL-0N for qemu-devel@nongnu.org; Mon, 17 May 2021 12:11:03 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:40921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpU-00065v-39 for qemu-devel@nongnu.org; Mon, 17 May 2021 12:11:02 -0400 Received: by mail-wr1-x42e.google.com with SMTP id z17so7005449wrq.7 for ; Mon, 17 May 2021 09:10:42 -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=8fhgplKrAIwPeJiS0d/uA6DCmsrrVSQ43uYZZyDSgQE=; b=NHnK492dnNSD6JoyPAdMvNzn4LBbBCwjkWVSUOoKJm6PenZpY6BPvaAOdtviOzUHAN PQgt4RiuzEWbNBEL14dB9UXbkHpoTe0NktMrTyN9HyY4riA8frWLHHRD6qvJRbNg9shE nT5F9B2XeQ3tYKzrhMM7uJmw5x9jh8WGAGK8E8sI7APX0OguF9/pbaHpdjD6N8Exm8gE LisSI3+EnoFdhLr6xdDNXiUkBOUtibcJTWGvQiotj+Ed5My+T40ZsTDAU/78nfLGNTtf 8p6c9tvw48eaz1WSJyt20KClxpwf30lQd1ywL2FTuY4l3NguG+uf425T4wXAI5p3+zWc JuAw== 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=8fhgplKrAIwPeJiS0d/uA6DCmsrrVSQ43uYZZyDSgQE=; b=iYvu03dK8HDB6UfWaMsWytaMBBJXoIB7kXtlxO93zNnEk2jZORhtLUVx0Tl3DXdcQn iSKfaC6W45a9lrwQwkR+xRY6FGrqHoKW+baiXAp9hjt6n0qxJmLMNzL7xAOaBJXGM3G0 7G4PF6FRTe6OXlJ17xyZWvogQM7EVpd3gHoIW1dg/eVmHgT0HFRyXc5otZXFPx5XAac+ Je1EPqAAG74kXfDJpLbgHYKXYdtxGvi7D120iRszm1BRyThxXadSAmzfieIDCEwb9tYc PPQYYqGFxlr+HojgzQfP409HKnRoDDquGrAxCST6ZYz15sQXnKG9tcfibNKFGLZOr4IJ tAew== X-Gm-Message-State: AOAM530xr8ixGHZUtIEdLFyQ+wVExBUVS9FBW6i7BrZ6UX95xEKeCcOQ kUvg4d0ixQ+Chz+s8H7un2XXMQ== X-Received: by 2002:adf:e944:: with SMTP id m4mr545940wrn.10.1621267842028; Mon, 17 May 2021 09:10:42 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c194sm19327185wme.46.2021.05.17.09.10.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 11BE81FF99; Mon, 17 May 2021 17:10:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 10/29] tests/tcg/tricore: Add build infrastructure Date: Mon, 17 May 2021 17:10:03 +0100 Message-Id: <20210517161022.13984-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 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: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann this includes the Makefile and linker script to build all the tests. Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Reviewed-by: Alex Bennée Message-Id: <20210305170045.869437-5-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-15-alex.bennee@linaro.org> -- 2.20.1 diff --git a/MAINTAINERS b/MAINTAINERS index 7572859317..40bba0fc4c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -349,6 +349,7 @@ S: Maintained F: target/tricore/ F: hw/tricore/ F: include/hw/tricore/ +F: tests/tcg/tricore/ Multiarch Linux User Tests M: Alex Bennée diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target new file mode 100644 index 0000000000..d64a99b95f --- /dev/null +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -0,0 +1,15 @@ +TESTS_PATH = $(SRC_PATH)/tests/tcg/tricore + +LDFLAGS = -T$(TESTS_PATH)/link.ld +ASFLAGS = + +QEMU_OPTS += -M tricore_testboard -nographic -kernel + +%.pS: $(TESTS_PATH)/%.S + $(HOST_CC) -E -o $@ $< + +%.o: %.pS + $(AS) $(ASFLAGS) -o $@ $< + +%.tst: %.o + $(LD) $(LDFLAGS) $< -o $@ diff --git a/tests/tcg/tricore/link.ld b/tests/tcg/tricore/link.ld new file mode 100644 index 0000000000..364bcdc00a --- /dev/null +++ b/tests/tcg/tricore/link.ld @@ -0,0 +1,60 @@ +/* Default linker script, for normal executables */ +OUTPUT_FORMAT("elf32-tricore") +OUTPUT_ARCH(tricore) +ENTRY(_start) + +/* the internal ram description */ +MEMORY +{ + text_ram (rx!p): org = 0x80000000, len = 15K + data_ram (w!xp): org = 0xd0000000, len = 130K +} +/* + * Define the sizes of the user and system stacks. + */ +__USTACK_SIZE = DEFINED (__USTACK_SIZE) ? __USTACK_SIZE : 1K ; +/* + * Define the start address and the size of the context save area. + */ +__CSA_BEGIN = 0xd0000000 ; +__CSA_SIZE = 8k ; +__CSA_END = __CSA_BEGIN + __CSA_SIZE ; + +SECTIONS +{ + .text : + { + *(.text) + . = ALIGN(8); + } > text_ram + + .rodata : + { + *(.rodata) + *(.rodata1) + } > data_ram + + .data : + { + . = ALIGN(8) ; + *(.data) + *(.data.*) + . = ALIGN(8) ; + __USTACK = . + __USTACK_SIZE -768; + + } > data_ram + /* + * Allocate space for BSS sections. + */ + .bss : + { + BSS_BASE = . ; + *(.bss) + *(COMMON) + . = ALIGN(8) ; + } > data_ram + /* Make sure CSA, stack and heap addresses are properly aligned. */ + _. = ASSERT ((__CSA_BEGIN & 0x3f) == 0 , "illegal CSA start address") ; + _. = ASSERT ((__CSA_SIZE & 0x3f) == 0 , "illegal CSA size") ; + +} From patchwork Mon May 17 16:10:04 2021 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: 440157 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1240196jac; Mon, 17 May 2021 09:26:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuiZ9p78ZlY0q+1urV1uH63xQsTcW/SGAyDA61/VEV7Kqq1w7QM/ohXl09kT7JI9K2WOY1 X-Received: by 2002:a05:6830:1bf7:: with SMTP id k23mr303468otb.219.1621268762702; Mon, 17 May 2021 09:26:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268762; cv=none; d=google.com; s=arc-20160816; b=HmUwzcydzitXkuBpy6FSOcMzLubmOm2GM5W89w3yx8yvo1ZLBkIJWHvo0v0UDCGYJD Xnb8vkqGuaUorUY4f+cxPnR+1Tix7TZrFmci/PLHd0FoDujF6LLdJFVf8ACQ73F2+C+Z BWjK+XETLuuHfLsPhN17chzmof/bFfrDIorvf/jixcxeS4zYuJQZ7xNwNKs8EOckmJoW PNotNA+pgVwJDldgoB4ycYhLcDTAAna6dmTh5bU0X+a8sx3evtQ9Y0gKwYC8onN0mmPB uEbmYKKhO5lk8SKDO+7fd1uswfUWylU8YMGhBdqaFI1hRzaVVpVIkwrKIxBGlSE84Xq4 4++g== 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=Agdx3G/Ci/HmPNt/TIfwdrNu8lRgFz7owXgkXOV3/r0=; b=inYTK+NvWXvWvstPx2xj7BfgKBoe8JtjxiJmZk7vFef38W4Zh4HfqsNUSqkvFomnqY kHntzegPDIO3K/ZaQaOM1m8BJf4gjfEzYPTSlZ+2heGlULpBCxhtKM2dVCqwfxFv5HIX k6SeXr6wcG3120WO2cz8W2HcLAydfRpwj4H4dy6XFX6hPiv9xGMW0DjrAP+h1+KY5hJC aJnU98wZF5RmmKgZKQCo/U/lPNIyeb+TMhC2PLJ3llWFcOh97c1Fa/GdDLSRCu93ckjC HjOoMHHGVB3rHwEnGbh9sIg49HVXipdCB1FDP/9OBrUefCfOPiQH8FYoN7U+umEsqQOn j9Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="QGzv/rdn"; 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 l5si8944794otu.142.2021.05.17.09.26.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:26:02 -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="QGzv/rdn"; 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]:42536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig49-00016f-UV for patch@linaro.org; Mon, 17 May 2021 12:26:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpY-0007Wf-72 for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:57 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:38659) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpJ-00063h-7x for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:52 -0400 Received: by mail-wr1-x429.google.com with SMTP id j14so5270393wrq.5 for ; Mon, 17 May 2021 09:10:39 -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=Agdx3G/Ci/HmPNt/TIfwdrNu8lRgFz7owXgkXOV3/r0=; b=QGzv/rdnDAo9O4hznhQiZnxawH0k2In2lXaWgTi+LGsJyPCvRBYOp4MVFUhHcrfku0 a0Ev0buIbEFJw2xUcoArVlYFkh5JazfUnu0I/56ZAEJGeI/C80Pmc4zWhhCxHRlvZw4/ Og0NecrN5R1OZoftDmFh5KM0WHO0VtMPhU9E6/b9u5bi0H4+C0yuPfUIYatfwsDs74Rx lD7LlGs9Gwax5cTnZj7Ysg6m4nhrPjvOGV04RTvDQrb4aAnaHYMFzvSDRvsRx1ejbR4F U6w7h1dgqfhzOvm6bfJ2UZcl2EdxLYBHOrlPr55NmH6GB6QiSc2BBs8dOrYmRRvKgCtS +mdg== 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=Agdx3G/Ci/HmPNt/TIfwdrNu8lRgFz7owXgkXOV3/r0=; b=VfalFXyocco3IKmEL8l+tP7jIR7y0xhPth84iQKCc8sJZvYC4kePgArDuTQBG3LchQ v1WtjD7T+9gqCeP19pgUT0rYgIJiJCIEGBV/9kYj/07UzbDIQ+66WUfVjgqbzojGx7A5 SB/Xt7i/+gDnlHffQLOuhQ+fizQedEiiJZPV6pch9AST4DbbL+KILpN5JSmvIeWfWPan MbgHpO9ClYutL9VcdhldHDGuJvcXlpmM5+qaGISpn4NpuU4Cmjd12M/sjsicPx6TYCr4 03o73oZqZB6oZejdLX9JKXnC8dWYo5WCeWjWyo408knQ19Q4VerTA2axysZvm+v0PdJv GqGw== X-Gm-Message-State: AOAM531ShXV5TLaevD331mJ9gnZQtXpxHxUtw6N7RQV/wAvn5cVe7/v8 lyX30f1VCuw6Jz5F5/8dgV051o35h0RlmQ== X-Received: by 2002:a5d:4d05:: with SMTP id z5mr485027wrt.127.1621267838383; Mon, 17 May 2021 09:10:38 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a16sm6216631wrw.62.2021.05.17.09.10.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 25D661FF9A; Mon, 17 May 2021 17:10:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 11/29] configure: Emit HOST_CC to config-host.mak Date: Mon, 17 May 2021 17:10:04 +0100 Message-Id: <20210517161022.13984-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 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: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann this is needed by the tricore-tcg-tests as tricore-gcc is not easily available. Thus we rely on the HOST_CC to do the preprocessing of the tricore assembly files. Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Message-Id: <20210305170045.869437-6-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-16-alex.bennee@linaro.org> -- 2.20.1 diff --git a/configure b/configure index 0e4233fd8a..df11c8bad0 100755 --- a/configure +++ b/configure @@ -6164,6 +6164,7 @@ echo "GENISOIMAGE=$genisoimage" >> $config_host_mak echo "MESON=$meson" >> $config_host_mak echo "NINJA=$ninja" >> $config_host_mak echo "CC=$cc" >> $config_host_mak +echo "HOST_CC=$host_cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then echo "CONFIG_IASL=$iasl" >> $config_host_mak fi From patchwork Mon May 17 16:10:05 2021 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: 440152 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1236777jac; Mon, 17 May 2021 09:21:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwI5K+Bg+Oc3ITr/S1fyrjlVWmB4iTV2n5+CuGUN16XhzQ7Sp7JWo/YwHOix1Hzv7B2uSPA X-Received: by 2002:a05:6638:3013:: with SMTP id r19mr826560jak.36.1621268513507; Mon, 17 May 2021 09:21:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268513; cv=none; d=google.com; s=arc-20160816; b=TFajD7qmFlT3G+KPVIjQpOLCDQHgx9do5QqbYyQzmCFc6eGCMbsIsjpuJy67jSpBAF 2Y4vU2URWVQipr8Hc0vhlqlM1AACmM0JEWZu9QXNtdd/YT0M7AvWJ6wMRZE4AwYYmmOi 0uwjcxe3dU1pBAVL/Dnvhm0i8h1Q+1qMGUZP3nK8Vbl3jBuTlfXnTE8c07KLOpcEXROw C/Miwv8QfQa1BRGJUKKIx6S+YBJy4d/Pgo4U+ppMlwsgO6uvULjLFduLNnyczTblzDh5 k1d/RvVwngUY0bOdQQBiEIGUnNd8cZLKkzPFlNzrtYvEu4jzgHBAEzXtG8vkDqYW3CA3 D0OA== 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=sLXv4miOw85rWayN8jZNBHnPaB/MX2m95N1aF2nNELo=; b=vt0DNH5LiTTxmIunDe5Os3T1XJ5BpGefX1d+q2P5BszL0EJVsQcL+Zq+Ecd3YIZdn+ rUeVoMDXeLhwgz4HkXJof5oUu2Y6C8LbEegN1fQlCm8tAueq9LV2bK2txDb6N/zBkFU4 XRaSrI9ypZumZg0MGvFM07cc4YM5cS8VdAkoFHlA2gZE8BEkqXf3GZlCcNnMzEGUqFHg zbBeOwEpEoAbSxEZLqFF+Joo3VGAcV6b7ejQsAUzln7C6erS8/j/CEkLGU+mjtxFh8dV JBJvX4MRfrBSG3k+VVHfDvBavd3ed0fcpd8EaDWRoS4bLidxOYhvjCRVd3nPCDHkWYp5 Rmqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=s9P0915K; 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 w14si16941172iom.23.2021.05.17.09.21.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:21:53 -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=s9P0915K; 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]:59222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig08-00013x-U8 for patch@linaro.org; Mon, 17 May 2021 12:21:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpb-0007bf-LS for qemu-devel@nongnu.org; Mon, 17 May 2021 12:11:01 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:34623) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpS-00066B-5N for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:59 -0400 Received: by mail-wr1-x433.google.com with SMTP id r12so7033402wrp.1 for ; Mon, 17 May 2021 09:10:44 -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=sLXv4miOw85rWayN8jZNBHnPaB/MX2m95N1aF2nNELo=; b=s9P0915K7rmHVynL2x7SXPJY9Qf93+ZvL+qQ0lAoH7x4Oyt2MveVHPT8zQnX9sOxnC TTs5uBn/Ee7+ziTdwMmmJiuL6MVQ1+OxNOUZ6ZcUXuyaD7+YnCHyEMud5fegZEDKY5oh rWkWwgKV3E/z6UCBW6mVASkUCDYQ+vgm1id52eTRhkR3UX7auHXCTfmxVs7yBA9B4Kmq bAMTbdZZ0FTZwudmnnketrIyTzNTJ4KFVL+B7zDAokBnuPL4D+yC2DskFnp27yhf0hhc 0+6rMV4wl1P6otNi2IdPQGeVY1BJtVi05+wuJsFUlajviKdQYHWq1oYQ71Qsh4FgLy1j whHA== 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=sLXv4miOw85rWayN8jZNBHnPaB/MX2m95N1aF2nNELo=; b=enVP+DqSR1r/5sPxIGKX38dX8o0mb1J6wnJInO6bNT2a45D+b5SrwL5tCOLtnB+eAV 0NG+WVYNZjElcdeXBq/Ias7PC8kldEPYjXb39fM7k3RzYCCtF3NMPhSY03mLE6ElSATK 9FEkrzfzcP6GYgqLv8IAb5xX0jU4ZS1yL3AJ+YTUTWJX+2MIrUAWqZoTLsbtiMyfgsMS zoyqB9U1hd4RFCp8ef/tA4iIMZssL/Lk2uj/QIkS82uThkEr8Buo6N1xWl1NUl+Utsso NLreRDvg3r8lDc5XTU7Mnfy9/4J8RnhrWO3r+3309Jj8oaTyRDJ90KIguv4oWfaQHivU YfuQ== X-Gm-Message-State: AOAM5327r0Pr8YaG9xylKddEdST2VoctGc2n29UX3XAgwu7RRC6tvJ6x TFS9ZMm1rzKGuGN9dUgnXZz8zOkpA69rUQ== X-Received: by 2002:a5d:4f03:: with SMTP id c3mr534880wru.158.1621267843758; Mon, 17 May 2021 09:10:43 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id y20sm456005wmi.0.2021.05.17.09.10.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4340E1FF9B; Mon, 17 May 2021 17:10:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 12/29] tests/tcg/tricore: Add macros to create tests and first test 'abs' Date: Mon, 17 May 2021 17:10:05 +0100 Message-Id: <20210517161022.13984-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 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: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann This kind of tests is inspired by the riscv-tests repository. This adds macros that makes it easy to create single instruction self containing tests. It is achieved by macros that create a test sequence for an instruction and check for a supplied correct value. If the value is correct the next instruction is tested. Otherwise we jump to fail handler that writes is test number as a status code back to qemu that then exits on that status code. If all tests pass we write back 0 as a status code and exit. [AJB: add container_hosts] Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Reviewed-by: Alex Bennée Message-Id: <20210305170045.869437-7-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-17-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h new file mode 100644 index 0000000000..76c133132a --- /dev/null +++ b/tests/tcg/tricore/macros.h @@ -0,0 +1,53 @@ +/* Helpers */ +#define LI(reg, val) \ + mov.u reg, lo:val; \ + movh DREG_TEMP_LI, up:val; \ + or reg, reg, DREG_TEMP_LI; \ + +/* Address definitions */ +#define TESTDEV_ADDR 0xf0000000 +/* Register definitions */ +#define DREG_RS1 %d0 +#define DREG_CALC_RESULT %d1 +#define DREG_TEMP_LI %d10 +#define DREG_TEMP %d11 +#define DREG_TEST_NUM %d14 +#define DREG_CORRECT_RESULT %d15 + +#define DREG_DEV_ADDR %a15 + +/* Test case wrappers */ +#define TEST_CASE(num, testreg, correct, code...) \ +test_ ## num: \ + code; \ + LI(DREG_CORRECT_RESULT, correct) \ + mov DREG_TEST_NUM, num; \ + jne testreg, DREG_CORRECT_RESULT, fail \ + +/* Actual test case type + * e.g inst %dX, %dY -> TEST_D_D + * inst %dX, %dY, %dZ -> TEST_D_DD + * inst %eX, %dY, %dZ -> TEST_E_DD + */ +#define TEST_D_D(insn, num, result, rs1) \ + TEST_CASE(num, DREG_CALC_RESULT, result, \ + LI(DREG_RS1, rs1); \ + insn DREG_CALC_RESULT, DREG_RS1; \ + ) + +/* Pass/Fail handling part */ +#define TEST_PASSFAIL \ + j pass; \ +fail: \ + LI(DREG_TEMP, TESTDEV_ADDR) \ + mov.a DREG_DEV_ADDR, DREG_TEMP; \ + st.w [DREG_DEV_ADDR], DREG_TEST_NUM;\ + debug; \ + j fail; \ +pass: \ + LI(DREG_TEMP, TESTDEV_ADDR) \ + mov.a DREG_DEV_ADDR, DREG_TEMP; \ + mov DREG_TEST_NUM, 0; \ + st.w [DREG_DEV_ADDR], DREG_TEST_NUM;\ + debug; \ + j pass; diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index cf6062a15f..d13d2bb388 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -203,6 +203,12 @@ for target in $target_list; do container_image=debian-sparc64-cross container_cross_cc=sparc64-linux-gnu-gcc ;; + tricore-softmmu) + container_hosts=x86_64 + container_image=debian-tricore-cross + container_cross_as=tricore-as + container_cross_ld=tricore-ld + ;; x86_64-*) container_hosts="aarch64 ppc64el x86_64" container_image=debian-amd64-cross diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index d64a99b95f..3b048e49fa 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -3,6 +3,8 @@ TESTS_PATH = $(SRC_PATH)/tests/tcg/tricore LDFLAGS = -T$(TESTS_PATH)/link.ld ASFLAGS = +TESTS += test_abs.tst + QEMU_OPTS += -M tricore_testboard -nographic -kernel %.pS: $(TESTS_PATH)/%.S diff --git a/tests/tcg/tricore/test_abs.S b/tests/tcg/tricore/test_abs.S new file mode 100644 index 0000000000..e42240159a --- /dev/null +++ b/tests/tcg/tricore/test_abs.S @@ -0,0 +1,7 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_D(abs, 1, 0, 0) + + TEST_PASSFAIL From patchwork Mon May 17 16:10:06 2021 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: 440148 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1233422jac; Mon, 17 May 2021 09:17:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV0OWKluIg5oa1U++NwJzlUWnrWc2ixjr3vURIDoFBIypxpSEhBQcaWv4vcF82NYf153Xr X-Received: by 2002:a05:6602:2cd5:: with SMTP id j21mr631634iow.83.1621268265051; Mon, 17 May 2021 09:17:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268265; cv=none; d=google.com; s=arc-20160816; b=Fxb+YRxYKNXT0GnZ6FMtWZhlRpbrcXn/vAN2nUN0CpLo3VbAsfYBOo/Y9yuDA2T7Ey 4WmauiZynAQD6UbuujhX0qwwa8WzljI8+/oYfO34H2BkniBs+Ac3jv+1dExm7XtAVFH+ 5h7D4KrffztawiuQkNW1bo7CSCvbu13SomYdTDWvCAlnHfRWo8Zb6XUkHP4UAOfrTI04 grCUNFeea4I1gbEijVTKzW6lN3TtAQwu7LA+LXEfh1zWE8NdFQHOhbPsdZImN3gwRnCf uHOXYxlC6EDiFHRpAjSfRoCs/+bE0TkE/0eoPwDQSGzOALMkwiDS6WK1+flMctFPnsq4 z5mw== 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=zqqVEkVFFAX35vmalm2I3V2tABfps9c4RcLK3dBbjx4=; b=TWiOXKesbCBEde8hNGc4rVURqrA8onVvnAWgRVUTxQnhKWsPaBN0Qa+dCWAZCcXUnI jkWRQN9T9va5FoQFhO/zFIrQn8jQCt4kpT15cDS8jN1sATD2oB91w1cSHNB0dzrOQ6mB dRGzqTZyK2QgIZ/6nDP0hPxfguR7nscWMa04TGgY8xU0eqh7cwdxt7c1uZrPYPZ4he4f n0Ejdk4HZ4+2J+xartMVbybFvRQiuMVaDmE9j0gWt3qdSoNujx0xPrrLITzQzrT+oRG1 zQP/zw5NlAb9bwmRJSWQi+w2pLUQ6bfQ43USwmuAhCVMuRNEYMhEx8+RWplwF4al9hyN aVOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=R6l4Og+d; 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 t2si17131161ilq.112.2021.05.17.09.17.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:17:45 -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=R6l4Og+d; 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]:52086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifw8-0004Wc-G8 for patch@linaro.org; Mon, 17 May 2021 12:17:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpa-0007ZR-RT for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:58 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:45781) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpJ-00064X-88 for qemu-devel@nongnu.org; Mon, 17 May 2021 12:10:58 -0400 Received: by mail-wr1-x434.google.com with SMTP id h4so6983154wrt.12 for ; Mon, 17 May 2021 09:10:40 -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=zqqVEkVFFAX35vmalm2I3V2tABfps9c4RcLK3dBbjx4=; b=R6l4Og+dx6cpayXEZk0Z2ri5kjCAy3UWqpK0TdkXjCnGANBHk+mFYQQNmXT1I7/WW8 p1h6V5Y2CrUSr8fJJyXYQu5GK3+wdtIoFSfyvcPPcxvbW61L5jaZH/lQnFLqyW2jnXjP Wkhjx2Ec2Ok+ExoX4QHRxuyarzGCAwGpMHPYmYYz64ej0TLVpbBMWtVgeNpGgkXfnJhh tpTtpHvFNb5manR6p/jTYJ90GoQOfjgvzfwTXalTREdw/Zwv0gLXNlf6scqvgc3CDbvj ZKKd0hnWQ43s6PqDcrd8NG0LP7PzMUnoUmy7m7lLVwBdT0rkD6PiIL/4zCBr10+d0ZQZ xJeA== 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=zqqVEkVFFAX35vmalm2I3V2tABfps9c4RcLK3dBbjx4=; b=Pjo6UOHPPTMwjk/kahtzuTaRGBL7izFHEmRL0oVPViP9mQzqyq8Xlh2huD0TL6YHoJ X+/l6L4jqmE+OPdbamjle60VQOADKVnQKSgGpriZLfOtnSWlojrX7tYdMSf6UJ2oQ2qm /Kloeug9BPllNzy8cWg3M0PvgwsZgMHNfp2fx2Hhf8e2fRbADdPQPtU6EOe3bWnz3qzG s70Sjy7BfTJrW/we4nzh+Fq+SjMxI1+PvybIFFIlRqiVg9LrjrVPYZaYBK4jSBj7MVwy p1xUwhi9AN62ZDp+rYgqOjbJ7niu49fiqWSEsUbnpyzKzc4WgvWOJ7i7daa4nbwqqls2 Vnuw== X-Gm-Message-State: AOAM530GKEQ3hUu/1dt2K62yFXmpVajzRGNIUjxZQy4DvO/4aWKQYtNo SwazaY1S2Mc4ooFjifuuHSZtaw== X-Received: by 2002:adf:f043:: with SMTP id t3mr519846wro.344.1621267839391; Mon, 17 May 2021 09:10:39 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f26sm13801807wmj.30.2021.05.17.09.10.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:36 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5DA251FF9C; Mon, 17 May 2021 17:10:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 13/29] tests/tcg/tricore: Add bmerge test Date: Mon, 17 May 2021 17:10:06 +0100 Message-Id: <20210517161022.13984-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 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: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Tested-by: Alex Bennée Message-Id: <20210305170045.869437-8-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-18-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h index 76c133132a..52aa936c56 100644 --- a/tests/tcg/tricore/macros.h +++ b/tests/tcg/tricore/macros.h @@ -8,7 +8,10 @@ #define TESTDEV_ADDR 0xf0000000 /* Register definitions */ #define DREG_RS1 %d0 +#define DREG_RS2 %d1 #define DREG_CALC_RESULT %d1 +#define DREG_CALC_PSW %d2 +#define DREG_CORRECT_PSW %d3 #define DREG_TEMP_LI %d10 #define DREG_TEMP %d11 #define DREG_TEST_NUM %d14 @@ -24,6 +27,17 @@ test_ ## num: \ mov DREG_TEST_NUM, num; \ jne testreg, DREG_CORRECT_RESULT, fail \ +#define TEST_CASE_PSW(num, testreg, correct, correct_psw, code...) \ +test_ ## num: \ + code; \ + LI(DREG_CORRECT_RESULT, correct) \ + mov DREG_TEST_NUM, num; \ + jne testreg, DREG_CORRECT_RESULT, fail; \ + mfcr DREG_CALC_PSW, $psw; \ + LI(DREG_CORRECT_PSW, correct_psw) \ + mov DREG_TEST_NUM, num; \ + jne DREG_CALC_PSW, DREG_CORRECT_PSW, fail; + /* Actual test case type * e.g inst %dX, %dY -> TEST_D_D * inst %dX, %dY, %dZ -> TEST_D_DD @@ -35,6 +49,16 @@ test_ ## num: \ insn DREG_CALC_RESULT, DREG_RS1; \ ) +#define TEST_D_DD_PSW(insn, num, result, psw, rs1, rs2) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + LI(DREG_RS2, rs2); \ + rstv; \ + insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2; \ + ) + + + /* Pass/Fail handling part */ #define TEST_PASSFAIL \ j pass; \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 3b048e49fa..de6a2cc88e 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -4,6 +4,7 @@ LDFLAGS = -T$(TESTS_PATH)/link.ld ASFLAGS = TESTS += test_abs.tst +TESTS += test_bmerge.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_bmerge.S b/tests/tcg/tricore/test_bmerge.S new file mode 100644 index 0000000000..8a0fa6d3f6 --- /dev/null +++ b/tests/tcg/tricore/test_bmerge.S @@ -0,0 +1,8 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(bmerge, 1, 0x555557f7, 0x00000b80, 0x0000001d, 0x0000ffff) + + TEST_PASSFAIL + From patchwork Mon May 17 16:10:07 2021 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: 440162 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1243419jac; Mon, 17 May 2021 09:30:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/AZwqoP4z3BEQMup1SY6PKMzPXQ42beaWDaKlhluvO+Dl7a5e1QmSFX0TCCtOhNKsOYtr X-Received: by 2002:a05:6602:134c:: with SMTP id i12mr661095iov.175.1621269004058; Mon, 17 May 2021 09:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621269004; cv=none; d=google.com; s=arc-20160816; b=ard9Lm9C7K1h9cZCKLojxsmLZT8olIlnr4FV1gapGbYacWQOh8gzIJlXaEbyqL1Cg0 eGItMjnEfVSkTHvuFjM0nqgZpIf7hv5q01Wk50FeBFVX3U7WNVdr/COUF9EtGabidtdk sP5EXR4RL25YXbQ58hjDnn44mzxuZgtorjo66QkoXo11S7CxZib+SuudCOaAlmPqce6A WlEOSu1jhsj9XFj6//Hw9cBk3MxAImdc8JmSCW6iG6YK1A6zS/I4R2lYE/fC7dbj0aOI x2bI5mSdGQ51WoAiqCrH5gnyw0zZMHpO/uUDkUU8wTjzYbL1DyUocWPawVE6oFkaTzRR N6jg== 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=/GoNt9HHy9fj7GtsQyqbYSYiaxiEhaVdxxiDzDGgum0=; b=RvNElhbM7nyqWcbVqoINuvh6vVM4gGaDNFK0lVVTjkPgN/uCKK8xKE4BsPL7+0CW8V LO+NdQ1ydHf2wgw9tZyfonqrBSzOICBQFVtxbJXlGQJmbMKN4b3Ze6MXT5frVKSSxd0C MkvZw/cO1IaCgcJEYfspSnhjJMk6+3kdRVS1DHTVeGOIF/yQSbR+ja+8ZD9wdrf/IpXe rJZZ8EHPHITgJK6gA4DEHpasMjLlNYI6Hlf0RGooe2+CNv0Iy390cv7t6Wmhn6e1Xmsk u5QfyPKEiE6rfM+MFg7VRDsRRDRWTPZouHv1u2UalcFOTuYjZwsAIv1020KAnALRox2R 8UZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GCNfcTeh; 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 j188si20725578jac.58.2021.05.17.09.30.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:30:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GCNfcTeh; 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]:57386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig83-000313-CL for patch@linaro.org; Mon, 17 May 2021 12:30:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60400) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyr-0001sN-Uy for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:33 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:33662) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyh-0002C8-Gn for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:33 -0400 Received: by mail-wm1-x32f.google.com with SMTP id z137-20020a1c7e8f0000b02901774f2a7dc4so231297wmc.0 for ; Mon, 17 May 2021 09:20:22 -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=/GoNt9HHy9fj7GtsQyqbYSYiaxiEhaVdxxiDzDGgum0=; b=GCNfcTehREn1MwjgatoRkiVlkWxbEGdqtixlShehgHp9uzreQL0P+X0lxtNQqtK6l+ YjCTAgh0BasUADdpljs7Q7vlx55dbnfgd5vEw5LSeCKM4408IBqjrnzeaj0mrkcEoxoI qYVG7lrEJ3Fv0gfV5met42ZzAA2/w8ymUYc52g2w6ARTkql47J+TQdXOtNfsDItnBsMb XmOXw9s8dr7brzvsNZ8a4k4Hl/eCsucTVQdVPfFJ8z465MLnO0hDjpOVpxDCM1JrrLYh qvHP7UIySzduaxj2ZHTLZAux6eAYYstKACeUgpCCWAePauI4pBatm4tOp2B8kFyv84uv T1jw== 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=/GoNt9HHy9fj7GtsQyqbYSYiaxiEhaVdxxiDzDGgum0=; b=rLmuKuIygIJ5FUihJiGfY767ymr/b0OwosazqoxwbLw09DVl9rSBn9khVWTu31WDQT eSmGNB24q/FHOjgE4tzKAwv/uOrVggf7ZzmTZXsFHd3PyCbJoDs2SFkNMa9okbHL7cRp JasO5ELqrLK5MHjOKlwOHuNHs+TI3H1l21a5yN6NmwvJDS2x8rSFVP4YFkvYmcYa6Ds3 wIroG4KB5zeioAFiIFW4+NnrrScNj+6dH6VX9g2bffp5WcTmgbn8oGrrbPWrEVlxOf5n tSjFjYW9WJLGmiZ4pIbCVcnCgjP2ApnJEEOHtuBgl4lXlNkZ7OiraaBdr9cO9WpTcTnJ LG+Q== X-Gm-Message-State: AOAM53299Ov6x8+9XqluqYq2iZHZi1EO141abJgzWQMt7529s3WA3y5H +9/9X5LWNTohayxHKz4BJVIZwAMPGDn0MA== X-Received: by 2002:a7b:c24a:: with SMTP id b10mr672587wmj.157.1621268422029; Mon, 17 May 2021 09:20:22 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o11sm3643109wrq.93.2021.05.17.09.20.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 764761FF9D; Mon, 17 May 2021 17:10:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 14/29] tests/tcg/tricore: Add clz test Date: Mon, 17 May 2021 17:10:07 +0100 Message-Id: <20210517161022.13984-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.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: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann [AJB: dropped duplicate Makefile] Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Tested-by: Alex Bennée Message-Id: <20210305170045.869437-9-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-19-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index de6a2cc88e..a9b81545e2 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -5,6 +5,7 @@ ASFLAGS = TESTS += test_abs.tst TESTS += test_bmerge.tst +TESTS += test_clz.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_clz.S b/tests/tcg/tricore/test_clz.S new file mode 100644 index 0000000000..e03835f123 --- /dev/null +++ b/tests/tcg/tricore/test_clz.S @@ -0,0 +1,9 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_D(cls.h, 1, 0x0, 0x6db17976) + TEST_D_D(cls.h, 2, 0x000f000f, 0x0) + + TEST_PASSFAIL + From patchwork Mon May 17 16:10:08 2021 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: 440156 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1239695jac; Mon, 17 May 2021 09:25:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9JqWS0SmUs7eUaCc1kcAS64t1CU4hGCZU/rKKZRshbDrEFcrRqH4FoxhCBEGfaTIOAxTu X-Received: by 2002:a05:6512:2385:: with SMTP id c5mr494854lfv.628.1621268721964; Mon, 17 May 2021 09:25:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268721; cv=none; d=google.com; s=arc-20160816; b=VojtSgSYxy3is3Nm28keHJoAssPCyf0eKgOLkKLKkniHejwzXKNcykWCGymBGrBf/Q 7pB0mImFBiStxb23obYtFAiTlKCyODXI2Ca9e2pz/NxmHn/GETnlQxnllyaPKr89OzK/ ChmJWA9j2ORY5XaB+BMgrqsLtCSLZZS3JyLCj1e/4TIJcjh7i/6uDuNI3RxNmUoWp8G+ DYbpJFsTustqj8UvlVW/sr/4KFqXrMyHRg4ozuh8RcELVeMlyoj7zBWtuESakJDqY9cu qNblbgnH/jPeJzaUpGRPb9665X5i2ULe/BHAL2rcX82+9yuwukLiB2uH//R2xiTfjT9q XKYw== 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=w/hNpOL3LseeGhFSjqXSpkvVGbd/+PpFDw4qT/V6I3k=; b=srRbulSWPlgbqtm4AR6gb3OdsMpPCOMKMb+U3coO4VbXPZmx4heRkZQbVoAmcyJIYJ hhXJsucVw++zYAnDcCosXbP+t7Hzk0QcFYLzLQ+KoYJvAiwltr2kNYHI00GtfCmeQaz9 Luj7hgMggXeb5Roh6axc9IGJXID0JQjEKPoJc7aOTZ0KIE/v9vjs98kTAnh0aZ/daw4R 5o9WuK0UNVpvaXFmnnjSAQy6zaOSpdlaO2pszgXhJfRRHTnRHB4jM12Zvv121XDcrcvk iyhSNccr8qtIpDgmuRoba9K90EaPZ7H2id+YcDBqRZ7omJNNMcGbnNF9o9W29qGyv/iy nKVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tPcvegta; 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 u7si19950040ljj.370.2021.05.17.09.25.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:25:21 -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=tPcvegta; 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]:40594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig3U-0008CV-Gv for patch@linaro.org; Mon, 17 May 2021 12:25:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyk-0001k4-S8 for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:27 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:33771) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyZ-000269-2n for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:25 -0400 Received: by mail-wr1-x42b.google.com with SMTP id n2so7120305wrm.0 for ; Mon, 17 May 2021 09:20:14 -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=w/hNpOL3LseeGhFSjqXSpkvVGbd/+PpFDw4qT/V6I3k=; b=tPcvegta0anouMbL3EvCXBbW1M8ZzJZh7Cdl+qwJxAOjZHmJW4wGO8XuiFS+vYi84P fmXEFrFI5Oex7tOrOJG8pWMx000O8hS6d4Zn8k6zoYOnTSEZ6cUOhjxSDzy1yBFBjsDo Nv+ctVaE5JjlMcLTIvn97y+EXGy8zgIuFCArwGigvS2aqalhh5g50x/V+ANlcQrPlrQv EWHK4i3bP2nee/6Jwo9x/DwfzfJNBU1HNlU5jIbcZJhQo95TtxWM5SCr6amgfji9sDTp qgdKoDng1X2wFQ8OPArm1qgsSyatORqFs4KG+QwcLRbV9PYlPnPmTARMMux31lOWh4nz epkA== 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=w/hNpOL3LseeGhFSjqXSpkvVGbd/+PpFDw4qT/V6I3k=; b=TJVuV8V120GeDEweFf3yJXH4h61nDlmQj6TQW+7Cy6TxmhEg+VYw7FX7d+hH/kfq1O 8h7C8rm1A1y+GgzBOrZCu7lFFburb+/Y0PJG2/0yDqIhNldCwYZOYx1uex+J2jBx1/vs FoFdk5O5IDPdJjhwbEqnqeq7532vsKpcs0iTbf+y9Pa4vkbPL3Ze8JOulVNBvOZx9hF6 GcAUrInJdobX14ghgunN4CNE3b9exqkSI+mjtfdK30fZ0rfDrbUnY4SVL/X9liKOXYoN tMroaeTnVFCsB4x3InNPPrvYb46QQcQtkzjKqfgCWYJMRqcg/QAMOL7A5VqDvQFeqe0P jPbQ== X-Gm-Message-State: AOAM533WWiRXWR/1dvvog3uV67etUFbCww2RZmt8i6aeIxnr5yx42hDD aoSIv/TeL+SpW8ttHoYbaL2rOg== X-Received: by 2002:adf:f142:: with SMTP id y2mr558277wro.426.1621268413820; Mon, 17 May 2021 09:20:13 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q13sm16397627wrw.56.2021.05.17.09.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 91C5A1FF9E; Mon, 17 May 2021 17:10:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 15/29] tests/tcg/tricore: Add dvstep test Date: Mon, 17 May 2021 17:10:08 +0100 Message-Id: <20210517161022.13984-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 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=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: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Tested-by: Alex Bennée Message-Id: <20210305170045.869437-10-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-20-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h index 52aa936c56..59b4b9a352 100644 --- a/tests/tcg/tricore/macros.h +++ b/tests/tcg/tricore/macros.h @@ -19,6 +19,18 @@ #define DREG_DEV_ADDR %a15 +#define EREG_RS1 %e6 +#define EREG_RS1_LO %d6 +#define EREG_RS1_HI %d7 +#define EREG_RS2 %e8 +#define EREG_RS2_LO %d8 +#define EREG_RS2_HI %d9 +#define EREG_CALC_RESULT %e8 +#define EREG_CALC_RESULT_HI %d9 +#define EREG_CALC_RESULT_LO %d8 +#define EREG_CORRECT_RESULT_LO %d0 +#define EREG_CORRECT_RESULT_HI %d1 + /* Test case wrappers */ #define TEST_CASE(num, testreg, correct, code...) \ test_ ## num: \ @@ -27,6 +39,15 @@ test_ ## num: \ mov DREG_TEST_NUM, num; \ jne testreg, DREG_CORRECT_RESULT, fail \ +#define TEST_CASE_E(num, correct_lo, correct_hi, code...) \ +test_ ## num: \ + code; \ + mov DREG_TEST_NUM, num; \ + LI(EREG_CORRECT_RESULT_LO, correct_lo) \ + jne EREG_CALC_RESULT_LO, EREG_CORRECT_RESULT_LO, fail; \ + LI(EREG_CORRECT_RESULT_HI, correct_hi) \ + jne EREG_CALC_RESULT_HI, EREG_CORRECT_RESULT_HI, fail; + #define TEST_CASE_PSW(num, testreg, correct, correct_psw, code...) \ test_ ## num: \ code; \ @@ -57,7 +78,13 @@ test_ ## num: \ insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2; \ ) - +#define TEST_E_ED(insn, num, res_hi, res_lo, rs1_hi, rs1_lo, rs2) \ + TEST_CASE_E(num, res_lo, res_hi, \ + LI(EREG_RS1_LO, rs1_lo); \ + LI(EREG_RS1_HI, rs1_hi); \ + LI(DREG_RS2, rs2); \ + insn EREG_CALC_RESULT, EREG_RS1, DREG_RS2; \ + ) /* Pass/Fail handling part */ #define TEST_PASSFAIL \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index a9b81545e2..799b51191e 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -6,6 +6,7 @@ ASFLAGS = TESTS += test_abs.tst TESTS += test_bmerge.tst TESTS += test_clz.tst +TESTS += test_dvstep.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_dvstep.S b/tests/tcg/tricore/test_dvstep.S new file mode 100644 index 0000000000..858dbc62dd --- /dev/null +++ b/tests/tcg/tricore/test_dvstep.S @@ -0,0 +1,15 @@ +#include "macros.h" +.text +.global _start +_start: + # Result RS1 RS2 + TEST_E_ED(dvstep, 1, 0x000001ff, 0xfffe5cff, 0x00000001, 0xfffffe5c, 0x0) + TEST_E_ED(dvstep, 2, 0x00000000, 0x000000ff, 0x00000000, 0x00000000, 0x0) + TEST_E_ED(dvstep, 3, 0x0000f000, 0x000000fd, 0x010000f0, 0x00000000, 0x0) + TEST_E_ED(dvstep, 4, 0xfffff000, 0x00000000, 0x7ffffff0, 0x00000000, 0x0) + TEST_E_ED(dvstep.u, 5, 0xffffff00, 0x100008ff, 0xffffffff, 0x00100008, 0x0) + TEST_E_ED(dvstep.u, 6, 0x00000100, 0x00000000, 0x08000001, 0x00000000, \ + 0xffffff2d) + + TEST_PASSFAIL + From patchwork Mon May 17 16:10:09 2021 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: 440164 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1248114jac; Mon, 17 May 2021 09:35:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysbOM+s9CrjEDsSsettk22gb2Y2kYLM83NIa8ENfwNu+qysYucph4sw42espF2T8KsRS6J X-Received: by 2002:a05:6830:1ddc:: with SMTP id a28mr379510otj.188.1621269334577; Mon, 17 May 2021 09:35:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621269334; cv=none; d=google.com; s=arc-20160816; b=W+3XxrvSL9x/8rHFEQJ+15/ZtEL6t3vMh9FKs5zYrlwN1XkQMxeV3VTT0o2pYQn0/H IevwqojwOnh0T8VVp8foqHSv7LftQLgT0XdvEgrWYKhf/0BhcpgZtpl0Wq3AnqgLqrI1 0GFsZhcEHwjCHcRbffKYZJmEmklmmZYw7wGsj2isE/AyWhfYQ2w5xiqaolfFatCBrj7a mzKQgTB2tRl0sCnx2MyeRZFOovRy9F+Pl4zqK9pQp74XKA0OKbk6g6ANq3CbxELVHUcv qup2AhaiwEHvHP2CzDBmPkra4m8TlaKrQ9IKQU80J8DY+8clQE/jzK/artPbL722oHeO cz0Q== 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=WvhMIJ7db8pZDvDIWrYxGMRIUJdWESbF5FwiwPU2Dbg=; b=FsKyecqJHzgjYdyHahw8vcRBe4x3+S5D5iaLSldv8Xfh0tcVbaRdYJxui38z00/4gL Vx4O2sgNA9c7IZCiJAtYlP63azZ29u+ncJWlTnuEvG5RGVRsX8/7KSkNY9BM+Pm4Z4rU N2/k489tJJjq43GD193PSsRQ8blR2jMr/PKe8nxKxxQEK3ZO6CnUbN5VEORdXFd2wpGp SMLOS/4vM6+aUCuescjmE0C48/G+OhF+xL0blkIVSpG7cZkRWnf8KZ6reoKlcd30N1X0 4gkF192tilpFarVsALwL0rs+ncnZ1nx81+IO7EDB4H4q65PZ3/yNHwap63Y7jSH6nHky +ndg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=dHT60kNd; 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 g21si1226832oiy.54.2021.05.17.09.35.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:35:34 -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=dHT60kNd; 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]:36828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligDN-0000ID-VR for patch@linaro.org; Mon, 17 May 2021 12:35:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyl-0001kK-0o for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:27 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:33665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyc-00027B-4k for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:26 -0400 Received: by mail-wm1-x333.google.com with SMTP id z137-20020a1c7e8f0000b02901774f2a7dc4so231171wmc.0 for ; Mon, 17 May 2021 09:20:17 -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=WvhMIJ7db8pZDvDIWrYxGMRIUJdWESbF5FwiwPU2Dbg=; b=dHT60kNd+SVrjduazssJnDHHQw7a3MDrC+3FLcujw+d5kyQ8dX+/x9AdTCm0qOx7rV i2A8FzqPoOomMRYRDfBiWwBcdrdGy/F3J1lxB8DuASJg5mVkE28XVo7vQNd5/YDewK/T +hVto37RCFEynoJP8Beu1KGjadqzt5v471UZqCtkTXOmRVaDwXtKzCwmUVWzX49Xmgtj es/vllJGDZScYZGSqTMV/6RClu9pSEt65bT3lzdzI6Z2GSFhB9tn/EpJxdpygMpHLxFB ggK90665csrg+XrEeA/PYEa7SFWiUM5xnNj3vCOT5Omqszj2wbAX+dD58RhnD3copJnr VrVA== 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=WvhMIJ7db8pZDvDIWrYxGMRIUJdWESbF5FwiwPU2Dbg=; b=YLuSnz/0embZbG3mtlClQ5CV7i6Ydxm2zz0MQmVHHQIbrRWQWD2L6P9m844ub5e+TH 19l4dRgu+uDvfvXEZHL9TsbPbiJLtfKM+C1B/hG1cVJl/OgYt9l6GaKmTtpFuiCqKT4t ykIhYUiIhRTMvaBid68BC7kfHYWlJISaV1coTzHMSZkyNZH009A0sJdI4dV4kbaKpv0S t6hQ3MwpeQpNuxEuC3a/ppjJrjy5/CnIVkd1PHXhZjOQKk/9drBamZA3dWUVnQxshSup NWEmk3x8cOomSyVqU3k2iPOfVX6YE3BeIFFSqWSb4j25p2SDq7geRl8YsT6A3rG27PiJ TmzA== X-Gm-Message-State: AOAM5327g9GQ9glQNbUnfbU9BYnr6JwYUfPXK6bkXpoQ1qYFbZYspt8f DEaLgDAk8yh1KqemnRbzoz43LA== X-Received: by 2002:a1c:9d43:: with SMTP id g64mr424019wme.181.1621268416322; Mon, 17 May 2021 09:20:16 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s5sm16964991wrw.95.2021.05.17.09.20.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A9AF81FF7E; Mon, 17 May 2021 17:10:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 16/29] tests/tcg/tricore: Add fadd test Date: Mon, 17 May 2021 17:10:09 +0100 Message-Id: <20210517161022.13984-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-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-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: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Tested-by: Alex Bennée Message-Id: <20210305170045.869437-11-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-21-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 799b51191e..e7adb16af9 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -7,6 +7,7 @@ TESTS += test_abs.tst TESTS += test_bmerge.tst TESTS += test_clz.tst TESTS += test_dvstep.tst +TESTS += test_fadd.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_fadd.S b/tests/tcg/tricore/test_fadd.S new file mode 100644 index 0000000000..1a65054803 --- /dev/null +++ b/tests/tcg/tricore/test_fadd.S @@ -0,0 +1,16 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(add.f, 1, 0x7fc00000, 0x00000b80, 0xffffff85, 0x00001234) + TEST_D_DD_PSW(add.f, 2, 0xf9c00000, 0x00000b80, 0xf9400000, 0xf9400000) + TEST_D_DD_PSW(add.f, 3, 0x8bb858ca, 0x00000b80, 0x8b3858ca, 0x8b3858ca) + TEST_D_DD_PSW(add.f, 4, 0x00000000, 0x00000b80, 0x000000ff, 0x00000000) + TEST_D_DD_PSW(add.f, 5, 0x7fc00000, 0x00000b80, 0xfffffe52, 0x0a4cf70c) + TEST_D_DD_PSW(add.f, 6, 0x9e6d5076, 0x84000b80, 0x9ded50ec, 0x9ded4fff) + TEST_D_DD_PSW(add.f, 7, 0x00000000, 0x04000b80, 0x0000e8bd, 0x00000000) + TEST_D_DD_PSW(add.f, 8, 0x7fc00000, 0xc4000b80, 0xffad546e, 0xffad546e) + TEST_D_DD_PSW(add.f, 9, 0x7fc00000, 0x04000b80, 0xfffe0000, 0x08130000) + + TEST_PASSFAIL + From patchwork Mon May 17 16:10:10 2021 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: 440171 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1268459jac; Mon, 17 May 2021 10:02:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOv5xcKKH3PkSvvc7tY2sgtdR0hi6RkLRw4tG503NXoli8akn1XDTUmHUJuniSpe2UPkF6 X-Received: by 2002:a2e:9746:: with SMTP id f6mr338772ljj.262.1621270933303; Mon, 17 May 2021 10:02:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621270933; cv=none; d=google.com; s=arc-20160816; b=ypK9WSGJfTmlRIoCUA87MQXLdviq2SKnRIk7iGXTzF6KLj3A2KWK5hbce6Z4Z5rY1U TvywPNVPOHKfy8kbcnPfVNb0nDBKvQlawjYaar9t3KN+eHSlM8xgVPtMw2asCpNgkXEO cn4OwYtCSX8kw/ckQa/f4c2bO5YkpzxnTBh0MLjWaV8XWX1Dn1upysfaaFXiNTes832v sHfyMZZjUQ+yt0A1TonRb1WspAPvaPUoKiUY5psTrIVEn0vkgSniM1AS/eI4YdTM6qax RtqszYnhAex5gSfXkGuBIiPXkoFykq5H8bbh3xsgjUhEng0wn+/mxxSSm+phECg7oEyf teew== 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=uJRixgwKB4R/8PvCfIqI45wxOthEoZS3ugc5iFFCnVo=; b=KgzUNkNXt6wO1D8Vr09ozj8h9dWqhplZOWbSoKNLrfyTYoYWOJehaTeS2WlrJtT6N2 I2/nYAtL0Zx5P+ezJmM43ip2WHQ+JohZVKR6uUkCORRYGh/OM0XmtZmxa8S+53MYJ879 eq4KI//XlK9Hy8Ckfy/EVIzcx/RCf4zpCnXNoSCA4MkXxZNsUbqcoC7MIUfxBu+Yym2j uXqBBlUcN8gma5GrHFgQe+hcxuBhszNSWJxzSog3X/PN/tCyNp2G9dW9GkI7Du/lekmE K8nYbbXKzeYMD5IrdK8ZkC2SE40s97o/XlLr62SEtK/yF14Cooao3Bvou7u76r585O1/ U4aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PN8sbdPz; 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 r24si17621353ljj.240.2021.05.17.10.02.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 10:02:13 -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=PN8sbdPz; 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]:47294 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligd9-0005B1-RX for patch@linaro.org; Mon, 17 May 2021 13:02:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lig8B-00045V-UD for qemu-devel@nongnu.org; Mon, 17 May 2021 12:30:13 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:46699) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lig8A-0005wu-0l for qemu-devel@nongnu.org; Mon, 17 May 2021 12:30:11 -0400 Received: by mail-wr1-x42c.google.com with SMTP id y14so4993770wrm.13 for ; Mon, 17 May 2021 09:30:09 -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=uJRixgwKB4R/8PvCfIqI45wxOthEoZS3ugc5iFFCnVo=; b=PN8sbdPzlXbwZvFl69uq2zAZBPXh9fG6DInEihci7gwaH+Y/s978Ji6rsmTpcwcWPj 7bq4DqMwS5OgpvkTLkn6ms1KXehQTDCxqgj+1KwdHfA9VhqEQ+/Exrd4D96aBDYpixHL iALJpTZWIJNfglNIUygYo6/H7m+NNk5fkMYFASizqOV+TEdcaz8OIXyjrURoUjQKA9DF E2NoDmwJk2u/pb/GY4AzJVDcoIWkar23nEj/HOA7wLSJY6UioTx+UtPIvV4wFUu+pUWx /wziwmxvYnswU7Izo+HGV/5pN3LXxOctBHOqnrDM0HCNn/WlmEzuknns2MJa+OEv29sD Oy7w== 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=uJRixgwKB4R/8PvCfIqI45wxOthEoZS3ugc5iFFCnVo=; b=j2yWkOasfxAljYIqp17U6KQq5IhC2n0PGuwkjNJ6WMrvZeXUmI/NIdQHRFWoAV7VWQ 0OSvan6N2KdR5SYqK9c6Mqt2s7Vh/35XebZnNzfMW5STDi6tvnTt4pzPlG3JYwkgn5W9 4oKBa0xTn1W+YoeM+IV2hCYtOYIqZHLBTe5FgK0wUtT6i/eAe0QXd7A8Dw4qHkEWgKov sPU9eHC4/rHi9pwUB4CPPsNXjddjThNhqbtakWI/NwfvxW899sQgOHMrfS/IvLAInq+g zxby0Vy4Hv1jX8gmW45u8+6WuuhUz6WvAblNue2SMZeMnXCv0WKk//qDNgk9Se7KSUKH aloQ== X-Gm-Message-State: AOAM530zaOA/r1ooKlv3/Uer1fKwH4eAx+PAvlK09IUhAy84+yYLFO+i CfLCo5DMiXd/jqyJT7iTbG2ysg== X-Received: by 2002:a05:6000:18a4:: with SMTP id b4mr635485wri.86.1621269008139; Mon, 17 May 2021 09:30:08 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k6sm21072059wmi.42.2021.05.17.09.30.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:30:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C066B1FF9F; Mon, 17 May 2021 17:10:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 17/29] tests/tcg/tricore: Add fmul test Date: Mon, 17 May 2021 17:10:10 +0100 Message-Id: <20210517161022.13984-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-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-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: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Tested-by: Alex Bennée Message-Id: <20210305170045.869437-12-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-22-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index e7adb16af9..34da1f37de 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -8,6 +8,7 @@ TESTS += test_bmerge.tst TESTS += test_clz.tst TESTS += test_dvstep.tst TESTS += test_fadd.tst +TESTS += test_fmul.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_fmul.S b/tests/tcg/tricore/test_fmul.S new file mode 100644 index 0000000000..fb1f634b2d --- /dev/null +++ b/tests/tcg/tricore/test_fmul.S @@ -0,0 +1,8 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(mul.f, 1, 0x974f4f0a, 0x84000b80, 0x1a0b1980, 0xbcbec42d) + + TEST_PASSFAIL + From patchwork Mon May 17 16:10:11 2021 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: 440160 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1242471jac; Mon, 17 May 2021 09:28:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+YEmO6wWbkkvQC0QuFCCvBgor/FCMR84u+22EVk7v2xTtEAOsBJ+IlW/sDJochxTBlrzI X-Received: by 2002:a05:6e02:12cb:: with SMTP id i11mr433436ilm.221.1621268933498; Mon, 17 May 2021 09:28:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268933; cv=none; d=google.com; s=arc-20160816; b=fkHOiTr+cVHmBwYe4teW47uhrnnsrdZ1C78wgsKy2RwqhpQVVtj8uWpbxPaoRlJUYY ovHP/kd4huy70R54YLrBvhDfpwbHsnToaa1NNjWvdzUOowd2ob3d5vPJ/dXY4qlxWAkv 2/ASaW7kP1I4IjwOHqaSyHG8Tr2soBF41RlCajvJ8TLEQZSNll1hLFsNt9Qu2DlKosxu WAuSXxb7VxOYeypjR3vfuQPQHpZb4XI87LO2fbEHfaBpBpkkIN5YAthmGu2NjhGoOtv4 iuEg6wuEfbBg9pH2Os2+6vNPOEFZASZuorxm8EEkXZNsFFRex73VCuTwYlMdHGrvo/0c h1lg== 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=kfyD+xyRFhNVltAJ3AwK8fH0Q4t00IkcCwNm6Vrvf38=; b=sCtF39WwPVni5DWCHn5qw630UZM6gOaZ/ur3taXz2b+wPmbO+pFjBWo7+XL+tOxydC o6xQD1ve3wf9Zfubt6pbo/THs/1xoAEKEjukfV3Tm4wacYjWSff3opOeWl9ImIPSYIoO ofpttPV8VS/XvBrhVOZ/c5avLXRLQ910ZGYAAgwz8odqTvs+t1Lt0OGxRRBD2vRh1M8v wId63Y2r3zQeI+jBwybje32uZXZJVQ46WU3Yp9RNOt0bJEZx5qW7R0ATGyPZVde0sqMh ClOndvlBFyRGX6uyGgFcP1G00aHV8ra9+5gfpNqYzA0PArEaaNMoqURv+WYUcKQRrw/e Mf6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JMkD7Nxr; 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 u8si2002332ilv.32.2021.05.17.09.28.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:28:53 -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=JMkD7Nxr; 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]:50888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig6v-0006xd-0L for patch@linaro.org; Mon, 17 May 2021 12:28:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifpd-0007d9-Kb for qemu-devel@nongnu.org; Mon, 17 May 2021 12:11:01 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:37403) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifpa-00066I-0U for qemu-devel@nongnu.org; Mon, 17 May 2021 12:11:01 -0400 Received: by mail-wm1-x32d.google.com with SMTP id k5-20020a05600c4785b0290174b7945d7eso3495717wmo.2 for ; Mon, 17 May 2021 09:10:45 -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=kfyD+xyRFhNVltAJ3AwK8fH0Q4t00IkcCwNm6Vrvf38=; b=JMkD7NxrH/W1LlwfhXvV8ydJn8DYfs8lCJDO+/rousI3R3LdiLrmWe7NDx/fj6W/JG MKxe4mt/sy+TFuTxxTwYZvwJAPfPOVVGG2aOTh+REDkxxP13ICdOqa8H7L6GKpHlZQB4 t1SHy8bi/nijW/XdnyDfzuGVWtXG6lxulpAv4Zot6kJqjF1zUEkQmS+8MCtD4B1y22Wm KB6Dae4NgVTNM7daO1wBa9q6rFuY1GWSn/5wWO/bTTZmNXWnG1oZVWMHaduKmzYCbg7o rpkuhYZ8fsll/NRu7wEoEdUOFVpPf2kxJ6cLBMqfIMLEZyLvjXhdfErtVdNLwTswQrOc UR0Q== 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=kfyD+xyRFhNVltAJ3AwK8fH0Q4t00IkcCwNm6Vrvf38=; b=rPZyXwfLU4alB6UGVk8u3uxPhLm3dqUbYoL+LWO8YFVd9suMncCOo+McSAov4zLXFI cQhufkx50jYvK+TRZSyqJ+2y5UZTHgevaf0NaSiU+AMlqk6GsIvWt6kISporgM0YeCZ0 8XRSNzbAmx/srnIqbpvmx5a+CUgEQoE+M9kV1EoX8+ScFf7tIcuZM9Jzmd7QW3hrLNdG ac8FVr9xdogrWhc396lxJxP2ssydKhRVZJ4T2QEtguPuBZhrlz2zW7V4ivpPp3V5jLp4 RdroPzUmioxehMnBkNQ0Nimce8kR0QCVFVxMdiJcyy0zzEl50WprdOuu7WZiNprhqqjJ /D5A== X-Gm-Message-State: AOAM530lOr54PpJy7W6M9/cU9YPHGoyZcv8OaluJFUkPTXA5xCFEx7TF qeIViAtF6Sx73RXJRHHFpAb7kg== X-Received: by 2002:a7b:c742:: with SMTP id w2mr423553wmk.76.1621267844862; Mon, 17 May 2021 09:10:44 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f12sm11567007wre.88.2021.05.17.09.10.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:10:43 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D87981FFA5; Mon, 17 May 2021 17:10:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 18/29] tests/tcg/tricore: Add ftoi test Date: Mon, 17 May 2021 17:10:11 +0100 Message-Id: <20210517161022.13984-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-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-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: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Tested-by: Alex Bennée Message-Id: <20210305170045.869437-13-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-23-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h index 59b4b9a352..e6a41cd1a2 100644 --- a/tests/tcg/tricore/macros.h +++ b/tests/tcg/tricore/macros.h @@ -70,6 +70,13 @@ test_ ## num: \ insn DREG_CALC_RESULT, DREG_RS1; \ ) +#define TEST_D_D_PSW(insn, num, result, psw, rs1) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + rstv; \ + insn DREG_CORRECT_RESULT, DREG_RS1; \ + ) + #define TEST_D_DD_PSW(insn, num, result, psw, rs1, rs2) \ TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ LI(DREG_RS1, rs1); \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 34da1f37de..fcc7b6c1c9 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -9,6 +9,7 @@ TESTS += test_clz.tst TESTS += test_dvstep.tst TESTS += test_fadd.tst TESTS += test_fmul.tst +TESTS += test_ftoi.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_ftoi.S b/tests/tcg/tricore/test_ftoi.S new file mode 100644 index 0000000000..fb4af6b5aa --- /dev/null +++ b/tests/tcg/tricore/test_ftoi.S @@ -0,0 +1,10 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_D_PSW(ftoi, 1, 0x0, 0x84000b80, 0x05f6e605) + TEST_D_D_PSW(ftoi, 2, 0x0, 0x04000b80, 0x00012200) + TEST_D_D_PSW(ftoi, 3, 0x0, 0xc4000b80, 0xffffffff) + + TEST_PASSFAIL + From patchwork Mon May 17 16:10:12 2021 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: 440165 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1249098jac; Mon, 17 May 2021 09:36:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgqBwKPxSITMTvHg15zEdzK5+3yRXWwBe1CdHLsIPUiO9uursddGIsebPtPjoj+fPLKF1Q X-Received: by 2002:a92:c246:: with SMTP id k6mr483219ilo.155.1621269408624; Mon, 17 May 2021 09:36:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621269408; cv=none; d=google.com; s=arc-20160816; b=kwsNetkIUZXoGNsuEnRxU/VcWmxeU5mMjT/E7txN+MUnEJXx2KHhPnaiQUfmB4UgIg JQUJLRKyaWoJ/f7in/bQaoH5awdRk/qTyWvFiRuQVNDtUbsAfdEVRvh68IhDhQB3wiPg BNqxnG49a075a28lU6N7s6W2+wYzA9i4R9om84mQNA2KljDL2kB1tGEWutrSA8iHuYGX UF5rUDdrJAMhkJWe7jD0B/y8cRu0mwcODlyNKIPb30V8xru4/RkYO/Fsb2ygwYlyKWIU 0/NoAAAanrsglbCYGACo8RgU0/eKSnjj23Tz66Oq3YFmmD25bHWPt1CghvLIDMc6h99C aESQ== 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=3tnX1FEG5gAj6hH28VBua+UMBDYi0WyGLJaNygRNlzA=; b=oOa6LMc0UFzANKAYn0SpSu50/6WKagWeH5ml1jdP2IJaKNEJUbgkKuR8bnZuYJeyRr RMF7Gft4tiHPm0uz4REelyO5wfuoQJERCo8onona1tPBhqkD3PsksW/AE/YNpUHv38pW CGk/86YqVe4RoOJCW6jjPKCvgE8pNTscwjwWVCAkD3LB2q2rO66Cq5m6PmrpHgSnCsnV 0266J3qKN5x9A7fvZVpUBK7J1tAxyBQxZaaNXyO+F8SJiJ/X2NiuGopmRxftGy7zyVUa ClNLhFVJy4Mpgs8j2bJaEZNhFWZGjbo8std0IxgV+2GafKNXN0w/shDUKExMSdEozy06 Q4Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=iwDQkp+A; 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 r1si2501240ilj.100.2021.05.17.09.36.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:36:48 -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=iwDQkp+A; 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]:37638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligEa-0000wI-0a for patch@linaro.org; Mon, 17 May 2021 12:36:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifys-0001vV-NJ for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:34 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:34711) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyk-0002FT-Lz for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:34 -0400 Received: by mail-wr1-x429.google.com with SMTP id r12so7066401wrp.1 for ; Mon, 17 May 2021 09:20:25 -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=3tnX1FEG5gAj6hH28VBua+UMBDYi0WyGLJaNygRNlzA=; b=iwDQkp+ANBvtY24CZ+m3//tIcKvGrYmaSkNSfPTrbEp/fm2t95fybRIwxzL/IH+RZY hlWxI9geKc8HILNtLS5tewrIsQjgLxgYBoWHkvpDP4FDmuG8P6Yi/vbQG5ohya5MqL6A Pnadjmsp1CLOw8pa5nlQJDQJMaDHRmkyrdRHj3SVL8gbMkEIXM5V8XtegJv3H40Xu7Fb nueq4faU1JVIw5hknOkZVYheQnZRF08a6pcwxtkFUeJZtVUYOuHmf58NcRIUa80bChDk +EFfxTTK6kuwI4L/0ngnORTx41kHb4r06hDsnnKWNplR+rSpxlzDVIenwc4HKbjI59NA vuJg== 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=3tnX1FEG5gAj6hH28VBua+UMBDYi0WyGLJaNygRNlzA=; b=o9e2pG0pcoxbb8KZgiRYaDuAjrTvxncBrjNyotKJInVIpvKbaQP+l4Qy1W4OibIiD2 eM5kffLUSX5cYKDIIl/tkVkNZoIKmjYD+/iNf5/xwtr6IPLTh1CR62B61qpezfZRZl/k xZi4Y9cjBehf34YhZIR6Z4eBpDttNeXu8kU/o6ewJCB+jz7DoOivTDke7R9iF8OsoF+x 7q1oHYBV1vKXhz9hhFFW3J4fX0t4ZJTiSWCqEJA1tKckcscaN441V9MmDYSpLyB6SrFO Jf1tNX8Xbqy8NzoCkCp3lR/S1ZALmbNuzHLMcHss+Nz+f8DkHaPhPf7MvZI6tAJZUlAG Woyw== X-Gm-Message-State: AOAM5334V70OQ4H+FGCoks7p9CNLk7eLCI4Mq0FOXb1EIWm+AeTUCci0 +9XWsof+B+TIlhEB9/ov3SO7Bg== X-Received: by 2002:adf:f60c:: with SMTP id t12mr599221wrp.152.1621268424852; Mon, 17 May 2021 09:20:24 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f15sm1547426wrs.47.2021.05.17.09.20.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F3D1D1FFA6; Mon, 17 May 2021 17:10:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 19/29] tests/tcg/tricore: Add madd test Date: Mon, 17 May 2021 17:10:12 +0100 Message-Id: <20210517161022.13984-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 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: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Tested-by: Alex Bennée Message-Id: <20210305170045.869437-14-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-24-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/macros.h b/tests/tcg/tricore/macros.h index e6a41cd1a2..0d76fc403a 100644 --- a/tests/tcg/tricore/macros.h +++ b/tests/tcg/tricore/macros.h @@ -9,6 +9,7 @@ /* Register definitions */ #define DREG_RS1 %d0 #define DREG_RS2 %d1 +#define DREG_RS3 %d4 #define DREG_CALC_RESULT %d1 #define DREG_CALC_PSW %d2 #define DREG_CORRECT_PSW %d3 @@ -85,6 +86,23 @@ test_ ## num: \ insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2; \ ) +#define TEST_D_DDD_PSW(insn, num, result, psw, rs1, rs2, rs3) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + LI(DREG_RS2, rs2); \ + LI(DREG_RS3, rs3); \ + rstv; \ + insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2, DREG_RS3; \ + ) + +#define TEST_D_DDI_PSW(insn, num, result, psw, rs1, rs2, imm) \ + TEST_CASE_PSW(num, DREG_CALC_RESULT, result, psw, \ + LI(DREG_RS1, rs1); \ + LI(DREG_RS2, rs2); \ + rstv; \ + insn DREG_CALC_RESULT, DREG_RS1, DREG_RS2, imm; \ + ) + #define TEST_E_ED(insn, num, res_hi, res_lo, rs1_hi, rs1_lo, rs2) \ TEST_CASE_E(num, res_lo, res_hi, \ LI(EREG_RS1_LO, rs1_lo); \ diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index fcc7b6c1c9..8de005523e 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -10,6 +10,7 @@ TESTS += test_dvstep.tst TESTS += test_fadd.tst TESTS += test_fmul.tst TESTS += test_ftoi.tst +TESTS += test_madd.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_madd.S b/tests/tcg/tricore/test_madd.S new file mode 100644 index 0000000000..5d839772bb --- /dev/null +++ b/tests/tcg/tricore/test_madd.S @@ -0,0 +1,11 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DDI_PSW(madd, 1, 0x0000fffd, 0x60000b80, 0x0000ffff, 0x7fffffff,2) + TEST_D_DDI_PSW(madd, 2, 0xffff7fff, 0x60000b80, 0xffff8001, 0x7fffffff,2) + TEST_D_DDD_PSW(madds.u, 3, 0xffffffff, 0x60000b80, 0x00000000, 0x80000000, \ + 0x80000000) + + TEST_PASSFAIL + From patchwork Mon May 17 16:10:13 2021 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: 440155 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1238940jac; Mon, 17 May 2021 09:24:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyulH7F9XA2qoeOaqXWY3RFdPZ8JRSwwU7uj4O0IumAKTOmKlX48YcbrklvFoMORhMDyxhA X-Received: by 2002:a19:495b:: with SMTP id l27mr507487lfj.230.1621268668628; Mon, 17 May 2021 09:24:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268668; cv=none; d=google.com; s=arc-20160816; b=Hp4QOZG0rswJ38t1SCTceWa4NczJx2SkZZdeGG8/DhJlfttYb04PNzY3KZPN7lM2yE 14SkP54hWyegF1yRqjxVDFy+sJHLJ8PKFBJUB+2nPLZiQTGBpHa54fGQnPygDK9OLcL7 BPN4KmKhh0OhxTMD7heinEf1l7MU+ObG4d9DlDrU/VGqn1g5JIKfCcOoap30yW3kOU1S LyV5BvLD9ZTkuOcrAhkE3CvQBY0KYiud2y740vkr92E483QJL8hs3BDqFLsNcu5cv3Rl av3voHG7vyjuc0tkvbSaOcupPmjIskJbk0FVoc1mgQSk0d052RQbBEooAb5ocRF/yk+z hJTQ== 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=AwHUKic2neBlh0Oqi4dLL3Doo9PeLOJuBwfn8ueZrao=; b=xKBANIXi/mu9RsbRjQGF7O9oMgBuWj0HNN6Nn5ZPqDI01R4mv4026WQyewSVh3Yn3f J/BnmODuap9bEEVcjXnfMjSuLzyafEK2MlBAZsPRJhQrm6rwSHd9yMjB5W/m83ezvcqN rgHYtN50VxpzEWTAiV0Pi0UoXgplircWZ/rmzqmmJCCvnuasbmVSLUvwugRyb1+s5gFh OtYuntK8weELYfeBdUMweB45/AeZuodqO6uF0PWVSLjkhz9SInm9kJTBLaShTuOAKIol ulmA8t44X6MuXbpULh1E+a/WBLgjHPjTa2TdXYJiyeoA6d5fZEewvOYMvxuv2hBS/QuO S0ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=nQLN+uVe; 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 8si6917025lfm.400.2021.05.17.09.24.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:24:28 -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=nQLN+uVe; 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]:40516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig2d-00089G-Bq for patch@linaro.org; Mon, 17 May 2021 12:24:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyY-0001bw-Le for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:14 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:42604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyU-000246-Mw for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:14 -0400 Received: by mail-wr1-x42a.google.com with SMTP id x8so7035217wrq.9 for ; Mon, 17 May 2021 09:20:09 -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=AwHUKic2neBlh0Oqi4dLL3Doo9PeLOJuBwfn8ueZrao=; b=nQLN+uVe5MRaiv2Y8oHuR5Jc4YQ8J8mUVSlubZy68eMafs+P66i1tELFMgyR6xNho+ GofoHpMfQFPVazH1gaMev/qmd+iMEiWcr6qCfbMGWqRhjzVEcfWHstE0cZpiCLZKQo7O PKkS6feyxTkr2aigizS3TYGf2geveuxQ8zPn800AqlybSHRNqBw1h1a7Yy4JJiEYrDho +OG06vXM9enPc2kQMFKyYL+EJaiSBJ+ZzsUdiKpmVnGIDlw7O4SQGEgs21MMvrW4FGWn GLhPjMO8LQGXgbqNjCni+hjlp7RMw0Dxud4uKDCu6/ZrB9DOIJkFrpJe0b06ZPaZrNOh ao6w== 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=AwHUKic2neBlh0Oqi4dLL3Doo9PeLOJuBwfn8ueZrao=; b=WGarlKt2JOa2bnGScLtbogiNr9I+vi3A1dRGQJyhemIdxWmws/QRXKT8nzWGBx75qm dvqcKqeDUSgFNIcPqhVd4SeKJQ26/ID1iLJKJsxZPWyae4D29qGhIpNYvtZh9WqNawsD WiD7FfqQeneObxkUxENr4Jxhj3ecI/3ie7dAB2hFtUiqD7n6r2T+o03SwKSNulWgAro7 Up5SFTCspyCdgMzP6WM66JTvLoCZm1yldJ0xHbh9sTRJRuW6Im1WttTf/t56hUK8/P8z 7ERtO07+75m6rnKNV2yxy17PAu0dav7U03IQUymz9NZMLM0CrJ2g1jYWbNfl4zOVEU7w hrQg== X-Gm-Message-State: AOAM531sDcD1PerRpzXrwvNMH7ojam1pgY1vwlPy5eLZv4t+e46FAlkB mUs7T30IlQidlMmBctIWN7fk4A== X-Received: by 2002:adf:e70e:: with SMTP id c14mr600181wrm.104.1621268408246; Mon, 17 May 2021 09:20:08 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z9sm14997968wmi.17.2021.05.17.09.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 18D241FFA9; Mon, 17 May 2021 17:10:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 20/29] tests/tcg/tricore: Add msub test Date: Mon, 17 May 2021 17:10:13 +0100 Message-Id: <20210517161022.13984-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42a.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: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Tested-by: Alex Bennée Message-Id: <20210305170045.869437-15-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-25-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 8de005523e..0fe6a86482 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -11,6 +11,7 @@ TESTS += test_fadd.tst TESTS += test_fmul.tst TESTS += test_ftoi.tst TESTS += test_madd.tst +TESTS += test_msub.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_msub.S b/tests/tcg/tricore/test_msub.S new file mode 100644 index 0000000000..6dee87d99c --- /dev/null +++ b/tests/tcg/tricore/test_msub.S @@ -0,0 +1,9 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DDI_PSW(msub, 1, 0xd2fbe5e0, 0x00000b80,0x64003300, 0xff5420d4, -216) + TEST_D_DDI_PSW(msub, 2, 0xfffffc10, 0x00000b80,0xfffffe68, 0xfffffffd, -200) + TEST_D_DDD_PSW(msubs.u, 3, 0x0, 0x60000b80, 0x1, 0xffffffff, 0xffffffdb) + TEST_PASSFAIL + From patchwork Mon May 17 16:10:14 2021 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: 440161 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1243343jac; Mon, 17 May 2021 09:30:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5lTyv1/xJXdaAztdGXZWFwl3lSOWqdG+pDGvlLk90Q6PLbSUogx101xaQMw0CDy8zCkl8 X-Received: by 2002:a05:6602:280d:: with SMTP id d13mr687736ioe.90.1621269000630; Mon, 17 May 2021 09:30:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621269000; cv=none; d=google.com; s=arc-20160816; b=OKz6ae1fSJuQqcBxJGAPlDZE9oHu4zduVEkDcQCQYcsAn+L0gTSPMbbWJQf10CGSbv /AL3zO7d1DVCU6cAgrZnz7YKcfA6otOw/hL2+j3enEDCC3QewAsEh4e1VCUSUf7p+3YC wSFCdmmO876xqk66iyS2YADtYoE/2GpY9tbnZgvOTbtuItRmfpJk6S6aRx49ldc0c8Ln fRZ2DEk9f1pknMfQegj4DqEJJNJIaNqAzWWzjYavWuYI3ZNv7vRHP+i8Hy6Hl/BEYba5 OHubXu/CbE4FTB3n7Sc+3r6ZQvZko6X80BKRAGFRZsSF8LLqq1Z9LNmoayAYbCbMyMY6 QomQ== 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=u2zl0v/ZGpHuJYXeEUyU1isb5BGw5bVkcJXnd3C7i50=; b=ErcpvlAYHBdHRG8bEpG+9pHFoJUQfu9qk+7k6DNlmv7IWfsini0Y3dmbHyLtuQBDA5 8Z2cG43KwUpargUnsj9aZifRfkeUB6qI0cm3DlQdhbpcQbvnRcsQRjElnHo/NFvjV+n+ 3lsYFDxDXcOUKBvcAIHbJ+XmdPSeBfzVCvfQxGpzJAfgxOuHXBWc/YhpasQTrrVIg7Ld z5g8MDvfwnE4ptA85H0G0uaqe36DbDp8akCh69CRdJiaIaPMgy1cHWtOxi6bQrVKRvC/ OyJ7N2Nw0aO6ub0KiUC9aTqdkATKkYWFFB3HF0/wJVACCDYhrWG4mFzdCCBeFApngyUM BiEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=S2v44eDN; 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 z14si17769428ioq.100.2021.05.17.09.30.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:30:00 -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=S2v44eDN; 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]:57122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig80-0002qI-2d for patch@linaro.org; Mon, 17 May 2021 12:30:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyf-0001j9-3r for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:23 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:42603) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyW-000257-EO for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:20 -0400 Received: by mail-wm1-x334.google.com with SMTP id f75-20020a1c1f4e0000b0290171001e7329so3952321wmf.1 for ; Mon, 17 May 2021 09:20:12 -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=u2zl0v/ZGpHuJYXeEUyU1isb5BGw5bVkcJXnd3C7i50=; b=S2v44eDNNIGapl8zlmmB32UO5QFHcjTsCd7CAdqiV8dgepVGmOOFynzo+3FBb55Iex IBguUYikIi+GV19LQjF0nLFbDIGT9fUn+WjuDiXLP0SPyAoPleFufoJLRWzHBaj4dgKU qez7zoNR9ZzW8XKn4hktKtxxK1SKQw8GaWtSWSH9Jlz4sMxX/dlG21HPIk6X8j3pMtQ5 jJg1ALGPiVaG/0z5O67LwwNZ8B+sLNrMONkIhLcUnzQOf5kyy8yPlROudnCs/fENkm8V oktjTLmpGt/afHLpLbVzmYk95tN6nzMAlSVewzdrDk4sEv+/krjaakdQAUm/nFCXsEye jDfA== 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=u2zl0v/ZGpHuJYXeEUyU1isb5BGw5bVkcJXnd3C7i50=; b=Y60O5dXXdz0O2y0Uo7a7cbiK5PRo4zlr/oyHHWnNby2oCz6zLWRXxp9h7A2kwoIqPi an/HgS5JtzFelCinnZb5wxMkonXBkueH5WH01hFfXDv8kp16NK7hovewjty3iVLozSfO c6wRETcDVE3+gIgPdYc7B4m4I9BipE5vJBE6ZPQAxEHfXFtzkeVK+15TVwpfihNu/IXV lGeQ1cmoJfP/VsBxJA/gDTbh1M9nm4gFoYi7FMBl6l4AVC0ex36dHuqAqSNHv06gzU/V Amjf+MEXfshN+2nNEYpNZfES4RAp47ITnHL69Ps5dcu1H/05kJf/BXUj4W1HbjELT0zX 3nNg== X-Gm-Message-State: AOAM532KmtP22IODFlE/r6P7BjVJGj4D83VmL6Sg2EWJ9pJuIuN6p2RW Ut13MJ/KaaAQWO3rp7FB1Y0AZA== X-Received: by 2002:a1c:988f:: with SMTP id a137mr720995wme.110.1621268411060; Mon, 17 May 2021 09:20:11 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c194sm19350470wme.46.2021.05.17.09.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 300AF1FFAA; Mon, 17 May 2021 17:10:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 21/29] tests/tcg/tricore: Add muls test Date: Mon, 17 May 2021 17:10:14 +0100 Message-Id: <20210517161022.13984-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 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: Bastian Koppelmann , =?utf-8?q?Alex_Be?= =?utf-8?b?bm7DqWU=?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Bastian Koppelmann Signed-off-by: Bastian Koppelmann Signed-off-by: Alex Bennée Tested-by: Alex Bennée Message-Id: <20210305170045.869437-16-kbastian@mail.uni-paderborn.de> Message-Id: <20210512102051.12134-26-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/tricore/Makefile.softmmu-target b/tests/tcg/tricore/Makefile.softmmu-target index 0fe6a86482..5007c60ce8 100644 --- a/tests/tcg/tricore/Makefile.softmmu-target +++ b/tests/tcg/tricore/Makefile.softmmu-target @@ -12,6 +12,7 @@ TESTS += test_fmul.tst TESTS += test_ftoi.tst TESTS += test_madd.tst TESTS += test_msub.tst +TESTS += test_muls.tst QEMU_OPTS += -M tricore_testboard -nographic -kernel diff --git a/tests/tcg/tricore/test_muls.S b/tests/tcg/tricore/test_muls.S new file mode 100644 index 0000000000..ca517556bc --- /dev/null +++ b/tests/tcg/tricore/test_muls.S @@ -0,0 +1,9 @@ +#include "macros.h" +.text +.global _start +_start: + TEST_D_DD_PSW(muls.u, 1, 0xffffffff, 0x78000b80, 0x80000001, 0xffffffff) + TEST_D_DD_PSW(muls.u, 2, 0xffffffff, 0x60000b80, 0xfffffffe, 0xffffffff) + + TEST_PASSFAIL + From patchwork Mon May 17 16:10:15 2021 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: 440169 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1262177jac; Mon, 17 May 2021 09:53:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzA+cFLEzOZZV3sqUVdSm90ZTatVbFO5A9yctQuLEJEtWzxAnDSbtSJLllXWMp2EJqWMr1A X-Received: by 2002:a9d:247:: with SMTP id 65mr424826otb.330.1621270429924; Mon, 17 May 2021 09:53:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621270429; cv=none; d=google.com; s=arc-20160816; b=rF4w6/xYWyhIhKA1LuJpImpam8ryapm7YEwsnntDjKopIcCvpljwA9TAErImSQLtfM sh8UL33nbYfFBowOBW8uGjMbhYzv12+vqeOKSd90kROIgQoAKpPRoieNoMPEOw5lGti2 JBa1kJ1+CMw5t8KyOfONjbhdH3Q3zLoxxPmjclgst785RGkSx5/oGAJp0wMh7YFcoZzK NT2RILGBEqJ8ENg/VfH2ZwHdc7bqCNJVsa31P+m9xQ9VoNXwFhTNm8YVp/tfcdm9EyrB Tq07Wjo5dSu1j8csbV2yGAD/D6LxACee5Kyh/XwMqlGp5L9gWI1YfZsat0TjI0cH+Xv4 R2ew== 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=ecrJ8Yrx6ZRJ+fACPN+MlJLK85SE+W/xoTVC0N/qwc0=; b=lQOKj+yh4FQEu5hHaFjS39zEgIvKadfk9d3HHEztLFSRdBDzZFhWj/OvAsZSv8MsN5 VlVkUKD7ESqLRs5ja+1CODrZ0Zi0Ji5/ev2uZ8uxfaRHOf9hBLVJuQUsEwGeHurwoDxY tRD/nQ9b13wTT6PdTEzpgyGuC/VhmSVF6RAyuPhXnMGPO3d8uGh1wJRH2v84oJBmtrQr RTuT7dT6vnnZ9DfArVrwk8LAcuVXh/00NAD/ReY/lGqYB0anh2BjON5KT0mMiVuz6abq xwWmI3qxDgPVdRP+RqRMr6I3n9iiDogggsKXEDBN18UlqHGpUWGzP8NMcOjfmSQ1AU8E Z5jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Qt+U7dja; 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 h7si15355755ooj.42.2021.05.17.09.53.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:53:49 -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=Qt+U7dja; 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]:51704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligV3-00056p-76 for patch@linaro.org; Mon, 17 May 2021 12:53:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyq-0001ns-R9 for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:32 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:37457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifye-00028i-Pj for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:32 -0400 Received: by mail-wm1-x32c.google.com with SMTP id k5-20020a05600c4785b0290174b7945d7eso3512769wmo.2 for ; Mon, 17 May 2021 09:20:17 -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=ecrJ8Yrx6ZRJ+fACPN+MlJLK85SE+W/xoTVC0N/qwc0=; b=Qt+U7dja5K02eYNlzpW0xIuVoXvMerwBhJ/RDvx/U17ezrvlejAtRNjweya/bBgRfe i52IqbRU8EwoIWwIBeOKQDfp6rEukpqp5UVM4UXcCOjJrGjL7RHNifN6xCxCcW+1+Rwh aM9kcgEze8vDIySx3+HudzUrP+3IRYf3SP42RHf1+O5cFbnd/ettp+gYcv1DPOMPu/9Y o9w+gecw5kQCj8Fh1otp5P2/YZFZpRqt2E7XpSoRRC6yETHGevZU0Ovae5ayPc2CkKmH mynrv3twjsIJd3kieEXwiXV6+QvD4pLwscyeKTBQZXvzd/obqx6mj61cYn1I7isFoDFS Fkvg== 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=ecrJ8Yrx6ZRJ+fACPN+MlJLK85SE+W/xoTVC0N/qwc0=; b=SrFYBNnUxgmnyBSCPp0tHBjxt5Shjzd8FbW4uXy7X3UoLDTNzrngWG67ceQ1jmwVR3 xbzzhx1uqBi8GtK8fIrwUYdbUYZBo62umajYe7HRqH/qVG8Eqx/4auHPN0D6eqbvi2qJ npvpmaimT7FNeQtt5/QVls7DqXj54VIvo5Ls90+TgSdDr/3b8W0KyZcjodrkgpO6xqez gZsKBGCCzDctxgAGYUgvgQSFvJRo8Yj+9bFq4/yhXSNt58FpQ+evj5fIHOl20ElBLPrt 4C4/xMRCsX88wEkEKv6CIV8cympfgwdgwVKB48WqwLEjZvdOnkDLFeuF5W1H9RKWXyMY 9Seg== X-Gm-Message-State: AOAM532jIrDXWFNm1LOT6kG5tth6yp6eOXxgIr2kygYN00GEmAgVawWL k93gjxNQAB+Wtx7la3sWisA+ew== X-Received: by 2002:a7b:c444:: with SMTP id l4mr487457wmi.36.1621268417035; Mon, 17 May 2021 09:20:17 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c7sm8796478wrs.23.2021.05.17.09.20.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4A0F01FFAB; Mon, 17 May 2021 17:10:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 22/29] tests/tcg/ppc64le: tests for brh/brw/brd Date: Mon, 17 May 2021 17:10:15 +0100 Message-Id: <20210517161022.13984-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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_Benn=C3=A9e?= , Matheus Ferst , qemu-devel@nongnu.org, Fabiano Rosas Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Matheus Ferst Tests for Byte-Reverse Halfword, Word and Doubleword [AJB: tweak to make rules for skip/plugins] Signed-off-by: Matheus Ferst Signed-off-by: Alex Bennée Tested-by: Fabiano Rosas Message-Id: <20210423205757.1752480-3-matheus.ferst@eldorado.org.br> Message-Id: <20210512102051.12134-28-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/ppc64le/byte_reverse.c b/tests/tcg/ppc64le/byte_reverse.c new file mode 100644 index 0000000000..53b76fc2e2 --- /dev/null +++ b/tests/tcg/ppc64le/byte_reverse.c @@ -0,0 +1,21 @@ +#include + +int main(void) +{ + unsigned long var; + + var = 0xFEDCBA9876543210; + asm("brh %0, %0" : "+r"(var)); + assert(var == 0xDCFE98BA54761032); + + var = 0xFEDCBA9876543210; + asm("brw %0, %0" : "+r"(var)); + assert(var == 0x98BADCFE10325476); + + var = 0xFEDCBA9876543210; + asm("brd %0, %0" : "+r"(var)); + assert(var == 0x1032547698BADCFE); + + return 0; +} + diff --git a/tests/tcg/ppc64/Makefile.target b/tests/tcg/ppc64/Makefile.target index 0c6a4585fc..a6a4ddaeca 100644 --- a/tests/tcg/ppc64/Makefile.target +++ b/tests/tcg/ppc64/Makefile.target @@ -10,4 +10,17 @@ PPC64_TESTS=bcdsub endif bcdsub: CFLAGS += -mpower8-vector +PPC64_TESTS += byte_reverse +ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_POWER10),) +run-byte_reverse: QEMU_OPTS+=-cpu POWER10 +run-plugin-byte_reverse-with-%: QEMU_OPTS+=-cpu POWER10 +else +byte_reverse: + $(call skip-test, "BUILD of $@", "missing compiler support") +run-byte_reverse: + $(call skip-test, "RUN of byte_reverse", "not built") +run-plugin-byte_reverse-with-%: + $(call skip-test, "RUN of byte_reverse ($*)", "not built") +endif + TESTS += $(PPC64_TESTS) diff --git a/tests/tcg/ppc64le/Makefile.target b/tests/tcg/ppc64le/Makefile.target index 1acfcff94a..c0c14ffbad 100644 --- a/tests/tcg/ppc64le/Makefile.target +++ b/tests/tcg/ppc64le/Makefile.target @@ -9,4 +9,17 @@ PPC64LE_TESTS=bcdsub endif bcdsub: CFLAGS += -mpower8-vector +PPC64LE_TESTS += byte_reverse +ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_POWER10),) +run-byte_reverse: QEMU_OPTS+=-cpu POWER10 +run-plugin-byte_reverse-with-%: QEMU_OPTS+=-cpu POWER10 +else +byte_reverse: + $(call skip-test, "BUILD of $@", "missing compiler support") +run-byte_reverse: + $(call skip-test, "RUN of byte_reverse", "not built") +run-plugin-byte_reverse-with-%: + $(call skip-test, "RUN of byte_reverse ($*)", "not built") +endif + TESTS += $(PPC64LE_TESTS) From patchwork Mon May 17 16:10:16 2021 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: 440159 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1241924jac; Mon, 17 May 2021 09:28:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfFk2fOJALBrd3n0+oXkTMY/WIbnty8AZJVrWX/JhLSGwb+MNFMMPzOcsoBX8hIaFaIbbB X-Received: by 2002:a9d:106:: with SMTP id 6mr361574otu.100.1621268894669; Mon, 17 May 2021 09:28:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268894; cv=none; d=google.com; s=arc-20160816; b=PQKCvThNqfLiZ4uOXtBTD1SsYzM/28uieOnKEWHVJMgSIEqZ67vMIRltk7WCun+lZ8 BeEqTuSBZtzyweErKm0mYz4LVk1TzVyhllqbN2rh1bVghJXbwUQwVM/7ly2cT+oGxCsH JVKEYuSvQRtwHeGT7n/DShPt5kaxsYVWxTFJaNuytssp4Jt1JS1ONaLXBrm+3up0vbyY DuHgNDHg2enP6w2/7bTU8pCknnAS3Wa6WSXXoJnewWxd8DhRtkMcdjxxF6H9hFleGSZF UshBUoOhNAQGOhbsjdbJbtCIqLio6q28pW3J1CsNyMGv2qEzZolXHUuqzECQF+hA2tYR RAAA== 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=mkstvpf+hN6bSILMqqRSGrxtXoo4HBUUCL7fU3xWKkM=; b=FSpk7b1qF5Msd18aheItoHq1dpqleqG+vE9vX8U8UvnslYB2nMHLAbRzxNulUdNh56 KBy29jgVXT9dnsMqOIdFQh73+tP2oiQtYzAbhJH8STU5CiqO1fH4ip9g/71nxqjs7mPY YNspNWHi/thElrs2+yOrDzOhkai2eApwr5LsSf+3/1N3rITCF1G9cjIuIV4qF7VjfKd5 6hFDFYTuUPZdozMCUGBV6W3aODYSAbL1D4SNFjuXJPXIbOQ7qDT3DlaRGWTNMLeTZfeX 2ciY73gT+itcS2JlmyV9PVv4qx3fI4W8pw8/JfOjDkpe3Uk7acaMNkgFgRnbi6bzasm+ oWow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=yOJPNrGd; 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 u7si9126519oth.178.2021.05.17.09.28.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:28:14 -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=yOJPNrGd; 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]:48788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig6I-0005Xf-0T for patch@linaro.org; Mon, 17 May 2021 12:28:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyX-0001bR-As for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:14 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:42601) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyU-00024p-O0 for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:13 -0400 Received: by mail-wm1-x332.google.com with SMTP id f75-20020a1c1f4e0000b0290171001e7329so3952254wmf.1 for ; Mon, 17 May 2021 09:20:10 -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=mkstvpf+hN6bSILMqqRSGrxtXoo4HBUUCL7fU3xWKkM=; b=yOJPNrGdzr/a24hKdf+de5oH4elbtkWcgAPmgavcxNuVS5eNMna4l2m2zt96hgwQjp 0AXssebE5HaCLJ1VipzHJyZWEv+ZClIsLTat/jzAKAJZWy3vwbLdcaH/XNE8/H/72L1k OB5JeDNYw1ngeFOX8OovrMi7ABPc8FRWuYs3y/I98NodHopup+S4wolIt9nWI1MnxSWK bOy2nVfbajBmq9q+7+KQaeow09d/XgrJZohJtBK8CQLm7gwwMwzGgP72oxQX+3DJ7W7c 1Pnd1Yag0ujrYXEiiMY59MlaOd/+eyDC/F0TYZ8ekIrfWVF6BRZejy20/Y642M+PUX0u pagw== 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=mkstvpf+hN6bSILMqqRSGrxtXoo4HBUUCL7fU3xWKkM=; b=b8DQZAGX5uujixu+iKsh2qaJSFKiNh9vDhELofRozLBO5UzQzoLKKb7nlyl6RdO6KX qv2d+WF/r/aDXQsDMKMwZP+7DQ2jYTLonXmRgofzh5uNxHXV2Br+IIAOoR1iUZlZA5Fv ft4nPxe5vlPxEuQ0PR4BW/TlVAlASYGGt2u828EdyMB5s3Log0BHD0SQpx0A+IKXJdgC 6WW7/4NiSyN0TPowaNpPKvHyb6cd269+Rs58MP13gJEoFEw6gqjDYsonEYeVOZhWaHqd adlcr9tg2TrGSgr0YKpazG4uKlsXpmxjnAhDVkIh/U+tiqP+/90e3OBMXIIa3+blcZ6K 643w== X-Gm-Message-State: AOAM532n8/e//OdX9o+yghZykjWy2lSCtMTVzKlVeKahrF5ngzy2pdLr 6/RW9fikWBJAqXLBOhOlvkiDdw== X-Received: by 2002:a05:600c:3388:: with SMTP id o8mr675433wmp.101.1621268409041; Mon, 17 May 2021 09:20:09 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f6sm20754175wru.72.2021.05.17.09.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 61C871FFAC; Mon, 17 May 2021 17:10:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 23/29] tests/tcg: fix missing return Date: Mon, 17 May 2021 17:10:16 +0100 Message-Id: <20210517161022.13984-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.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_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" This was picked up when clang built the test. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210512102051.12134-30-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/multiarch/system/memory.c b/tests/tcg/multiarch/system/memory.c index eb0ec6f8eb..41c7f66e2e 100644 --- a/tests/tcg/multiarch/system/memory.c +++ b/tests/tcg/multiarch/system/memory.c @@ -326,6 +326,7 @@ static bool do_unsigned_test(init_ufn fn) fn(i); ok = do_unsigned_reads(i); } + return ok; #else fn(0); return do_unsigned_reads(0); From patchwork Mon May 17 16:10:17 2021 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: 440167 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1256847jac; Mon, 17 May 2021 09:47:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0FqFFp2KKpI4FlupaP25THJMPiTjic1++UNF2MgivHNw0zJcJRhLonkyFjpIn3dXU5Wdh X-Received: by 2002:a05:6e02:1bef:: with SMTP id y15mr481516ilv.305.1621270037499; Mon, 17 May 2021 09:47:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621270037; cv=none; d=google.com; s=arc-20160816; b=SC0PzxcJCjhaDV83H1xDle6mWQcC0bo8YH3Wu5tvjToEhgpP9sYUftb99E4PLIsc4H qII2jtxEJr/maXnAIPZ6aCqDZMGwJpH+kNNxshbx1iOKYVOGpyoxAQhtz2ZWTN5lbRKY O3Aaa1t+pqqnlfMjnIH3w0DWUCVJFA+3/vFy7Jo20jj5CBPHAzsgOr91Ysp7zgCy1fx+ vJ1WD4Yj1KHoSAB+6uBzYgnWqfzbOwce9++IRDr1f4HbyZUwr4EdEDhkkKn0OoyoMdr9 TlDnllc3i/qVgHiiyCbSiwLSViO5ro7ITfJZUMVPb0U3uHDakp/vOleJ/EQS2A7Jlajb d9yw== 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=SG64un54Q9dR+nW/jKLTv4A2RmDY5Rqb3p7F8J5Dt48=; b=Cdik77RUKqhTxTKpDq+ylb1hhxvMbjDnVBTc21jBOQb+m7WNKmEM0qYDTKiHmKvGt+ VWmjodDZMQQ2jLXLudqk2rSkl0yI9kbetLOLQeNNGybeFGakSjmu5MrziJw5CRSNrgwu 9gzK1BVJfowbSWwi7EZHg2+ASsmTPdT2onylP23TX+TVFhU/7GFpznXcfRX5H5t2fojZ rLt91xqL06gqRhxO00xCFNNtHbMBbOV/TVvChNt6/C80D60Gzs98ZWBgJIBTAZIK1jTv C1EvoIZpTWCmXGaZLw6HqcvQUNSFhlfTxM710SwcKw/KK6hfO7+y9vYmDhSJUhqCngFl ng1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=W89sO4vU; 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 a27si19787271jab.118.2021.05.17.09.47.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:47:17 -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=W89sO4vU; 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]:60070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligOi-0008AZ-QK for patch@linaro.org; Mon, 17 May 2021 12:47:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lig8H-00047w-NQ for qemu-devel@nongnu.org; Mon, 17 May 2021 12:30:17 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:39570) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lig8A-0005x1-IE for qemu-devel@nongnu.org; Mon, 17 May 2021 12:30:17 -0400 Received: by mail-wm1-x336.google.com with SMTP id l18-20020a1ced120000b029014c1adff1edso5518437wmh.4 for ; Mon, 17 May 2021 09:30:10 -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=SG64un54Q9dR+nW/jKLTv4A2RmDY5Rqb3p7F8J5Dt48=; b=W89sO4vUX5l8oqFUkAQGpZiZzt+06eW0VNoHAhdC+PnyVDZZ6TMT5vsEwIGrwgsuBN tQ7ntY+0lw2hnM/wqVGxbrNax6EIsNSok8VmUAK4/TJqCeDdY1wQpdtR4SEQfOrR+GcU Gi4kpZQVmXa9uGlYqENxhRqdCUVJjbqJejnAWvTqiT/ZvhPN4gHkxvGyLkqljbcv4Dcb FGAJpkYM9XN2yQwBCIi25dPGeyFDJiipiyS6r8GwK+c6FY/s+SMeA6chKoVHNvAj0rCz lfY74Mb9GcZiRUikKQs7+LvQdv88+UjH0cuEO8eDB/Li1KCr1CL/3fN7mnNAPL/DPgBw v+WQ== 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=SG64un54Q9dR+nW/jKLTv4A2RmDY5Rqb3p7F8J5Dt48=; b=HDVKYqZKRKbGfMQGqvflpImX4RcVG6lNYQrI4BIaQRLWg+wuOH6G4oAPd0ETRH6vm7 uqJKUjM+I8BhQNXD4kLdJXYRq8MWxtgw3RRRvb/AXMexiu9/Derbx458mbYdbSGqXo+q tUG7LWODDuza8vH3H2oidrV9DpaDZGdngHhJTlg0fA0NYVIOsCvVf60EzVkIGrumXwnQ 7q5CKU43t+bl8m10ITBIP5mcV4DCdZnchV/6p92vVG0z5/y+o39U0yBTt1au3gxAQsLW qcM8KvSomM521sQl/8E5wOS9uIFl5CMsYD9WnawPrgNahARkVE4QjwKNEJoO4xs3wUgj PdAg== X-Gm-Message-State: AOAM530xmkOCGucvvQehvk7XwH4hFp9CRRDUYYmPWnFjuQ4VU40HKrgV 26YGwZ3m61KqPbt0FvcJcKHgEg== X-Received: by 2002:a7b:cf13:: with SMTP id l19mr746724wmg.140.1621269008949; Mon, 17 May 2021 09:30:08 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q186sm1974451wme.20.2021.05.17.09.30.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:30:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 77D5D1FF87; Mon, 17 May 2021 17:10:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 24/29] tests/tcg: don't allow clang as a cross compiler Date: Mon, 17 May 2021 17:10:17 +0100 Message-Id: <20210517161022.13984-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.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_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Currently there are two problems. The first is clang generates a preamble (that is always executed) to stack xmm registers. This causes a ILLOP on the x86_64 softmmu tests as SSE isn't enabled. The second is the inline assembler in test-i386.c breaks clangs compiler and I don't know how to fix it. Even with Theodore's patch series (D5741445-7EFD-4AF1-8DB2-E4AFA93CBB1A@icloud.com) I still get compiler failures. For now lets just skip clang and allow it to fall back to the containers which we know have compilers which work. Signed-off-by: Alex Bennée -- 2.20.1 diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index d13d2bb388..016aa24ce4 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -105,6 +105,14 @@ for target in $target_list; do esac container_image= + container_hosts= + container_cross_cc= + container_cross_as= + container_cross_ld= + + # suppress clang + supress_clang= + case $target in aarch64-*) # We don't have any bigendian build tools so we only use this for AArch64 @@ -142,6 +150,7 @@ for target in $target_list; do container_hosts=x86_64 container_image=fedora-i386-cross container_cross_cc=gcc + supress_clang=yes ;; m68k-*) container_hosts=x86_64 @@ -213,6 +222,7 @@ for target in $target_list; do container_hosts="aarch64 ppc64el x86_64" container_image=debian-amd64-cross container_cross_cc=x86_64-linux-gnu-gcc + supress_clang=yes ;; xtensa*-softmmu) container_hosts=x86_64 @@ -246,71 +256,75 @@ for target in $target_list; do if eval test "x\${cross_cc_$i+yes}" != xyes; then continue fi + eval "target_compiler=\${cross_cc_$arch}" - eval "target_compiler=\${cross_cc_$i}" - if ! has $target_compiler; then - continue - fi - write_c_skeleton - if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC -static ; then - # For host systems we might get away with building without -static - if ! do_compiler "$target_compiler" $target_compiler_cflags -o $TMPE $TMPC ; then - continue - fi - echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak - else - echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak + if has "$target_compiler"; then + if test "$supress_clang" = yes && + $target_compiler --version | grep -qi "clang"; then + got_cross_cc=no + else + write_c_skeleton + if ! do_compiler "$target_compiler" $target_compiler_cflags \ + -o $TMPE $TMPC -static ; then + # For host systems we might get away with building without -static + if do_compiler "$target_compiler" $target_compiler_cflags \ + -o $TMPE $TMPC ; then + got_cross_cc=yes + echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak + echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + fi + else + got_cross_cc=yes + echo "CROSS_CC_GUEST_STATIC=y" >> $config_target_mak + echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak + fi + + # Test for compiler features for optional tests. We only do this + # for cross compilers because ensuring the docker containers based + # compilers is a requirememt for adding a new test that needs a + # compiler feature. + case $target in + aarch64-*) + if do_compiler "$target_compiler" $target_compiler_cflags \ + -march=armv8.1-a+sve -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_SVE=y" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -march=armv8.3-a -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -mbranch-protection=standard -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_BTI=y" >> $config_target_mak + fi + if do_compiler "$target_compiler" $target_compiler_cflags \ + -march=armv8.5-a+memtag -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_ARMV8_MTE=y" >> $config_target_mak + fi + ;; + ppc*) + if do_compiler "$target_compiler" $target_compiler_cflags \ + -mpower8-vector -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak + fi + ;; + i386-linux-user) + if do_compiler "$target_compiler" $target_compiler_cflags \ + -Werror -fno-pie -o $TMPE $TMPC; then + echo "CROSS_CC_HAS_I386_NOPIE=y" >> $config_target_mak + fi + ;; + esac + fi fi - echo "CROSS_CC_GUEST=$target_compiler" >> $config_target_mak - # Test for compiler features for optional tests. We only do this - # for cross compilers because ensuring the docker containers based - # compilers is a requirememt for adding a new test that needs a - # compiler feature. - case $target in - aarch64-*) - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=armv8.1-a+sve -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_SVE=y" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=armv8.3-a -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak + if test $got_cross_cc = no && test "$container" != no && test -n "$container_image"; then + for host in $container_hosts; do + if test "$host" = "$ARCH"; then + echo "DOCKER_IMAGE=$container_image" >> $config_target_mak + echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> $config_target_mak fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -mbranch-protection=standard -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_BTI=y" >> $config_target_mak - fi - if do_compiler "$target_compiler" $target_compiler_cflags \ - -march=armv8.5-a+memtag -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_ARMV8_MTE=y" >> $config_target_mak - fi - ;; - ppc*) - if do_compiler "$target_compiler" $target_compiler_cflags \ - -mpower8-vector -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak - fi - ;; - i386-linux-user) - if do_compiler "$target_compiler" $target_compiler_cflags \ - -Werror -fno-pie -o $TMPE $TMPC; then - echo "CROSS_CC_HAS_I386_NOPIE=y" >> $config_target_mak - fi - ;; - esac - - enabled_cross_compilers="$enabled_cross_compilers $target_compiler" - got_cross_cc=yes - break + done + fi done - - if test $got_cross_cc = no && test "$container" != no && test -n "$container_image"; then - for host in $container_hosts; do - if test "$host" = "$ARCH"; then - echo "DOCKER_IMAGE=$container_image" >> $config_target_mak - echo "DOCKER_CROSS_CC_GUEST=$container_cross_cc" >> $config_target_mak - fi - done - fi done From patchwork Mon May 17 16:10:18 2021 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: 440166 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1252529jac; Mon, 17 May 2021 09:41:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwL4sNJxmLqL3gVuDuzex0flU7KfSs1IqM5LyZyf7TJNFiGdqKBzaFvu6w3d0mLvi+1ThEv X-Received: by 2002:a92:3307:: with SMTP id a7mr485581ilf.113.1621269669240; Mon, 17 May 2021 09:41:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621269669; cv=none; d=google.com; s=arc-20160816; b=v9Bl1sOtAFOfbkDf0GKDCvrcvEo3HwwfhcmFE1jEy0GcaGd+fLL6g0cWjLVQuO3qtz pn85dnuZeZSdr1d8MgGuoN4PtT4KMv0BiA1blThIQy9f9zymZ8ky8o/wk4UuY1tklxGx TNe7yP0TkFAdliFcy2nOP9lQVLmrNwIss9PsYSAuxhEIZmOUzF5V60yeze9iHzTPOBZp ppwhSX9aJHQ/AMWa5KNlJWC/4DiOs8cdJGsgvGuDnVRb81n703pCDDmusQoXjqEB9gtc hVvZR3Cxxddf/qbNBApnm3uohhgQCXwIK9CJrI1+kQVJUQlDP7Qech9igMp9I6RHAeww EmLw== 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=aArNQrBNJ1XP3sxmOTGdE9hYoqsnx7QPKTcrKqVX3cY=; b=ThMsH7+n8eMrj1GkLASK97jtRcjaihyi8Z7cgSJ5io9aHCkKjxz5+4rWPcuT0iKNpS jtzrfz3r3StvmKqNRExaCEXF7LKkYNUP4IRnR7Itx6U9/h45rQlIqiqRqJB0CbatlHAo IMjOQlOtgHNTXuLugo9F+68povv+i/5kPzTe38cShfIhzh0uFgE9n/vOmIPcEPDR5Mri PNgJi9FSWA4dBYb8RTj3kNbsz74FogXGMTFENYMi6McTakJE3mU82ZvnGG5SoEV8ZuUN 8B3xAN5eAUDFsWSULpXwBuyq5OVmCaFEex1RnYYcO4L99cxlAlSrRA/mBHAunrZqjvdD VhpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tv5boI8O; 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 p18si9222500jam.69.2021.05.17.09.41.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:41:09 -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=tv5boI8O; 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]:48688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligIm-00009B-ML for patch@linaro.org; Mon, 17 May 2021 12:41:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lig8H-00048g-Tr for qemu-devel@nongnu.org; Mon, 17 May 2021 12:30:17 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:40625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lig8D-0005xy-HO for qemu-devel@nongnu.org; Mon, 17 May 2021 12:30:17 -0400 Received: by mail-wr1-x430.google.com with SMTP id z17so7070981wrq.7 for ; Mon, 17 May 2021 09:30:12 -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=aArNQrBNJ1XP3sxmOTGdE9hYoqsnx7QPKTcrKqVX3cY=; b=tv5boI8O0DNknjgn9AkC77mEaZs8G2DbbAlJEQxY0quzurzjAY1kaiwMUhhffb+SYv i/hsGWZrztRxV8sUfZbOwzXehWxkGlqnwW1zqvM4E4xUnlPEvzFF6VpFAEezTGCK00MI g7QyTK1+ihAJmE8/3sG1mVoclpvCj+qf9gIDkjZaRIHp08U80TLAGCQmgnkhKMsrREQ4 GztgSk8X5YSOgqI7ZdoM4QYcFZZJAskaVgcSp95FxWZzcmLqCoLRirXRIHgupdHt0+c3 EaUtmQ1cIIEf/P57MbSY4lBxdHLs5UhDeh1KgnY1i6UnTX3MWHc+giG1oC6vkPj2GuEB Ua3Q== 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=aArNQrBNJ1XP3sxmOTGdE9hYoqsnx7QPKTcrKqVX3cY=; b=PPAW49sk4scx+f3ABW5zu03QNb44IbjrVyvHs4bNfdK0jbJCgUYAI9KB01ewcjD15b G8PyFetDZg0MuI6qEucZKrv7HxqTcGs2gs+OA4XjikdJ4x0UXGRG/DaRBgUvkqPEyW3c qafSAKfmLIDzd8Ft/IoB+cqcK9go8Ys+yenvQRr4o7N1yDq0h1wAgA1c4BL/+SyvUXSl wz3eP9m2tRHJFJEsRMaLQx9ZtfeLOFDNSRqZB+GlTB1WHXCmh/eggo0FFJe43UEuK3b4 rV9JwZ7wmtgEzM/q5kkrxL4Xy3iFzmB78MaklOpv0MlCyVrS1ZCxGF66EcgI8uV0diau ubQQ== X-Gm-Message-State: AOAM533W+9sW30yOMztkKxA9A6i9rSxFaQy6pxNm3aEFY/hx09MeRxWt Fco1QiFUVC/4saBGe++3LC90yw== X-Received: by 2002:a5d:6c61:: with SMTP id r1mr596553wrz.151.1621269011120; Mon, 17 May 2021 09:30:11 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id e8sm17745240wrt.30.2021.05.17.09.30.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:30:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8E0EE1FFAE; Mon, 17 May 2021 17:10:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 25/29] configure: use cc, not host_cc to set cross_cc for build arch Date: Mon, 17 May 2021 17:10:18 +0100 Message-Id: <20210517161022.13984-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.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?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Otherwise you run into hilarity like trying when cross compiling a 32 bit ARM build on a 64 bit system trying to use host_cc to build 32 bit test cases. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210512102051.12134-32-alex.bennee@linaro.org> -- 2.20.1 diff --git a/configure b/configure index df11c8bad0..9470fff09a 100755 --- a/configure +++ b/configure @@ -1651,7 +1651,7 @@ case "$cpu" in # No special flags required for other host CPUs esac -eval "cross_cc_${cpu}=\$host_cc" +eval "cross_cc_${cpu}=\$cc" cross_cc_vars="$cross_cc_vars cross_cc_${cpu}" QEMU_CFLAGS="$CPU_CFLAGS $QEMU_CFLAGS" From patchwork Mon May 17 16:10:19 2021 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: 440158 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1241355jac; Mon, 17 May 2021 09:27:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOfN5OhI2LOUMJrYJDsWZ1+7E7ogt/ZJd0k5IPNv+aIiQkdlhOkArR+KqNOpPHWEXB6eTT X-Received: by 2002:a92:c54b:: with SMTP id a11mr466414ilj.174.1621268852693; Mon, 17 May 2021 09:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268852; cv=none; d=google.com; s=arc-20160816; b=FvSPtQDWQjcQZ4T8WLvUOFut8P2RhxXCULiBRlWo5fK/7/pv05i+EPlcYY7aRSxWtc 3Qx1aTN/Dn6WjuIxNc8Xwnk1q13NMBHiONXSYF3AoFlHy3fqXUDmDAVCrUAXg18G4WQO 7UlOwvXRj0OM4CPnuMt5ZyDKYMBPvEDg7jBE3A5W7DVvDuo9f7Ouxkp9HYIM5cgX40Pu Osc5uYzJssBYW2v9ISx3xWd1TGvu2Tx7HsqGjH/kD7mTbI0OK8I5Ug1czcbPpOHvv6eN b0/SCRuvEB/KyEjuxSNjyavV5lQ3beyjwDC5llthh8PNZe9gyjVj7J+EDIrtgGd+kETS QABw== 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=laBTRAnhUqYkkWxlzGzSELGQ267uzqchU3TV+3waw3g=; b=BEwLALSr1h/uZ+8GOG1/aPNvvWbG6b8ZeplibKgbTjwFqKzBmGVXHgbJXHZCzKOYkz ruRCuJu2MAug1CVbdE0WpfEhP3BpbTwFJzCMT7iQcklI22n/KPkDiR8weoG3vbc7OXlm WSC0yaOci9ncGpKMxoUPn8DQFIvoCujILMf3gljZZF8yYlgyBPPnldP0ke32frQZtXl4 X9m+5NGx2AHEhLKHBWYMCZmouzRM5cQV5DGir4rln9EKaezW6UD+aDpqeIOUYU12FdNj 9cT7ltqOedvOFAbLnF4bZtuIpWzNRUZlAR5ag3MhnD/3rlg+X2QotEV2UwFAQRQFHJLu xn8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Kt7lxjfh; 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 r25si18222889jai.80.2021.05.17.09.27.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:27:32 -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=Kt7lxjfh; 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]:48928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lig5c-0005db-3k for patch@linaro.org; Mon, 17 May 2021 12:27:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60352) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyp-0001mt-SV for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:32 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:37482) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifye-0002AQ-Ts for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:31 -0400 Received: by mail-wr1-x436.google.com with SMTP id q5so7054414wrs.4 for ; Mon, 17 May 2021 09:20:20 -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=laBTRAnhUqYkkWxlzGzSELGQ267uzqchU3TV+3waw3g=; b=Kt7lxjfhIBrfiH3KTPAODzXItNhwVOQwVfMCnoGv76PcVzxAQJWzCctWAq02rghu+f R2bSvco/nzvIcDkRV3t0Z1KrYmJZ++aCs6U9+ajZpsqW86oWLMu88SE0g0D5sdyfuVnb 3nQXWkx5E+PLJn3c4FX/4u2OD5hNFf15E3EVV3JH3LL2PV1djTTeCW7L0MEKNLlc7h/t nYgpLBxqIQbvub4SQfzVmAVBTZtuZIHKAQw+O2IjH4xY5Mky624pzE6PpIWhB8W67V4C oguo0YRdr0T4iOaUsz35IGHVoSiB/PJ6yjteRdtHnIlMPMX3QNNdLuOfxIzlRJ2tdM8V HRoA== 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=laBTRAnhUqYkkWxlzGzSELGQ267uzqchU3TV+3waw3g=; b=aFWGNxmeQgrIQRqtnm+c0Szx8MgpyyBkm8PPPta0TxFAsquMVFrktieAWe4+94G/W2 nPpIKtFqgIRA2MU4mbfffpoC/Umrm1pfRwjzoAk9S/ay9N0suyfjMmx3OVON5HwXP+HU /ksOFgPdm9yjsKSJAJiutXPVoreGIh7iR9z9j44nnqXTQy2tJS56DB70MRNMmvk4m/f+ oUi3t+asvagHNrwlhv4zOSSStlMGcOnsaz6HoSDy4lhxsPtcrhAoIUbmjFhckko2on9Z 3Z6jQzlOJgnongFekKzT89D//D2+HNiRNJaQ8E+/3RWfVC41Dv6MXJJmIwGhMe7+M065 AuBA== X-Gm-Message-State: AOAM530J9p3nU/Bvl/bmZsxMKfIw32veqlyC9EbMsIzleLYOWR3UjS57 OahwkXgo+HXZyLFD6LAgnIO6Cg== X-Received: by 2002:adf:e991:: with SMTP id h17mr538534wrm.265.1621268419094; Mon, 17 May 2021 09:20:19 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s18sm7551429wra.80.2021.05.17.09.20.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A47221FFAF; Mon, 17 May 2021 17:10:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 26/29] plugins: Update qemu-plugins.symbols to match qemu-plugins.h Date: Mon, 17 May 2021 17:10:19 +0100 Message-Id: <20210517161022.13984-27-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.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: Yonggang Luo , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Yonggang Luo Reorder the function symbols that consistence with qemu-plugins.h Signed-off-by: Yonggang Luo Signed-off-by: Alex Bennée Message-Id: <20210318185555.434-2-luoyonggang@gmail.com> Message-Id: <20210505092259.8202-2-alex.bennee@linaro.org> -- 2.20.1 diff --git a/plugins/qemu-plugins.symbols b/plugins/qemu-plugins.symbols index 4bdb381f48..a0ac1df62a 100644 --- a/plugins/qemu-plugins.symbols +++ b/plugins/qemu-plugins.symbols @@ -5,35 +5,34 @@ qemu_plugin_register_vcpu_exit_cb; qemu_plugin_register_vcpu_idle_cb; qemu_plugin_register_vcpu_resume_cb; - qemu_plugin_register_vcpu_insn_exec_cb; - qemu_plugin_register_vcpu_insn_exec_inline; - qemu_plugin_register_vcpu_mem_cb; - qemu_plugin_register_vcpu_mem_haddr_cb; - qemu_plugin_register_vcpu_mem_inline; - qemu_plugin_ram_addr_from_host; qemu_plugin_register_vcpu_tb_trans_cb; qemu_plugin_register_vcpu_tb_exec_cb; qemu_plugin_register_vcpu_tb_exec_inline; - qemu_plugin_register_flush_cb; - qemu_plugin_register_vcpu_syscall_cb; - qemu_plugin_register_vcpu_syscall_ret_cb; - qemu_plugin_register_atexit_cb; + qemu_plugin_register_vcpu_insn_exec_cb; + qemu_plugin_register_vcpu_insn_exec_inline; qemu_plugin_tb_n_insns; - qemu_plugin_tb_get_insn; qemu_plugin_tb_vaddr; + qemu_plugin_tb_get_insn; qemu_plugin_insn_data; qemu_plugin_insn_size; qemu_plugin_insn_vaddr; qemu_plugin_insn_haddr; - qemu_plugin_insn_disas; qemu_plugin_mem_size_shift; qemu_plugin_mem_is_sign_extended; qemu_plugin_mem_is_big_endian; qemu_plugin_mem_is_store; qemu_plugin_get_hwaddr; qemu_plugin_hwaddr_is_io; - qemu_plugin_hwaddr_to_raddr; + qemu_plugin_hwaddr_phys_addr; + qemu_plugin_hwaddr_device_name; + qemu_plugin_register_vcpu_mem_cb; + qemu_plugin_register_vcpu_mem_inline; + qemu_plugin_register_vcpu_syscall_cb; + qemu_plugin_register_vcpu_syscall_ret_cb; + qemu_plugin_insn_disas; qemu_plugin_vcpu_for_each; + qemu_plugin_register_flush_cb; + qemu_plugin_register_atexit_cb; qemu_plugin_n_vcpus; qemu_plugin_n_max_vcpus; qemu_plugin_outs; From patchwork Mon May 17 16:10:20 2021 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: 440168 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1259039jac; Mon, 17 May 2021 09:49:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwr0l9MfUO6xVNixHCyyXH3HPENrZXFRyh3rGQS4ozUCI9C6ajCg/C8TL/1RJfIZ5zJkQHy X-Received: by 2002:a5d:9644:: with SMTP id d4mr775896ios.84.1621270197977; Mon, 17 May 2021 09:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621270197; cv=none; d=google.com; s=arc-20160816; b=V5gf+0dbRP/QtFWTvg3GqPB/2gxiJWSbwEebNBIBB/lRRZbjciNoZzGIy1CfZRBvcG p4n70Pis5/XZF4sCH1TTHpUpuuwogSXKPG61To1tOJumC5QenE4o0qCmVp1G36tuBDDw we5tbd9uXhuCxrGhtTHHabHNl9NTPXnfEhF3ZjODf8+OFTOl7YoFvokk7hMmEaQyrtWo sAfLZ4HbH2svIKNPNSYOo8F5FAGlJtrtlSuNf/4Bm7vPgVWm8z5/9lmJrydumO7oRTvC dhHxbIwIcN7i7AsMcxK5E9e8BNi8hckXJLg5QQJzhA94VSOVmMZD92ZQpFQWq2G5CIzn OfMw== 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=W7tjTvDwpWeS7WRwmPx5p6DYd0bz3KPUyEjh0yy6O08=; b=wL/V8MyKzVu+39xFpaiASdIR1LSVaONoisuWZ+KnCL8kzdUpNOd0mNpTpV9BggPN71 pTuN28sClgGogbUgJN67N9Qr38pKpWVeSBKm4iumOumQkIJsB0synZQ4EZm1kObNVQcc 10vu+npd0JTg5Dqv0jIPd0DuExcHfWDU1yDEAYRs5VGamQyN3MAI36RPwWJ3+Egb0noE s7M+FygIEWZiaMuji1FmnX1KM/CV1R2Q/P1XjKVN+8uRHw/S1IqNS9OJ+j5Md86rsBXM BgcZcRIgirRkuxB2DWVdqG9nCkM/65r1mEYPGv6Xs7vcr8R0Xis1dBeqcgoOfX9xknQ3 0LZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=N7WKU6lv; 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 x4si8473648ilm.150.2021.05.17.09.49.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:49: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=N7WKU6lv; 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]:43286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligRJ-0007hI-AY for patch@linaro.org; Mon, 17 May 2021 12:49:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyp-0001mJ-NK for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:32 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:42610) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyg-0002B6-JL for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:27 -0400 Received: by mail-wr1-x42e.google.com with SMTP id x8so7035984wrq.9 for ; Mon, 17 May 2021 09:20:21 -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=W7tjTvDwpWeS7WRwmPx5p6DYd0bz3KPUyEjh0yy6O08=; b=N7WKU6lvxE7z/9mK6cVnNVSyu81zH7h2ofEcLmiJkm+Cfd2vMLrdOWTzunkCkKHyfh sVVORNdrYREn7R2NOWVYy+KqleyogWs/E//7oiTLVWanOVOBoPUErETGum2NFJb9Rctw qtHMC/GY+fZLTYRaj+Ambj1SAXwS3MgCdFEeTXsxgB7BMg+y3mEfYAPROgnl/vcQd9tB EjtYhub4MfTtQ6XOtLnJiki2TLROl28qnV9OqLrxd9bsrqBZsm7oow/qUMSudn0N+Jpm QykHEpzkbr+Ls5D700yDA1oXrObMcoBI4ew3Rl2GLnMrPm7HVTe/Cu0+xasze3Xq7O8Z WpWw== 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=W7tjTvDwpWeS7WRwmPx5p6DYd0bz3KPUyEjh0yy6O08=; b=lB3U6PhU2pr63XummyPBGrFcjpM/D9nbXPrnW2ZTng9fz5h93Kr6A2ohbCn5SnVSGD LjUYvGfM8fXK9nQE/HJRFJGPaMJSEVbKi6pev25VoBwp5WJ0VD/W9i5FejU+SDqbuoTW psMVMAdP9JQkz/pG+FY6zQVhH0IFzgsHl853GWBqBjUtIMSHoiubXRG3yUV83mf+pPzi jLC0dCLz2Jj1iVk9M3l+B5vPdLM0E0ZoleSrZL9UohrRDPgGhu7foQu4lWufa0XALjlx CoLuVhFcePHQDt87PTUGJdcX+vn8zcm+zPY0MN0IbIbFVWlERxd7QQDDMhSR0Lz1zqaJ cyyw== X-Gm-Message-State: AOAM532ENdP/nSQcTryc8ihog8S+Wzm8jsCDUdu95REZab+WDA1dcMJU LgOBsO1HXDmCEM08obn5Odjvow== X-Received: by 2002:adf:e38c:: with SMTP id e12mr580800wrm.128.1621268420071; Mon, 17 May 2021 09:20:20 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f14sm5599450wry.40.2021.05.17.09.20.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BBFD81FFB1; Mon, 17 May 2021 17:10:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 27/29] plugins: Move all typedef and type declaration to the front of the qemu-plugin.h Date: Mon, 17 May 2021 17:10:20 +0100 Message-Id: <20210517161022.13984-28-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 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: Yonggang Luo , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Yonggang Luo Signed-off-by: Yonggang Luo Signed-off-by: Alex Bennée Message-Id: <20210318185555.434-3-luoyonggang@gmail.com> Message-Id: <20210505092259.8202-3-alex.bennee@linaro.org> -- 2.20.1 diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 97cdfd7761..2cb17f3051 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -81,27 +81,6 @@ typedef struct qemu_info_t { }; } qemu_info_t; -/** - * qemu_plugin_install() - Install a plugin - * @id: this plugin's opaque ID - * @info: a block describing some details about the guest - * @argc: number of arguments - * @argv: array of arguments (@argc elements) - * - * All plugins must export this symbol which is called when the plugin - * is first loaded. Calling qemu_plugin_uninstall() from this function - * is a bug. - * - * Note: @info is only live during the call. Copy any information we - * want to keep. @argv remains valid throughout the lifetime of the - * loaded plugin. - * - * Return: 0 on successful loading, !0 for an error. - */ -QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, - const qemu_info_t *info, - int argc, char **argv); - /** * typedef qemu_plugin_simple_cb_t - simple callback * @id: the unique qemu_plugin_id_t @@ -135,6 +114,98 @@ typedef void (*qemu_plugin_vcpu_simple_cb_t)(qemu_plugin_id_t id, typedef void (*qemu_plugin_vcpu_udata_cb_t)(unsigned int vcpu_index, void *userdata); +/** struct qemu_plugin_tb - Opaque handle for a translation block */ +struct qemu_plugin_tb; +/** struct qemu_plugin_insn - Opaque handle for a translated instruction */ +struct qemu_plugin_insn; + +/** + * enum qemu_plugin_cb_flags - type of callback + * + * @QEMU_PLUGIN_CB_NO_REGS: callback does not access the CPU's regs + * @QEMU_PLUGIN_CB_R_REGS: callback reads the CPU's regs + * @QEMU_PLUGIN_CB_RW_REGS: callback reads and writes the CPU's regs + * + * Note: currently unused, plugins cannot read or change system + * register state. + */ +enum qemu_plugin_cb_flags { + QEMU_PLUGIN_CB_NO_REGS, + QEMU_PLUGIN_CB_R_REGS, + QEMU_PLUGIN_CB_RW_REGS, +}; + +enum qemu_plugin_mem_rw { + QEMU_PLUGIN_MEM_R = 1, + QEMU_PLUGIN_MEM_W, + QEMU_PLUGIN_MEM_RW, +}; + +/** + * typedef qemu_plugin_vcpu_tb_trans_cb_t - translation callback + * @id: unique plugin id + * @tb: opaque handle used for querying and instrumenting a block. + */ +typedef void (*qemu_plugin_vcpu_tb_trans_cb_t)(qemu_plugin_id_t id, + struct qemu_plugin_tb *tb); + +/** + * enum qemu_plugin_op - describes an inline op + * + * @QEMU_PLUGIN_INLINE_ADD_U64: add an immediate value uint64_t + * + * Note: currently only a single inline op is supported. + */ + +enum qemu_plugin_op { + QEMU_PLUGIN_INLINE_ADD_U64, +}; + +/** + * typedef qemu_plugin_meminfo_t - opaque memory transaction handle + * + * This can be further queried using the qemu_plugin_mem_* query + * functions. + */ +typedef uint32_t qemu_plugin_meminfo_t; +/** struct qemu_plugin_hwaddr - opaque hw address handle */ +struct qemu_plugin_hwaddr; + +typedef void +(*qemu_plugin_vcpu_mem_cb_t)(unsigned int vcpu_index, + qemu_plugin_meminfo_t info, uint64_t vaddr, + void *userdata); + +typedef void +(*qemu_plugin_vcpu_syscall_cb_t)(qemu_plugin_id_t id, unsigned int vcpu_index, + int64_t num, uint64_t a1, uint64_t a2, + uint64_t a3, uint64_t a4, uint64_t a5, + uint64_t a6, uint64_t a7, uint64_t a8); +typedef void +(*qemu_plugin_vcpu_syscall_ret_cb_t)(qemu_plugin_id_t id, unsigned int vcpu_idx, + int64_t num, int64_t ret); + +/** + * qemu_plugin_install() - Install a plugin + * @id: this plugin's opaque ID + * @info: a block describing some details about the guest + * @argc: number of arguments + * @argv: array of arguments (@argc elements) + * + * All plugins must export this symbol which is called when the plugin + * is first loaded. Calling qemu_plugin_uninstall() from this function + * is a bug. + * + * Note: @info is only live during the call. Copy any information we + * want to keep. @argv remains valid throughout the lifetime of the + * loaded plugin. + * + * Return: 0 on successful loading, !0 for an error. + */ +QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, + const qemu_info_t *info, + int argc, char **argv); + /** * qemu_plugin_uninstall() - Uninstall a plugin * @id: this plugin's opaque ID @@ -205,41 +276,6 @@ void qemu_plugin_register_vcpu_idle_cb(qemu_plugin_id_t id, void qemu_plugin_register_vcpu_resume_cb(qemu_plugin_id_t id, qemu_plugin_vcpu_simple_cb_t cb); -/** struct qemu_plugin_tb - Opaque handle for a translation block */ -struct qemu_plugin_tb; -/** struct qemu_plugin_insn - Opaque handle for a translated instruction */ -struct qemu_plugin_insn; - -/** - * enum qemu_plugin_cb_flags - type of callback - * - * @QEMU_PLUGIN_CB_NO_REGS: callback does not access the CPU's regs - * @QEMU_PLUGIN_CB_R_REGS: callback reads the CPU's regs - * @QEMU_PLUGIN_CB_RW_REGS: callback reads and writes the CPU's regs - * - * Note: currently unused, plugins cannot read or change system - * register state. - */ -enum qemu_plugin_cb_flags { - QEMU_PLUGIN_CB_NO_REGS, - QEMU_PLUGIN_CB_R_REGS, - QEMU_PLUGIN_CB_RW_REGS, -}; - -enum qemu_plugin_mem_rw { - QEMU_PLUGIN_MEM_R = 1, - QEMU_PLUGIN_MEM_W, - QEMU_PLUGIN_MEM_RW, -}; - -/** - * typedef qemu_plugin_vcpu_tb_trans_cb_t - translation callback - * @id: unique plugin id - * @tb: opaque handle used for querying and instrumenting a block. - */ -typedef void (*qemu_plugin_vcpu_tb_trans_cb_t)(qemu_plugin_id_t id, - struct qemu_plugin_tb *tb); - /** * qemu_plugin_register_vcpu_tb_trans_cb() - register a translate cb * @id: plugin ID @@ -269,18 +305,6 @@ void qemu_plugin_register_vcpu_tb_exec_cb(struct qemu_plugin_tb *tb, enum qemu_plugin_cb_flags flags, void *userdata); -/** - * enum qemu_plugin_op - describes an inline op - * - * @QEMU_PLUGIN_INLINE_ADD_U64: add an immediate value uint64_t - * - * Note: currently only a single inline op is supported. - */ - -enum qemu_plugin_op { - QEMU_PLUGIN_INLINE_ADD_U64, -}; - /** * qemu_plugin_register_vcpu_tb_exec_inline() - execution inline op * @tb: the opaque qemu_plugin_tb handle for the translation @@ -393,16 +417,6 @@ uint64_t qemu_plugin_insn_vaddr(const struct qemu_plugin_insn *insn); */ void *qemu_plugin_insn_haddr(const struct qemu_plugin_insn *insn); -/** - * typedef qemu_plugin_meminfo_t - opaque memory transaction handle - * - * This can be further queried using the qemu_plugin_mem_* query - * functions. - */ -typedef uint32_t qemu_plugin_meminfo_t; -/** struct qemu_plugin_hwaddr - opaque hw address handle */ -struct qemu_plugin_hwaddr; - /** * qemu_plugin_mem_size_shift() - get size of access * @info: opaque memory transaction handle @@ -480,11 +494,6 @@ uint64_t qemu_plugin_hwaddr_phys_addr(const struct qemu_plugin_hwaddr *haddr); */ const char *qemu_plugin_hwaddr_device_name(const struct qemu_plugin_hwaddr *h); -typedef void -(*qemu_plugin_vcpu_mem_cb_t)(unsigned int vcpu_index, - qemu_plugin_meminfo_t info, uint64_t vaddr, - void *userdata); - void qemu_plugin_register_vcpu_mem_cb(struct qemu_plugin_insn *insn, qemu_plugin_vcpu_mem_cb_t cb, enum qemu_plugin_cb_flags flags, @@ -496,21 +505,9 @@ void qemu_plugin_register_vcpu_mem_inline(struct qemu_plugin_insn *insn, enum qemu_plugin_op op, void *ptr, uint64_t imm); - - -typedef void -(*qemu_plugin_vcpu_syscall_cb_t)(qemu_plugin_id_t id, unsigned int vcpu_index, - int64_t num, uint64_t a1, uint64_t a2, - uint64_t a3, uint64_t a4, uint64_t a5, - uint64_t a6, uint64_t a7, uint64_t a8); - void qemu_plugin_register_vcpu_syscall_cb(qemu_plugin_id_t id, qemu_plugin_vcpu_syscall_cb_t cb); -typedef void -(*qemu_plugin_vcpu_syscall_ret_cb_t)(qemu_plugin_id_t id, unsigned int vcpu_idx, - int64_t num, int64_t ret); - void qemu_plugin_register_vcpu_syscall_ret_cb(qemu_plugin_id_t id, qemu_plugin_vcpu_syscall_ret_cb_t cb); From patchwork Mon May 17 16:10:21 2021 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: 440151 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1235956jac; Mon, 17 May 2021 09:20:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZQAIZwxVS5npo+69HZYENgYo7ewMykF4kvnBpeIPB14/KwkdVlBjdYGW9kDNsrwqr5sqq X-Received: by 2002:a05:6e02:c5:: with SMTP id r5mr446116ilq.48.1621268459040; Mon, 17 May 2021 09:20:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621268459; cv=none; d=google.com; s=arc-20160816; b=mIcTaQvlFmADpwiD9gFPQXFDfmdBV6xYJ0yZHRh8dQ0asuXQGOuSTEnjJAxGiyeott 8otRTzaMo6+Hf3SUD3g4Vqt78DsyAIJilUK/7W2pJMInNclX9Sj8w9zxem8IvR+ih0f2 y0jh3NPDN/RHAfzI6Z+2HHgDThKG6VzQMw7xnna5W4CTCCOQ8SBAbg+x+aRSxFm3K6oS ug/LWeyI7Qk5yY5TM2jVItW2dtZhYjY5MklqlSruWr5e4ijmQtRkyAm9jcXKJ5NrYPG3 PzKqOz1Do5Oj/F4Qq8AwYmyt+Dt1O9k8WH2yfq9WOk7daWqOQVDjyp1kGtsra0CVqhd9 xSaw== 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=50j4O5HpF3lWjOwIwMIUVpGBggucg+cBxQSDFU6ktaY=; b=fWxT5GS2B8oHjNxplwDEX+s5/vTYvb6h8flpmfrp/VmgRc2KZLN54mUqLC3ldKc3zd hzeI04GxDQiPBmHcgotTAnO4JtKLM9JF38aYYOOlcj4o4DZHz5BBjaeEhHJX7zgH+ubZ 4FJS7eLM+9v4gNCDi1HPkpGuHUuWM2yz2AKoMSbhWpz+gEq3dB89iRzknhmN5NwvL5LW 5gpOzIzgS8Q9xc0VDH4xz1PnCSOUCv4Mlw8+hA43n4RdCRDTMZvFyevNjsA3OAj3NHa4 Q/GXFbBROT4/XC85dSoEpz7xNqKL0wJFUqjiHWnV3BXRx0D5LhcCV/CpL7UEvTZzFavn qpXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=KzOcjwKR; 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 m1si20534217ilu.13.2021.05.17.09.20.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:20:59 -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=KzOcjwKR; 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]:60170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lifzG-0001mv-Ct for patch@linaro.org; Mon, 17 May 2021 12:20:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyj-0001jn-5l for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:26 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:55809) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyX-00025F-76 for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:24 -0400 Received: by mail-wm1-x329.google.com with SMTP id b7so3319118wmh.5 for ; Mon, 17 May 2021 09:20:12 -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=50j4O5HpF3lWjOwIwMIUVpGBggucg+cBxQSDFU6ktaY=; b=KzOcjwKRx8HvVdwe+nX2EAot4dNihCmshqBCRhupJOhjH4Zk23y7H3X8t0SS6PJYoz Zi1G1DSkzm7UrTVMZ+qY1g2A1oD0KCao+e1DXTKKPCY+6UZY43zoXXo9kdKrQ5XWj9Rf mNcJ9NFFgP1nGUVCmYFgYymWQSst6E14jYp+PsByT/RMYwp4MjkEV749k45o67STO9+9 C1zXAFfahGkVCVnVESzu95lEk4fSC2b5LsgdLDG6R9ka20Zq7sf+46R5VyNz47BImg2O 1pJ96Ufiycn8DamMdy5+CqmW3pk0cZ3lzz09Cu/315nAm8YFx1DCg51lmQ8RZcnh5Txc nu4Q== 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=50j4O5HpF3lWjOwIwMIUVpGBggucg+cBxQSDFU6ktaY=; b=S5VbzEATVRqDluPcgHfuXO9wUd4L7liSFdd24jbBJ/u4kOvuadumdb0XY7RDZq10Dt FAQnaHShrRYGMfk9u+R9xzbFXqmLDKkA/18+LUvZNntI6B2Oy0A+regUoembrmlM+Vpv k+9y4radeJ3LydUXkhAegsc4xqydKrbHCt0HSMT3c8SVrgj4AIMqg0M+FmcUWEW7vFC2 hc+OQylGoNrxVcu8fo4r3QTQbKmyY3UruczO6RNO2HCroWha9CRzW+YPekkIWjnLdurm YPQ2MeWYFU/ejG7KExCskeIFqAcJgSdp9WaeSKHJ8k+qWQkSFBzhCm2DtM6fm2+Zifhe BUcQ== X-Gm-Message-State: AOAM532RWJk1A+qaheIXZwxPbEzZQIAvRh57VZ6LXscA9egesxDlj2pH t0p/Cqlx0dJJW2ugo3mXXuyDyQ== X-Received: by 2002:a7b:c182:: with SMTP id y2mr424951wmi.125.1621268411830; Mon, 17 May 2021 09:20:11 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r11sm12061267wrp.46.2021.05.17.09.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:07 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D3A4A1FFB3; Mon, 17 May 2021 17:10:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 28/29] plugins/hotblocks: Properly freed the hash table values Date: Mon, 17 May 2021 17:10:21 +0100 Message-Id: <20210517161022.13984-29-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.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: Mahmoud Mandour , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Mahmoud Mandour Freed the values stored in the hash table ``hotblocks`` returned by ``g_hash_table_get_values()`` by freeing the sorted list and destroyed the hash table afterward. Signed-off-by: Mahmoud Mandour Signed-off-by: Alex Bennée Message-Id: <20210422005043.3569-2-ma.mandourr@gmail.com> Message-Id: <20210505092259.8202-4-alex.bennee@linaro.org> -- 2.20.1 diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 4b08340143..64692c0670 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -68,10 +68,11 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) rec->insns, rec->exec_count); } - g_list_free(it); + g_list_free_full(it, g_free); g_mutex_unlock(&lock); } + g_hash_table_destroy(hotblocks); qemu_plugin_outs(report->str); } From patchwork Mon May 17 16:10:22 2021 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: 440170 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp1263730jac; Mon, 17 May 2021 09:56:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8pn2o+5UeTS7Uh6f+gYexLIkkfnXfgjzVZ2TNl8qzDWyHvepxckrRlj2pxHXkoMMylpQ+ X-Received: by 2002:a9d:748d:: with SMTP id t13mr437203otk.296.1621270561348; Mon, 17 May 2021 09:56:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621270561; cv=none; d=google.com; s=arc-20160816; b=dFpKpBIoaCx/V5JEAhQc9QYxKLmlvuJ6TOyMA1+bdgmzoyWbBXWmxMnGVoO7ix5enO 8hjvT/xbR7WQpeoRB1s3UKEnCh1Y78bHhxDNFwGKfXQiXD1+AO61zSOlVZw9F3JxaqTd mmTW3Wu7usyfsc4BRYQ3k0tmdeXrnvs70EszxvgeDF92WnVJFl6s2XeLMatSjbmTYmKL mtkd3loT/VbQzT9hmxQRr6xyakm0cU8WDT4vevOFtxPX/ApR2bUXUpdwMcRxqUGJhOdg p9AxybAw27Lm9UpPG56QcKKw3RGIbJVRXCUj8Il0CqSI2mD5KPp4HjU8KLgiUDEslx8M ICqw== 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=aZuDUoz3vNGYexV1AEzGlzVlTs4kTeswm8li9GZxIko=; b=ZnVZDcakxi7160JvmvolRgWO0Ea/Mn2oFo9Vnpu7h9QijYlY8OZjCGFrRKEO+12Amn Bcf/LCdmv7GzkRvz6Dfa5sjfWbYdP5YtgwkQ3gUwI92qWFL2groc0r1Hgxflrj7eCb2H 9AKipfCg2Ur5eBeT91lj5xbsT8tZS9XS6M9ptNJRhJgqKhcnpXckXhbp20Gtwajcm7z8 dNc07UroQGyJqseRgaXhJXgL7vHaDRlgu3WXIpyS1c+jOMgqNj8gaHEcGE4Rph8P6Xds oMOsolL5omxtzzpG2d/OQPCjCoonYhOOez5O6mbK/cJuvu0SpceoKjBQxclPSXWgJjfm wW/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JV7tltDS; 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 w28si14789188oti.83.2021.05.17.09.56.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 May 2021 09:56:01 -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=JV7tltDS; 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]:59464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ligXA-00028A-Qk for patch@linaro.org; Mon, 17 May 2021 12:56:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lifyr-0001om-3M for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:33 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:42596) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lifyi-0002DT-RN for qemu-devel@nongnu.org; Mon, 17 May 2021 12:20:32 -0400 Received: by mail-wm1-x32b.google.com with SMTP id f75-20020a1c1f4e0000b0290171001e7329so3952654wmf.1 for ; Mon, 17 May 2021 09:20:23 -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=aZuDUoz3vNGYexV1AEzGlzVlTs4kTeswm8li9GZxIko=; b=JV7tltDSdSR9KmszjToHv6VBlamZSzMvBvKcaPronfV5LOmDnZVCqwlytyO+ha9CTb Bp9U1AQtHl6gT4CusHJp0A6lsy2w0TpNhDQJpgA92L/Md202XA7AT2GaiMPwV1ILJ1eR 5+DtnWDNuDE4lLDRiIHAc/MzF/cwl3WuaJEpnvPovanYvGLzAfLseIcTwfVT9kIw77kk neq00oaA9dMzGG9xraxEGlrKBs5L9vr/n4P5Gam8krGIrKur7sViX3BxiutL6V9jGOBW 50/5yGUwAvP1KZEbf3tGNSFiQt5XGmeuO8uuY92R/h64MLd/M7d3/mY97br4Km4HJTX6 VGuQ== 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=aZuDUoz3vNGYexV1AEzGlzVlTs4kTeswm8li9GZxIko=; b=gpYRa/wwC+/ZuCu0zFa21rMuFMZwYgWCkDTc7WOszv/sFOoz40/ofErXSbFNzGA7BM VloQ3bL0sG8VhO56fy5gMhHNwnFYQghEBfDU/Gq4+FVDpi8rv00RWmlH4csaRqPq9VOF VJGJD+gnM76ruJC/IwfxN/7+lebOZVtv1EJuIgGwJS45KEdOlUNcE+W8YUjllfgVvTR3 7C0WCgfrtc41Oqi2dBLb68E85FcWXkMIoKypjGHgBSJKDXRPBU49qZc+jsCgk0tNnCVe 2yMBJSB8FJbNp4hTDtIChVnqyN+HgDpTHMIO0dHvX5whz+Ai1xM3TJsYS+M0zMamS6Hy dRCQ== X-Gm-Message-State: AOAM530QUoVL1+xzz1R3W/9BgiLE23oOHJ90sRSmynVuB+qzxJN1Lm0X 3amthcFy3+clLJ3n1kKvdb1e4g== X-Received: by 2002:a1c:e408:: with SMTP id b8mr441275wmh.85.1621268422887; Mon, 17 May 2021 09:20:22 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r1sm2333011wrt.67.2021.05.17.09.20.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 09:20:14 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EA6601FFB4; Mon, 17 May 2021 17:10:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 29/29] plugins/hotpages: Properly freed the hash table values Date: Mon, 17 May 2021 17:10:22 +0100 Message-Id: <20210517161022.13984-30-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210517161022.13984-1-alex.bennee@linaro.org> References: <20210517161022.13984-1-alex.bennee@linaro.org> MIME-Version: 1.0 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: Mahmoud Mandour , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Mahmoud Mandour Allocated ``pages`` hash table through ``g_hash_table_new_full`` to add a freeing function & destroyed the hash table on exit. Signed-off-by: Mahmoud Mandour Signed-off-by: Alex Bennée Message-Id: <20210422005043.3569-3-ma.mandourr@gmail.com> Message-Id: <20210505092259.8202-5-alex.bennee@linaro.org> -- 2.20.1 diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c index bf53267532..9cf7f02c77 100644 --- a/contrib/plugins/hotpages.c +++ b/contrib/plugins/hotpages.c @@ -97,13 +97,14 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) g_list_free(it); } + g_hash_table_destroy(pages); qemu_plugin_outs(report->str); } static void plugin_init(void) { page_mask = (page_size - 1); - pages = g_hash_table_new(NULL, g_direct_equal); + pages = g_hash_table_new_full(NULL, g_direct_equal, NULL, g_free); } static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo,