From patchwork Fri Jan 15 13:07: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: 363618 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp277728jap; Fri, 15 Jan 2021 05:09:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3f5UfPkuxTnyksEi4+k7/1F3vLJVW3dQNnPpSFAsgIeIbQPJwAuaqfEbgzPlD0ACrkvdU X-Received: by 2002:a25:db91:: with SMTP id g139mr17907033ybf.48.1610716148858; Fri, 15 Jan 2021 05:09:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610716148; cv=none; d=google.com; s=arc-20160816; b=jrTX2ffr9Bzzphqi2iiqGvOT+SGkxelE2laF6xSvTJPSXXm2zX96sFk3ptvVO7Vs2T Lq/4+4k1VYjbJYNADehVn2yho0WpouN3YuoyKEjFAZyRZuT4SvMXD850sym160+BMOjn Hd6zsR4mOQcisCRWAAmF82ePrlbfAI7koR+u1vOuE634ODqT6C4D/AWKXx65pdZDtECd nk0TtTuq6E1JEqUS0TSDgq0tJjkldtVGlyytw8YYJexc+5Vs5w3zf4E9HcPDPmK3UttY TGUrX+06v17rq3wziXkI8Ca4aAHFhv+IzIlhJfY7BpumtDsbfguURy8piL56TeFjJNJb 87Sg== 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=qCfmMpKgkFsOUU7euaB6kPeimG9lO3ftqeOAgTO8Ito=; b=aO068tRoYTxphlObzuAeKPGE7X2xJhh6nqyIeoHF1jBYPYzHX64amP5jGfF+1HNBHk 3KxOKIXtBqqFqN4K4MqxSVxkUpKiOKmH6x7c3AHOSuMwsa04+XVdL0cGoygZJwxTuFW5 9L8nJye/V03oyR2SmnSFop9c80v9l2ZGO3jbhhhRbc0w4Gb/jMT2pqN5Pw5NHXZn4PW4 Isn2LTNqaiYQKHys7/MyBUNughl1Ne3XQJ17QZSpRqAppDwQRbqnJqxvRCyC7uVeqXUt LugfrDqKFYjiDgExlmLXCa9W4yc8gAIytGwpOayYjr3Lz4FxVE1hLgPdhhg375X7LAuS K7gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JdOtiKmH; 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 x63si9501106ybh.326.2021.01.15.05.09.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:09:08 -0800 (PST) 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=JdOtiKmH; 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]:50718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Oqi-00069N-97 for patch@linaro.org; Fri, 15 Jan 2021 08:09:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0OqG-00068j-PD for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:08:41 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:38747) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0Oq9-0006UA-0N for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:08:38 -0500 Received: by mail-wr1-x42c.google.com with SMTP id a9so5763660wrt.5 for ; Fri, 15 Jan 2021 05:08:32 -0800 (PST) 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=qCfmMpKgkFsOUU7euaB6kPeimG9lO3ftqeOAgTO8Ito=; b=JdOtiKmHmuSn7kKTMPmw5l9UnyULSNbn4x5VsaA2vBIHAxx0UGWzknRLCOBLmkn9By z3KwkNKAl2iQvhGV/t1Vc1tzl1BekSV+mPUwxmMUinoIgfQi6pn5LXGie92JtQfBhWU6 InZXl9AgBSEZpBpVQYJ/ypXzbZ0Z6klmfvoW10YbNVP1TOkCL1NOkD+IPaUyRwOIIR1L aLDV6sbBVjybBqDRkniSGIVfaoHkrOF6kzW117c1DvDcwqx4urVPVQb2M9IXxXIrvICz vmNltnBD3IEHgthGXNU9oY1PJqRKxUhxhjx0PagAvwu4T6XgjEll+Sa7vhvkjz35zPPa FBDQ== 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=qCfmMpKgkFsOUU7euaB6kPeimG9lO3ftqeOAgTO8Ito=; b=MdAvqjIfa3GSIjMVOexkNl93H1FltO0ekjI7P+1VRehBnddnySq42kFsS++Sc1venE Pf32BNqVGGQn2LxQi8780C4+7QkQVfnwE0UniRTTLzTLJ5wa9ipYHC2D+oco22DIYzU/ TY3toRsXZJi5+DprL1AowQuefydyFriGODJVrGCsLUncqnqdOyya0l7aYZ1Qpc58AtSv cKtIH+SbvuiKRrWRGqLDBE66sHsrg/BEA7iPsCExgGCZWR0qmgdoX5FvE7yNGwPKrGM9 7cWErtwWWfP37UhZFBDmn9g6g6yX7/XepMGPHAvrnziy1fxb4aV4JxJRtWoezcHUo1rC 83hw== X-Gm-Message-State: AOAM532FJo/7x0+6MnF/URgWh3f2FGGyunRoqT6CcUJKVeQ98ILv7F44 8Hkeqx+VQyyKzq3sVtZDFNkzpw== X-Received: by 2002:adf:82c5:: with SMTP id 63mr13223373wrc.38.1610716111315; Fri, 15 Jan 2021 05:08:31 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id l16sm15097652wrx.5.2021.01.15.05.08.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:08:29 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DFEE31FF87; Fri, 15 Jan 2021 13:08:28 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 01/30] tests/docker: Remove Debian 9 remnant lines Date: Fri, 15 Jan 2021 13:07:59 +0000 Message-Id: <20210115130828.23968-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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: Fam Zheng , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Debian 9 base container has been removed in commits e3755276d1f and c9d78b06c06. Remove the last remnants. Fixes: e3755276d1f ("tests/docker: Remove old Debian 9 containers") Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Willian Rampazzo Message-Id: <20210107072933.3828450-1-f4bug@amsat.org> Message-Id: <20210114165730.31607-2-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index c254ac38d0..0779dab5b9 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -108,7 +108,6 @@ ifneq ($(HOST_ARCH),x86_64) DOCKER_PARTIAL_IMAGES += debian-mips-cross debian-mipsel-cross debian-mips64el-cross DOCKER_PARTIAL_IMAGES += debian-ppc64el-cross DOCKER_PARTIAL_IMAGES += debian-s390x-cross -DOCKER_PARTIAL_IMAGES += debian-win32-cross debian-win64-cross DOCKER_PARTIAL_IMAGES += fedora travis endif From patchwork Fri Jan 15 13:08: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: 363620 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp277771jap; Fri, 15 Jan 2021 05:09:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJyuOQONW4OFuumip2j0Z57+tUDsHm3Ed8wckUQ2GbAeejtcj0FIaoSb8Xzl69mrQVEd1+dR X-Received: by 2002:a25:d7d7:: with SMTP id o206mr134884ybg.265.1610716152462; Fri, 15 Jan 2021 05:09:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610716152; cv=none; d=google.com; s=arc-20160816; b=vAvC+fV8dKwZSJKeWsRkoYuUo1ix9mTyRSuaYeUi8qXiPDzvrb3hmHpZq3Lw+6+G6q 9AlkpBGDPWRL24jk9tgiNgHaj31d+8YOS1IFd5thBGi1viAaejf0yAp+Zt+kkhUH9gJM zuM5w6329a97EKROVBa3u71ishxehKBuieXkOwejUh9BGhGAswYOPmJ7r+Zy+Jy1aRcU sJPTrGamUuKUArWcpDsUrREKJgN08Pv8WJls0eYQpyn61uP8uV9h1QInRD6xsTYC0lc+ +XcYFLMWwQNv1MZAVd5+qHsUToEktkfG2xDdkV1tZpfj2497oKgZJeJopSbs38ltrA+3 9niQ== 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=4D3wzMWDLF+Xh5usy9XjNnUkkh3/qWiSO7HsVwcUfl0=; b=Vr8EMyWT10UZ6uanJlat81VJZPBsn90Y0VmTjOMXeFem1UF2wFxXU5bdL2Gh1cfxgO mDxrEjljZ7psD4VjQe0LL9aDGhUSAn5RuQ+nvmSJ10lXYFsSMmAe41D89ItxjhXXvB5G W7DgwTfSP+fn4Xj9Z+LhZXuNGsagAzbjx2UyhWVxhCSjPbGMvYdfCTx7BCZmDSEDSjcA RWNC1L7nsN0DuBGw7QgW8D2xzjZ3bxVHFoRiTg/cykwaVKf+vKViyyUpNG7UWqN9XoQW nLzL2s8XlhRpmz1SBQpRvlS7VDwUy/KSjjDTbf7oE2Z8VlR7QECkbeRzlqzbDy/yFRJf NWVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=dRK0pVkK; 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 n197si8353466ybg.488.2021.01.15.05.09.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:09:12 -0800 (PST) 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=dRK0pVkK; 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]:50932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Oql-0006FI-TE for patch@linaro.org; Fri, 15 Jan 2021 08:09:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0OqL-0006D7-EP for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:08:45 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:34648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0OqG-0006W8-EW for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:08:45 -0500 Received: by mail-wr1-x430.google.com with SMTP id q18so9241562wrn.1 for ; Fri, 15 Jan 2021 05:08:38 -0800 (PST) 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=4D3wzMWDLF+Xh5usy9XjNnUkkh3/qWiSO7HsVwcUfl0=; b=dRK0pVkKOBbor4UIrUBgXdI5gYE+kWZiRj7Lwc9EcSYQu670sfLuPdKSqufdYO1yxX 649Ijtq0ONmcXj5Zm6IHSiWz9xMhBYdCWx107NBW/f57CqnqN6XCaogoJO4VEh8jPY6Q dzlHHkBWP4dY/ahfcwKxSWT/qzPxXUIXCaTO2UiZnojvpmH21Coh9r3ERur3Hi1Meo7V /pz35RfyfWK3FsNw0RVORKOxR6i2/1c/E2vjT8tEMit9OUTP5z2Cou7O93NiX6KBZnBQ ozg7mkjEXmWRa5eb3bC52+XLDpwKMXPQxFb5vgS2YTUMjzB3UFJmltcBw5Hcx4n8jFq0 D/pA== 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=4D3wzMWDLF+Xh5usy9XjNnUkkh3/qWiSO7HsVwcUfl0=; b=BEWm5zNbIXKe3le5it1i1f/4RKYhZcHghsXOYPTjfphd6aUbEY8bdgIqY4hKioaO6t hrB1f5oS1XoUPtegAtsegnvfqe2W0D0yE/Gqcrn/TnBlhSc0BUZSS7ObGxu9CYYabMsk WHrzH+d1z0ORjkR9K7OM9h18mDydiciX+HNixlrmZSzgbhwQx4/jk29yRQrUtSf2I9KF uxU7bJ/RKe/fr+Y7nTBL6SUIbwPHzrdiia4AQhrZkRbHnm+cxK0tEpnV0br1OEsgOCfo GD5M9yQ1q6C8keCYXMt2j9Wjc1uGgOC3AaU5H18UHfcVYuU2nfvfvI+dYoSMAW4xsCOU 3NUw== X-Gm-Message-State: AOAM533m5CGRSL7jXMeE9kTIw4CEfNGk/+ARo8SwE+cy03DN6TS8Xf1w UtDaWTkGPMuRE9lUEr2goRc8Bfm4DVQgCg== X-Received: by 2002:adf:dd92:: with SMTP id x18mr13258194wrl.311.1610716117508; Fri, 15 Jan 2021 05:08:37 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a8sm12627339wmd.6.2021.01.15.05.08.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:08:29 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2AD8C1FF8C; Fri, 15 Jan 2021 13:08:29 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 02/30] Makefile: add GNU global tags support Date: Fri, 15 Jan 2021 13:08:00 +0000 Message-Id: <20210115130828.23968-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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" GNU Global is another tags engine which is more like cscope in being able to support finding both references and definitions. You will be un-surprised to know it also integrates well with Emacs. The main benefit of integrating it into find-src-path is it takes less time to rebuild the database from scratch when you have a lot of build directories under your source tree. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210114165730.31607-3-alex.bennee@linaro.org> -- 2.20.1 diff --git a/Makefile b/Makefile index fb9923ff22..0c509a7704 100644 --- a/Makefile +++ b/Makefile @@ -253,6 +253,18 @@ ctags: rm -f "$(SRC_PATH)/"tags $(find-src-path) -exec ctags -f "$(SRC_PATH)/"tags --append {} + +.PHONY: gtags +gtags: + $(call quiet-command, \ + rm -f "$(SRC_PATH)/"GTAGS; \ + rm -f "$(SRC_PATH)/"GRTAGS; \ + rm -f "$(SRC_PATH)/"GPATH, \ + "GTAGS", "Remove old $@ files") + $(call quiet-command, \ + (cd $(SRC_PATH) && \ + $(find-src-path) | gtags -f -), \ + "GTAGS", "Re-index $(SRC_PATH)") + .PHONY: TAGS TAGS: rm -f "$(SRC_PATH)/"TAGS @@ -279,7 +291,7 @@ help: $(call print-help,all,Build all) $(call print-help,dir/file.o,Build specified target only) $(call print-help,install,Install QEMU, documentation and tools) - $(call print-help,ctags/TAGS,Generate tags file for editors) + $(call print-help,ctags/gtags/TAGS,Generate tags file for editors) $(call print-help,cscope,Generate cscope index) $(call print-help,sparse,Run sparse on the QEMU source) @echo '' diff --git a/.gitignore b/.gitignore index b32bca1315..75a4be0724 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,9 @@ cscope.* tags TAGS +GPATH +GRTAGS +GTAGS *~ *.ast_raw *.depend_raw From patchwork Fri Jan 15 13:08: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: 363625 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp281709jap; Fri, 15 Jan 2021 05:13:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0+GReXJgnx5Yc3AXw1JmT+Kp/c9fBqXBz83t0hoJRK8cwXEWhVyP32fz5o9z5ZQNoO4Ts X-Received: by 2002:a67:87cd:: with SMTP id j196mr8977571vsd.28.1610716430390; Fri, 15 Jan 2021 05:13:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610716430; cv=none; d=google.com; s=arc-20160816; b=q+CKW3aw8bj+5GjYghmtOgV1f5Pb3D+hyy2RtdYwGKfVQsq/GwIYA1nMNOo4eH777Q pODy/UOJWhoLSkUE4Nsw4SHW1tTdwZTG6/XuHwSqGzOyY8Bv5HCGI/o4LnJI+nAt5EOM iw5RZ1+xdvH1Cw5cantjJ8mAzjZAVWE9XanPrLtfTkqCgBnHXLHiw2wyqKxE/e3BK1IP bgLfvjgFxEeVB70F8j//82XCe/hDaG6EP7YRE+4Q1JJah25kY1Fgj0XBmKdbDucxYW7C ymjnA6uCT4tix1eJq/lPoZw637CuspnYgZw88sXWcwKSNdqCNkH5vItbLKMPeVaTYcXz JSaA== 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=0kRNRSa2KGo6qnJuYo+2vDEJl7aJwqXpJfAVTcsTMM0=; b=opPe52nxMAFy60MbcYiUYbBtT+Dl8YXhf0Xkf22ljUyd05g01WWAOmZrogMtaC2lW6 XH08ZlZ1eIq3aO2+cb7TTTrHorn5/SWkTzUOn93MJbkq2GHRBH1PkfpFVsndVXQRNNtO SkrJNhx1dVr44CzL2CWJF8PkaT9XvVB0l7J6edd8fM5kI5hh7o3u1JSbnLvnfXp8E+aA WuGG6J1WobJdTP6nURj6mrQfp7pEFDVUxNtaqVy7PyVrOyXrrV3CLA9D2HSjkAd/2u+T PifafKOR038pS88vzlPyna5SNfgpCn5iPcxSoa83TcuZMIZY0obvQGlICyhXCHxkKMOu tcWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=cPZC10f0; 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 c1si139804uas.34.2021.01.15.05.13.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:13:50 -0800 (PST) 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=cPZC10f0; 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]:59092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0OvF-0001NO-Oh for patch@linaro.org; Fri, 15 Jan 2021 08:13:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0OqK-0006Bd-6I for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:08:44 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:54914) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0OqG-0006WC-Ek for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:08:43 -0500 Received: by mail-wm1-x330.google.com with SMTP id i63so7305080wma.4 for ; Fri, 15 Jan 2021 05:08:38 -0800 (PST) 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=0kRNRSa2KGo6qnJuYo+2vDEJl7aJwqXpJfAVTcsTMM0=; b=cPZC10f0F5x0J+ZfvCY/MjTytVwFB3n0JKkAofFBZ7UT7IA/OTzm3pnJZNBmsK3GTR ggwTmsIkdTInltr6ERkbuyl/mcyWgIGnfd52uIaJC4JAAILbCL/WAK1o8JUBjX/I3egq CkUhTNPfPnr1M3vdF/rj5orE/n15WV+oobTS9a1Vfapf9B6kMlKPKItZiu0UMGvM6nHA neICH8qyCWQ1hUz32csSa3YgTHcuGWwF4uduZ1aUNLCBDq0IAN0Mr+5YXmRQoNoC4/uw RnGXNy7M+QDrJdeVTiTj9im/nbJucls/d0dCAxxCg76LoYfiSKJ2KLeseDWGnkm5fk7M V+Uw== 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=0kRNRSa2KGo6qnJuYo+2vDEJl7aJwqXpJfAVTcsTMM0=; b=c/PNYKmVYLnucRUZ/+OaZgrbNgDNlZKZTi8nWKOnlHwdvbC9koPOkps4RYLZJCCfgx IMIgLqk4PffzJ0jiy9qejFpsZP1WBD3GPftt6rTknKsHUcfE7I6703a0vJ+F1tLs9KBj vIhRL03N6+OgMAePjD6+H26ZFlmm/B4gmxqlEKPSwauncpbjDPNjrAMeZIibBsZ/l+lK 1n89j8K3Rofb6+6X1FKZoPG/HO2gr0C8PGhDuuKIeYMiaUzYbMvfDFYJ5NwrzjIYKZSD kHyoUIiuiRseUucarNFKzCZCT5jy8+s02Ly+6p6WKvYUzuqUDgPIFkB3aTE/lxmTp8na G0Aw== X-Gm-Message-State: AOAM531wCDePhFc/IhkVi8R3q++ViUK8dsBVIWg+uiQg0Fiaaef+p1IN VNfjjJ7vLfM326GB0AqNTXXePw== X-Received: by 2002:a1c:4843:: with SMTP id v64mr8741351wma.26.1610716117901; Fri, 15 Jan 2021 05:08:37 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v11sm14496760wrt.25.2021.01.15.05.08.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:08:37 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5BB9D1FF8F; Fri, 15 Jan 2021 13:08:29 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 03/30] shippable.yml: Remove jobs duplicated on Gitlab-CI Date: Fri, 15 Jan 2021 13:08:01 +0000 Message-Id: <20210115130828.23968-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?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: Philippe Mathieu-Daudé The following jobs are duplicated on Gitlab-CI since commit 6bcb5fc0f7a ("gitlab-ci: Add cross-compiling build tests"): - IMAGE=debian-armel-cross TARGET_LIST=arm-softmmu -> cross-armel-system TARGET_LIST=arm-linux-user -> cross-armel-user TARGET_LIST=armeb-linux-user -> cross-armel-user - IMAGE=debian-armhf-cross TARGET_LIST=arm-softmmu -> cross-armhf-system TARGET_LIST=arm-linux-user -> cross-armhf-user TARGET_LIST=armeb-linux-user -> cross-armhf-user - IMAGE=debian-arm64-cross TARGET_LIST=aarch64-softmmu -> cross-arm64-system TARGET_LIST=aarch64-linux-user -> cross-arm64-user - IMAGE=debian-s390x-cross TARGET_LIST=s390x-softmmu -> cross-s390x-system TARGET_LIST=s390x-linux-user -> cross-s390x-user - IMAGE=debian-mips-cross TARGET_LIST=mipsel-linux-user -> cross-mips-user - IMAGE=debian-mips64el-cross TARGET_LIST=mips64el-softmmu -> cross-mips64el-system TARGET_LIST=mips64el-linux-user -> cross-mips64el-user - IMAGE=debian-ppc64el-cross TARGET_LIST=ppc64-softmmu -> cross-ppc64el-system TARGET_LIST=ppc64-linux-user -> cross-ppc64el-user TARGET_LIST=ppc64abi32-linux-user -> cross-ppc64el-user Remove them from Shippable CI. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Acked-by: Alex Bennée Message-Id: <20210108145103.269353-1-f4bug@amsat.org> Message-Id: <20210114165730.31607-4-alex.bennee@linaro.org> -- 2.20.1 diff --git a/.shippable.yml b/.shippable.yml index 14350e6de8..97bfa2a0f3 100644 --- a/.shippable.yml +++ b/.shippable.yml @@ -7,20 +7,8 @@ env: matrix: - IMAGE=debian-amd64 TARGET_LIST=x86_64-softmmu,x86_64-linux-user - - IMAGE=debian-armel-cross - TARGET_LIST=arm-softmmu,arm-linux-user,armeb-linux-user - - IMAGE=debian-armhf-cross - TARGET_LIST=arm-softmmu,arm-linux-user,armeb-linux-user - - IMAGE=debian-arm64-cross - TARGET_LIST=aarch64-softmmu,aarch64-linux-user - - IMAGE=debian-s390x-cross - TARGET_LIST=s390x-softmmu,s390x-linux-user - IMAGE=debian-mips-cross - TARGET_LIST=mips-softmmu,mipsel-linux-user - - IMAGE=debian-mips64el-cross - TARGET_LIST=mips64el-softmmu,mips64el-linux-user - - IMAGE=debian-ppc64el-cross - TARGET_LIST=ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user + TARGET_LIST=mips-softmmu build: pre_ci_boot: image_name: registry.gitlab.com/qemu-project/qemu/qemu/${IMAGE} From patchwork Fri Jan 15 13:08: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: 363621 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp277782jap; Fri, 15 Jan 2021 05:09:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5/hGJfkBlVkaYByFif4EA7f7l8N78uLXM9DSQHgbELCOsCetxVOQu1xkPj0zA5K62fqjZ X-Received: by 2002:a25:3897:: with SMTP id f145mr17445225yba.2.1610716153475; Fri, 15 Jan 2021 05:09:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610716153; cv=none; d=google.com; s=arc-20160816; b=WhGOyTTbX1SC4pL4dlq0YE/yFL7omWVv9QAXHG2utXUFURSvG7Ket6HpXZvvF170pJ U04VDVGhfYoMxLzyAGnL65qzzIzF79huLM8MKsMf8jbyP/AUvPMO58i9NWFv1+e5O32r Yx5neQpr5JfcnhoMy+ywYmt/cFc6LZYvUdyFiXnni5c03W3Cm9pSG8F7wKBsdIWwsSz0 ZzC2gAJkryR7W8nry/FExCm/lEGnWbjHyYwQRp22pY/j+xSbHciO6vJ3Wly/4uMc1ACp f8SGFlKENHIB2t7W1YM70c0FZsfWQcH9TAtb8BLlxtbyZ4JRXQrI3RBaMMSSoKY7JHms 0AFg== 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=Sue2S9mTNcHq9hmZ1GOz9KiLULOP8mmJ5EI6Hxa2j+Q=; b=y5BD0NG11IqMTYYC4OATmpWCJBhtgdRnxbAZ1wxpjQqHbx/zYSyQta3E6V8+3bqIZk OT1IWEnYWQ8fsMW/zpfx4WnSk1/SH7VKkbORuVNaH/kT+CaumJVInrOOaa18Waf08KIL iJvJ3JzUBXEz8MN3mn5bksGSc/I8CrlokwQf//IYWcDRWYLasu2T3Q9mMTpd9YR+T5BU CM0DPmqF2yy21cQp/JyAeR+e/Qqz8XcH9QmZRpNUvthBjYUkvDLJCfe0pnjAPDSwntUd /tb21WGis/oSbxSBHR6qqte1Yw8rn1Etl1uRpCa1DSIAN3YONC/Ycgu2lbFaqBpgkoiz yFKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=pQ4xJ21g; 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 o76si7879303yba.487.2021.01.15.05.09.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:09:13 -0800 (PST) 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=pQ4xJ21g; 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]:51092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Oqm-0006JZ-Uf for patch@linaro.org; Fri, 15 Jan 2021 08:09:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0OqO-0006GA-Nk for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:08:50 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:40373) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0OqL-0006Y0-Jz for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:08:48 -0500 Received: by mail-wr1-x433.google.com with SMTP id 91so9231062wrj.7 for ; Fri, 15 Jan 2021 05:08:45 -0800 (PST) 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=Sue2S9mTNcHq9hmZ1GOz9KiLULOP8mmJ5EI6Hxa2j+Q=; b=pQ4xJ21gboYQOn1oqGU0nQUeTscsccH72XxMQxy43zAg14VOSm48NgY3nCfFrfNALZ Pld/Bs/OuDj6er1XHfmadYhz4NjDc2aL8pZUECwx674gSdSxRT/R3X8TS9ZD4rV82MaS Rs/VIO5+frutrOyOZj1fiLjRlm4qcPfF/el5iVYxKhlw9w2vMTYOX3djkKihnN32NJDv qpMsHGjRBqTz8uThWnKs/dOx2Vs2ymEgqygNguVC7Za9zUVKNSnVjY5ZWH+T0gzb6yAk gO3ZGhltyN+Ae8TBGYV9FCxK/ssm53GxIHytGbAYlT8Pq4+GNE7D8YnSVMhLIQ3za1U7 3VHg== 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=Sue2S9mTNcHq9hmZ1GOz9KiLULOP8mmJ5EI6Hxa2j+Q=; b=OCLmMUv9CgqYKTmpA/TL5wZlqWxs4nHvGL8dB4uWfGX3fJY9wvmqGetYSXTFjdd70i z8EDYBtDf2GR+Y4/1PAdvnPRLE8kWPOJfG6No9GZWT1AIQGNPVm9vDvN0b+oddaTHsmV 4PmkyPhbI/pogfDXQzjXOftvPwwysVHhIcKo8GL3kB0pOssmJtBnXue7DbAjvHmMYz80 ZIR7tjB5tvQLlSLwzu3fM0RGHV7A6/7m/t6cWcW/AHExdnYKVcvQj7JIasOuCoQYTU6O WQdnmSfU23f0CsWGTuvkW0HFvm5Kcax5qKiknF6yh2PStWFPB+j/Jl6MRlL8gvB3RI1B MN2w== X-Gm-Message-State: AOAM532/TPXjHv1Jsku5WXUwBaRU0APZISKkme1Y+9ggANigS3SkkcSe 41CgHDKhiDfX+3ndGWtmjCHFfw== X-Received: by 2002:a5d:604b:: with SMTP id j11mr13292240wrt.406.1610716124400; Fri, 15 Jan 2021 05:08:44 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id d18sm12285167wmb.30.2021.01.15.05.08.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:08:39 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 93C831FF90; Fri, 15 Jan 2021 13:08:29 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 04/30] Add newline when generating Dockerfile Date: Fri, 15 Jan 2021 13:08:02 +0000 Message-Id: <20210115130828.23968-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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: Alessandro Di Federico , Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Willian Rampazzo , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daudé Message-Id: <1610080146-14968-36-git-send-email-tsimpson@quicinc.com> Message-Id: <20210114165730.31607-5-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 36b7868406..884dfeb29c 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -332,9 +332,9 @@ class Docker(object): (uname, uid, uname)) tmp_df.write("\n") - tmp_df.write("LABEL com.qemu.dockerfile-checksum=%s" % (checksum)) + tmp_df.write("LABEL com.qemu.dockerfile-checksum=%s\n" % (checksum)) for f, c in extra_files_cksum: - tmp_df.write("LABEL com.qemu.%s-checksum=%s" % (f, c)) + tmp_df.write("LABEL com.qemu.%s-checksum=%s\n" % (f, c)) tmp_df.flush() From patchwork Fri Jan 15 13:08: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: 363632 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp294307jap; Fri, 15 Jan 2021 05:28:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5SBfo4fSdaAk9WyLOJur0Yjf9yJHOefOQQDbjsC1uigtciLZeaxKm6NhrojOdIIMpPP8U X-Received: by 2002:a25:7a44:: with SMTP id v65mr18188891ybc.0.1610717326185; Fri, 15 Jan 2021 05:28:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610717326; cv=none; d=google.com; s=arc-20160816; b=NRlFpEdkLuxqF/5Ks4DAs/vzCH5WBpbPoBkZmdaSJtX8qN+lJpaLzXshL2RrEin0/Y sjvVlUJh1VWF4T4e1UB951/3is0P8PTePChMreueWY2CdDLeYW/IPF2/QfrzPIXsCfDr jlhsH7PdusjGcTBNqaqdWV+jZRpVzMbRJfBYEwOdu9bIdbGf/M4SRJCILaUplk6L6qHP /9GJfV1/puIzrH3vrmjd+gHRo6e/pHo9dmyRmYAl90yEonpsYnwueb8ip701agkQG5oe 1EmqDzpAhMwfWmqYXtUM52giZuiirLCLJPJK+6aaY7i2NcBetsu7aufWHrDR2yLwhJvE DRHQ== 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=2eBPRRTpBQIiw9KV1Y5NGEpPUP1NHA3ZNzhEBTWGhjU=; b=Y4GFaYiA3Wx5R4KDA4MfFCz0WpwuMAwII9W59bOC9TQDogk3dXYfLLIPhmMjv+CMfW nCobpMkI6A5c9ltKJ8eXluzTOAUpY5wG8GNkC7MTwQtnaD4ul2gtknNFyJOmUfFNkqi5 FhAlEfY8jG+RFdety5OUv/maM5ULtXGfbErS3tRDNT0+eL/p84vublw9iHty1x90VcFm AWdpYNCUp4YaQiFOD2hyB5WZCkD1OMdYXPIsOf7uESnEmZGN0EM/SgtlYqMoRrb8b1No O3N9IipJM9p6xYDLxG/EN0ne8sfTFOOnTPhU4aNkytHMkSY8cMDr8/akz/Icfc8gDQ5u TONQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=errtOb+L; 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 2si8375042ybo.182.2021.01.15.05.28.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:28:46 -0800 (PST) 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=errtOb+L; 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]:56036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0P9g-00047w-6E for patch@linaro.org; Fri, 15 Jan 2021 08:28:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0OqS-0006HW-1J for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:08:52 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:51841) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0OqO-0006ZU-Nm for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:08:51 -0500 Received: by mail-wm1-x32b.google.com with SMTP id h17so7112339wmq.1 for ; Fri, 15 Jan 2021 05:08:48 -0800 (PST) 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=2eBPRRTpBQIiw9KV1Y5NGEpPUP1NHA3ZNzhEBTWGhjU=; b=errtOb+LNTSh3QpNuh2PuZECbpVQVduKOpQy7lG+ODURMW5GP0nYqPTFlK+1EZ2fkB WeaVCG0kAOBZbWw+wNp5z8Zkc8WmkLKw5Ai4QXOYr6qfm6dy5O4rNxwqhDr2xlDW9lff eP1CjJKktx20SG2RoBkiaKFv46Nd/y3ABAmZ/GpHnab2h3NzRkR79vFKstgOS/mQaeYh WaEz2QRynEHglhKyuHYwwoPTiRc0YYnb5cyVB+zO1+daH5MD2uFn/tGyNgzTWKkBBCFg 7hSD0cGMZhFDigs9M30zyfFuQfL1FDDXhErN065hK82r5UVRn0hpfLmL3eQFzRcZJJJe g9bg== 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=2eBPRRTpBQIiw9KV1Y5NGEpPUP1NHA3ZNzhEBTWGhjU=; b=IIOMASUAbezTpY4xu/guVoKkZZyhea43ntbANZo64pdbtV4vbIatjY8kgdMR67Af88 fsFSa39wA6QX+ectewIigb2teijagsr9R7qoIbu57S2VS1EZWn1bkps5eHfzZweNqfXI VZqKECoYg1mBr/Ujg/ZtdSvRQpBP9RcG3DHjrIX7NXPFiOAaEQlIO0YtgFhKsUVZEHzv TIJxcDkXHqLTA8rnSk1LjHCS8b1drwNnU8yMzKc1E//iCQ7WQjkeqLUFIArzxxfBhDdQ JeUZSy1CFZxzag5Qk3CUSXtRkctlsMdQyYSefsuZKF11hEFcym3VXyFCWGuenpeL0eSQ csKA== X-Gm-Message-State: AOAM533+K5bYTo7OJBMetWUVbtHLTvF0etwfCPm4w7LfYlQN/O92AICU NKpEKJxdue5lVOFYBXm7Sz/6dw== X-Received: by 2002:a7b:c20b:: with SMTP id x11mr5709985wmi.107.1610716127399; Fri, 15 Jan 2021 05:08:47 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g187sm7172865wmf.1.2021.01.15.05.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:08:39 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BE15F1FF91; Fri, 15 Jan 2021 13:08:29 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 05/30] Makefile: wrap ctags in quiet-command calls Date: Fri, 15 Jan 2021 13:08:03 +0000 Message-Id: <20210115130828.23968-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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: Willian Rampazzo , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" For prettier output. Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210114165730.31607-6-alex.bennee@linaro.org> -- 2.20.1 diff --git a/Makefile b/Makefile index 0c509a7704..bbab640b31 100644 --- a/Makefile +++ b/Makefile @@ -250,8 +250,13 @@ find-src-path = find "$(SRC_PATH)/" -path "$(SRC_PATH)/meson" -prune -o \( -name .PHONY: ctags ctags: - rm -f "$(SRC_PATH)/"tags - $(find-src-path) -exec ctags -f "$(SRC_PATH)/"tags --append {} + + $(call quiet-command, \ + rm -f "$(SRC_PATH)/"tags, \ + "CTAGS", "Remove old tags") + $(call quiet-command, \ + $(find-src-path) -exec ctags \ + -f "$(SRC_PATH)/"tags --append {} +, \ + "CTAGS", "Re-index $(SRC_PATH)") .PHONY: gtags gtags: From patchwork Fri Jan 15 13:08: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: 363627 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp287219jap; Fri, 15 Jan 2021 05:20:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJytXaaY1SpVMhU2wv8rAwVPG2dCDURgqc50dVzlzZMREpz8murInuJb1emLTcFGRKY/Jrkl X-Received: by 2002:a25:d053:: with SMTP id h80mr18315435ybg.271.1610716807051; Fri, 15 Jan 2021 05:20:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610716807; cv=none; d=google.com; s=arc-20160816; b=wQgJ/3JMy53X81WLm5nMMYnkWwaGiaJHKVA37FnzFKqJWun+/sThJo5YDipZzXnIYv /6G58/aRevqjELGI+Zg4V7qYe0ReUvdlaw4fFT2Qx9NzAzOLAH8WAGsXBouGp2mdMCgm Drc+OlumR/WRl5C/0ONtSaYAOdml3U9K9vEs2lMGJ8BUVo2C1lLjoreU/3CIvuLQ81Gb p7hmf9tYF36HC/+D1i0mdFWepTG6oxwpkL/f57R856qJNQAdNWdEvxG3R1xAVvSI1BFn hmAchmVn2bcgxIFsRe/NBFIk2EkVNDn/UV9IigeEZ4BoWqvo2Wt7R7DnfM2nu3LzjCva MDRQ== 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=r8r4UKUDO6tEaLsLvzMsuoJjuo6O2hAvhV37rpchiL4=; b=OTu1gxGCkWlLs945BbBtfPNT89hZzjDkxEptNXFi2zYxnOVi2NiT6ZSWrjDdoaAxTU LI3DfjGEhAg+Xy3y5CLMrxWMYvHdG3JXWP3vUOVpONbrlPc7zqbyX0EBKe8lTQWeWMyC hOS2kanp6gWpM7PpglkLjj7WlIim1onOnXOj5sQC96drFoaED0SOaUb6ZXDbcSL/Xv9y xLAOCWeLJfw7wZivNvKm1EWsYIHHy+uvj+o8U5dBT0y8DFBtIeqcgY9gxPrNo6qX+T73 80bzO4b6GPI5uLp7SOOuba+TFlRNiLqNo3jiqsQxkQR8Zywp0T1ZTLa5Q+pCVNYnUg3g HRqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=e8beQF4J; 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 w14si8881987ybl.390.2021.01.15.05.20.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:20:07 -0800 (PST) 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=e8beQF4J; 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]:39512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0P1K-0005Bo-HQ for patch@linaro.org; Fri, 15 Jan 2021 08:20:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0OqL-0006DQ-MS for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:08:45 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:38755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0OqI-0006X4-Ef for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:08:45 -0500 Received: by mail-wr1-x433.google.com with SMTP id a9so5764131wrt.5 for ; Fri, 15 Jan 2021 05:08:42 -0800 (PST) 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=r8r4UKUDO6tEaLsLvzMsuoJjuo6O2hAvhV37rpchiL4=; b=e8beQF4JAPwIZnvk+22TWgTRcjWZSroi3yzbCoxz74EN3r7Khb04UfEw9lSiP2Kra7 RftVPYSLAP3mb8h9AqxbyWJ47x60/Hy4Oj9SyW0Nh77prv/OkjcbFVfAYEVGCfj2kAJi r9eUwWbFuXajj59twieZwzvOgQTwZ3195R71kVeNHZLGg8qozrvR2HRzENyA2wRJJOG1 yC22Wb5AtmSrgwo+bjwJxmcX+hkpd74UEo/cM4pD5OU6PwfnOWEtFuAHNE1kBaw8t8lR HwlDGyuirXzWBK0ln9KlfgwTOCEXhW9/AefG1bcGu4ZYz4hZ2gdBhxaztaLmjM+f0zku rymg== 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=r8r4UKUDO6tEaLsLvzMsuoJjuo6O2hAvhV37rpchiL4=; b=HZJ7r+L5+4gfsY7XM1UBhc019sK8sFvG0afPDx63saUXrL/JpPYMPwf82U6etLk24i qVlLk/pIkkmDSubuuI+jomxlqcOnLEGjmz5vBXCx8hrNwDX+/1drZ40ATihpfuWHEobw 5Bw2btoC50xOz/gx1Ts+sfbFIQ1uk1lF1opJ4HJ3I3wfIp6J78idY7lm1turSMtG9yxe q7ra2SnXUErdsKMrbWhPFKB3MLtuI8gpHmES4ato5J75RvSVdsyACN6Q5iCAFpEpmo2v 8lGANHZN2Ca57aMeWZXUYXEkp6wGO0+32huq5qP4uLuLDTsOCXaYeefCS8ffeJVxpzAi eNOA== X-Gm-Message-State: AOAM5330F5PJo4cMBzHsAPEN8r6DVhWH32XlBbJTa1fBVg3NmZvTfqiL xG+H9aUNxO3xJjhG7YWDtuh2rA== X-Received: by 2002:a5d:4dc6:: with SMTP id f6mr13346193wru.336.1610716121108; Fri, 15 Jan 2021 05:08:41 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r20sm17106184wrg.66.2021.01.15.05.08.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:08:39 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id EB4FA1FF92; Fri, 15 Jan 2021 13:08:29 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 06/30] Makefile: wrap etags in quiet-command calls Date: Fri, 15 Jan 2021 13:08:04 +0000 Message-Id: <20210115130828.23968-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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: Willian Rampazzo , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" For prettier output. Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210114165730.31607-7-alex.bennee@linaro.org> -- 2.20.1 diff --git a/Makefile b/Makefile index bbab640b31..f7e9eb9f08 100644 --- a/Makefile +++ b/Makefile @@ -272,8 +272,13 @@ gtags: .PHONY: TAGS TAGS: - rm -f "$(SRC_PATH)/"TAGS - $(find-src-path) -exec etags -f "$(SRC_PATH)/"TAGS --append {} + + $(call quiet-command, \ + rm -f "$(SRC_PATH)/"TAGS, \ + "TAGS", "Remove old $@") + $(call quiet-command, \ + $(find-src-path) -exec etags \ + -f "$(SRC_PATH)/"TAGS --append {} +, \ + "TAGS", "Re-index $(SRC_PATH)") .PHONY: cscope cscope: From patchwork Fri Jan 15 13:08: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: 363634 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp297423jap; Fri, 15 Jan 2021 05:32:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzFuhVk374nMBBAqdKcxnLIesdHJ+ddf2I3dlpfXV0cey1D/577+sbS1SGi47G3u3rJYTCl X-Received: by 2002:a25:260d:: with SMTP id m13mr18779381ybm.257.1610717544501; Fri, 15 Jan 2021 05:32:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610717544; cv=none; d=google.com; s=arc-20160816; b=FjPtG/XoTU0yUvzDRKfGygr/AmacJ8V6CpPFk7PX2Qdq0MkrKZqb7ZaHhbI6VVWk2g 7r7iEaeXJE/SRaghIgIuArLYkmYUrJ9BofZYtPEcSWd0LsemNOf21+EPH+kkgM9DFsTD vYfbKtyteo4jNCv44YDWBVv96Qe4H3FYuPS4ROMSUlO66XHPISdhrv0OVSRERYbn8Pye BbK/OeJhbesMhawOUn7fLR30mLoysdXAzdsc83LTkl8NlCHj3l6TnfHgWSm5p7LfTX8L jf/EU0486+Z4BjPIfera/Sh7OjaPzLkkYCqufA4ZpPtX2gNq6iEj7TNZbfBqZ59tr092 DzuA== 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=aUV0CSHAphut/le5gNpcaNl1Lefe5Sy6yOiBhggdhko=; b=rV0hYXnYpPxv04BlVwVWPTFazcTpRKOlvfbbWb89ryv/CrDlX8s1teCOoafX4gEe1Y N2PLPrIPFioLTLMDztX/Wi2HnnbnSVHG20ipYaLfsWBXjVV0L2pfPkT9JfncT+DSEqnE itphCtBWS56529JZivxO8mbD0sS5aKgKsh+2sQKae81nZmAWlR2Ns/9K+TJcuAyPmN2p NMYEM3laQ/YBOleBKPqpmvJgZMLZXrLtJU13/p+ey2TEQFZ4CpHWlUSMZHluSH3+UlyL lGAPrtUPoL0m7pErnrcVoZ+w42icIHsFIXrr55ovIQdzuQHXq8D7O0pFkpzfG2pcMcq+ lewg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="lx4EF6/w"; 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 c16si9335329ybm.303.2021.01.15.05.32.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:32:24 -0800 (PST) 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="lx4EF6/w"; 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]:36902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0PDD-0007yU-Ao for patch@linaro.org; Fri, 15 Jan 2021 08:32:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0P0A-0005Ge-4g for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:18:54 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:45186) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0P08-0002M2-8e for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:18:53 -0500 Received: by mail-wr1-x429.google.com with SMTP id d26so9236011wrb.12 for ; Fri, 15 Jan 2021 05:18:48 -0800 (PST) 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=aUV0CSHAphut/le5gNpcaNl1Lefe5Sy6yOiBhggdhko=; b=lx4EF6/wzfsaV3aPhuDvxOPJZkxRyN0+bePqGuiuEk3Mskt8o4ffpYUOyft3BsxreD KZ1FNISb/wovOQWqi+T6vZXoCr7d7N2+Lpvtx42+D7ux/As2ZvASlgkKNIJUqUQsisYz y3ywxhUDTmAWDyluOHFIB/l8hR/RiZBXqsgmigCllnMnsuI9pMjM1fC+2gmlEDF8Yo9Q fXSrzHGYnyhP0NyDE20Q/HMKiJAUhENMWujxsSvbzEGhm5lFprkslM3q5VkE9+ggmr4E LbFzYHzZLjmrejZHaNuyomC44tti0MPRA/Suim6BghpKZX77S6oNCrM1WT4CV7rBpy+D lxyw== 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=aUV0CSHAphut/le5gNpcaNl1Lefe5Sy6yOiBhggdhko=; b=BNoJP29pyerFDk7DaRVIHFDFEFyEjBP84JpOEx/Bm4DVnKpXeR2ctt+1xS7TX6WoO3 Dw7Qwyb8c54pN0YM//1y6h0YIQoBrBrSaPtS7AX/WqHbSvd6UoYBZgylbONeqfXc03wE dIdJfeMR4fHN4EX2QVYmCIMQXjapdvUl6xPfXk40BPYJdXEPlOAVqVRD+OhpmHrJfK+7 00gp0sGQDU2t33qSU4kBygtwslpWSFtIPO9XNCKIE8WorD/LVmFwyCky+J2XzyBH2xOH /0u0sTw+8vWwt25tcsNJLVXZEv0Fjc9A1B05HN73Avn16enwhAcC9peBNqEv9IgXJdRk bGgg== X-Gm-Message-State: AOAM533nh8q5+u8lgvpFyD0J898ZIQJaDhNxOOibfjAg+mBaif1z8BPv qNoW7WNl64J8FJ7Ucmv8gpS7UA== X-Received: by 2002:adf:828b:: with SMTP id 11mr12826740wrc.180.1610716728086; Fri, 15 Jan 2021 05:18:48 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v126sm1415840wma.22.2021.01.15.05.18.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:18:46 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1A8F51FF93; Fri, 15 Jan 2021 13:08:30 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 07/30] Makefile: wrap cscope in quiet-command calls Date: Fri, 15 Jan 2021 13:08:05 +0000 Message-Id: <20210115130828.23968-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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: Willian Rampazzo , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" For prettier output. Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210114165730.31607-8-alex.bennee@linaro.org> -- 2.20.1 diff --git a/Makefile b/Makefile index f7e9eb9f08..2a926aaeb0 100644 --- a/Makefile +++ b/Makefile @@ -282,9 +282,17 @@ TAGS: .PHONY: cscope cscope: - rm -f "$(SRC_PATH)"/cscope.* - $(find-src-path) -print | sed -e 's,^\./,,' > "$(SRC_PATH)/cscope.files" - cscope -b -i"$(SRC_PATH)/cscope.files" -f"$(SRC_PATH)"/cscope.out + $(call quiet-command, \ + rm -f "$(SRC_PATH)/"cscope.* , \ + "cscope", "Remove old $@ files") + $(call quiet-command, \ + ($(find-src-path) -print | sed -e 's,^\./,,' \ + > "$(SRC_PATH)/cscope.files"), \ + "cscope", "Create file list") + $(call quiet-command, \ + cscope -b -i"$(SRC_PATH)/cscope.files" \ + -f"$(SRC_PATH)"/cscope.out, \ + "cscope", "Re-index $(SRC_PATH)") # Needed by "meson install" export DESTDIR From patchwork Fri Jan 15 13:08: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: 363642 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp323640jap; Fri, 15 Jan 2021 06:04:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxF4JZxAPpstjyqNRzD7Qrbs848kbhnjiJ4UizRvpOU6OnWL+RRuFoyuN+LtmTumVoySHHB X-Received: by 2002:a25:dc53:: with SMTP id y80mr6122807ybe.3.1610719492540; Fri, 15 Jan 2021 06:04:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610719492; cv=none; d=google.com; s=arc-20160816; b=MIUWfxzk0LRZr4lhPRcDrjrlbqRHsfV5g63ri8S3E5BQGoNNoHQ3WAdG8UpWIYbexp UOL9zXAgx/B2gp7QqsKnWiNTMrx+kZ7RpxkH0rcTrxU8IG8ToWAR6vMst4qGDD9GTrhq m0/ULDDrGBBDGMNbduASEWtWwWEv66Jp1cVt9U1ol98T9NHza0UjC/of1p/ez2rrh9Lr HC5nhn2/15OMv8YY984g+/iOdBxh/GTJdQZSgpkrgXtbuaTQrlW4f4q7Xm33Ki45effh RILSOAm325FIkF2FYU5121LPvrBzCXgBjAYi+BrrgvrZl/hIr5D92hBtQ20U2/VYJPRT 9Vxg== 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=TUlWKvVgHwLfbI3Cp8gI2bdX+EOS2lLxQJgbjb3aQz8=; b=UFhvZLtp9uhiSec1eyEz6nNuhCWQuzMs3zOlVlVJeI/DYR9wgke1Q922DdG7Ds3AdQ 3i0MOkZopVE2tivtN5DEyzGR4dqTOMt4rPIOJ6oqOKKDJxwYcPZR0OZ64pSezq1+YS8f TgpO14pYvOTRuCXJJZP2Mh0I3sh0N7LPvln4/LkKFqwpdmZ7Mb73XjY3vZ29qhL1GRZ7 mvO3CPcDAt1aYG6aFHEA1/tcsiG6lMWGvBIPeP//Lz0bJYXpAdDdxB7lcaNejuwcqe0y i1Igg1LoeMN7CN+qmKO80auhA/thbebcKt0uZRICRQPiug2u5Kh3boogbFvPJVYeQUsK C8DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=FbASaw8t; 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 4si7566537ybo.222.2021.01.15.06.04.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 06:04:52 -0800 (PST) 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=FbASaw8t; 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]:47418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Pid-00064c-JT for patch@linaro.org; Fri, 15 Jan 2021 09:04:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0PEV-000168-QW for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:43 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:54061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0PET-00085N-VV for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:43 -0500 Received: by mail-wm1-x32e.google.com with SMTP id k10so7369012wmi.3 for ; Fri, 15 Jan 2021 05:33:41 -0800 (PST) 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=TUlWKvVgHwLfbI3Cp8gI2bdX+EOS2lLxQJgbjb3aQz8=; b=FbASaw8t8feG3B4gcGo/GCQpaLOT/kdsWR9zbq2mKHfuT62pWIb3yKC0XieDVd/jhL CvmdUgn1v02qyIJ46vqNWFkGMiWYnRJ2cWYzqfQffqpya8LpP8HlDbKJcoxmZz4Mib/8 epRcdfGHejG8yivMKFb7kYfG06w5Jn1H8yumI9hOt8P8DIlZGzfSd1ftWFXrMv88K6ig Nay4oKyx+mR2By2VLQJzZgJD01fmBIfHN6PprGGCsREISZb1LsAjp0jkOKKP0eS1f3gE Mmj2agibW+8qHzrdDtjbHFXJZNK2ADJfSl0nYvTAX8mU04/6JndFowz4If/9D2JFgXgS JoIA== 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=TUlWKvVgHwLfbI3Cp8gI2bdX+EOS2lLxQJgbjb3aQz8=; b=eLgc6CULoUHsPKROnqBZzSAqqybXzmKvuSvqAs+s7am9rkcJCOkqhtgcM0hn6V5rLP iuzC7VUeRXdnJPGyw5LehoQuF54DJDqWAlz/9MbhYPT00rdetXQQoo7d0/xlhfPP2X+b 4FFpJWZnAgqP7zLSpqLUg9Tk33L1xEpL/pTfnIW8PGYjLc0PzBFGcTEvAxJwlnia3Bne 5WR9mjGQ3hMMd2N4Y80rcr4IYPIJkA4Sazba7p9ryM/GTT7uwoyc2U3ruNs5J+hVAllb X9ExCzymTCMdOc5WGBziqc7KTrrq50CbU+M49ryVczUsDIb3uagye/c6939SXeEeq6vA 5e3g== X-Gm-Message-State: AOAM531vHzjuudzSMIeBHEfYucRerAbSorcfKCsc36A+bmZjdWjEEvMT rmnEaCcDKbupav3rNYPu3HwuGQ== X-Received: by 2002:a1c:df88:: with SMTP id w130mr2191739wmg.164.1610717620690; Fri, 15 Jan 2021 05:33:40 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id m17sm16047383wrn.0.2021.01.15.05.33.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:33:40 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 46AA91FF96; Fri, 15 Jan 2021 13:08:30 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 08/30] docker: expand debian-amd64 image to include tag tools Date: Fri, 15 Jan 2021 13:08:06 +0000 Message-Id: <20210115130828.23968-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Willian Rampazzo , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is going to be helpful when we want to both test the tool integration and in the case of global generate a xref doc build. Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210114165730.31607-9-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/docker/dockerfiles/debian-amd64.docker b/tests/docker/dockerfiles/debian-amd64.docker index 55075d9fce..a98314757d 100644 --- a/tests/docker/dockerfiles/debian-amd64.docker +++ b/tests/docker/dockerfiles/debian-amd64.docker @@ -1,7 +1,7 @@ # # Docker x86_64 target # -# This docker target builds on the debian Stretch base image. Further +# This docker target builds on the Debian Buster base image. Further # libraries which are not widely available are installed by hand. # FROM qemu/debian10 @@ -14,7 +14,10 @@ RUN apt update && \ RUN apt update && \ DEBIAN_FRONTEND=noninteractive eatmydata \ apt install -y --no-install-recommends \ + cscope \ genisoimage \ + exuberant-ctags \ + global \ libbz2-dev \ liblzo2-dev \ libgcrypt20-dev \ From patchwork Fri Jan 15 13:08: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: 363648 Delivered-To: patch@linaro.org Received: by 2002:a17:906:fb05:0:0:0:0 with SMTP id lz5csp548485ejb; Fri, 15 Jan 2021 06:19:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHVC/9J3tl05ejNO5R6MbYGw3s3AtPg0Ebqoc3eT4I2ok8OJ7UWVP5FOOaYPorzCALWswV X-Received: by 2002:a67:7385:: with SMTP id o127mr10387518vsc.8.1610720398071; Fri, 15 Jan 2021 06:19:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610720398; cv=none; d=google.com; s=arc-20160816; b=NNYFwLDqObz9o0bS4iRuUmLt7/cc0fcLKSxNbLOaSTRHLCLNdpri4cRckM776Dut0k XhIr71qYTeh91zDgd0bQmMCdaM0vbbpsXgo3SQguMnzuX6Gb2yXf8SagTN5MnUjheqKr UauyOIlm78DAkDPGKTf+B+VJTuelAu8KXynLIAV8XsxJzxBOMfzGejNG8SMg7zw8bsB6 DdF2s2U/Wx9/LUlYRUaBIuh6qG4qGaJwduPdFf5dVgEj5ciG9IUaJ+2BXeiHN9M7EWqu 0ZGpyK0oIoClzKW6RAGcFzFQXVc8/C8QLj0NLe7xlHrVrrEJrrA4mSCKo980mWIL2u4B WGwQ== 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=Df631mxt2afxlIpDJjQfhR/CHjkLtQgEg7fhjq99/Rk=; b=jHLOdmrCPhERmxix2kHeAbtR5awN17Le4SD2y/03kQMzFY9Py5152fJTbieOSlunCO sXvUyWNLarmGbBL/dHtboXckxXABmdazJj831lWk5h19G2cd20wGHi3mX0sDWOvy+/3I gXXf7SYQBrwZaSRembBQZ3K1CmqPK427ZuFldglcVg9SAWlEKGJYKug7OhSivySO3027 y6M2g1OM4jdts9xNL7VzTcH9QGEnGSw844LDemaXVkD+7pid60Mf2j/AXkvcPzPKTTqS w5+v0fqScKqUW0n3OLiOOyWbR67O+Cnpe2dvS3fBuRAIJEmdxer7PxZ1/9exj08jl0NQ h6dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=V4dUDnvq; 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 h6si1852836vsh.440.2021.01.15.06.19.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 06:19:58 -0800 (PST) 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=V4dUDnvq; 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]:59766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0PxF-00072I-Cm for patch@linaro.org; Fri, 15 Jan 2021 09:19:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42846) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0PEa-0001H7-Gf for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:48 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:46092) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0PEY-00087f-It for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:48 -0500 Received: by mail-wr1-x42d.google.com with SMTP id d13so9271607wrc.13 for ; Fri, 15 Jan 2021 05:33:46 -0800 (PST) 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=Df631mxt2afxlIpDJjQfhR/CHjkLtQgEg7fhjq99/Rk=; b=V4dUDnvqmVoIz7oFrWRUcUyUY9OhrH09AKNkBe/LOBUW2NbEUDnnX3fd/Ls+KI852i pOB8a5gjaeikawZ3qw2QacpC3wCra2F1yJxUUaFTMB7WTECF9n59RrTNqXhMvKmdAG3B RxuaKYSE4O1s63FkOb7U59G28r3sGfRHnHXd3axLqJgkleeqBvTZGtBrCgS1zdlkhXzY F+SXgy3pXQLYpusy5INByZASQ8K3uX5rDI9Yq19yZeWnfM0C/R4Dr4+UYB6rcwl1dTsV wHSUTGjyRU0zQJP797kKgjDH8/uIfZJ64dbKgt9yop1UxOD/50WvoAQbk3AihhDGjDWj 0Tvw== 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=Df631mxt2afxlIpDJjQfhR/CHjkLtQgEg7fhjq99/Rk=; b=Qmd2XpwEVEYynVydWbup8OtTVGeciTqhpXtPAdMK3833rI7S6Sr+9WuN6CJTYl+jGm nhDxvooPSPA9ZbjyMwIlhPq5qtuhCGQV3oA+a+q32laW7b3M22+K0lCV1oRioZU187FG /ymAeb8pR/Nq3BmpeYGNNPfyNv5i3t5nnpkK+NahOTQz3IrUaXNDrPY1niSgtv7aABxC RMOSoKexFmLeXI/FYoKS00bipSgb4FxLeOUKe/fCL37j6Ih5EpcFu0HYVRRIGb0F5B0x 7yUi5XRMY1qQtG1JRbyXN5Rr8a4viIJRj6OIXoYhvBqZz8R7HoSg9pAlOHg0bnHvX1w5 O7CQ== X-Gm-Message-State: AOAM532GBqjvxw3XhCZp9ySo2vnugU6zw/Y1vEtJ0p28ylJqe6DVu91F W0pqcQID5O8rWgMgY/edVznkT3evLtPBlg== X-Received: by 2002:adf:e547:: with SMTP id z7mr12787550wrm.283.1610717625242; Fri, 15 Jan 2021 05:33:45 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r13sm14650825wrt.10.2021.01.15.05.33.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:33:40 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 786BD1FF98; Fri, 15 Jan 2021 13:08:30 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 09/30] gitlab: move docs and tools build across from Travis Date: Fri, 15 Jan 2021 13:08:07 +0000 Message-Id: <20210115130828.23968-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" While we are at it we might as well check the tag generation. For bonus points we run GNU globals htags into the public pages directory for publishing with the auto generated pages. Signed-off-by: Alex Bennée Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo Acked-by: Thomas Huth Message-Id: <20210114165730.31607-10-alex.bennee@linaro.org> -- 2.20.1 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4532f1718a..bd60f3e741 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -79,7 +79,6 @@ build-system-ubuntu: TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu moxie-softmmu microblazeel-softmmu mips64el-softmmu MAKE_CHECK_ARGS: check-build - CONFIGURE_ARGS: --enable-docs artifacts: expire_in: 2 days paths: @@ -111,7 +110,6 @@ build-system-debian: TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu MAKE_CHECK_ARGS: check-build - CONFIGURE_ARGS: --enable-docs artifacts: expire_in: 2 days paths: @@ -126,6 +124,17 @@ check-system-debian: IMAGE: debian-amd64 MAKE_CHECK_ARGS: check +build-tools-and-docs-debian: + <<: *native_build_job_definition + variables: + IMAGE: debian-amd64 + MAKE_CHECK_ARGS: ctags TAGS cscope + CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools + artifacts: + expire_in: 2 days + paths: + - build + acceptance-system-debian: <<: *native_test_job_definition needs: @@ -596,14 +605,21 @@ build-libvhost-user: - meson - ninja +# Prepare for GitLab pages deployment. Anything copied into the +# "public" directory will be deployed to $USER.gitlab.io/$PROJECT pages: - image: $CI_REGISTRY_IMAGE/qemu/ubuntu2004:latest + image: $CI_REGISTRY_IMAGE/qemu/debian-amd64:latest stage: test needs: - - job: build-system-ubuntu - artifacts: true + - job: build-tools-and-docs-debian script: - - mkdir public + - mkdir -p public + # HTML-ised source tree + - make gtags + - htags -anT --tree-view=filetree -m qemu_init + -t "Welcome to the QEMU sourcecode" + - mv HTML public/src + # Project documentation - mv build/docs/index.html public/ - for i in devel interop specs system tools user ; do mv build/docs/$i public/ ; done artifacts: diff --git a/.travis.yml b/.travis.yml index f2a101936c..3b574a5968 100644 --- a/.travis.yml +++ b/.travis.yml @@ -148,22 +148,6 @@ jobs: - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" - # Check we can build docs and tools (out of tree) - - name: "tools and docs (bionic)" - dist: bionic - env: - - BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.." - - BASE_CONFIG="--enable-tools --enable-docs" - - CONFIG="--target-list=x86_64-softmmu,aarch64-linux-user" - - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" - addons: - apt: - packages: - - ninja-build - - python3-sphinx - - perl - - # Test with Clang for compile portability (Travis uses clang-5.0) - name: "Clang (user)" env: From patchwork Fri Jan 15 13:08: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: 363643 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp324656jap; Fri, 15 Jan 2021 06:05:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRHdVn6Jh+SW1Oeqi9UKdntEzRbpwo4esEiQ/zSDuNNPUeDUmxbe+ucXbiExSY3Ioy6bWF X-Received: by 2002:a25:b320:: with SMTP id l32mr9595700ybj.104.1610719553688; Fri, 15 Jan 2021 06:05:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610719553; cv=none; d=google.com; s=arc-20160816; b=f7+0rCMd4ajUw72BfQjtqIrKgG+xpqEdbgC3YSLbnHXhOPN38NV++udPEIOR/efSzJ lMM2DVhSw3fZPpO5Ndtry19YrCtpqSTFG9QTUMHoVF+TGyyUCW6NTUQn1V4SQxZ4dK+9 KWi+Da2kDOz130E4WbyNvdcYMCPwcdFlnYAMVSfNhUk/KHuZ58raRhuD/gOLV6fbjM2d Ok3/AeoxtJ6v+H4BrAZt/BhTc7N69VgkBqUVgh1tO27DqyFW1gSVmq5BdD3jZcIg9SWO 75dORUf5cADvCCcGeavA4QROHNdhrsE4DFgOktDC9AJ+udge2MlDfbbMv5RT1HtOPecV u8Tg== 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=iJuG3Rfmdo42tUHxFy8AoALmnllEX6aTVqM1tNYHJiM=; b=a9+37itanrlMgZpolBH17A/d9Zj8cQMT2VyZjn7rAOVioA09tHTSjnSfsx6vOmqli2 mv9y7ykuPiB9u4RouO5vXgqeri0/pl+c2JX6C7IUTQKqEsgcXdwivyfdPqqP4/DgFkDG h+Qw4W+hsyHZpaqxIYZDbYRu4qGf6JbN3NBNBwjbApgwg3PlUG6yAAG/bUkvic+cbQYn 95V2wuIEOQEcrN7skNBfqX0/iCu1j/shkNY7HQGgGKdHI5oZ6Fm1gWC1UcXIuMcYN7+6 UXLuYp3dYnVX1bJHIjXk8Yfb58V1RzEFoTsHl/1K5q+geTmTPevZIx/9PZgo66M5DNJj JoVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=iQTyRNsJ; 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 m17si7565159ybt.241.2021.01.15.06.05.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 06:05:53 -0800 (PST) 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=iQTyRNsJ; 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]:49092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Pjd-0006jc-4E for patch@linaro.org; Fri, 15 Jan 2021 09:05:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42810) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0PEX-0001AA-DX for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:45 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:44448) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0PEV-00085m-JY for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:45 -0500 Received: by mail-wr1-x434.google.com with SMTP id w5so9278203wrm.11 for ; Fri, 15 Jan 2021 05:33:43 -0800 (PST) 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=iJuG3Rfmdo42tUHxFy8AoALmnllEX6aTVqM1tNYHJiM=; b=iQTyRNsJ84WZf2d3BDqSxdfSv+yOUZuSS/TQqO1joOBR72VCHkKddoPh7wZS3cyY0M z5YvWtwz/qaunIY33vwKCnblHflELSoYrrrJNtOXO+TphYXTG+F7SZ3J15NIISo7FXYK JrCDMsofITg+Eh5Y/j8x+kpurVtb//QnRVGEVVadMBehVqCmMcbtEVpK62Tdmnl6dUcO NpzVX+82eklQ1SJnCSHbAiwk+63aSZCVhmAaMY6cc37/2BpmjqlDJwVMpmByqbtD0STV nBMkz8r/JQbAv5wq+ljFCHs7XiDhdTEwUuHwNTvUPAOZuHhuc7u/z4vgo/bLKDEh3wJe VhuA== 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=iJuG3Rfmdo42tUHxFy8AoALmnllEX6aTVqM1tNYHJiM=; b=biMEXW/HkXAWbo0VaK3iKxxyYebkK2LhTJL8OzxsGrjUFbDA7Yr7dcd53aPuWENif2 d/ir+fVA3EtHcMYJqqoU6OuFEWfFm5mrHIKABC/dT0bnPfHGQy29HkJmEMTXt0SoWGqO jSfegE0gyEhS4mmbHM7ot65qoNCOdyJcHVphh166wuPpDKf7YwOyPaodtcpazwvDhA+0 wjtkRSyOsP5PdWamxpCSkJ19cdAe/XAVW/leCDcwXe/5m9Mz9wyPbPnZbhUA4ihhtKeU DwwcMocR2jpd3vW7xU6EChNaSnA4hKvsDvZi/ruyuT/Ny6A3ee3Riv6HJ3AEYEzk6xEw i5rQ== X-Gm-Message-State: AOAM530yOQIolDWYD1vJZj6++ezkaEJrFja6uEpBt797ERx7bmz66U7v Mj24MgxdUDau3Av9l7qPH/JsPQ== X-Received: by 2002:adf:fb85:: with SMTP id a5mr13198597wrr.331.1610717622256; Fri, 15 Jan 2021 05:33:42 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g194sm12691056wme.39.2021.01.15.05.33.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:33:40 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BC2C31FF99; Fri, 15 Jan 2021 13:08:30 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 10/30] Fix build with new yank feature by adding stubs Date: Fri, 15 Jan 2021 13:08:08 +0000 Message-Id: <20210115130828.23968-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Lukas Straub , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Paolo Bonzini Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Lukas Straub Fixes: 50186051f42 ("Introduce yank feature") Signed-off-by: Lukas Straub [AJB: tweak MAINTAINERS] Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210114141918.5201cc9c@gecko.fritz.box> Message-Id: <20210114165730.31607-11-alex.bennee@linaro.org> -- 2.20.1 diff --git a/stubs/yank.c b/stubs/yank.c new file mode 100644 index 0000000000..6090416065 --- /dev/null +++ b/stubs/yank.c @@ -0,0 +1,29 @@ +#include "qemu/osdep.h" +#include "qemu/yank.h" + +bool yank_register_instance(const YankInstance *instance, Error **errp) +{ + return true; +} + +void yank_unregister_instance(const YankInstance *instance) +{ +} + +void yank_register_function(const YankInstance *instance, + YankFn *func, + void *opaque) +{ +} + +void yank_unregister_function(const YankInstance *instance, + YankFn *func, + void *opaque) +{ +} + +void yank_generic_iochannel(void *opaque) +{ +} + + diff --git a/MAINTAINERS b/MAINTAINERS index cb0656aec3..07e4851aa4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2736,6 +2736,7 @@ Yank feature M: Lukas Straub S: Odd fixes F: util/yank.c +F: stubs/yank.c F: include/qemu/yank.h F: qapi/yank.json diff --git a/stubs/meson.build b/stubs/meson.build index 80b1d81a31..1a656cd070 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -47,6 +47,7 @@ stub_ss.add(files('vm-stop.c')) stub_ss.add(files('win32-kbd-hook.c')) stub_ss.add(files('cpu-synchronize-state.c')) if have_block + stub_ss.add(files('yank.c')) stub_ss.add(files('replay-tools.c')) endif if have_system From patchwork Fri Jan 15 13:08: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: 363641 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp320889jap; Fri, 15 Jan 2021 06:02:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJykvn5yMu1sQmWWAq0cH67H6JUajKgSdDhkHrlAzLFBPOTUEgiGgIn+yK7eTv4qPGDv2ekD X-Received: by 2002:a25:1541:: with SMTP id 62mr18485480ybv.484.1610719331929; Fri, 15 Jan 2021 06:02:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610719331; cv=none; d=google.com; s=arc-20160816; b=ScZla2V4O75Rxpsl4AytglTEpSBlHCAIuxxyFgTTjNE8GQxkqMtS1SSW0bExDKk7DC O0FM7eSKBF7vTjz6HkZhzPT36UIJodBTX7D4eGAo9Kz/vx4xrvuDY2+i2p9TKijHB1GB skuQAY/W+lxKt/IAsbMLoS91OCLPqJLmk1LC12SyQqifCWqa6NQA500S+w4/dO2cIHIP wmgqnJpbVqMZVe971VEDStxRC5gptpz98MDD7tGgd2uWfMJOcd6AvBChLUmoxOkHBVhb CQKp0dQ5DA1/mRZ7SMWEQQcuX01DmuM/lo+wGtcsMeGf2vwfL7AqFbCJfUR/wAoksXde pP7A== 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=9l5GkCqPTLZXmRBOi/YdjflOtXCCeq14JR2oZmMiTyU=; b=KAM9GBYFjiBDnQ7DckS4ZIGonH689//e5ISsUS7sHpdTUxfNTfcqPLzcUr1gowSu0x jvFaSeTDgSyvRHLxaXrtlfR36u/D8+6NAgCPLZRH73L9s4RaJj06KiFG8TFcqS1T1NKN RHMmVkF8kn4eVjPw/b5mhUPLFelY1oLupT4wvREl5ucKZCC5gj65Ht80jX9g/frgTXPz cARiYZJ8Lheda0SuTKu1Esl0ndAevOmiGMkdZUdu63k125V2V1A8p8nT3Te1q0E/P5t3 +Nqusy/H+rqy5dclp0pDYBdLdIJ8PWN7fUSePV2vxvOokWDLwZbpq2u0GSC09dzcqped KS+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rf4Wu690; 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 a4si1964138yba.90.2021.01.15.06.02.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 06:02:11 -0800 (PST) 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=rf4Wu690; 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]:38882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Pg3-0002Yj-Ak for patch@linaro.org; Fri, 15 Jan 2021 09:02:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0PEU-00012K-2b for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:42 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:36301) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0PER-00083s-0b for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:41 -0500 Received: by mail-wr1-x436.google.com with SMTP id 6so1998051wri.3 for ; Fri, 15 Jan 2021 05:33:38 -0800 (PST) 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=9l5GkCqPTLZXmRBOi/YdjflOtXCCeq14JR2oZmMiTyU=; b=rf4Wu690iN9cZNxbxd/BeLkccLH3IkbSZSKBHyU5/5x7H44FxfQxkOi8n8SBg/HIdO K6CrPi+7jIaWzoCq7lutRUmJ0D3QFKI//qxC/dDgmZD4pP2ltLI5UhlVyO6RBVBK/Ota AEKKCbLeRL5ALSGsbamjDyi5rX07wYzt/Dk5cLG2PaLdd+3jrCWfI/Fi/dp/+w4LVNkR QH80r+8m3jRpg8dEiQ5vW8iQX3ZSKo//ysRrYO0rOV94MO3y80DcAF+9TTDrXjdmaQAF lJYA7WA/0UxLbg37a3wvtoN+7UcYayQKm/w845QARnhTgLKDVwtTRzyvWaEt73vDs71a M1fw== 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=9l5GkCqPTLZXmRBOi/YdjflOtXCCeq14JR2oZmMiTyU=; b=Yi+3v23YjdhPhIQbexlRnwxvwuwfMzsAW8OyA7NbpmjqMxZS80id3JYAWEfZkBud4S Yh0mFyB+/VaBC7nVhon8F4gddONN4PLc+ItvIhmKu8w2Ll3AQR3D1m97hPjkTUuWh3lH i5aC3BvNMqRBNRaKt2ddjV+KplUPci7EUun/7Eos9kGZs9r/jr/zRFr8jmbBYNoBg8Gb zVDtFoOkqzhIPQBUOCurSzGfTpAvmVT2v65L1g7y2lPCaGFqjLsxDGK1oqAE4WhpgDmQ /74vQh0ZWvUXcgsVfiixoCSUvLrA9dBxrQIKt/EEuXN8ZnJD+3Q4vhOyUB/R014PhgPc hZbg== X-Gm-Message-State: AOAM531hCWBEXFVN/FynUWenE1gqjusssp7RSGQmEvQSYus4I8nw+G5w yAnjE3SyK1ST5JgRhLj58agCWQ== X-Received: by 2002:a05:6000:368:: with SMTP id f8mr13171063wrf.150.1610717617491; Fri, 15 Jan 2021 05:33:37 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v126sm1471163wma.22.2021.01.15.05.33.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:33:33 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 016401FF9A; Fri, 15 Jan 2021 13:08:31 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 11/30] gitlab: migrate the minimal tools and unit tests from Travis Date: Fri, 15 Jan 2021 13:08:09 +0000 Message-Id: <20210115130828.23968-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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: Fam Zheng , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" These tests are good at shaking out missing stubs which otherwise work if we have built targets. Rather than create a new job just add the checks to the existing tools-and-docs build. Signed-off-by: Alex Bennée Reviewed-by: Willian Rampazzo Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210114165730.31607-12-alex.bennee@linaro.org> -- 2.20.1 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bd60f3e741..fd0162ad29 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -124,11 +124,13 @@ check-system-debian: IMAGE: debian-amd64 MAKE_CHECK_ARGS: check +# No targets are built here, just tools, docs, and unit tests. This +# also feeds into the eventual documentation deployment steps later build-tools-and-docs-debian: <<: *native_build_job_definition variables: IMAGE: debian-amd64 - MAKE_CHECK_ARGS: ctags TAGS cscope + MAKE_CHECK_ARGS: check-unit check-softfloat ctags TAGS cscope CONFIGURE_ARGS: --disable-system --disable-user --enable-docs --enable-tools artifacts: expire_in: 2 days diff --git a/.travis.yml b/.travis.yml index 3b574a5968..5f1dea873e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -119,15 +119,6 @@ after_script: jobs: include: - # Just build tools and run minimal unit and softfloat checks - - name: "GCC check-unit and check-softfloat" - env: - - BASE_CONFIG="--enable-tools" - - CONFIG="--disable-user --disable-system" - - TEST_CMD="make check-unit check-softfloat -j${JOBS}" - - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default" - - # --enable-debug implies --enable-debug-tcg, also runs quite a bit slower - name: "GCC debug (main-softmmu)" env: From patchwork Fri Jan 15 13:08: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: 363650 Delivered-To: patch@linaro.org Received: by 2002:a17:906:fb05:0:0:0:0 with SMTP id lz5csp559728ejb; Fri, 15 Jan 2021 06:33:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/D9ap+QE5NY4e302NcEOBGEhO0CXdLdCH89Fp79doRAwCJFfLX8OKL/kOxazTltKkttic X-Received: by 2002:a25:4843:: with SMTP id v64mr17463350yba.24.1610721188381; Fri, 15 Jan 2021 06:33:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610721188; cv=none; d=google.com; s=arc-20160816; b=uw48qlgxyGWZSrb5opVK/cZjXMOM3Z0wcXRxCILIKoXnfE4nHwz0aL6nkJGOXCXl1R ww9OR0D0UfBHv8CmkctKgnrlFac9Lb9p1+v5q7ef4KjJVgHoF1NvYMZqZttlnuerijjG VPRpLmHCEpDGzTzlCVvrIS1LFVvEg7l+2tIVCKB9v3VNr9ttqIPTRleZFYlrzQfIU36a IAxQ/XnI6jxawGuKFtzI6KdXxqkOtsZtvHzXWSS4JKJHMmq1TGBmt5S6bz5MkL8ehMnT HHTsjwhHRg9MfOshwGmJWqMMVpNv9PKmqWqm+mvuzqDjIHWPOSZX65UeUeQYReEzJXdO bT7w== 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=dUtwtJbUZsSTf0W75DM+q3KlG12586cM2haaQCIRHuk=; b=le0Vp9JlP+ZBpC95JwyyaoKI6rFgdANSJ/X/nyamOPNmSelN9uQsDKIyheHQjxoMwe LMvW/3z9cZcDOEa/cuK5ZilLeo9L83clB8d3UeIwzoD8ynfES0r5WnBgy0Nh111h7qie 7QViu+3lSyKAKHjJyZ5C/X9Sx0DHja9Lx5m/dBoMBH6nvahuAoB6dxt1WutPQbsDwQjN dO9T0kVByDwhdq96ruvl0jUb9kliTjAIl1bIfGMhdv0VkFHPEB5ywwFJB4F+LLwE2Q2O sPLwcQySj7rUwBbgAacoSOoc4t/x/q2qN+f+gYfeCNYDzGM5oAfZDz2diOPxU6w03KXV mjBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VLD33elQ; 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 e12si1612699ybj.185.2021.01.15.06.33.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 06:33:08 -0800 (PST) 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=VLD33elQ; 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]:43506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Q9z-0007Pc-QG for patch@linaro.org; Fri, 15 Jan 2021 09:33:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42880) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0PEc-0001Mo-Q2 for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:50 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:55118) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0PEa-000894-Vr for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:50 -0500 Received: by mail-wm1-x32a.google.com with SMTP id i63so7376596wma.4 for ; Fri, 15 Jan 2021 05:33:48 -0800 (PST) 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=dUtwtJbUZsSTf0W75DM+q3KlG12586cM2haaQCIRHuk=; b=VLD33elQ3q3lJW2HhLrmNQronVELMi2mRbDhRTENVB8YnttDZvBflhnr63X8IQQATS zk7Nl8OV0UHnfFKxbfd4D3DFbjyHGt2moHv8VXJCpD41Q2rohYHB9264XZkloc1dBsep JGA20tSu/95Y8+S7sRqMhw029OOEcpd9f/DYOJrD6oScDYIR5FpKHOLyDLO7nN8Sfq3k RUxmeaKFFbn+kbb6BwSaZZzv/vtU+ME9YBewsuEvXKOY1TqozMBowSQ+Ez3V+MEVw5Oh nYdS/fAXovbh+X4B4CikvXIr2VBYGEge/4of61QxLAWUq+G21LLkXqoFTWyA6Y38dC7L NE2g== 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=dUtwtJbUZsSTf0W75DM+q3KlG12586cM2haaQCIRHuk=; b=FQOUn58cTPNHbQ9j9pXfx3+iedf9B+MuKXCAtIU371QO90GNtKQS6oRsXLHXVZtCiB JvC7JOBuXwNBXMD5EcU1J4cTTEBQcN3at6odknBr5BulRBeWZcusVgn6ql1fMsbvHZ1w XxSq7oDpnyyRrbUgHlhzUCQ11LZqE3E/BU9OUyyk6VlGriFLRoeVvjRGMZWZh1OZ0dbH C5GuMmcbNoj+kHVXU1nNk/4WZcm+0MLW/BgTRw425CDCh20dv7UPYa+TVW8WqZ9ssfID 3fqSIlHNbGmFwhgEfss6SACHc8+CHFQmkfJG0bpbp9WtMS+7FAXVgaXU0zjgR5jV3crK Urtg== X-Gm-Message-State: AOAM530pFi5AYdzNRZVhl4hBezyYCs9UKsbrvlrSF7HFyc4WyAZ//0wO QkTwcc92W/1Vq4H+x9HPhjp5Ww== X-Received: by 2002:a7b:cb9a:: with SMTP id m26mr8713365wmi.130.1610717627562; Fri, 15 Jan 2021 05:33:47 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id t1sm15325867wro.27.2021.01.15.05.33.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:33:40 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 29EEC1FF9B; Fri, 15 Jan 2021 13:08:31 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 12/30] scripts/checkpatch.pl: fix git-show invocation to include diffstat Date: Fri, 15 Jan 2021 13:08:10 +0000 Message-Id: <20210115130828.23968-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-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: Willian Rampazzo , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Without this checkpatch keeps complaining about new/changed files even when MAINTAINERS has been updated. Normal invocations of checkpatch on patch files rather than commit IDs are unaffected. Signed-off-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé Reviewed-by: Willian Rampazzo Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210114165730.31607-13-alex.bennee@linaro.org> -- 2.20.1 diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 88c858f67c..e47ad878d8 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -399,7 +399,7 @@ if ($chk_branch) { my $num_patches = @patches; for my $hash (@patches) { my $FILE; - open($FILE, '-|', "git", "show", $hash) || + open($FILE, '-|', "git", "show", "--patch-with-stat", $hash) || die "$P: git show $hash - $!\n"; while (<$FILE>) { chomp; From patchwork Fri Jan 15 13:08: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: 363636 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp303178jap; Fri, 15 Jan 2021 05:39:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3UWm00oRGznyuH5+UPVvJIBtprWdp6H9DXgREgJahQC/XHCMGP/WU85xX7eJkkkkjNqVh X-Received: by 2002:a25:d1c4:: with SMTP id i187mr18664797ybg.106.1610717949620; Fri, 15 Jan 2021 05:39:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610717949; cv=none; d=google.com; s=arc-20160816; b=BDgnvYIbBRgYeHbVVEEZZ+cuLo2Hj4wE944vZ8SVDYxGjmS3kKs11bCxt7TFcVXEd7 qyaNcUtkmP1EcBzX2yQbrUJrXbKAZJ/gt1JXB1NekfaIWE9FF1oYA0rveG6xi+rrmVKI z2j7fSTiB50IhTp64Vtz6nCWt2ie/az6tUC0i+TdCtAGtJXfApJAe5cPobC2VMv/Z8Uu loNhY3og011CLZyPWQ0hpoCuq453Yhr0PNmNqe7ecDKM0wOITm1BV5Fbn5YAIwQzOtmD moRGsqNCVk71l4l2E1tthIM9eLgTI43Lm2A3oj5JnljQH2JIcjrXqVjW8P+hnWFvWETU FOHA== 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=0DLaq5XO4L95+WalvO7hnVvFiqtWHgwlFOevcPsbzXs=; b=pbKkNKTZz+1xADXJ0jWakMtdiQwpHhJ4ioZUAsJ+322i2qsdiiZQj4dBwmPWnmJL1W NAzPYJXPoVcFxfgenzIbI7KEMkF6ANExVa4RrcpxKwn44MUNLXVC9Rr3/E37Nk/mXsfX G0JIy45xwDl/IkH5+TDIoBRAGwBV+9xuM+i3tEYBHbf1tTkcbvba0c8054x5M/FCgmvj zDzojnNA81migro2A4iC6Y3vMDUjwAZaLb5VO5wfWNZVAKlEn1d6agIO5gYVs4NRhMQX 8T7SDHi+zqpN0Ajr67ov62mcTCcZ+TC9kb4kQeSGVjMGvezqogH+NRpgFSzdReLknXFQ LYfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=e6OBOMe5; 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 z65si8115090ybc.309.2021.01.15.05.39.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:39:09 -0800 (PST) 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=e6OBOMe5; 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]:52654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0PJj-000681-DV for patch@linaro.org; Fri, 15 Jan 2021 08:39:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0Ozv-00051K-W5 for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:18:40 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:36145) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0Ozs-0002Hl-W5 for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:18:39 -0500 Received: by mail-wr1-x433.google.com with SMTP id 6so1951564wri.3 for ; Fri, 15 Jan 2021 05:18:36 -0800 (PST) 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=0DLaq5XO4L95+WalvO7hnVvFiqtWHgwlFOevcPsbzXs=; b=e6OBOMe5RiWkTgeeuZd+4ikTf71g5JG8sljKDtJhejRfq8K424gzngugp1kJOa61/f 8Hecha+SOocYCrzQru4RjUmE8A2xPXToTYBZBMVzwFDeIrzYKvKmvA2CVEQVAEOdJh55 v7EMWzZAG5lbhvA6sjV8t6n4z5B7w/r/eFpB3dbPJfH4XappFCFbQouSdPN3e5qlHON5 lmn/8vgSAFywmUbkS5NRBaGBHIpkK1zEFcnPGtffpnLiKe5xO+gHU1mGc5oZcrKTf96+ sDxwLb/dfKEAOrN+s3OJwI6PK4cdUzgIBCzhg2fOYiEJ7h0azCbVVX8PYJOkLYu0UUjA 7Xqw== 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=0DLaq5XO4L95+WalvO7hnVvFiqtWHgwlFOevcPsbzXs=; b=G7x2G2cJ/gs2wLhE+gsHQITiOX8oOIXsbwcb3LEEQo6PX/Uc3XvWyrHXk7nKbROpGG CCdWgGqgsa08pk5FynslcDzg81Zlfv76L+g4p3cuWHWhjt8tfwi6VlCIElomjrpCk9dB SPHXkQVzggD+JzA7vWx2fM8ZezagOBvRRmL2LJOIhxbE7HXVgeUH1L2ybjM0/KLHsMfI G3XWTWTjm0QAAViMqsMS7ZDW1jRFZtIE/3uDaG7naasIirpOc20QH+p49KueYGyO7hPD LaNWsy5Oe5CuKCy6BxEQMRVGzBPbkV3Xp1jPvl6WHLWievR8VMg261G0jzSrD8c2HRjt M2/w== X-Gm-Message-State: AOAM530KzrnVQNZV9zWwwjQ5i9MHdaGVhPxOv4/PYS23XNmOy9XmeCwO 62ZWOD4yLwz1I5ZPDuhQGPqcXw== X-Received: by 2002:a5d:55c6:: with SMTP id i6mr13142545wrw.137.1610716714848; Fri, 15 Jan 2021 05:18:34 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f14sm13069710wme.14.2021.01.15.05.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:18:33 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 595EE1FF9C; Fri, 15 Jan 2021 13:08:31 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 13/30] test/guest-debug: echo QEMU command as well Date: Fri, 15 Jan 2021 13:08:11 +0000 Message-Id: <20210115130828.23968-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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: =?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" This helps with debugging. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210108224256.2321-3-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/guest-debug/run-test.py b/tests/guest-debug/run-test.py index 71c5569054..0c4f5c3808 100755 --- a/tests/guest-debug/run-test.py +++ b/tests/guest-debug/run-test.py @@ -53,6 +53,7 @@ if __name__ == '__main__': cmd = "%s %s -g %s %s" % (args.qemu, args.qargs, socket_name, args.binary) + print("QEMU CMD: %s" % (cmd)) inferior = subprocess.Popen(shlex.split(cmd)) # Now launch gdb with our test and collect the result From patchwork Fri Jan 15 13:08: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: 363637 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp305495jap; Fri, 15 Jan 2021 05:42:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJz87IwxHYrNYsT2oFeKvv8tvT/Bkk0stLnVaPyyn7c1P0I9dpRtuZ6NA7pE5AiTJtDoYH4a X-Received: by 2002:a25:1241:: with SMTP id 62mr18434853ybs.366.1610718126182; Fri, 15 Jan 2021 05:42:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610718126; cv=none; d=google.com; s=arc-20160816; b=Bln9PtPLxVZCeIrOMCvhGcP0woWBjsmfvcbf36KNus0g0IRPFgS3shjOnptyoWQpZM idDQkTso2jc+dSiiog3ZALo0OUPt4sd/zT565hxEOh1mBfZkR+NeB2uNawz2py0PzGYT Jlvtf0ndbzcmo5vcMo9lK+FIuEnvyVzOMDvki0Mt2hxDMX3tAnFnUm5mzyg/EjkGGean d/+Fy0kGqYhj2JvIcKtYea+6M3nOP/n1FVeZ3YYatHSllg01/UFKWhx1xUM7lo1NwsI4 sng+n6M8UUvgVzVP0pUmFMUAFX1E4P4f+NFYijYA16WkZ7cC5d2s3Fvgrut0wyTVLkpi TY4g== 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=MngZD7MAUlTLKXGuVgx7HmpB6eRFsW1jUL6SSCJlos4=; b=HIp0SN83CBRGhZ8QTyEGh84pw+EfHUnYAfTib/FmCkiEjdJhUlrXTGSNcS27cxYs1w Jz3sOn8IzfVkxAvtcYIc+fHn+zxsI0TMCK8yOjxGDzi8tVw37Cn40W5T6IRWHCtROARK oWtxJTBowBKo1B1gwuyjOsSw3PQ+8czFM1D0kGsI1mHp7ZmWzGOBnzsTPnddKWLVOmsB 7wZDiKi3o7J03HSh5kjyA6lI+s8jX+xgC1A/mw3Vqn8tKPNQdEwR+ZXPPNn/JQAB/8Rf 9PjCgo2vXOsuh4yMnZLD4OoL/YcxEZqtuOoiBjs8dIY4gYIF88M91b3fHuWNfADbdz85 VLBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=mAz4IzcN; 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 184si8215629ybz.73.2021.01.15.05.42.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:42:06 -0800 (PST) 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=mAz4IzcN; 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]:33266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0PMb-0001UD-JA for patch@linaro.org; Fri, 15 Jan 2021 08:42:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0Ozx-00055U-Gm for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:18:41 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:46963) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0Ozv-0002IS-Io for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:18:41 -0500 Received: by mail-wr1-x42a.google.com with SMTP id d13so9225724wrc.13 for ; Fri, 15 Jan 2021 05:18:37 -0800 (PST) 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=MngZD7MAUlTLKXGuVgx7HmpB6eRFsW1jUL6SSCJlos4=; b=mAz4IzcNWC3WECR6MTfbWLhLc0R1btqWr+oY87luKhUBrJNtQDiVYAN5011TyINzN0 pPKL+yxeu3dE9OkWa9DmWBHnNGwb2xewl+vO3d+uX/Ii0vIknHngbTOu8cZsd0xJ0iut pYLNMxdQ82fi+eJ7T9U4tGNTGzcnjQdGXLxg9KVp4GwG6/ID3+EM5unx3dIvqrDwTYUr M4YPThZUrH3EELiCbbX04dlyUlJMe2LJTyIY0w6KsHuecf19IU3D6xKQvD4GMeyiLqMP 1ZL7jqrL2a6kQC/3n1pTgzcG/J15CHIKwTUvRTleD0LDyyCwRBoujZhCBeDWxlm1tOf6 SaQA== 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=MngZD7MAUlTLKXGuVgx7HmpB6eRFsW1jUL6SSCJlos4=; b=rgKmKUkfGye43eL6hzJ7eswSR/8HWm/mx2ybpb6Gm8ndna5ST7/iyJc6j00da8csQy 5Wui4jBxlLzo9s8S1u6VBoUcX5TPYSPjm/KqRojjxvWbWD1QgSJ8ECVcY+PZ0FhiKK0K SVrTDcY2iFBXYu0j1p7ATCSU83mkju8OyyXqRWRv8yZhvpnQaiLcrvSPnHZu230ZMMcW e5WL9KiHXThfih4LxcjSoiUV87VWSE/eK52Byzu7uj50fQ5mfNMMmBuwpz5yBK65lkQr UBIzvHAVKg0FsQ2D6F6DpE1XratyntaTqOorAcLvRTpBXulvmiebChW3NWEqtFyGPPEt aKrA== X-Gm-Message-State: AOAM532twGr+lNw2ZEYvBieRSOczWOYjxK6bFJryOGwDk7bVCVtJlw7n 9KQ+y9O42E5NKw8jpwtAxxySxQ== X-Received: by 2002:adf:fd0c:: with SMTP id e12mr13141755wrr.61.1610716717039; Fri, 15 Jan 2021 05:18:37 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s13sm15767183wra.53.2021.01.15.05.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:18:33 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9019B1FF87; Fri, 15 Jan 2021 13:08:31 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 14/30] configure: gate our use of GDB to 8.3.1 or above Date: Fri, 15 Jan 2021 13:08:12 +0000 Message-Id: <20210115130828.23968-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The support of socket based debugging which we need for linux-user testing is only really stable as of 8.3.1 so lets gate our use of GDB on having a relatively modern version. For direct testing you can just point to a locally compiled version of gdb via configure, e.g.: ../../configure --gdb=$HOME/src/binutils-gdb.git/builds/all/install/bin/gdb Signed-off-by: Alex Bennée Message-Id: <20210108224256.2321-4-alex.bennee@linaro.org> -- 2.20.1 diff --git a/configure b/configure index 155dda124c..9f016b06b5 100755 --- a/configure +++ b/configure @@ -6166,8 +6166,11 @@ if test "$plugins" = "yes" ; then fi fi -if test -n "$gdb_bin" ; then - echo "HAVE_GDB_BIN=$gdb_bin" >> $config_host_mak +if test -n "$gdb_bin"; then + gdb_version=$($gdb_bin --version | head -n 1) + if version_ge ${gdb_version##* } 8.3.1; then + echo "HAVE_GDB_BIN=$gdb_bin" >> $config_host_mak + fi fi if test "$secret_keyring" = "yes" ; then From patchwork Fri Jan 15 13:08: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: 363647 Delivered-To: patch@linaro.org Received: by 2002:a17:906:fb05:0:0:0:0 with SMTP id lz5csp548281ejb; Fri, 15 Jan 2021 06:19:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyT4v+R2fiSPA0cZkMLKkGl/IoUV2po0IyqML5K7CYKswtYqrnDccAHxJI8OmHB4mNU23bh X-Received: by 2002:ab0:1c0a:: with SMTP id a10mr9501936uaj.89.1610720384891; Fri, 15 Jan 2021 06:19:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610720384; cv=none; d=google.com; s=arc-20160816; b=scV0dFPsZZLM1aWY3DS/B1anzk8ZayltzdfLaunFGdwST/74SX6MTmpiDWTg07ShKb b4yn1HJAhqZT8m76y4iDkFO1HZSd8c8Xqpof4u7Rd9QuZx+l7/JNxHMXeoOATRSZQ8Tq fUFaNtpXeFH3WHqt0LSefrnkcZajOKAEW0dKIufMJcEF6iMtyJbgj8Pw6R/SDQwTR9ao 5NB4CZxPsYzOR8FLLWU+BjcOnwc5amuuAHIwExkaJpdapWeHrJRHAuyiGWTSAHbfGcSj qrFlqlzmnqWPd9QffRQ7wHxcJ4pw48v1oUIJvrVP/tf6jfgoPwwqmIjZzOKJpGKMlfac i4GA== 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=moGIhp3Qh31dnVMf3+UGKfdn7lm3YI+E8Yw9+ZtUEYU=; b=MISkFRZfIPA7w12RqAZF88vu2JRCh47gaMkL51OnuWzZ4m9F7qpQqW8+oWLmQe/S9e XhMm361nSSm+/Do0YPJcWaPi5pJWrEabE/wZapFlYoE1jSntkv0sadj16u9xnWJpwapa GQE17w1yzd4EnnM7df3M7iqkCZiA0UpdRWuFC4uk7RR+e/Aj5+hPvnKBAPDYoCh7oreq rhWtRrVJ8kY3jqWXzukh5UN8Yj9fq1a9AHq4OxWh4K6h+FWt57dqmeJM8GxamZYlbV0W 5Y7izwPo8qcTJwOgbUHOAT+XaZV/oA2zsOliN4d2TA+0hicAn70uxfb56zMnkbtlR+My IQ7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=lOJuv7iS; 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 z135si2097666vsz.373.2021.01.15.06.19.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 06:19:44 -0800 (PST) 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=lOJuv7iS; 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]:59346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Px2-0006on-84 for patch@linaro.org; Fri, 15 Jan 2021 09:19:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0PEY-0001Bv-4N for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:46 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:39214) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0PEW-00087F-Kc for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:45 -0500 Received: by mail-wr1-x429.google.com with SMTP id c5so9295666wrp.6 for ; Fri, 15 Jan 2021 05:33:44 -0800 (PST) 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=moGIhp3Qh31dnVMf3+UGKfdn7lm3YI+E8Yw9+ZtUEYU=; b=lOJuv7iSRwTHqce2TNln6ZEgNB0vdm0gmjXxV9zBqbub3vh6hIDHDEN5OeL5yvrVxD 3xaeLH2Hdn3MCjmY7z3BiCWKPseJCgBw+JEycugNlySc9G7YEUJUZrt2SDHP3BdG5R6T wAEtkZn+ETnvneguWOhEAIqDbLZuHDJQv5u0Q+79xZZFjsjQDNp9GZzbv8tKlEIyuQg4 CmrcKP2BhqpNSVvL681ZDYrrX/oF4gsptopLJqvvHLdEB1TgreMn2JZMFT5zfld102Gn 8rMOtjk8cczRqYzuX/io0Js8oHmoWskVHrHwXBnjqK9Oj2TnfJuMpKJKi7kJLz55qxYI ml6w== 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=moGIhp3Qh31dnVMf3+UGKfdn7lm3YI+E8Yw9+ZtUEYU=; b=WIP1hNATXLaxgD14WrJPm6CTKgL/7z+IhTLCFXDaTifmhCsJKDnnQ5BudxvUvyWeDj X9MCdyNkDlMRF2w1GMLqRkfYsR75Ip1b+XEnhkw0CT1GEUtS6rp4sfsHVgiXfgzMVgxR 9bRO09r/BesNhd9f01MkNi4kDx87vCghpBCGmnt6ISVokAfOdjdgHr1Z2aL4mkV6PWPM bHL2dYhWPjjcku7iLb0Tjd9/59/JORCjShbuITrmVR5lrb31b2qzYg4jH+2Yp6GzMiGz wnQ8nfpp3V4MAE2R79cqitdv8+UNgoH+Or5c1aMlmbURe1bxYZQ0E7DAea5lsFOlfUHb OjRw== X-Gm-Message-State: AOAM5327ioULshj8AmQrnS2Y72riLLUS4yK37kzAfrzNyC2zkvq+6IBK w70orayKxbOE3e9uDPsiHplSQg== X-Received: by 2002:a5d:6204:: with SMTP id y4mr13226251wru.48.1610717623301; Fri, 15 Jan 2021 05:33:43 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id m18sm15105670wrw.43.2021.01.15.05.33.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:33:40 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C41A21FF9D; Fri, 15 Jan 2021 13:08:31 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 15/30] Revert "tests/tcg/multiarch/Makefile.target: Disable run-gdbstub-sha1 test" Date: Fri, 15 Jan 2021 13:08:13 +0000 Message-Id: <20210115130828.23968-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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: =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We won't attempt to run the test now it's gated on a newer version of gdb. This reverts commit a930cadd83b4681a98ce72abf530a791ee2e42a6. Signed-off-by: Alex Bennée Message-Id: <20210108224256.2321-5-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target index 230eb9a95e..cb49cc9ccb 100644 --- a/tests/tcg/multiarch/Makefile.target +++ b/tests/tcg/multiarch/Makefile.target @@ -54,9 +54,7 @@ run-gdbstub-sha1: sha1 --bin $< --test $(MULTIARCH_SRC)/gdbstub/sha1.py, \ "basic gdbstub support") -# Disable this for now -- it provokes a gdb internal-error on -# Ubuntu gdb 8.1.1-0ubuntu1. -# EXTRA_RUNS += run-gdbstub-sha1 +EXTRA_RUNS += run-gdbstub-sha1 endif From patchwork Fri Jan 15 13:08: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: 363629 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp289999jap; Fri, 15 Jan 2021 05:23:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbECwZmrN9i2RtUb59kmL1hP2PfRlCQwtxwy8FvplxtF/CqYJ2Pf/QbAuGBm0WNsN7YYfh X-Received: by 2002:a5b:307:: with SMTP id j7mr17661897ybp.362.1610716999393; Fri, 15 Jan 2021 05:23:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610716999; cv=none; d=google.com; s=arc-20160816; b=DdSw8AnsoYTgN4UIr5jVOsEUyn2T6+awASoGdx1uiQCgdfCIQ4Y0C3Yxkz2m1ZDY5Z qEdeY5MTr53F31eI6XqAU0aMSBBxzSfdr0i+t7ql7Bq8ILpporEj6a+RNMhzcCYzHRRN U7TGyvKoNf9jELvcF+8i89kNgl3FoxaWHGibqpdrRRdYcUq8dr+unsK+bROsfGVOroI5 iKorZtrntQcyXNzfQMS6poLU9WrZAb5FvBrAwCuv05fUru4wQ2P/NubPk2we+Ut2Gtws Z9IOadegcJiB/ZL2AYfWKHhiwEvFEqLf8BJjxTFeFtntlRJe5QLJZv2b4+NFfv9ZSizP wqAQ== 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=p0xKGCu2x+ajtEVrrvkR3jdCoMZYnyBd/7EmZo94xME=; b=GPy+i8Vebh8mnpBH5hxamvVkHA8EREB152E4RKxtcvpfYeYEsEOWWAw9HaMA3xns++ TEOgoQG99HczXo+kAenZo22xVHro+LWg8SJTUr+gMuqpaO8gCTH5T6iH3LkIUK3OJH0b wqsTkyuaQ5R8j0+k7TFy1/3SLWBCwltZdUiBUg+gtNgR2f9G5+NrDB5QiRU6qI7oQjLA gTBvFYG80Co9ylkscLPitrYSMnl+O88pAR5pYJbwycMRPTx5aQvz74Dz9Jfca4n/NoPf y0GQue4mOO+ulyLQUEiG+8bhmO+N+a9dr1e7wK5VQOwlE8CvZoxPFf9LhqX14bNwUKDQ bZdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=uUyqioFn; 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 f10si11544207ybi.343.2021.01.15.05.23.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:23:19 -0800 (PST) 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=uUyqioFn; 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]:43156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0P4Q-0006zr-Dj for patch@linaro.org; Fri, 15 Jan 2021 08:23:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0P0N-0005LW-5d for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:19:17 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:55007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0P0B-0002OQ-GH for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:19:06 -0500 Received: by mail-wm1-x331.google.com with SMTP id i63so7335827wma.4 for ; Fri, 15 Jan 2021 05:18:55 -0800 (PST) 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=p0xKGCu2x+ajtEVrrvkR3jdCoMZYnyBd/7EmZo94xME=; b=uUyqioFnk6Y8MDoFli/8DwB3LmjNFRe1sT6hnB6bFjt7PKI4aLJDy7r5mhiasNvSDe i884vJNhcRohs405lja7FXuPZspUKsFtKhO0ua0LMi1dkD/WSEnsI/VMckhMm8qYZGyH qEZi+ZpmdODsJommTFTXNK+pQVQiTmGKl525/lUuyoTbii/e3RxZKrf8OE5W/VJp/yhT c22WPxIUXd8wCkJCxFU2fPWM5aDeOehrteqagcSD+P45FW4NM+QGoCnVLyod7dmEchT6 giidZtbmwXCzK9QK28oUSDPDZAWYcOpVvDCWIN8I+cAssMWgQRA6gdG0PHbxARCfRdRp vuJA== 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=p0xKGCu2x+ajtEVrrvkR3jdCoMZYnyBd/7EmZo94xME=; b=QndVzFrE7J3YqfPuFNMp1pxY6T0bVMg414O6WIwBpq2pzhj5F3wYrIzy9thS0w9Hti /nI+jg1BhBy8zunlwFXW9oUtC4JzQD1jYInpCo+kY27h3/qbJwP7HCiRVN/bypr1UBeB K9Cd01S9HWwXZFbK4LlySCzR74LgJkZSMTwpYSPYu8meZou4dqNK/GgrNvWwLkhq/rMr mykW4kYC90RV6Lh4/KVxa/cXwkHUMNzaqFLNPYHF+ViizT2CMMTf4XfJRx4fZxgKL5eu 0D1RZ/6qmWsPvjIiIgZQp4a0ZhH9Zt8L/iZOlH2vqEgfblOVn1Iir3fLcEoTW3yL1T0R xx3w== X-Gm-Message-State: AOAM5317xpEuiPyXkdKuNx6apv9Pbwvxr/iicYKjcJdiwnZL+S1SoQrX 4R3wmAGcMerspCIeSoRn6CnwLQ== X-Received: by 2002:a7b:c397:: with SMTP id s23mr8527810wmj.63.1610716734142; Fri, 15 Jan 2021 05:18:54 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w13sm14377741wrt.52.2021.01.15.05.18.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:18:46 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1BCCD1FF9E; Fri, 15 Jan 2021 13:08:32 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 16/30] gdbstub: implement a softmmu based test Date: Fri, 15 Jan 2021 13:08:14 +0000 Message-Id: <20210115130828.23968-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.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: Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Richard Henderson , qemu-devel@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "open list:ARM TCG CPUs" , Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This adds a new tests that allows us to test softmmu only features including watchpoints. To do achieve this we need to: - add _exit: labels to the boot codes - write a memory.py test case - plumb the test case into the build system - tweak the run_test script to: - re-direct output when asked - use socket based connection for all tests - add a small pause before connection Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210108224256.2321-6-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/guest-debug/run-test.py b/tests/guest-debug/run-test.py index 0c4f5c3808..8b91ff95af 100755 --- a/tests/guest-debug/run-test.py +++ b/tests/guest-debug/run-test.py @@ -16,6 +16,7 @@ import subprocess import shutil import shlex import os +from time import sleep from tempfile import TemporaryDirectory def get_args(): @@ -27,10 +28,21 @@ def get_args(): required=True) parser.add_argument("--test", help="GDB test script", required=True) - parser.add_argument("--gdb", help="The gdb binary to use", default=None) + parser.add_argument("--gdb", help="The gdb binary to use", + default=None) + parser.add_argument("--output", help="A file to redirect output to") return parser.parse_args() + +def log(output, msg): + if output: + output.write(msg + "\n") + output.flush() + else: + print(msg) + + if __name__ == '__main__': args = get_args() @@ -42,18 +54,25 @@ if __name__ == '__main__': if not args.gdb: print("We need gdb to run the test") exit(-1) + if args.output: + output = open(args.output, "w") + else: + output = None socket_dir = TemporaryDirectory("qemu-gdbstub") socket_name = os.path.join(socket_dir.name, "gdbstub.socket") # Launch QEMU with binary if "system" in args.qemu: - cmd = "%s %s %s -s -S" % (args.qemu, args.qargs, args.binary) + cmd = "%s %s %s -gdb unix:path=%s,server" % (args.qemu, + args.qargs, + args.binary, + socket_name) else: cmd = "%s %s -g %s %s" % (args.qemu, args.qargs, socket_name, args.binary) - print("QEMU CMD: %s" % (cmd)) + log(output, "QEMU CMD: %s" % (cmd)) inferior = subprocess.Popen(shlex.split(cmd)) # Now launch gdb with our test and collect the result @@ -63,16 +82,15 @@ if __name__ == '__main__': # disable prompts in case of crash gdb_cmd += " -ex 'set confirm off'" # connect to remote - if "system" in args.qemu: - gdb_cmd += " -ex 'target remote localhost:1234'" - else: - gdb_cmd += " -ex 'target remote %s'" % (socket_name) + gdb_cmd += " -ex 'target remote %s'" % (socket_name) # finally the test script itself gdb_cmd += " -x %s" % (args.test) - print("GDB CMD: %s" % (gdb_cmd)) - result = subprocess.call(gdb_cmd, shell=True); + sleep(1) + log(output, "GDB CMD: %s" % (gdb_cmd)) + + result = subprocess.call(gdb_cmd, shell=True, stdout=output) # A negative result is the result of an internal gdb failure like # a crash. We force a return of 0 so we don't fail the test on diff --git a/tests/tcg/aarch64/Makefile.softmmu-target b/tests/tcg/aarch64/Makefile.softmmu-target index 1057a8ac49..a7286ac295 100644 --- a/tests/tcg/aarch64/Makefile.softmmu-target +++ b/tests/tcg/aarch64/Makefile.softmmu-target @@ -15,6 +15,7 @@ CRT_PATH=$(AARCH64_SYSTEM_SRC) LINK_SCRIPT=$(AARCH64_SYSTEM_SRC)/kernel.ld LDFLAGS=-Wl,-T$(LINK_SCRIPT) TESTS+=$(AARCH64_TESTS) $(MULTIARCH_TESTS) +EXTRA_RUNS+=$(MULTIARCH_RUNS) CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC) LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc diff --git a/tests/tcg/aarch64/system/boot.S b/tests/tcg/aarch64/system/boot.S index b14e94f332..e190b1efa6 100644 --- a/tests/tcg/aarch64/system/boot.S +++ b/tests/tcg/aarch64/system/boot.S @@ -197,6 +197,7 @@ __start: bl main /* pass return value to sys exit */ +_exit: mov x1, x0 ldr x0, =0x20026 /* ADP_Stopped_ApplicationExit */ stp x0, x1, [sp, #-16]! diff --git a/tests/tcg/i386/Makefile.softmmu-target b/tests/tcg/i386/Makefile.softmmu-target index 1c8790eecd..5266f2335a 100644 --- a/tests/tcg/i386/Makefile.softmmu-target +++ b/tests/tcg/i386/Makefile.softmmu-target @@ -19,6 +19,7 @@ CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC) LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc TESTS+=$(MULTIARCH_TESTS) +EXTRA_RUNS+=$(MULTIARCH_RUNS) # building head blobs .PRECIOUS: $(CRT_OBJS) diff --git a/tests/tcg/i386/system/boot.S b/tests/tcg/i386/system/boot.S index 90aa174908..794c2cb0ad 100644 --- a/tests/tcg/i386/system/boot.S +++ b/tests/tcg/i386/system/boot.S @@ -76,7 +76,7 @@ _start: */ call main - /* output any non-zero result in eax to isa-debug-exit device */ +_exit: /* output any non-zero result in eax to isa-debug-exit device */ test %al, %al jz 1f out %ax, $0xf4 diff --git a/tests/tcg/multiarch/gdbstub/memory.py b/tests/tcg/multiarch/gdbstub/memory.py new file mode 100644 index 0000000000..67864ad902 --- /dev/null +++ b/tests/tcg/multiarch/gdbstub/memory.py @@ -0,0 +1,130 @@ +from __future__ import print_function +# +# Test some of the softmmu debug features with the multiarch memory +# test. It is a port of the original vmlinux focused test case but +# using the "memory" test instead. +# +# This is launched via tests/guest-debug/run-test.py +# + +import gdb +import sys + +failcount = 0 + + +def report(cond, msg): + "Report success/fail of test" + if cond: + print("PASS: %s" % (msg)) + else: + print("FAIL: %s" % (msg)) + global failcount + failcount += 1 + + +def check_step(): + "Step an instruction, check it moved." + start_pc = gdb.parse_and_eval('$pc') + gdb.execute("si") + end_pc = gdb.parse_and_eval('$pc') + + return not (start_pc == end_pc) + + +# +# Currently it's hard to create a hbreak with the pure python API and +# manually matching PC to symbol address is a bit flaky thanks to +# function prologues. However internally QEMU's gdbstub treats them +# the same as normal breakpoints so it will do for now. +# +def check_break(sym_name): + "Setup breakpoint, continue and check we stopped." + sym, ok = gdb.lookup_symbol(sym_name) + bp = gdb.Breakpoint(sym_name, gdb.BP_BREAKPOINT) + + gdb.execute("c") + + # hopefully we came back + end_pc = gdb.parse_and_eval('$pc') + report(bp.hit_count == 1, + "break @ %s (%s %d hits)" % (end_pc, sym.value(), bp.hit_count)) + + bp.delete() + + +def do_one_watch(sym, wtype, text): + + wp = gdb.Breakpoint(sym, gdb.BP_WATCHPOINT, wtype) + gdb.execute("c") + report_str = "%s for %s" % (text, sym) + + if wp.hit_count > 0: + report(True, report_str) + wp.delete() + else: + report(False, report_str) + + +def check_watches(sym_name): + "Watch a symbol for any access." + + # Should hit for any read + do_one_watch(sym_name, gdb.WP_ACCESS, "awatch") + + # Again should hit for reads + do_one_watch(sym_name, gdb.WP_READ, "rwatch") + + # Finally when it is written + do_one_watch(sym_name, gdb.WP_WRITE, "watch") + + +def run_test(): + "Run through the tests one by one" + + print("Checking we can step the first few instructions") + step_ok = 0 + for i in range(3): + if check_step(): + step_ok += 1 + + report(step_ok == 3, "single step in boot code") + + # If we get here we have missed some of the other breakpoints. + print("Setup catch-all for _exit") + cbp = gdb.Breakpoint("_exit", gdb.BP_BREAKPOINT) + + check_break("main") + check_watches("test_data[128]") + + report(cbp.hit_count == 0, "didn't reach backstop") + +# +# This runs as the script it sourced (via -x, via run-test.py) +# +try: + inferior = gdb.selected_inferior() + arch = inferior.architecture() + print("ATTACHED: %s" % arch.name()) +except (gdb.error, AttributeError): + print("SKIPPING (not connected)", file=sys.stderr) + exit(0) + +if gdb.parse_and_eval('$pc') == 0: + print("SKIP: PC not set") + exit(0) + +try: + # These are not very useful in scripts + gdb.execute("set pagination off") + + # Run the actual tests + run_test() +except (gdb.error): + print("GDB Exception: %s" % (sys.exc_info()[0])) + failcount += 1 + pass + +# Finally kill the inferior and exit gdb with a count of failures +gdb.execute("kill") +exit(failcount) diff --git a/tests/tcg/multiarch/system/Makefile.softmmu-target b/tests/tcg/multiarch/system/Makefile.softmmu-target index db4bbeda44..4657f6e4cf 100644 --- a/tests/tcg/multiarch/system/Makefile.softmmu-target +++ b/tests/tcg/multiarch/system/Makefile.softmmu-target @@ -7,8 +7,25 @@ # complications of building. # -MULTIARCH_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/multiarch/system +MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch +MULTIARCH_SYSTEM_SRC=$(MULTIARCH_SRC)/system VPATH+=$(MULTIARCH_SYSTEM_SRC) MULTIARCH_TEST_SRCS=$(wildcard $(MULTIARCH_SYSTEM_SRC)/*.c) MULTIARCH_TESTS = $(patsubst $(MULTIARCH_SYSTEM_SRC)/%.c, %, $(MULTIARCH_TEST_SRCS)) + +ifneq ($(HAVE_GDB_BIN),) +GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py + +run-gdbstub-memory: memory + $(call run-test, $@, $(GDB_SCRIPT) \ + --gdb $(HAVE_GDB_BIN) \ + --qemu $(QEMU) \ + --output $<.gdb.out \ + --qargs \ + "-monitor none -display none -chardev file$(COMMA)path=$<.out$(COMMA)id=output $(QEMU_OPTS)" \ + --bin $< --test $(MULTIARCH_SRC)/gdbstub/memory.py, \ + "softmmu gdbstub support") + +MULTIARCH_RUNS += run-gdbstub-memory +endif diff --git a/tests/tcg/x86_64/Makefile.softmmu-target b/tests/tcg/x86_64/Makefile.softmmu-target index df252e761c..1bd763f2e6 100644 --- a/tests/tcg/x86_64/Makefile.softmmu-target +++ b/tests/tcg/x86_64/Makefile.softmmu-target @@ -19,6 +19,7 @@ CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC) LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc TESTS+=$(MULTIARCH_TESTS) +EXTRA_RUNS+=$(MULTIARCH_RUNS) # building head blobs .PRECIOUS: $(CRT_OBJS) diff --git a/tests/tcg/x86_64/system/boot.S b/tests/tcg/x86_64/system/boot.S index 73b19a2bda..f8a2fcc839 100644 --- a/tests/tcg/x86_64/system/boot.S +++ b/tests/tcg/x86_64/system/boot.S @@ -124,7 +124,7 @@ _start: /* don't worry about stack frame, assume everthing is garbage when we return */ call main - /* output any non-zero result in eax to isa-debug-exit device */ +_exit: /* output any non-zero result in eax to isa-debug-exit device */ test %al, %al jz 1f out %ax, $0xf4 From patchwork Fri Jan 15 13:08: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: 363626 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp282762jap; Fri, 15 Jan 2021 05:15:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJynDltmxszgKP8f4+2XLZ6/yG4MhPNx81z80cnG/NIikCqS636XSnGz9ePZwiDI5AMWMdcq X-Received: by 2002:a67:1341:: with SMTP id 62mr9851029vst.49.1610716504335; Fri, 15 Jan 2021 05:15:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610716504; cv=none; d=google.com; s=arc-20160816; b=jy7dfryl8hmrjBIY1mOjxEV2w8KxA4o335eLtwmpmKNfwSNYSPu+gyhzOtVb9nYXnA OGLD1UTKV5pXF2yXYEtKjdPr/phgGmNgfWqj6deUe7ZY2tE4qbL/pVxHq0LAVQKQEfMz vO5O+hqzn5sWAlLCQrHVyzTsfIjqpyt04OX1oSoYUClAapq3eti0m5YMJyOlw/K9tngw ESHgQd5rdACAtBkfd7ZDhjnJ0b3MU+peWb5yvoPn6bBgw8LIXMt023JJjXXPhWcwDqbz 266qE39W5zl66GBE8/QlENtK3X/7LQTueygoMf6OAsTL5En9G4FUWmg4c0CiqnR3KZFH Wxsw== 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=2GUhzUadCRVMspuODUa1CjJLdyIkkEbOLktjex9QAso=; b=mk3wLthUpWQKG8xQcj4o4ZLfLMEmDIEpg4r50l5wKMuL1FF5ndgcoL4NI3mautyWEk P+Nnai2wIEYey8hBve0oJR2P8V3p1MSGDyDtCIg771QEun6hv4MJQf0JfS5bJ9XmiHK4 TbBQ4lK6yudoG19F5G2V+QJLm6ErwzErtJYpChk1HUjclu+w4t7JNcYFAst9+lN5V95L ZDC/gjlJsWADVGjp+cJOi9iKY27c/xfRIm+aVehTraKoslhgjJOEWRO7YOnAJeeetoDG ZxXxR+2srZlkzF1GxYQkc+dnO0iu1NTWwGKxXjz232HIyMZsWs+/nKiApO5LXk61psEW 85xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ru4X31pv; 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 q6si1931143vsm.339.2021.01.15.05.15.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:15:04 -0800 (PST) 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=ru4X31pv; 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]:33172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0OwR-0002K0-KA for patch@linaro.org; Fri, 15 Jan 2021 08:15:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0OqW-0006Jp-4F for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:08:56 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:42545) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0OqS-0006av-Q7 for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:08:55 -0500 Received: by mail-wr1-x430.google.com with SMTP id m4so9205936wrx.9 for ; Fri, 15 Jan 2021 05:08:52 -0800 (PST) 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=2GUhzUadCRVMspuODUa1CjJLdyIkkEbOLktjex9QAso=; b=ru4X31pvQGX1+6QxQcU6wBx4HTlI0pcX16KjFZZJrtdwjRzMBIrSA2igYBwOHXrVJY q6QEla+GXCmTAVPe8oqUqdpn8nkesnkFkBLtfS4lUGjiQOy0p3Ewy5R5h9KUUrGjPSMQ 7Xfp8lWxfmYDktR/3C0tzD7mYPrL3aBG7X1dDq+djWdqxBAJVE82CfYdrlfaIBXpcIdr FE8MG7h0KWRaafXM8kOF6O7DXi0CPraYIlQ/QylW3dYSF5qXt/kCdeWHbWu35eLdLAPd nYtAhhh1932g8R35U4NZxpZz+MHbQzAx0CBB7xdzCfPXuBfXlgQw+ith8GLXdyvwVTPJ YPVA== 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=2GUhzUadCRVMspuODUa1CjJLdyIkkEbOLktjex9QAso=; b=nFrVN3+CIY5KWRDikHqU41/XkCi8POpiBNpGegXg05GezxDMUecSqmXRzAvGe6V5ll fcjaXZvjX8v3KeGNfk7hdP81blYmf2lzazcls/BmzfJymYh30viEj+VR8ecVpeuvoFD9 3HXXEGK1Y0hM4ZBU6sknu2J6n5hhTXKaTdKkicwFC4ym2YkbV7dIVCMBwPm26HqsV5Us 0JVPqpwB7iQl4OsvBjSCMdHBg0awNRwkh/s/xMHc3y84ywQrxWE2+kEsIZAa5iDM4N+w mXIOhINpmnifY7+efzVAg7Oyva26nhBP3qzfCbJXKY6mt0ZntW5XXvc0FeDwJuzjo1xR MdSg== X-Gm-Message-State: AOAM531/GDqCzdjAZiaf/cmPg4USJp4SBsaotHGwc2VEINutoWL7tA5f VUeOwfU5mRDFbKSHmuIPElJM+A== X-Received: by 2002:a05:6000:1884:: with SMTP id a4mr13238081wri.42.1610716131565; Fri, 15 Jan 2021 05:08:51 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id y11sm12293981wmi.0.2021.01.15.05.08.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:08:49 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 51C121FF9F; Fri, 15 Jan 2021 13:08:32 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 17/30] gdbstub: add support to Xfer:auxv:read: packet Date: Fri, 15 Jan 2021 13:08:15 +0000 Message-Id: <20210115130828.23968-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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: Richard Henderson , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Lirong Yuan Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Lirong Yuan This allows gdb to access the target’s auxiliary vector, which can be helpful for telling system libraries important details about the hardware, operating system, and process. Signed-off-by: Lirong Yuan [AJB: minor tweaks to test case, update MAINTAINERS] Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20200730193932.3654677-1-yuanzi@google.com> Message-Id: <20210108224256.2321-7-alex.bennee@linaro.org> -- 2.20.1 diff --git a/gdbstub.c b/gdbstub.c index d99bc0bf2e..15d3a8e1f5 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -2172,6 +2172,12 @@ static void handle_query_supported(GdbCmdContext *gdb_ctx, void *user_ctx) ";ReverseStep+;ReverseContinue+"); } +#ifdef CONFIG_USER_ONLY + if (gdbserver_state.c_cpu->opaque) { + g_string_append(gdbserver_state.str_buf, ";qXfer:auxv:read+"); + } +#endif + if (gdb_ctx->num_params && strstr(gdb_ctx->params[0].data, "multiprocess+")) { gdbserver_state.multiprocess = true; @@ -2233,6 +2239,46 @@ static void handle_query_xfer_features(GdbCmdContext *gdb_ctx, void *user_ctx) gdbserver_state.str_buf->len, true); } +#ifdef CONFIG_USER_ONLY +static void handle_query_xfer_auxv(GdbCmdContext *gdb_ctx, void *user_ctx) +{ + TaskState *ts; + unsigned long offset, len, saved_auxv, auxv_len; + const char *mem; + + if (gdb_ctx->num_params < 2) { + put_packet("E22"); + return; + } + + offset = gdb_ctx->params[0].val_ul; + len = gdb_ctx->params[1].val_ul; + ts = gdbserver_state.c_cpu->opaque; + saved_auxv = ts->info->saved_auxv; + auxv_len = ts->info->auxv_len; + mem = (const char *)(saved_auxv + offset); + if (offset > auxv_len) { + put_packet("E00"); + return; + } + + if (len > (MAX_PACKET_LENGTH - 5) / 2) { + len = (MAX_PACKET_LENGTH - 5) / 2; + } + + if (len < auxv_len - offset) { + g_string_assign(gdbserver_state.str_buf, "m"); + memtox(gdbserver_state.str_buf, mem, len); + } else { + g_string_assign(gdbserver_state.str_buf, "l"); + memtox(gdbserver_state.str_buf, mem, auxv_len - offset); + } + + put_packet_binary(gdbserver_state.str_buf->str, + gdbserver_state.str_buf->len, true); +} +#endif + static void handle_query_attached(GdbCmdContext *gdb_ctx, void *user_ctx) { put_packet(GDB_ATTACHED); @@ -2338,6 +2384,14 @@ static GdbCmdParseEntry gdb_gen_query_table[] = { .cmd_startswith = 1, .schema = "s:l,l0" }, +#ifdef CONFIG_USER_ONLY + { + .handler = handle_query_xfer_auxv, + .cmd = "Xfer:auxv:read::", + .cmd_startswith = 1, + .schema = "l,l0" + }, +#endif { .handler = handle_query_attached, .cmd = "Attached:", diff --git a/MAINTAINERS b/MAINTAINERS index 07e4851aa4..3216387521 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2322,6 +2322,7 @@ R: Philippe Mathieu-Daudé S: Maintained F: gdbstub* F: gdb-xml/ +F: tests/tcg/multiarch/gdbstub/ Memory API M: Paolo Bonzini diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target index cb49cc9ccb..1dd0f64d23 100644 --- a/tests/tcg/multiarch/Makefile.target +++ b/tests/tcg/multiarch/Makefile.target @@ -55,6 +55,15 @@ run-gdbstub-sha1: sha1 "basic gdbstub support") EXTRA_RUNS += run-gdbstub-sha1 + +run-gdbstub-qxfer-auxv-read: sha1 + $(call run-test, $@, $(GDB_SCRIPT) \ + --gdb $(HAVE_GDB_BIN) \ + --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \ + --bin $< --test $(MULTIARCH_SRC)/gdbstub/test-qxfer-auxv-read.py, \ + "basic gdbstub qXfer:auxv:read support") + +EXTRA_RUNS += run-gdbstub-sha1 run-gdbstub-qxfer-auxv-read endif diff --git a/tests/tcg/multiarch/gdbstub/test-qxfer-auxv-read.py b/tests/tcg/multiarch/gdbstub/test-qxfer-auxv-read.py new file mode 100644 index 0000000000..d91e8fdf19 --- /dev/null +++ b/tests/tcg/multiarch/gdbstub/test-qxfer-auxv-read.py @@ -0,0 +1,57 @@ +from __future__ import print_function +# +# Test auxiliary vector is loaded via gdbstub +# +# This is launched via tests/guest-debug/run-test.py +# + +import gdb +import sys + +failcount = 0 + +def report(cond, msg): + "Report success/fail of test" + if cond: + print ("PASS: %s" % (msg)) + else: + print ("FAIL: %s" % (msg)) + global failcount + failcount += 1 + +def run_test(): + "Run through the tests one by one" + + auxv = gdb.execute("info auxv", False, True) + report(isinstance(auxv, str), "Fetched auxv from inferior") + report(auxv.find("sha1"), "Found test binary name in auxv") + +# +# This runs as the script it sourced (via -x, via run-test.py) +# +try: + inferior = gdb.selected_inferior() + arch = inferior.architecture() + print("ATTACHED: %s" % arch.name()) +except (gdb.error, AttributeError): + print("SKIPPING (not connected)", file=sys.stderr) + exit(0) + +if gdb.parse_and_eval('$pc') == 0: + print("SKIP: PC not set") + exit(0) + +try: + # These are not very useful in scripts + gdb.execute("set pagination off") + gdb.execute("set confirm off") + + # Run the actual tests + run_test() +except (gdb.error): + print ("GDB Exception: %s" % (sys.exc_info()[0])) + failcount += 1 + pass + +print("All tests complete: %d failures" % failcount) +exit(failcount) From patchwork Fri Jan 15 13:08: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: 363631 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp292399jap; Fri, 15 Jan 2021 05:26:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxKMynuv9jAU2j8jQNYcABGYgzT3AsIyUCdh/kiizgdopXUUDHntTe2MtQxirTumA8PqMQv X-Received: by 2002:a25:31c1:: with SMTP id x184mr18472540ybx.365.1610717181135; Fri, 15 Jan 2021 05:26:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610717181; cv=none; d=google.com; s=arc-20160816; b=LOLhV6fpaqexbrhWVXAgxV7dS86XrJQQthPhcwSdMYg2VtGMfx9Wyqtm7i9h5hVvRn /9vCg7h4RgriHbY8FW41aho0fZTfOmeopD0WIJfeGwvLEtqWPcO4LZmd6k97pdpzex3j ylSdw8MEWGsi7ytbmpzT1uv7JNlvIijiAAlRAkayDrcpc0LKtde8XUFN94NXT7T2GGAu E8MsM87KjRDGGIn8tyH22JDGuRAfW9B5AtiNl5OKTEl7U8iqt7jfx/oiodyifOmH1Mi2 K1Uz45opbI9Epuo/wrgoW/YoEW46nx/GWIA42AtwbOipBmCx3TbYadgzBMBdSVBBIHcQ iX0w== 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=7M7Vxt1PgYxvSdpOyx8xpXMm+2OhKwvGp+AnPAxmwB4=; b=DQ1/4vcw6FFf3l3F9be8oodRG+/LMdCMzvlSj7CHoTUl1ZqgXjQCRlQN5yQgq33Dnd jzIdFE3RjFUb2xm7mwmSas41hmAS01RDu2d5DWjulhqQH2o7bHWFDgNU4Gna65Iyb1GC JrxFY4m2U9LnvHgosiUhprY7TcNcc+edkenpMMhCf3x0p9Q2EJk01qVIUf92ynvh2gNd dJh7nUySNS4QDik7a7t1HbMtExcQfAs9H3eaWo4ALZYMW1VoRrkTRpztpds5aXl9IcmI AdaEry7CpWrzyVddi+A3QFPHR/SDFUWBn0vOIhVpkV5X5YLPz0fDjGMb+ktDvV3+73r1 3k7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=dvK34jng; 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 b63si8755315ybg.240.2021.01.15.05.26.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:26:21 -0800 (PST) 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=dvK34jng; 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]:50478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0P7M-0001rP-Hy for patch@linaro.org; Fri, 15 Jan 2021 08:26:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0P0Y-0005N3-Sh for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:19:20 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:36148) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0P0L-0002Pt-Jh for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:19:10 -0500 Received: by mail-wr1-x432.google.com with SMTP id 6so1952675wri.3 for ; Fri, 15 Jan 2021 05:18:58 -0800 (PST) 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=7M7Vxt1PgYxvSdpOyx8xpXMm+2OhKwvGp+AnPAxmwB4=; b=dvK34jngeVjNhpIo6OuGqVHWL9V0Rph5hWt1vPduc+EBba00/PLzMb5FFnITHpydhr x0mw8icclClvYmRh1VNHbqAiMFpjiak83gPhPaOOkqocPsx0wEqqe7NBwxYhYLcO3UXT vw5AmOQyTguStkFlANTmE4AYbM+LWJjxpfxb0TYBWfKmPG+hIiDIgsuwnDbnbt3oTVEQ mbuvybwydJczsBBLb4uHHLmxzVdN2HhZljg+MXTbAx0Ycj3bcewN5rajWs5a5sDN6B3e 2QFwp20WXaW1MmRr40R8ZOnweE4G9wB6kV3jZ0Z7aJEgLeb9yQfFSiuNUTBH5tISSTMZ lfNQ== 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=7M7Vxt1PgYxvSdpOyx8xpXMm+2OhKwvGp+AnPAxmwB4=; b=fhm46oVCzPSIfojNTvPDa17KGCuOMWmuDMLP067f3gk5gpKS+7WNceprhF7OsaF51j XqF5kDYsPsHkhAmFeL/JLNuNGrrCokgYXfjH6RbQN9QXqE1K1WJ2/a8sBhyCxTaNMVUT iJzHmUbDq9g8m9grDPxuVQCfZLOr9ZVayrST6yIAepwe/M8xR0NAtGBDF73qElt6kSrv s2aLDZoX0Axih8PHBALsNbwbWQpDRMWUGg+4NcdX9wKzpL14S5cg+0gIi37gEZcUOIze eKw2vTtzlQ17jLT7gSZ7JBUag64plP6ioI8YVUFXfBFKMe4n5+Tgr9q8ljkJMhF9SNUH E3ag== X-Gm-Message-State: AOAM5313b9aso03O8xazj0n0yfAaP+YIpNBBTIuzsLAm6GRSF9l+HpBG r1BOPV8ihji23vxnS8rHs+6KUg== X-Received: by 2002:a05:6000:1624:: with SMTP id v4mr13554747wrb.210.1610716737821; Fri, 15 Jan 2021 05:18:57 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id g10sm6491497wmq.3.2021.01.15.05.18.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:18:56 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A537A1FFA5; Fri, 15 Jan 2021 13:08:32 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 18/30] gdbstub: drop CPUEnv from gdb_exit() Date: Fri, 15 Jan 2021 13:08:16 +0000 Message-Id: <20210115130828.23968-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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: Marek Vasut , =?utf-8?q?Alex_Benn=C3=A9e?= , Chris Wulff , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, "open list:ARM TCG CPUs" , =?utf-8?q?Philippe_Ma?= =?utf-8?q?thieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" gdb_exit() has never needed anything from env and I doubt we are going to start now. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210108224256.2321-8-alex.bennee@linaro.org> -- 2.20.1 diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 94d8f83e92..492db0f512 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -46,7 +46,7 @@ void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...); void gdb_do_syscallv(gdb_syscall_complete_cb cb, const char *fmt, va_list va); int use_gdb_syscalls(void); void gdb_set_stop_cpu(CPUState *cpu); -void gdb_exit(CPUArchState *, int); +void gdb_exit(int); #ifdef CONFIG_USER_ONLY /** * gdb_handlesig: yield control to gdb diff --git a/bsd-user/syscall.c b/bsd-user/syscall.c index d38ec7a162..adc3d21b54 100644 --- a/bsd-user/syscall.c +++ b/bsd-user/syscall.c @@ -333,7 +333,7 @@ abi_long do_freebsd_syscall(void *cpu_env, int num, abi_long arg1, #ifdef CONFIG_GPROF _mcleanup(); #endif - gdb_exit(cpu_env, arg1); + gdb_exit(arg1); qemu_plugin_atexit_cb(); /* XXX: should free thread stack and CPU env */ _exit(arg1); @@ -435,7 +435,7 @@ abi_long do_netbsd_syscall(void *cpu_env, int num, abi_long arg1, #ifdef CONFIG_GPROF _mcleanup(); #endif - gdb_exit(cpu_env, arg1); + gdb_exit(arg1); qemu_plugin_atexit_cb(); /* XXX: should free thread stack and CPU env */ _exit(arg1); @@ -514,7 +514,7 @@ abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1, #ifdef CONFIG_GPROF _mcleanup(); #endif - gdb_exit(cpu_env, arg1); + gdb_exit(arg1); qemu_plugin_atexit_cb(); /* XXX: should free thread stack and CPU env */ _exit(arg1); diff --git a/gdbstub.c b/gdbstub.c index 15d3a8e1f5..afa553e8fc 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -3068,7 +3068,7 @@ static void gdb_read_byte(uint8_t ch) } /* Tell the remote gdb that the process has exited. */ -void gdb_exit(CPUArchState *env, int code) +void gdb_exit(int code) { char buf[4]; diff --git a/linux-user/exit.c b/linux-user/exit.c index 1594015444..70b344048c 100644 --- a/linux-user/exit.c +++ b/linux-user/exit.c @@ -34,6 +34,6 @@ void preexit_cleanup(CPUArchState *env, int code) #ifdef CONFIG_GCOV __gcov_dump(); #endif - gdb_exit(env, code); + gdb_exit(code); qemu_plugin_atexit_cb(); } diff --git a/target/arm/arm-semi.c b/target/arm/arm-semi.c index f7b7bff522..93360e28c7 100644 --- a/target/arm/arm-semi.c +++ b/target/arm/arm-semi.c @@ -1101,7 +1101,7 @@ target_ulong do_arm_semihosting(CPUARMState *env) */ ret = (args == ADP_Stopped_ApplicationExit) ? 0 : 1; } - gdb_exit(env, ret); + gdb_exit(ret); exit(ret); case TARGET_SYS_SYNCCACHE: /* diff --git a/target/m68k/m68k-semi.c b/target/m68k/m68k-semi.c index 27600e0cc0..d919245e4f 100644 --- a/target/m68k/m68k-semi.c +++ b/target/m68k/m68k-semi.c @@ -195,7 +195,7 @@ void do_m68k_semihosting(CPUM68KState *env, int nr) args = env->dregs[1]; switch (nr) { case HOSTED_EXIT: - gdb_exit(env, env->dregs[0]); + gdb_exit(env->dregs[0]); exit(env->dregs[0]); case HOSTED_OPEN: GET_ARG(0); diff --git a/target/nios2/nios2-semi.c b/target/nios2/nios2-semi.c index d7a80dd303..e508b2fafc 100644 --- a/target/nios2/nios2-semi.c +++ b/target/nios2/nios2-semi.c @@ -215,7 +215,7 @@ void do_nios2_semihosting(CPUNios2State *env) args = env->regs[R_ARG1]; switch (nr) { case HOSTED_EXIT: - gdb_exit(env, env->regs[R_ARG0]); + gdb_exit(env->regs[R_ARG0]); exit(env->regs[R_ARG0]); case HOSTED_OPEN: GET_ARG(0); From patchwork Fri Jan 15 13:08: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: 363639 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp318206jap; Fri, 15 Jan 2021 05:59:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZaUSirvklJ/dDajxcOebEEwMMjclzMqO2gPJxjr3JC47ualO7Z7BxgyLLupzL3Vr0576E X-Received: by 2002:a25:9703:: with SMTP id d3mr17776530ybo.356.1610719156144; Fri, 15 Jan 2021 05:59:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610719156; cv=none; d=google.com; s=arc-20160816; b=xtj3vWb8Yg6eGikRYNVxVUhkSZBEJGiUBmCjiF916cqWcYJ7Gwb8RArvxCATFWvKAm dk5KF8BRmAYoJxN/MwnXsqslOEupR+D7xSZO2GKfViNGMomm8hnj1w6D8Dn8URsqpmXu V3Col+GGr+McFiA+1xA6j1eURPQ+kWUFXM9oKOMBrwPZcBQxQgOG9D+u/TyQ7KtASrsS AHlxLRTliP+c9Xc8dxuN2i0NUTBLTvJORLKc4lBGdGXx2CB9m9QgQp06J5oiHNQlmjAL +7ORY+FFn/HjN91/a/oOzDu6WkzzFDu+iLBlhiYGiE431zKAFCwunxRtTU7NOCOl3nKm UNgA== 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=ldh2RZcPciHS3IeZWtBzIRmDunW2E0Q1bR4gP7fB6wc=; b=uNaMpuQyto4PgdaZnCHLUXR9sTKNBzFKSpByuWuQbMilp4keBR5hqBXKNCOgfME/3E VqjAE9aOvLLZ0KP1NaW5go7GU2SYi5yfmE+w/6uhaaTbzdj9zA1qwf8eLxz9fQM0W1/8 zRjqbYKydjg8TG/leSkqERWnohr1L229DRpyzKRFYSybf9T/IciFGzEX26OmbNzvBWUF +BePQfSkK+xptswpUlmjuJHjBrp50/z/HkYKsJZhLs9tOoqXCv1eG2aRISacmo4Me0FT 9ECGzWJWMgdavddXzAsmPPXLn0M6WTa9yQKoZo2axfuT4jXLzLrCbSF42NN9Wth/g0+M X91w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HQ5GQ56V; 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 k12si10458452ybg.271.2021.01.15.05.59.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:59:16 -0800 (PST) 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=HQ5GQ56V; 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]:33082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0PdD-0008Ou-JK for patch@linaro.org; Fri, 15 Jan 2021 08:59:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0PEP-0000yN-Pb for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:37 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:40604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0PEN-00082O-O0 for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:37 -0500 Received: by mail-wr1-x42e.google.com with SMTP id 91so9308509wrj.7 for ; Fri, 15 Jan 2021 05:33:35 -0800 (PST) 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=ldh2RZcPciHS3IeZWtBzIRmDunW2E0Q1bR4gP7fB6wc=; b=HQ5GQ56V0smLxmh1tMc0TTB84e5CDmglMxtqYn3kiighh5X7S2ZI7FAviLWfwd+9WB BPgK2VYqA/xfxiJRvRRP1i0vXkIEONsUXRPYyXtwqoYNI1QXDUsHxzV4Q1OkiDsKHC3K Kc9ov0iwx/a1bNDsotUF+wb0pZWNrv9e0c6IBclUUqHCKBjxz+LPncZhYbh7dvm0LWa8 w9mYL03P4+sYIZlHhwA8MIKbs1Ejc0pmTUrYMU/CcVBnFkR9zWY+OMq+pLODkxY2+Pgo RdrK0E+Dy1UbYx7ZMpm8K3SYlWSGlhgQ5Ga+scn5acvzrIfU8ykDZUeEkyEpT8QgElly jkWw== 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=ldh2RZcPciHS3IeZWtBzIRmDunW2E0Q1bR4gP7fB6wc=; b=LLwQY0XbIO47WX7ib6MS2pSUwmX+ZG4rbi5DMsZlDneM5w3LMz2Z3EqgwH4OXQ7Oqq +MKIHApIGlZUm/pd76LwgJkYV2GmqbGykti/PBhwKPCV3tjB0rmO553sYiErvJnD9hEq zwnM7fDaXIN+HvGYJ7b2sVAr82la4YyQJcbcL337zSKNSlJFbWDm00NtBRyFDMqM/zpz LbBGT20jn5+9neX28WkUZ8kQqh0O+dtMj8loxBQRDFx3BLw0tA7SeTrHkZFSCQ2fFQTu mL7paDl493IdvxMRkYFBH4F4ouh8wH5xdlMeKPtR6Jek+fXeBWnX/vzJuyiBogNT0yx1 VhHQ== X-Gm-Message-State: AOAM533KSI61zyHbOmQCJ6as8205mYIKTo07P8wQnbWZBaVXvOjSJXBq aE4QkNrcTPhbPSDodZy601pqfA== X-Received: by 2002:a5d:660c:: with SMTP id n12mr13382075wru.291.1610717614171; Fri, 15 Jan 2021 05:33:34 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c10sm16528611wrb.92.2021.01.15.05.33.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:33:32 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DD2001FFA6; Fri, 15 Jan 2021 13:08:32 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 19/30] gdbstub: drop gdbserver_cleanup in favour of gdb_exit Date: Fri, 15 Jan 2021 13:08:17 +0000 Message-Id: <20210115130828.23968-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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: Richard Henderson , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , =?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" Despite it's name it didn't actually clean-up so let us document gdb_exit() better and use that. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210108224256.2321-9-alex.bennee@linaro.org> -- 2.20.1 diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 492db0f512..ff0b7bc45e 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -46,7 +46,17 @@ void gdb_do_syscall(gdb_syscall_complete_cb cb, const char *fmt, ...); void gdb_do_syscallv(gdb_syscall_complete_cb cb, const char *fmt, va_list va); int use_gdb_syscalls(void); void gdb_set_stop_cpu(CPUState *cpu); -void gdb_exit(int); + +/** + * gdb_exit: exit gdb session, reporting inferior status + * @code: exit code reported + * + * This closes the session and sends a final packet to GDB reporting + * the exit status of the program. It also cleans up any connections + * detritus before returning. + */ +void gdb_exit(int code); + #ifdef CONFIG_USER_ONLY /** * gdb_handlesig: yield control to gdb @@ -187,8 +197,6 @@ static inline uint8_t * gdb_get_reg_ptr(GByteArray *buf, int len) */ int gdbserver_start(const char *port_or_device); -void gdbserver_cleanup(void); - /** * gdb_has_xml: * This is an ugly hack to cope with both new and old gdb. diff --git a/gdbstub.c b/gdbstub.c index afa553e8fc..bab8476357 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -3547,13 +3547,6 @@ int gdbserver_start(const char *device) return 0; } -void gdbserver_cleanup(void) -{ - if (gdbserver_state.init) { - put_packet("W00"); - } -} - static void register_types(void) { type_register_static(&char_gdb_type_info); diff --git a/softmmu/runstate.c b/softmmu/runstate.c index 636aab0add..6177693a30 100644 --- a/softmmu/runstate.c +++ b/softmmu/runstate.c @@ -775,7 +775,7 @@ void qemu_init_subsystems(void) void qemu_cleanup(void) { - gdbserver_cleanup(); + gdb_exit(0); /* * cleaning up the migration object cancels any existing migration From patchwork Fri Jan 15 13:08: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: 363646 Delivered-To: patch@linaro.org Received: by 2002:a17:906:fb05:0:0:0:0 with SMTP id lz5csp546636ejb; Fri, 15 Jan 2021 06:17:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPleD+vUBkhFDX6hT0blcVgA0ZMPUwO2oilUkrcjYEPR75+YGJAOaIoHj3aUQNUAurACMC X-Received: by 2002:a25:e007:: with SMTP id x7mr17837263ybg.123.1610720274971; Fri, 15 Jan 2021 06:17:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610720274; cv=none; d=google.com; s=arc-20160816; b=GgL8g9IOIJqvYYM6wp0ip7ew9WH5SGeXtVBRi/2FuTDFbSLGHqN2BFDN50HyDTFMpk smVN4BeEfaVqJ3w3yliVU84lnFsQgGzTnfv9PZR8ysmHvbZy93CZJGmb9k8oTSja1Uwf L3UWIn5L8NSv8zGxx5VlDn2WkKQqCi6IYSgy24S6Ll1MO4bSkxHGmXEr1vK/iQSo7CQ+ ARsVWUzshIOJPrPaVSLQulLWEWL4gB8+AS+OQQSzzUCX/CkG5UYJpFnl3jYIRcvGiNaI Un7IntGlxZdE8r7DduQjKAQkoZcpe529pY5svhM6IG4FhwWsIlBKij7MUQ7CM6xaKUTH b7xQ== 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=fZE5uaIwLZldq7vEhz62Qdeapora369YG0j9BYJ0Rp8=; b=XzGo0uQyT7E1AiPheUI+t9sy0EyCEp1Tu+XcC6IJUEEWu740QYf4x0ZfAnd38QhcAX f9Kl/bfMLML9AQ7MEt2KSTSHmf7BVZld5gQKbyuHdL7FEuGODQn1GEXUjmkbb/FzEMnv 0pSFmfZc5LWT1XDFYWENK9HrFGNUnRRKUW/om/jcUBdAIm1iFOAeZirxnSlm6oCCYRGw XcII88HAgnDFUii+i8X+BTgOS8Uz0OeGFy0+ZqpghK8xZN7OByJV1wmuX1uqEXW5kDuY +Bfh65zLmcyIKOSgeAj1ZUYVbOin4T+5vcGHYfL8TP/BNc2KmGNn4gBvpYb7NFwJ1OJO VEiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=n4EoICc9; 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 m17si7585010ybt.241.2021.01.15.06.17.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 06:17:54 -0800 (PST) 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=n4EoICc9; 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]:52528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0PvG-0003rL-BA for patch@linaro.org; Fri, 15 Jan 2021 09:17:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0PEW-00017n-JB for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:44 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:35736) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0PET-00084z-Ed for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:44 -0500 Received: by mail-wm1-x330.google.com with SMTP id e15so1221666wme.0 for ; Fri, 15 Jan 2021 05:33:40 -0800 (PST) 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=fZE5uaIwLZldq7vEhz62Qdeapora369YG0j9BYJ0Rp8=; b=n4EoICc9z8Y/ZjPva6YEEFmJydxGhq3xJ2lMq0QJ56E3Y+TnLj9amK4CyqNgRHX5+B bsUdDdD/ZZAZ90yD2OPTc0dt5EP5ViZLC2GxZMsxd6EnmE9ot8WahPuwuVbGS6S1RqdO HKL4hWDqvH8U+loxmLnWRNzTmzC7zNt5fpje9okCkOwjkCKLomOE33ui9D1954Da+cvj fgPLqMoQnUFqf50o32boTft2vm4xwiEh9xL6BaYjkdae9xeigTOMHGEFy7L8hjEgLRr3 rUlJi+Jys7r0xmW5V6HqPlNzbyRyAoUQ9qgF+ilGr05rT2KwCUnLsQD8koxrMcfomphS 3zLA== 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=fZE5uaIwLZldq7vEhz62Qdeapora369YG0j9BYJ0Rp8=; b=ZJodVy4irbTERt1Y8rnF3KHGezj3c2V2orJ/qxoCWbr3z++VB/d+u5n0dNnYyCN0Qz iKJpGeSHGq3f9d6gBWTYIxUR9qBs+LKhuhHrKdO3Lese7APVZlt4viHaJX99B7OSWgiV rtoLXfLuuMdlNfm/yvAXqMTcO0Cpeo1QM1Sho3BOx3JP1BkCn2kPaSCi7DGyQrXhTYrV lIH7W6bskcdJe0mxaCK1GT5HT8dh1ncD3YTzMDrNFubJhm/on6Afd8zxWAUZ7+XiwNE9 +L5JRHk6RGCiqpduEFgrhVkkR56q8sDPnFMbD/4hTZRBrM2axX7uVZ9Im1lWCpGVYsN0 P2tA== X-Gm-Message-State: AOAM532f8ObeuYV2BdecmxOtBzqCmG5b/kLjL4/1hf6ifvAspP6DxYej GnrP3EKCmYpH5l90PNRPH2oQ3g== X-Received: by 2002:a1c:9ece:: with SMTP id h197mr3054045wme.76.1610717619674; Fri, 15 Jan 2021 05:33:39 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c4sm12625486wmf.19.2021.01.15.05.33.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:33:33 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0A5361FFA9; Fri, 15 Jan 2021 13:08:33 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 20/30] gdbstub: ensure we clean-up when terminated Date: Fri, 15 Jan 2021 13:08:18 +0000 Message-Id: <20210115130828.23968-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , =?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" If you kill the inferior from GDB we end up leaving our socket lying around. Fix this by calling gdb_exit() first. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210108224256.2321-10-alex.bennee@linaro.org> -- 2.20.1 diff --git a/gdbstub.c b/gdbstub.c index bab8476357..8c301edf32 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1978,6 +1978,7 @@ static void handle_v_kill(GdbCmdContext *gdb_ctx, void *user_ctx) /* Kill the target */ put_packet("OK"); error_report("QEMU: Terminated via GDBstub"); + gdb_exit(0); exit(0); } @@ -2539,6 +2540,7 @@ static int gdb_handle_packet(const char *line_buf) case 'k': /* Kill the target */ error_report("QEMU: Terminated via GDBstub"); + gdb_exit(0); exit(0); case 'D': { From patchwork Fri Jan 15 13:08: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: 363630 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp291139jap; Fri, 15 Jan 2021 05:24:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJw8+hmvqHuXGev54dgBQmEt23m5vJB4Uhp3E32aGWuC1cMeD/XtNu8FJUjmIL1lYq1pX10d X-Received: by 2002:a25:2c8b:: with SMTP id s133mr11882987ybs.61.1610717087605; Fri, 15 Jan 2021 05:24:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610717087; cv=none; d=google.com; s=arc-20160816; b=wQPxguOlDfJWaG5rEitqHWBtCn1kCLVv8Vg5ftcjgTgS7W7G6b+bBTnZZIgI1bS801 Vg4/neSVLocQp5fCno+0UMlL2vkf9gAS+Dvd1ufbiVHvF+DxpFoqqwNK5iPNmKEnZqWM YD5Tte0L4s9pAlQ+BO3Efm7eGSH1bYv/eUBx20mZQ6/vbzrGu8uSrhr5HDb/AAX7uQiB A5rpoqH4jePiTfLhpc/TzD8NWsh4J3DTGxYD5X/6Y46dHqeaQHvwHF30MyjhacpuX3Q/ QAhqU7Bs6APDqoErgG7Cc0mxUaz+OBRl3BJ+b4vXjRmjyMyLVkZEm2KcZKBmtCNU8yyT fFww== 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=hLZqIajkzEU/c6xTrzrj0aRppNL63M3pKJrQ+36KQfM=; b=mj5rWIi9nXq9ECGas/dGPGWQlSSLdYV0GpeeUV2gj4kKqTdaaHbmBjY1VTdwmZJZGp EbF7dOZi8Kb0FE8hWr9qXOZNot19nQ2DIx8XQPXl7WMhho8ezJMdIPyOg+jZT8auFOLb D/XRImQlxSPOUE9jra31yQ24n404GTGmHE1O13YXOYLZUQAyH0pt8BOIp7lOJhTKbFba 5Td6pfehI8pxf2UyB1d/xp6lhjv4VXLIniLEy1ySQB/lTVlwKUDUNAxlRs5ILkpzlbGR gFmgO/FdlQnWB16nKb9cKitqtf18K1/Jamm9eUHiHOMxtoqwf8rGMP1NulXI8vArSHFZ 1Q0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=oBnPKmep; 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 c187si4043716yba.194.2021.01.15.05.24.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:24:47 -0800 (PST) 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=oBnPKmep; 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]:46762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0P5r-0000D6-1M for patch@linaro.org; Fri, 15 Jan 2021 08:24:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0Ozz-00059P-6w for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:18:43 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:51932) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0Ozx-0002JK-3D for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:18:42 -0500 Received: by mail-wm1-x335.google.com with SMTP id h17so7141241wmq.1 for ; Fri, 15 Jan 2021 05:18:40 -0800 (PST) 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=hLZqIajkzEU/c6xTrzrj0aRppNL63M3pKJrQ+36KQfM=; b=oBnPKmepx1QARKHePO3lKcGt++ogSRSGjIWUGy9NHzDe2kuNi4fup2+433FgrZR1NT ajEul0PcBNbfWdl6ACMVJ1wgL6L8Hwxu8dOsUW/jDcA72AXfOVYIjfvTU3Oxl62jIUag a9OB7F404h4WcI54fA78QCRCBnA25OamU1MNMnMQLsj13W62i35fm0Kwpz5aGj2jCNrC 7twJzmH0qwLlLkhngaUGzEKh8NocAU4Y3HXZtw1O1hwl56sSorZZ1rAV1l6hpp3XjtLF dHoRku+xY5lqT7xT4QfsSU/E+3yOr5XlbMo4sEQfVuaiH42KPl07I1TgCUyDiiWxzmBD nkaQ== 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=hLZqIajkzEU/c6xTrzrj0aRppNL63M3pKJrQ+36KQfM=; b=NIaNxuukHA0GHfFnaqn1BwdulvSi36HlTNJTR+2Wz02008gfrW5fi42PUIpAKhZtaj gr7Ar3aiFLYlWmCPEsy/KuYpYa9x2Fb80aLtwzLzC6AQ4ajd3mEpJ2TGGnxp9+ifvjZm k/20CIKnoaUqdIz28fbgFaT8nXrRexBmGKWoc0dpPhwwSTl2Ag41K724OaJ8btNX/HZT 0sQ7Tw5qYg8lGzuT1gBz/GD+aq4vsFZUe1wDBZiXtFr/izFhTk/vIBgmWcPNLSjm/1nf 7Vu5cmQVHDofBc0MsTxyiNfyxAPGf7lPz4vHFp1XIvT22hUlYR0I1dONdlVr243x6U6b 8/TA== X-Gm-Message-State: AOAM533jH1DwlTv+3U9hdhZ7PR2NAGxdLzqtqjrWP3xHYsixZirV29vf Oz8lq46ZKmAxRIc7PCtaRVMRfg== X-Received: by 2002:a7b:c395:: with SMTP id s21mr6786112wmj.97.1610716719626; Fri, 15 Jan 2021 05:18:39 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r20sm17140997wrg.66.2021.01.15.05.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:18:33 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3EDFA1FFAA; Fri, 15 Jan 2021 13:08:33 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 21/30] target/arm: use official org.gnu.gdb.aarch64.sve layout for registers Date: Fri, 15 Jan 2021 13:08:19 +0000 Message-Id: <20210115130828.23968-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-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: Luis Machado , "open list:ARM TCG CPUs" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" While GDB can work with any XML description given to it there is special handling for SVE registers on the GDB side which makes the users life a little better. The changes aren't that major and all the registers save the $vg reported the same. All that changes is: - report org.gnu.gdb.aarch64.sve - use gdb nomenclature for names and types - minor re-ordering of the types to match reference - re-enable ieee_half (as we know gdb supports it now) - $vg is now a 64 bit int - check $vN and $zN aliasing in test Signed-off-by: Alex Bennée Reviewed-by: Luis Machado Message-Id: <20210108224256.2321-11-alex.bennee@linaro.org> -- 2.20.1 diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c index 866595b4f1..a8fff2a3d0 100644 --- a/target/arm/gdbstub.c +++ b/target/arm/gdbstub.c @@ -195,22 +195,17 @@ static const struct TypeSize vec_lanes[] = { { "uint128", 128, 'q', 'u' }, { "int128", 128, 'q', 's' }, /* 64 bit */ + { "ieee_double", 64, 'd', 'f' }, { "uint64", 64, 'd', 'u' }, { "int64", 64, 'd', 's' }, - { "ieee_double", 64, 'd', 'f' }, /* 32 bit */ + { "ieee_single", 32, 's', 'f' }, { "uint32", 32, 's', 'u' }, { "int32", 32, 's', 's' }, - { "ieee_single", 32, 's', 'f' }, /* 16 bit */ + { "ieee_half", 16, 'h', 'f' }, { "uint16", 16, 'h', 'u' }, { "int16", 16, 'h', 's' }, - /* - * TODO: currently there is no reliable way of telling - * if the remote gdb actually understands ieee_half so - * we don't expose it in the target description for now. - * { "ieee_half", 16, 'h', 'f' }, - */ /* bytes */ { "uint8", 8, 'b', 'u' }, { "int8", 8, 'b', 's' }, @@ -223,17 +218,16 @@ int arm_gen_dynamic_svereg_xml(CPUState *cs, int base_reg) GString *s = g_string_new(NULL); DynamicGDBXMLInfo *info = &cpu->dyn_svereg_xml; g_autoptr(GString) ts = g_string_new(""); - int i, bits, reg_width = (cpu->sve_max_vq * 128); + int i, j, bits, reg_width = (cpu->sve_max_vq * 128); info->num = 0; g_string_printf(s, ""); g_string_append_printf(s, ""); - g_string_append_printf(s, ""); + g_string_append_printf(s, ""); /* First define types and totals in a whole VL */ for (i = 0; i < ARRAY_SIZE(vec_lanes); i++) { int count = reg_width / vec_lanes[i].size; - g_string_printf(ts, "vq%d%c%c", count, - vec_lanes[i].sz, vec_lanes[i].suffix); + g_string_printf(ts, "svev%c%c", vec_lanes[i].sz, vec_lanes[i].suffix); g_string_append_printf(s, "", ts->str, vec_lanes[i].gdb_type, count); @@ -243,39 +237,37 @@ int arm_gen_dynamic_svereg_xml(CPUState *cs, int base_reg) * signed and potentially float versions of each size from 128 to * 8 bits. */ - for (bits = 128; bits >= 8; bits /= 2) { - int count = reg_width / bits; - g_string_append_printf(s, "", count); - for (i = 0; i < ARRAY_SIZE(vec_lanes); i++) { - if (vec_lanes[i].size == bits) { - g_string_append_printf(s, "", - vec_lanes[i].suffix, - count, - vec_lanes[i].sz, vec_lanes[i].suffix); + for (bits = 128, i = 0; bits >= 8; bits /= 2, i++) { + const char suf[] = { 'q', 'd', 's', 'h', 'b' }; + g_string_append_printf(s, "", suf[i]); + for (j = 0; j < ARRAY_SIZE(vec_lanes); j++) { + if (vec_lanes[j].size == bits) { + g_string_append_printf(s, "", + vec_lanes[j].suffix, + vec_lanes[j].sz, vec_lanes[j].suffix); } } g_string_append(s, ""); } /* And now the final union of unions */ - g_string_append(s, ""); - for (bits = 128; bits >= 8; bits /= 2) { - int count = reg_width / bits; - for (i = 0; i < ARRAY_SIZE(vec_lanes); i++) { - if (vec_lanes[i].size == bits) { - g_string_append_printf(s, "", - vec_lanes[i].sz, count); - break; - } - } + g_string_append(s, ""); + for (bits = 128, i = 0; bits >= 8; bits /= 2, i++) { + const char suf[] = { 'q', 'd', 's', 'h', 'b' }; + g_string_append_printf(s, "", + suf[i], suf[i]); } g_string_append(s, ""); + /* Finally the sve prefix type */ + g_string_append_printf(s, + "", + reg_width / 8); + /* Then define each register in parts for each vq */ for (i = 0; i < 32; i++) { g_string_append_printf(s, "", + " regnum=\"%d\" type=\"svev\"/>", i, reg_width, base_reg++); info->num++; } @@ -287,31 +279,22 @@ int arm_gen_dynamic_svereg_xml(CPUState *cs, int base_reg) " regnum=\"%d\" group=\"float\"" " type=\"int\"/>", base_reg++); info->num += 2; - /* - * Predicate registers aren't so big they are worth splitting up - * but we do need to define a type to hold the array of quad - * references. - */ - g_string_append_printf(s, - "", - cpu->sve_max_vq); + for (i = 0; i < 16; i++) { g_string_append_printf(s, "", + " regnum=\"%d\" type=\"svep\"/>", i, cpu->sve_max_vq * 16, base_reg++); info->num++; } g_string_append_printf(s, "", + " type=\"svep\"/>", cpu->sve_max_vq * 16, base_reg++); g_string_append_printf(s, "", + " regnum=\"%d\" type=\"int\"/>", base_reg++); info->num += 2; g_string_append_printf(s, ""); diff --git a/target/arm/helper.c b/target/arm/helper.c index 5ab3f5ace3..8a492465d6 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -276,7 +276,7 @@ static int arm_gdb_get_svereg(CPUARMState *env, GByteArray *buf, int reg) * while the ZCR works in Vector Quads (VQ) which is 128bit chunks. */ int vq = sve_zcr_len_for_el(env, arm_current_el(env)) + 1; - return gdb_get_reg32(buf, vq * 2); + return gdb_get_reg64(buf, vq * 2); } default: /* gdbstub asked for something out our range */ diff --git a/tests/tcg/aarch64/gdbstub/test-sve-ioctl.py b/tests/tcg/aarch64/gdbstub/test-sve-ioctl.py index 972cf73c31..b9ef169c1a 100644 --- a/tests/tcg/aarch64/gdbstub/test-sve-ioctl.py +++ b/tests/tcg/aarch64/gdbstub/test-sve-ioctl.py @@ -40,6 +40,17 @@ class TestBreakpoint(gdb.Breakpoint): except gdb.error: report(False, "checking zregs (out of range)") + # Check the aliased V registers are set and GDB has correctly + # created them for us having recognised and handled SVE. + try: + for i in range(0, 16): + val_z = gdb.parse_and_eval("$z0.b.u[%d]" % i) + val_v = gdb.parse_and_eval("$v0.b.u[%d]" % i) + report(int(val_z) == int(val_v), + "v0.b.u[%d] == z0.b.u[%d]" % (i, i)) + except gdb.error: + report(False, "checking vregs (out of range)") + def run_test(): "Run through the tests one by one" From patchwork Fri Jan 15 13:08: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: 363640 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp320846jap; Fri, 15 Jan 2021 06:02:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJy3TsvaPN2icjPxkmJwS1vX55kjq45V1Zn1t0hX8ijVU9iOiaDujILO+cu1/YX9hk3eE1CX X-Received: by 2002:a05:6902:1025:: with SMTP id x5mr17612573ybt.21.1610719328830; Fri, 15 Jan 2021 06:02:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610719328; cv=none; d=google.com; s=arc-20160816; b=shg1P22do0weX/gQE/HJKocPn1zR7RVQymY8VQRCyu2Q54Zz1dJIQNfEn791Y5y24H NF/1aHxksT9GKNVq1ZmTC5I1Kpxbh3OpLau+cMkmT2pBl6ar0oFsAsONFLnbbl6hvuKk X6NZlc/lwD4bvZemA+Pd+rGU4PPCLui9m7UmdCqg1h2teiyCTUzQQle79CKCw6ApMCNs ZeaK79j4YsLLlLPqWG0DlEDCbgTQfV3HZtmjLneQCdwhsaf/otYcw1L8ydV7+CraygkQ JcSOMbFc98ntX/hkrlW1G45krkv9pa8JKWc0/NMhFHSDP5B22kvG2Gm/i8SO2qKHsyOI ZStg== 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=tuoacA6ETpiSNAlNzO7Jo0J8CYkUv6GuPz2V5DgQzqM=; b=mLsO4an8Nh7/o6hDkAdXEDFoMZWGg7A/zW0PB9qUo8QZ0DPlbL6wHonqZ1GAt/Unrs YkdMrVXfkpqH/JJGrWEYfr70+hZ2mTpBijMlPVI15xFmg84o5UTN6VFlrlLPSN8EmbPl 08lTleRwhgvGSd2BKVmzrCImLHd168fzxrXV45VrZe3QwyT7H4gzDoNhsg8cXjAKV/3P bwVvJIRW8T/JPZ+n4c/bzEV7XEtf3zj0h1VAVx3JUYuRiTk8R4JOdGbd2mwimJC/I8a3 +uv/rZWrEDAELUG7UeK/vR13uO8BASbjajnJrXnn+qax865xXn/ytOBye7wsGU8+VSzA cxYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=WzjqJ7a3; 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 e64si3414164ybi.44.2021.01.15.06.02.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 06:02:08 -0800 (PST) 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=WzjqJ7a3; 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]:37674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Pg0-0001z6-8Q for patch@linaro.org; Fri, 15 Jan 2021 09:02:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0PEW-00016c-0k for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:44 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:37187) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0PET-00085M-VZ for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:43 -0500 Received: by mail-wr1-x435.google.com with SMTP id v15so5638971wrx.4 for ; Fri, 15 Jan 2021 05:33:41 -0800 (PST) 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=tuoacA6ETpiSNAlNzO7Jo0J8CYkUv6GuPz2V5DgQzqM=; b=WzjqJ7a3B/DXUEwygRJwChspjb0Wex5U8T3j03LBXHypMq0RUn/vNiHkuxm1gknrqd OnB9FSUWSUVj1bGBVOuauzjw39cXhWpMuwW8qfymyt/UIy2OcWS7D+dE4DhpQWB6bI2v NJwLkL2g8jyrP/9v6aGOBN28tYfNyrKOrVlJe+UHoFnCqFGAk9Nhh6QaCvZWaH+VwJpa LEuFNbalTKA2oViK8OXG1ecwdQSfLoqCGVQPBef3NQBBZG/HahJz3+chbC8xyVMR4bA2 W9+jKF76+wHSGOXjjXXqpYa+i2QCELpp2a/B3hYlWd2PH7AgtLdeJzd6xyqwumfkkRlx cd9w== 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=tuoacA6ETpiSNAlNzO7Jo0J8CYkUv6GuPz2V5DgQzqM=; b=e9roeWFyCqvICaua7nrTxeYeUsXCRoEbVEEgN/2FA1PaYOQhDnuanAh261hlBHftDp DbI23SZdIaxn7DdJ2IUoELDimRCZYxjvrs6DdYAOws4aKz1jS/lbPoaRbN8OCba+zxOB 2cc7aYvkhCs143gJ2RXsYFUzdmiv9k31iKwVvIUcoj7zzK9lLkPzurIUXgOL98jzk6wR VZ0LXdCJREkAKEprAKb8o39FqgqKE8ohtmIiFgOGcYUYU/72Otw+/m0XuRxl88ycSQCu KhUMLgu17Q/Ja99ncP7AT3y1Pocz6wVQ/aaM4/rnoZ06RtbOi2++K5Aks8ciybS9DE4g cxIw== X-Gm-Message-State: AOAM532AwZueO/i9YcJirXpi27gDzkptbC2F5P7LecN31b+4nn3UTbJK zIGLeQdIM4ddltExCUGKeiuKtw== X-Received: by 2002:a5d:6cd4:: with SMTP id c20mr13244276wrc.57.1610717620697; Fri, 15 Jan 2021 05:33:40 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id m21sm12231414wml.13.2021.01.15.05.33.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:33:40 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AB1EB1FFAB; Fri, 15 Jan 2021 13:08:33 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 22/30] semihosting: Move ARM semihosting code to shared directories Date: Fri, 15 Jan 2021 13:08:20 +0000 Message-Id: <20210115130828.23968-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Keith Packard , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , Laurent Vivier , qemu-devel@nongnu.org, "open list:ARM TCG CPUs" , Alistair Francis , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Keith Packard This commit renames two files which provide ARM semihosting support so that they can be shared by other architectures: 1. target/arm/arm-semi.c -> hw/semihosting/common-semi.c 2. linux-user/arm/semihost.c -> linux-user/semihost.c The build system was modified use a new config variable, CONFIG_ARM_COMPATIBLE_SEMIHOSTING, which has been added to the ARM softmmu and linux-user default configs. The contents of the source files has not been changed in this patch. Signed-off-by: Keith Packard [AJB: rename arm-compat-semi, select SEMIHOSTING] Signed-off-by: Alex Bennée Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210107170717.2098982-2-keithp@keithp.com> Message-Id: <20210108224256.2321-13-alex.bennee@linaro.org> -- 2.20.1 diff --git a/default-configs/devices/arm-softmmu.mak b/default-configs/devices/arm-softmmu.mak index 08a32123b4..0500156a0c 100644 --- a/default-configs/devices/arm-softmmu.mak +++ b/default-configs/devices/arm-softmmu.mak @@ -42,4 +42,5 @@ CONFIG_FSL_IMX25=y CONFIG_FSL_IMX7=y CONFIG_FSL_IMX6UL=y CONFIG_SEMIHOSTING=y +CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y CONFIG_ALLWINNER_H3=y diff --git a/default-configs/targets/aarch64-linux-user.mak b/default-configs/targets/aarch64-linux-user.mak index 163c9209f4..4713253709 100644 --- a/default-configs/targets/aarch64-linux-user.mak +++ b/default-configs/targets/aarch64-linux-user.mak @@ -2,3 +2,4 @@ TARGET_ARCH=aarch64 TARGET_BASE_ARCH=arm TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml TARGET_HAS_BFLT=y +CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y diff --git a/default-configs/targets/aarch64_be-linux-user.mak b/default-configs/targets/aarch64_be-linux-user.mak index 4c953cf8c5..fae831558d 100644 --- a/default-configs/targets/aarch64_be-linux-user.mak +++ b/default-configs/targets/aarch64_be-linux-user.mak @@ -3,3 +3,4 @@ TARGET_BASE_ARCH=arm TARGET_WORDS_BIGENDIAN=y TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml TARGET_HAS_BFLT=y +CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y diff --git a/default-configs/targets/arm-linux-user.mak b/default-configs/targets/arm-linux-user.mak index c7cd872e86..e741ffd4d3 100644 --- a/default-configs/targets/arm-linux-user.mak +++ b/default-configs/targets/arm-linux-user.mak @@ -3,3 +3,4 @@ TARGET_SYSTBL_ABI=common,oabi TARGET_SYSTBL=syscall.tbl TARGET_XML_FILES= gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml TARGET_HAS_BFLT=y +CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y diff --git a/default-configs/targets/armeb-linux-user.mak b/default-configs/targets/armeb-linux-user.mak index 79bf10e99b..255e44e8b0 100644 --- a/default-configs/targets/armeb-linux-user.mak +++ b/default-configs/targets/armeb-linux-user.mak @@ -4,3 +4,4 @@ TARGET_SYSTBL=syscall.tbl TARGET_WORDS_BIGENDIAN=y TARGET_XML_FILES= gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml TARGET_HAS_BFLT=y +CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y diff --git a/target/arm/arm-semi.c b/hw/semihosting/arm-compat-semi.c similarity index 100% rename from target/arm/arm-semi.c rename to hw/semihosting/arm-compat-semi.c diff --git a/linux-user/arm/semihost.c b/linux-user/semihost.c similarity index 100% rename from linux-user/arm/semihost.c rename to linux-user/semihost.c diff --git a/hw/semihosting/Kconfig b/hw/semihosting/Kconfig index efe0a30734..eaf3a20ef5 100644 --- a/hw/semihosting/Kconfig +++ b/hw/semihosting/Kconfig @@ -1,3 +1,7 @@ config SEMIHOSTING bool + +config ARM_COMPATIBLE_SEMIHOSTING + bool + select SEMIHOSTING diff --git a/hw/semihosting/meson.build b/hw/semihosting/meson.build index f40ac574c4..ea8090abe3 100644 --- a/hw/semihosting/meson.build +++ b/hw/semihosting/meson.build @@ -2,3 +2,6 @@ specific_ss.add(when: 'CONFIG_SEMIHOSTING', if_true: files( 'config.c', 'console.c', )) + +specific_ss.add(when: ['CONFIG_ARM_COMPATIBLE_SEMIHOSTING'], + if_true: files('arm-compat-semi.c')) diff --git a/linux-user/arm/meson.build b/linux-user/arm/meson.build index 432984b58e..5a93c925cf 100644 --- a/linux-user/arm/meson.build +++ b/linux-user/arm/meson.build @@ -1,6 +1,3 @@ -linux_user_ss.add(when: 'TARGET_AARCH64', if_true: files('semihost.c')) -linux_user_ss.add(when: 'TARGET_ARM', if_true: files('semihost.c')) - subdir('nwfpe') syscall_nr_generators += { diff --git a/linux-user/meson.build b/linux-user/meson.build index 2b94e4ba24..7fe28d659e 100644 --- a/linux-user/meson.build +++ b/linux-user/meson.build @@ -16,6 +16,7 @@ linux_user_ss.add(rt) linux_user_ss.add(when: 'TARGET_HAS_BFLT', if_true: files('flatload.c')) linux_user_ss.add(when: 'TARGET_I386', if_true: files('vm86.c')) +linux_user_ss.add(when: 'CONFIG_ARM_COMPATIBLE_SEMIHOSTING', if_true: files('semihost.c')) syscall_nr_generators = {} diff --git a/target/arm/meson.build b/target/arm/meson.build index f5de2a77b8..15b936c101 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -32,8 +32,6 @@ arm_ss.add(files( )) arm_ss.add(zlib) -arm_ss.add(when: 'CONFIG_TCG', if_true: files('arm-semi.c')) - arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: files('kvm-stub.c')) arm_ss.add(when: 'TARGET_AARCH64', if_true: files( From patchwork Fri Jan 15 13:08: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: 363649 Delivered-To: patch@linaro.org Received: by 2002:a17:906:fb05:0:0:0:0 with SMTP id lz5csp557613ejb; Fri, 15 Jan 2021 06:30:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHYKPBgqc+gLHswzHXrC4TeBve0CVaWOOpGnwfm+xJVXbF5WoMflUhigoo5yyfyVHmAyNe X-Received: by 2002:a25:d84:: with SMTP id 126mr10904943ybn.145.1610721047253; Fri, 15 Jan 2021 06:30:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610721047; cv=none; d=google.com; s=arc-20160816; b=viOoUbULd285e9YU1IyEuF3+X+Y1Yxy45fqnohOisGlyPhZ8lQS1cAm7PTyASQAyLs 7gouL590dCTQOTSk48aFmwECGV0pIPjq/R5vu3e/+aynIFcMgnjHMiuWKJ9QNQRas5nr S1ypPfn5eHGvUSoCBbNbJ8bjMErfIi2btqDPsTaGmUPtQCQEG423hO33aHb+09V/vUAK sY76Hs4TITjAky+v0/xnhqR/xLfamt6k6s29hTJJYdAhTkrbsdh7pYh2V9hB3ewsalx0 Hv/NxeCzG92IOOxO54IKLVUaITlFWUYi9n4CvdP5IsXY+TMOg860W4EiKSTIiBfGUJlr TQ5w== 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=Z7qx5BbOQ9U2pOy58BttUDuc3hCnuco/Gmd85qnIRTs=; b=TBysLGPtyTcaWBxCbO31apQ/Ify9BIm2pthNcVzcNjkYh1P6lng08M8gm0umwRN9ME tG7LGoQxgqlLDTxNFXVzdxTtLsUiKsnD6rsXkier93hoiLueYFWv0BY2MBQQM3+7HSOu 9b0pQfLhTzdnpzzheqw9pjgetW/iI03KEaHAN37Sn9DuTZ3gfdJ5T5+uwwkPgBYyBDLG QnDkyT5L0ruR82lnuR+Bd241SGHe32JKMbmhXb3IRB5+P4r78R6LLWdR9UBtrskcAk6h jSfLHpRPwMhBJUe5myORJRSmZmYZ6MIcy6eBBuoeP7flTHooIuZtKAFJvAuyzSz0O6MF 8lmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="bpee/CyJ"; 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 b15si7369161ybn.473.2021.01.15.06.30.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 06:30:47 -0800 (PST) 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="bpee/CyJ"; 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]:34798 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Q7i-0003mx-Il for patch@linaro.org; Fri, 15 Jan 2021 09:30:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0PEU-000130-9r for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:42 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:42782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0PER-00083z-UJ for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:42 -0500 Received: by mail-wr1-x429.google.com with SMTP id m4so9280939wrx.9 for ; Fri, 15 Jan 2021 05:33:39 -0800 (PST) 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=Z7qx5BbOQ9U2pOy58BttUDuc3hCnuco/Gmd85qnIRTs=; b=bpee/CyJRZtyEZa+9BFSzPp1fJUAe/SlJ8SRKAgZ5HPFEf8xyX0Pm/u6sCCaNcglTm /htzKpiJ2u5Dy6zXzp1BYC1XYl2qXbzUl7PEv3p2CB5t/X9ibgh3AISzXUVIceufu88/ BoNtAdQV2et1uUppoRTUw6Vl03fy2Yug9xOzhOa9zRVsUZsP07DpALvcA0hZVzuE4q20 UgRicMYU+OPR+mDa1z2GAUmw2svBqgU3oCiXxcL9Xc6o9b9RCVo7Hhc4MZwUwPEtT9I4 SIRG2j/xxjsaiH13Zyc7Qn550MBPW/oam33R9bp7vrqKLY0m2P7Xn3IJPJ/guKOLrsvf oNdA== 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=Z7qx5BbOQ9U2pOy58BttUDuc3hCnuco/Gmd85qnIRTs=; b=bsVCCtZQvtQVVicVOBnY0KBJGKtmBoAgf1Xx2IItbHxG4v++2U7a0QxYaQCkF6bJGf rojyqray7b1CNkXipAwu0sOkSSvyj0iuCDHgDZZHdL2xc1/CdfdCqRxJ2WRPoImffk9C 6szeBtpXLvM6Y4FoTgyNd/p+1F8h+rretOwaOkn4MOiNWmUKwoVnNcFusiDGoa31q9L0 NJdGZGh5nfADt+kSn1gEBIM0o48jfWmyxjXNLK5kauO7L1/5GJjZOnbR/e9WPwtXugQS ePXcmNZ6lofGTwKkpTn0WFCm5s4ota6zLHVWQEQvRj/g0h4ZxGXd7g7l0NCgnGjEuQ8L EE9A== X-Gm-Message-State: AOAM532oxXF4PO4wTR5UkcsptoMGG8S9dY/S8azOM1Yn2OEgTjMxnvpz ud18uHZpp1DaOu7/7rIy9+1gmQ== X-Received: by 2002:adf:9d48:: with SMTP id o8mr13342904wre.408.1610717618549; Fri, 15 Jan 2021 05:33:38 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u83sm12813287wmu.12.2021.01.15.05.33.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:33:33 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 006961FFAC; Fri, 15 Jan 2021 13:08:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 23/30] semihosting: Change common-semi API to be architecture-independent Date: Fri, 15 Jan 2021 13:08:21 +0000 Message-Id: <20210115130828.23968-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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: Keith Packard , qemu-devel@nongnu.org, Laurent Vivier , "open list:ARM TCG CPUs" , Alistair Francis , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Keith Packard The public API is now defined in hw/semihosting/common-semi.h. do_common_semihosting takes CPUState * instead of CPUARMState *. All internal functions have been renamed common_semi_ instead of arm_semi_ or arm_. Aside from the API change, there are no functional changes in this patch. Signed-off-by: Keith Packard Signed-off-by: Alex Bennée Reviewed-by: Alistair Francis Message-Id: <20210107170717.2098982-3-keithp@keithp.com> Message-Id: <20210108224256.2321-14-alex.bennee@linaro.org> -- 2.20.1 diff --git a/hw/semihosting/common-semi.h b/hw/semihosting/common-semi.h new file mode 100644 index 0000000000..bc53e92c79 --- /dev/null +++ b/hw/semihosting/common-semi.h @@ -0,0 +1,36 @@ +/* + * Semihosting support for systems modeled on the Arm "Angel" + * semihosting syscalls design. + * + * Copyright (c) 2005, 2007 CodeSourcery. + * Copyright (c) 2019 Linaro + * Written by Paul Brook. + * + * Copyright © 2020 by Keith Packard + * Adapted for systems other than ARM, including RISC-V, by Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * ARM Semihosting is documented in: + * Semihosting for AArch32 and AArch64 Release 2.0 + * https://static.docs.arm.com/100863/0200/semihosting.pdf + * + */ + +#ifndef COMMON_SEMI_H +#define COMMON_SEMI_H + +target_ulong do_common_semihosting(CPUState *cs); + +#endif /* COMMON_SEMI_H */ diff --git a/target/arm/cpu.h b/target/arm/cpu.h index f3bca73d98..84cc2de3b1 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -1068,14 +1068,6 @@ static inline void aarch64_sve_change_el(CPUARMState *env, int o, static inline void aarch64_add_sve_properties(Object *obj) { } #endif -#if !defined(CONFIG_TCG) -static inline target_ulong do_arm_semihosting(CPUARMState *env) -{ - g_assert_not_reached(); -} -#else -target_ulong do_arm_semihosting(CPUARMState *env); -#endif void aarch64_sync_32_to_64(CPUARMState *env); void aarch64_sync_64_to_32(CPUARMState *env); diff --git a/hw/semihosting/arm-compat-semi.c b/hw/semihosting/arm-compat-semi.c index 93360e28c7..2e959aba08 100644 --- a/hw/semihosting/arm-compat-semi.c +++ b/hw/semihosting/arm-compat-semi.c @@ -1,10 +1,14 @@ /* - * Arm "Angel" semihosting syscalls + * Semihosting support for systems modeled on the Arm "Angel" + * semihosting syscalls design. * * Copyright (c) 2005, 2007 CodeSourcery. * Copyright (c) 2019 Linaro * Written by Paul Brook. * + * Copyright © 2020 by Keith Packard + * Adapted for systems other than ARM, including RISC-V, by Keith Packard + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -373,12 +377,12 @@ static target_ulong arm_gdb_syscall(ARMCPU *cpu, gdb_syscall_complete_cb cb, * do anything with its return value, because it is not necessarily * the result of the syscall, but could just be the old value of X0. * The only thing safe to do with this is that the callers of - * do_arm_semihosting() will write it straight back into X0. + * do_common_semihosting() will write it straight back into X0. * (In linux-user mode, the callback will have happened before * gdb_do_syscallv() returns.) * * We should tidy this up so neither this function nor - * do_arm_semihosting() return a value, so the mistake of + * do_common_semihosting() return a value, so the mistake of * doing something with the return value is not possible to make. */ @@ -675,10 +679,10 @@ static const GuestFDFunctions guestfd_fns[] = { * leave the register unchanged. We use 0xdeadbeef as the return value * when there isn't a defined return value for the call. */ -target_ulong do_arm_semihosting(CPUARMState *env) +target_ulong do_common_semihosting(CPUState *cs) { - ARMCPU *cpu = env_archcpu(env); - CPUState *cs = env_cpu(env); + ARMCPU *cpu = ARM_CPU(cs); + CPUARMState *env = &cpu->env; target_ulong args; target_ulong arg0, arg1, arg2, arg3; char * s; diff --git a/linux-user/aarch64/cpu_loop.c b/linux-user/aarch64/cpu_loop.c index bbe9fefca8..42b9c15f53 100644 --- a/linux-user/aarch64/cpu_loop.c +++ b/linux-user/aarch64/cpu_loop.c @@ -22,6 +22,7 @@ #include "qemu.h" #include "cpu_loop-common.h" #include "qemu/guest-random.h" +#include "hw/semihosting/common-semi.h" #define get_user_code_u32(x, gaddr, env) \ ({ abi_long __r = get_user_u32((x), (gaddr)); \ @@ -129,7 +130,7 @@ void cpu_loop(CPUARMState *env) queue_signal(env, info.si_signo, QEMU_SI_FAULT, &info); break; case EXCP_SEMIHOST: - env->xregs[0] = do_arm_semihosting(env); + env->xregs[0] = do_common_semihosting(cs); env->pc += 4; break; case EXCP_YIELD: diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c index 3d272b56ef..cadfb7fa43 100644 --- a/linux-user/arm/cpu_loop.c +++ b/linux-user/arm/cpu_loop.c @@ -22,6 +22,7 @@ #include "qemu.h" #include "elf.h" #include "cpu_loop-common.h" +#include "hw/semihosting/common-semi.h" #define get_user_code_u32(x, gaddr, env) \ ({ abi_long __r = get_user_u32((x), (gaddr)); \ @@ -421,7 +422,7 @@ void cpu_loop(CPUARMState *env) } break; case EXCP_SEMIHOST: - env->regs[0] = do_arm_semihosting(env); + env->regs[0] = do_common_semihosting(cs); env->regs[15] += env->thumb ? 2 : 4; break; case EXCP_INTERRUPT: diff --git a/target/arm/helper.c b/target/arm/helper.c index 8a492465d6..c5377e7ecb 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -34,6 +34,7 @@ #ifdef CONFIG_TCG #include "arm_ldst.h" #include "exec/cpu_ldst.h" +#include "hw/semihosting/common-semi.h" #endif #define ARM_CPU_FREQ 1000000000 /* FIXME: 1 GHz, should be configurable */ @@ -9875,13 +9876,13 @@ static void handle_semihosting(CPUState *cs) qemu_log_mask(CPU_LOG_INT, "...handling as semihosting call 0x%" PRIx64 "\n", env->xregs[0]); - env->xregs[0] = do_arm_semihosting(env); + env->xregs[0] = do_common_semihosting(cs); env->pc += 4; } else { qemu_log_mask(CPU_LOG_INT, "...handling as semihosting call 0x%x\n", env->regs[0]); - env->regs[0] = do_arm_semihosting(env); + env->regs[0] = do_common_semihosting(cs); env->regs[15] += env->thumb ? 2 : 4; } } diff --git a/target/arm/m_helper.c b/target/arm/m_helper.c index 643dcafb83..6176003029 100644 --- a/target/arm/m_helper.c +++ b/target/arm/m_helper.c @@ -31,6 +31,7 @@ #ifdef CONFIG_TCG #include "arm_ldst.h" #include "exec/cpu_ldst.h" +#include "hw/semihosting/common-semi.h" #endif static void v7m_msr_xpsr(CPUARMState *env, uint32_t mask, @@ -2306,7 +2307,11 @@ void arm_v7m_cpu_do_interrupt(CPUState *cs) qemu_log_mask(CPU_LOG_INT, "...handling as semihosting call 0x%x\n", env->regs[0]); - env->regs[0] = do_arm_semihosting(env); +#ifdef CONFIG_TCG + env->regs[0] = do_common_semihosting(cs); +#else + g_assert_not_reached(); +#endif env->regs[15] += env->thumb ? 2 : 4; return; case EXCP_BKPT: From patchwork Fri Jan 15 13:08: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: 363651 Delivered-To: patch@linaro.org Received: by 2002:a17:906:fb05:0:0:0:0 with SMTP id lz5csp562445ejb; Fri, 15 Jan 2021 06:36:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxr18l8mHa1IJi7hilYyIim4gRvFYQ/YFyt9facUiKtSFA+p3tveKhZvtMzcA8ilPgljBt/ X-Received: by 2002:a25:4f8b:: with SMTP id d133mr5581065ybb.402.1610721374599; Fri, 15 Jan 2021 06:36:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610721374; cv=none; d=google.com; s=arc-20160816; b=dkRdCBwX/FJb1+Duz0PMUEMlrIi0zQd5ppqF+ASoLz2f8wmb4ojFe7cq/JG85hKom3 YaZ19C0+nPvuNKgYm6SwcUz8hREhtDQ9dPSmYZ4kyFOIBEldDu1BOVZxKGv9/hW4X+Ej /lZG3FB1pU3ZlAWu4+6QmjPI1eSu6ngPiIuEVF2R9D6UKAM1LdGN9csFaL2kleH02cux EX+oEfHWXZD1JbPpOYkFZj8osTHWXeH29F6oEVeE8i0twholjL53LfxbOHqN7oXPjWUb I487GJDMNk2oWh/gIiVBKJtnKkLL2In3y6hMI/vqMf2016fLMv4ogvNa7vQl2wA8tf54 jlQw== 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=haEOr3p2LM0OyOi9Bttq3JrTgiKEFWl+PPHvvyZsiXE=; b=EpRcNK6ei8KNc3Aqu4A/ofJO3YdXouLkL2hOIqyUJzqObzjyVmkIWS+ZVENnRStjlr QPL4PQgJGG0xmXBUTxADJlC6gQJfSh3AArtJmqxYVJx4D7DQhhqd6eX5RfzxlvIGLrxq kfrMpGV5xyrsYFg7DGYGUMaLabu40Qbb1O4Cu/9KumEchaWqPIZq6GP/yfASnAX6ynRI GNrxmzvJw0fARtmowldwgBhvzvLbxBo7s7g1aV3Nvoet492sFDLU2ZiX9rmY7ToZUwMG HYt7DvfXGO5bG6tUDsEDY9YtBRVxgCazFHRjHDkqfyqe7Fc4qGhBw9wABY6lH/qeuAfq amrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=qZtidMRd; 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 6si8162512ybe.356.2021.01.15.06.36.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 06:36:14 -0800 (PST) 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=qZtidMRd; 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]:49752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0QD0-0001dV-00 for patch@linaro.org; Fri, 15 Jan 2021 09:36:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0PEg-0001Vp-H6 for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:54 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:36638) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0PEd-00089v-4m for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:54 -0500 Received: by mail-wm1-x335.google.com with SMTP id v184so3404293wma.1 for ; Fri, 15 Jan 2021 05:33:50 -0800 (PST) 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=haEOr3p2LM0OyOi9Bttq3JrTgiKEFWl+PPHvvyZsiXE=; b=qZtidMRdtguBQIFycaChh/sofp+K8wAl3FMUXOTH/ni0dvi6V9rkxhVKHhDDfzaepx GI0lUx/tFdLrCqmiZTLgHujeUbf1WL6mzGx6Isdaa21o6fmwIMBJ664HkXOgxFnizg+x iEsEMTzTB1PMY/Q/IElSp0ZUV6jtenobN5yUWk2bLJqKjwSu72E05oBLjVVTvSNJEZy7 73NxYrSqhzqsWHRw5th4fAhGR1sFOTn/M03vG1+7RGKROe9nXA3ePa1l5qX8KXrVKHU0 KJWNfXwnIlOJAA4UFFMHfENeAz5JMyvBEMiyOe5MVFSNLyRNNDcue4krfY73xa5OfVJS VccQ== 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=haEOr3p2LM0OyOi9Bttq3JrTgiKEFWl+PPHvvyZsiXE=; b=Pk8aVwTy8B7Z6bOMAQ5jhduSWhJLRIA0D0PfZb64sOBoBzDBsnwzFAbABUETypl593 2L2RkzZ9XrKWjy2mXsqfSPZEmZAo7GFCl0wp4Za/umo8pXGB2yniz638Gs8yMvsECa+m ILNBw+GPx5/yZ/2xqCY4ZSP2tkFBBnMkg5M2Wft5TZZU30yrYSvkDjwhG5PH1gjAQmh2 8mUj/xzgJ5B8a4m0WYKlXdF//3in6CP+UYTrh/YKcqVWWIqlBqdHeedOaHD0xmKr8ybm ww7491mTSvb5neCeNiHbId0CZ9DTFIKcYB1PFEEW9QmKbttgfqTtP1B+OsvMSLacrAQ3 WbBQ== X-Gm-Message-State: AOAM530xWS2U0pRzyrHxZXFhAFxGR5Hpud8hjTHaJyrkBL0kB0iqfvOs j/TIFFKDz2xSUjA7phpkDGUdjw== X-Received: by 2002:a7b:c2e8:: with SMTP id e8mr8566799wmk.103.1610717629558; Fri, 15 Jan 2021 05:33:49 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n9sm14544387wrq.41.2021.01.15.05.33.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:33:40 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 235E21FFAE; Fri, 15 Jan 2021 13:08:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 24/30] semihosting: Change internal common-semi interfaces to use CPUState * Date: Fri, 15 Jan 2021 13:08:22 +0000 Message-Id: <20210115130828.23968-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-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: Alistair Francis , Keith Packard , =?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: Keith Packard This makes all of the internal interfaces architecture-independent and renames the internal functions to use the 'common_semi' prefix instead of 'arm' or 'arm_semi'. To do this, some new architecture-specific internal helper functions were created: static inline target_ulong common_semi_arg(CPUState *cs, int argno) Returns the argno'th semihosting argument, where argno can be either 0 or 1. static inline void common_semi_set_ret(CPUState *cs, target_ulong ret) Sets the semihosting return value. static inline bool common_semi_sys_exit_extended(CPUState *cs, int nr) This detects whether the specified semihosting call, which is either TARGET_SYS_EXIT or TARGET_SYS_EXIT_EXTENDED should be executed using the TARGET_SYS_EXIT_EXTENDED semantics. static inline target_ulong common_semi_rambase(CPUState *cs) Returns the base of RAM region used for heap and stack. This is used to construct plausible values for the SYS_HEAPINFO call. In addition, several existing functions have been changed to flag areas of code which are architecture specific: static target_ulong common_semi_flen_buf(CPUState *cs) Returns the current stack pointer minus 64, which is where a stat structure will be placed on the stack #define GET_ARG(n) This fetches arguments from the semihosting command's argument block. The address of this is available implicitly through the local 'args' variable. This is *mostly* architecture independent, but does depend on the current ABI's notion of the size of a 'long' parameter, which may need run-time checks (as it does on AARCH64) #define SET_ARG(n, val) This mirrors GET_ARG and stores data back into the argument block. Signed-off-by: Keith Packard Signed-off-by: Alex Bennée Reviewed-by: Alistair Francis Message-Id: <20210107170717.2098982-4-keithp@keithp.com> Message-Id: <20210108224256.2321-15-alex.bennee@linaro.org> -- 2.20.1 diff --git a/hw/semihosting/arm-compat-semi.c b/hw/semihosting/arm-compat-semi.c index 2e959aba08..ac1271545e 100644 --- a/hw/semihosting/arm-compat-semi.c +++ b/hw/semihosting/arm-compat-semi.c @@ -32,15 +32,18 @@ #include "cpu.h" #include "hw/semihosting/semihost.h" #include "hw/semihosting/console.h" +#include "hw/semihosting/common-semi.h" #include "qemu/log.h" #ifdef CONFIG_USER_ONLY #include "qemu.h" -#define ARM_ANGEL_HEAP_SIZE (128 * 1024 * 1024) +#define COMMON_SEMI_HEAP_SIZE (128 * 1024 * 1024) #else #include "exec/gdbstub.h" #include "qemu/cutils.h" +#ifdef TARGET_ARM #include "hw/arm/boot.h" +#endif #include "hw/boards.h" #endif @@ -134,6 +137,50 @@ typedef struct GuestFD { static GArray *guestfd_array; +#ifdef TARGET_ARM +static inline target_ulong +common_semi_arg(CPUState *cs, int argno) +{ + ARMCPU *cpu = ARM_CPU(cs); + CPUARMState *env = &cpu->env; + if (is_a64(env)) { + return env->xregs[argno]; + } else { + return env->regs[argno]; + } +} + +static inline void +common_semi_set_ret(CPUState *cs, target_ulong ret) +{ + ARMCPU *cpu = ARM_CPU(cs); + CPUARMState *env = &cpu->env; + if (is_a64(env)) { + env->xregs[0] = ret; + } else { + env->regs[0] = ret; + } +} + +static inline bool +common_semi_sys_exit_extended(CPUState *cs, int nr) +{ + return (nr == TARGET_SYS_EXIT_EXTENDED || is_a64(cs->env_ptr)); +} + +#ifndef CONFIG_USER_ONLY +#include "hw/arm/boot.h" +static inline target_ulong +common_semi_rambase(CPUState *cs) +{ + CPUArchState *env = cs->env_ptr; + const struct arm_boot_info *info = env->boot_info; + return info->loader_start; +} +#endif + +#endif /* TARGET_ARM */ + /* * Allocate a new guest file descriptor and return it; if we * couldn't allocate a new fd then return -1. @@ -239,11 +286,10 @@ static target_ulong syscall_err; #include "exec/softmmu-semi.h" #endif -static inline uint32_t set_swi_errno(CPUARMState *env, uint32_t code) +static inline uint32_t set_swi_errno(CPUState *cs, uint32_t code) { if (code == (uint32_t)-1) { #ifdef CONFIG_USER_ONLY - CPUState *cs = env_cpu(env); TaskState *ts = cs->opaque; ts->swi_errno = errno; @@ -254,10 +300,9 @@ static inline uint32_t set_swi_errno(CPUARMState *env, uint32_t code) return code; } -static inline uint32_t get_swi_errno(CPUARMState *env) +static inline uint32_t get_swi_errno(CPUState *cs) { #ifdef CONFIG_USER_ONLY - CPUState *cs = env_cpu(env); TaskState *ts = cs->opaque; return ts->swi_errno; @@ -266,24 +311,22 @@ static inline uint32_t get_swi_errno(CPUARMState *env) #endif } -static target_ulong arm_semi_syscall_len; +static target_ulong common_semi_syscall_len; -static void arm_semi_cb(CPUState *cs, target_ulong ret, target_ulong err) +static void common_semi_cb(CPUState *cs, target_ulong ret, target_ulong err) { - ARMCPU *cpu = ARM_CPU(cs); - CPUARMState *env = &cpu->env; - target_ulong reg0 = is_a64(env) ? env->xregs[0] : env->regs[0]; + target_ulong reg0 = common_semi_arg(cs, 0); if (ret == (target_ulong)-1) { errno = err; - set_swi_errno(env, -1); + set_swi_errno(cs, -1); reg0 = ret; } else { /* Fixup syscalls that use nonstardard return conventions. */ switch (reg0) { case TARGET_SYS_WRITE: case TARGET_SYS_READ: - reg0 = arm_semi_syscall_len - ret; + reg0 = common_semi_syscall_len - ret; break; case TARGET_SYS_SEEK: reg0 = 0; @@ -293,77 +336,66 @@ static void arm_semi_cb(CPUState *cs, target_ulong ret, target_ulong err) break; } } - if (is_a64(env)) { - env->xregs[0] = reg0; - } else { - env->regs[0] = reg0; - } + common_semi_set_ret(cs, reg0); } -static target_ulong arm_flen_buf(ARMCPU *cpu) +static target_ulong common_semi_flen_buf(CPUState *cs) { + target_ulong sp; +#ifdef TARGET_ARM /* Return an address in target memory of 64 bytes where the remote * gdb should write its stat struct. (The format of this structure * is defined by GDB's remote protocol and is not target-specific.) * We put this on the guest's stack just below SP. */ + ARMCPU *cpu = ARM_CPU(cs); CPUARMState *env = &cpu->env; - target_ulong sp; if (is_a64(env)) { sp = env->xregs[31]; } else { sp = env->regs[13]; } +#endif return sp - 64; } -static void arm_semi_flen_cb(CPUState *cs, target_ulong ret, target_ulong err) +static void +common_semi_flen_cb(CPUState *cs, target_ulong ret, target_ulong err) { - ARMCPU *cpu = ARM_CPU(cs); - CPUARMState *env = &cpu->env; /* The size is always stored in big-endian order, extract the value. We assume the size always fit in 32 bits. */ uint32_t size; - cpu_memory_rw_debug(cs, arm_flen_buf(cpu) + 32, (uint8_t *)&size, 4, 0); + cpu_memory_rw_debug(cs, common_semi_flen_buf(cs) + 32, + (uint8_t *)&size, 4, 0); size = be32_to_cpu(size); - if (is_a64(env)) { - env->xregs[0] = size; - } else { - env->regs[0] = size; - } + common_semi_set_ret(cs, size); errno = err; - set_swi_errno(env, -1); + set_swi_errno(cs, -1); } -static int arm_semi_open_guestfd; +static int common_semi_open_guestfd; -static void arm_semi_open_cb(CPUState *cs, target_ulong ret, target_ulong err) +static void +common_semi_open_cb(CPUState *cs, target_ulong ret, target_ulong err) { - ARMCPU *cpu = ARM_CPU(cs); - CPUARMState *env = &cpu->env; if (ret == (target_ulong)-1) { errno = err; - set_swi_errno(env, -1); - dealloc_guestfd(arm_semi_open_guestfd); + set_swi_errno(cs, -1); + dealloc_guestfd(common_semi_open_guestfd); } else { - associate_guestfd(arm_semi_open_guestfd, ret); - ret = arm_semi_open_guestfd; - } - - if (is_a64(env)) { - env->xregs[0] = ret; - } else { - env->regs[0] = ret; + associate_guestfd(common_semi_open_guestfd, ret); + ret = common_semi_open_guestfd; } + common_semi_set_ret(cs, ret); } -static target_ulong arm_gdb_syscall(ARMCPU *cpu, gdb_syscall_complete_cb cb, - const char *fmt, ...) +static target_ulong +common_semi_gdb_syscall(CPUState *cs, gdb_syscall_complete_cb cb, + const char *fmt, ...) { va_list va; - CPUARMState *env = &cpu->env; va_start(va, fmt); gdb_do_syscallv(cb, fmt, va); @@ -386,7 +418,7 @@ static target_ulong arm_gdb_syscall(ARMCPU *cpu, gdb_syscall_complete_cb cb, * doing something with the return value is not possible to make. */ - return is_a64(env) ? env->xregs[0] : env->regs[0]; + return common_semi_arg(cs, 0); } /* @@ -395,20 +427,18 @@ static target_ulong arm_gdb_syscall(ARMCPU *cpu, gdb_syscall_complete_cb cb, * do the work and return the required return value for the guest, * setting the guest errno if appropriate. */ -typedef uint32_t sys_closefn(ARMCPU *cpu, GuestFD *gf); -typedef uint32_t sys_writefn(ARMCPU *cpu, GuestFD *gf, +typedef uint32_t sys_closefn(CPUState *cs, GuestFD *gf); +typedef uint32_t sys_writefn(CPUState *cs, GuestFD *gf, target_ulong buf, uint32_t len); -typedef uint32_t sys_readfn(ARMCPU *cpu, GuestFD *gf, +typedef uint32_t sys_readfn(CPUState *cs, GuestFD *gf, target_ulong buf, uint32_t len); -typedef uint32_t sys_isattyfn(ARMCPU *cpu, GuestFD *gf); -typedef uint32_t sys_seekfn(ARMCPU *cpu, GuestFD *gf, +typedef uint32_t sys_isattyfn(CPUState *cs, GuestFD *gf); +typedef uint32_t sys_seekfn(CPUState *cs, GuestFD *gf, target_ulong offset); -typedef uint32_t sys_flenfn(ARMCPU *cpu, GuestFD *gf); +typedef uint32_t sys_flenfn(CPUState *cs, GuestFD *gf); -static uint32_t host_closefn(ARMCPU *cpu, GuestFD *gf) +static uint32_t host_closefn(CPUState *cs, GuestFD *gf) { - CPUARMState *env = &cpu->env; - /* * Only close the underlying host fd if it's one we opened on behalf * of the guest in SYS_OPEN. @@ -418,20 +448,21 @@ static uint32_t host_closefn(ARMCPU *cpu, GuestFD *gf) gf->hostfd == STDERR_FILENO) { return 0; } - return set_swi_errno(env, close(gf->hostfd)); + return set_swi_errno(cs, close(gf->hostfd)); } -static uint32_t host_writefn(ARMCPU *cpu, GuestFD *gf, +static uint32_t host_writefn(CPUState *cs, GuestFD *gf, target_ulong buf, uint32_t len) { + CPUArchState *env = cs->env_ptr; uint32_t ret; - CPUARMState *env = &cpu->env; char *s = lock_user(VERIFY_READ, buf, len, 1); + (void) env; /* Used in arm softmmu lock_user implicitly */ if (!s) { /* Return bytes not written on error */ return len; } - ret = set_swi_errno(env, write(gf->hostfd, s, len)); + ret = set_swi_errno(cs, write(gf->hostfd, s, len)); unlock_user(s, buf, 0); if (ret == (uint32_t)-1) { ret = 0; @@ -440,18 +471,19 @@ static uint32_t host_writefn(ARMCPU *cpu, GuestFD *gf, return len - ret; } -static uint32_t host_readfn(ARMCPU *cpu, GuestFD *gf, +static uint32_t host_readfn(CPUState *cs, GuestFD *gf, target_ulong buf, uint32_t len) { + CPUArchState *env = cs->env_ptr; uint32_t ret; - CPUARMState *env = &cpu->env; char *s = lock_user(VERIFY_WRITE, buf, len, 0); + (void) env; /* Used in arm softmmu lock_user implicitly */ if (!s) { /* return bytes not read */ return len; } do { - ret = set_swi_errno(env, read(gf->hostfd, s, len)); + ret = set_swi_errno(cs, read(gf->hostfd, s, len)); } while (ret == -1 && errno == EINTR); unlock_user(s, buf, len); if (ret == (uint32_t)-1) { @@ -461,68 +493,66 @@ static uint32_t host_readfn(ARMCPU *cpu, GuestFD *gf, return len - ret; } -static uint32_t host_isattyfn(ARMCPU *cpu, GuestFD *gf) +static uint32_t host_isattyfn(CPUState *cs, GuestFD *gf) { return isatty(gf->hostfd); } -static uint32_t host_seekfn(ARMCPU *cpu, GuestFD *gf, target_ulong offset) +static uint32_t host_seekfn(CPUState *cs, GuestFD *gf, target_ulong offset) { - CPUARMState *env = &cpu->env; - uint32_t ret = set_swi_errno(env, lseek(gf->hostfd, offset, SEEK_SET)); + uint32_t ret = set_swi_errno(cs, lseek(gf->hostfd, offset, SEEK_SET)); if (ret == (uint32_t)-1) { return -1; } return 0; } -static uint32_t host_flenfn(ARMCPU *cpu, GuestFD *gf) +static uint32_t host_flenfn(CPUState *cs, GuestFD *gf) { - CPUARMState *env = &cpu->env; struct stat buf; - uint32_t ret = set_swi_errno(env, fstat(gf->hostfd, &buf)); + uint32_t ret = set_swi_errno(cs, fstat(gf->hostfd, &buf)); if (ret == (uint32_t)-1) { return -1; } return buf.st_size; } -static uint32_t gdb_closefn(ARMCPU *cpu, GuestFD *gf) +static uint32_t gdb_closefn(CPUState *cs, GuestFD *gf) { - return arm_gdb_syscall(cpu, arm_semi_cb, "close,%x", gf->hostfd); + return common_semi_gdb_syscall(cs, common_semi_cb, "close,%x", gf->hostfd); } -static uint32_t gdb_writefn(ARMCPU *cpu, GuestFD *gf, +static uint32_t gdb_writefn(CPUState *cs, GuestFD *gf, target_ulong buf, uint32_t len) { - arm_semi_syscall_len = len; - return arm_gdb_syscall(cpu, arm_semi_cb, "write,%x,%x,%x", - gf->hostfd, buf, len); + common_semi_syscall_len = len; + return common_semi_gdb_syscall(cs, common_semi_cb, "write,%x,%x,%x", + gf->hostfd, buf, len); } -static uint32_t gdb_readfn(ARMCPU *cpu, GuestFD *gf, +static uint32_t gdb_readfn(CPUState *cs, GuestFD *gf, target_ulong buf, uint32_t len) { - arm_semi_syscall_len = len; - return arm_gdb_syscall(cpu, arm_semi_cb, "read,%x,%x,%x", - gf->hostfd, buf, len); + common_semi_syscall_len = len; + return common_semi_gdb_syscall(cs, common_semi_cb, "read,%x,%x,%x", + gf->hostfd, buf, len); } -static uint32_t gdb_isattyfn(ARMCPU *cpu, GuestFD *gf) +static uint32_t gdb_isattyfn(CPUState *cs, GuestFD *gf) { - return arm_gdb_syscall(cpu, arm_semi_cb, "isatty,%x", gf->hostfd); + return common_semi_gdb_syscall(cs, common_semi_cb, "isatty,%x", gf->hostfd); } -static uint32_t gdb_seekfn(ARMCPU *cpu, GuestFD *gf, target_ulong offset) +static uint32_t gdb_seekfn(CPUState *cs, GuestFD *gf, target_ulong offset) { - return arm_gdb_syscall(cpu, arm_semi_cb, "lseek,%x,%x,0", - gf->hostfd, offset); + return common_semi_gdb_syscall(cs, common_semi_cb, "lseek,%x,%x,0", + gf->hostfd, offset); } -static uint32_t gdb_flenfn(ARMCPU *cpu, GuestFD *gf) +static uint32_t gdb_flenfn(CPUState *cs, GuestFD *gf) { - return arm_gdb_syscall(cpu, arm_semi_flen_cb, "fstat,%x,%x", - gf->hostfd, arm_flen_buf(cpu)); + return common_semi_gdb_syscall(cs, common_semi_flen_cb, "fstat,%x,%x", + gf->hostfd, common_semi_flen_buf(cs)); } #define SHFB_MAGIC_0 0x53 @@ -551,31 +581,29 @@ static void init_featurefile_guestfd(int guestfd) gf->featurefile_offset = 0; } -static uint32_t featurefile_closefn(ARMCPU *cpu, GuestFD *gf) +static uint32_t featurefile_closefn(CPUState *cs, GuestFD *gf) { /* Nothing to do */ return 0; } -static uint32_t featurefile_writefn(ARMCPU *cpu, GuestFD *gf, +static uint32_t featurefile_writefn(CPUState *cs, GuestFD *gf, target_ulong buf, uint32_t len) { /* This fd can never be open for writing */ - CPUARMState *env = &cpu->env; errno = EBADF; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } -static uint32_t featurefile_readfn(ARMCPU *cpu, GuestFD *gf, +static uint32_t featurefile_readfn(CPUState *cs, GuestFD *gf, target_ulong buf, uint32_t len) { + CPUArchState *env = cs->env_ptr; uint32_t i; -#ifndef CONFIG_USER_ONLY - CPUARMState *env = &cpu->env; -#endif char *s; + (void) env; /* Used in arm softmmu lock_user implicitly */ s = lock_user(VERIFY_WRITE, buf, len, 0); if (!s) { return len; @@ -595,19 +623,19 @@ static uint32_t featurefile_readfn(ARMCPU *cpu, GuestFD *gf, return len - i; } -static uint32_t featurefile_isattyfn(ARMCPU *cpu, GuestFD *gf) +static uint32_t featurefile_isattyfn(CPUState *cs, GuestFD *gf) { return 0; } -static uint32_t featurefile_seekfn(ARMCPU *cpu, GuestFD *gf, +static uint32_t featurefile_seekfn(CPUState *cs, GuestFD *gf, target_ulong offset) { gf->featurefile_offset = offset; return 0; } -static uint32_t featurefile_flenfn(ARMCPU *cpu, GuestFD *gf) +static uint32_t featurefile_flenfn(CPUState *cs, GuestFD *gf) { return sizeof(featurefile_data); } @@ -651,16 +679,17 @@ static const GuestFDFunctions guestfd_fns[] = { /* Read the input value from the argument block; fail the semihosting * call if the memory read fails. */ +#ifdef TARGET_ARM #define GET_ARG(n) do { \ if (is_a64(env)) { \ if (get_user_u64(arg ## n, args + (n) * 8)) { \ errno = EFAULT; \ - return set_swi_errno(env, -1); \ + return set_swi_errno(cs, -1); \ } \ } else { \ if (get_user_u32(arg ## n, args + (n) * 4)) { \ errno = EFAULT; \ - return set_swi_errno(env, -1); \ + return set_swi_errno(cs, -1); \ } \ } \ } while (0) @@ -669,6 +698,7 @@ static const GuestFDFunctions guestfd_fns[] = { (is_a64(env) ? \ put_user_u64(val, args + (n) * 8) : \ put_user_u32(val, args + (n) * 4)) +#endif /* * Do a semihosting call. @@ -681,8 +711,7 @@ static const GuestFDFunctions guestfd_fns[] = { */ target_ulong do_common_semihosting(CPUState *cs) { - ARMCPU *cpu = ARM_CPU(cs); - CPUARMState *env = &cpu->env; + CPUArchState *env = cs->env_ptr; target_ulong args; target_ulong arg0, arg1, arg2, arg3; char * s; @@ -691,14 +720,9 @@ target_ulong do_common_semihosting(CPUState *cs) uint32_t len; GuestFD *gf; - if (is_a64(env)) { - /* Note that the syscall number is in W0, not X0 */ - nr = env->xregs[0] & 0xffffffffU; - args = env->xregs[1]; - } else { - nr = env->regs[0]; - args = env->regs[1]; - } + (void) env; /* Used implicitly by arm lock_user macro */ + nr = common_semi_arg(cs, 0) & 0xffffffffU; + args = common_semi_arg(cs, 1); switch (nr) { case TARGET_SYS_OPEN: @@ -711,19 +735,19 @@ target_ulong do_common_semihosting(CPUState *cs) s = lock_user_string(arg0); if (!s) { errno = EFAULT; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } if (arg1 >= 12) { unlock_user(s, arg0, 0); errno = EINVAL; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } guestfd = alloc_guestfd(); if (guestfd < 0) { unlock_user(s, arg0, 0); errno = EMFILE; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } if (strcmp(s, ":tt") == 0) { @@ -752,18 +776,19 @@ target_ulong do_common_semihosting(CPUState *cs) if (arg1 != 0 && arg1 != 1) { dealloc_guestfd(guestfd); errno = EACCES; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } init_featurefile_guestfd(guestfd); return guestfd; } if (use_gdb_syscalls()) { - arm_semi_open_guestfd = guestfd; - ret = arm_gdb_syscall(cpu, arm_semi_open_cb, "open,%s,%x,1a4", arg0, - (int)arg2 + 1, gdb_open_modeflags[arg1]); + common_semi_open_guestfd = guestfd; + ret = common_semi_gdb_syscall(cs, common_semi_open_cb, + "open,%s,%x,1a4", arg0, (int)arg2 + 1, + gdb_open_modeflags[arg1]); } else { - ret = set_swi_errno(env, open(s, open_modeflags[arg1], 0644)); + ret = set_swi_errno(cs, open(s, open_modeflags[arg1], 0644)); if (ret == (uint32_t)-1) { dealloc_guestfd(guestfd); } else { @@ -780,17 +805,17 @@ target_ulong do_common_semihosting(CPUState *cs) gf = get_guestfd(arg0); if (!gf) { errno = EBADF; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } - ret = guestfd_fns[gf->type].closefn(cpu, gf); + ret = guestfd_fns[gf->type].closefn(cs, gf); dealloc_guestfd(arg0); return ret; case TARGET_SYS_WRITEC: - qemu_semihosting_console_outc(env, args); + qemu_semihosting_console_outc(cs->env_ptr, args); return 0xdeadbeef; case TARGET_SYS_WRITE0: - return qemu_semihosting_console_outs(env, args); + return qemu_semihosting_console_outs(cs->env_ptr, args); case TARGET_SYS_WRITE: GET_ARG(0); GET_ARG(1); @@ -800,10 +825,10 @@ target_ulong do_common_semihosting(CPUState *cs) gf = get_guestfd(arg0); if (!gf) { errno = EBADF; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } - return guestfd_fns[gf->type].writefn(cpu, gf, arg1, len); + return guestfd_fns[gf->type].writefn(cs, gf, arg1, len); case TARGET_SYS_READ: GET_ARG(0); GET_ARG(1); @@ -813,22 +838,22 @@ target_ulong do_common_semihosting(CPUState *cs) gf = get_guestfd(arg0); if (!gf) { errno = EBADF; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } - return guestfd_fns[gf->type].readfn(cpu, gf, arg1, len); + return guestfd_fns[gf->type].readfn(cs, gf, arg1, len); case TARGET_SYS_READC: - return qemu_semihosting_console_inc(env); + return qemu_semihosting_console_inc(cs->env_ptr); case TARGET_SYS_ISTTY: GET_ARG(0); gf = get_guestfd(arg0); if (!gf) { errno = EBADF; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } - return guestfd_fns[gf->type].isattyfn(cpu, gf); + return guestfd_fns[gf->type].isattyfn(cs, gf); case TARGET_SYS_SEEK: GET_ARG(0); GET_ARG(1); @@ -836,20 +861,20 @@ target_ulong do_common_semihosting(CPUState *cs) gf = get_guestfd(arg0); if (!gf) { errno = EBADF; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } - return guestfd_fns[gf->type].seekfn(cpu, gf, arg1); + return guestfd_fns[gf->type].seekfn(cs, gf, arg1); case TARGET_SYS_FLEN: GET_ARG(0); gf = get_guestfd(arg0); if (!gf) { errno = EBADF; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } - return guestfd_fns[gf->type].flenfn(cpu, gf); + return guestfd_fns[gf->type].flenfn(cs, gf); case TARGET_SYS_TMPNAM: qemu_log_mask(LOG_UNIMP, "%s: SYS_TMPNAM not implemented", __func__); return -1; @@ -857,15 +882,15 @@ target_ulong do_common_semihosting(CPUState *cs) GET_ARG(0); GET_ARG(1); if (use_gdb_syscalls()) { - ret = arm_gdb_syscall(cpu, arm_semi_cb, "unlink,%s", - arg0, (int)arg1 + 1); + ret = common_semi_gdb_syscall(cs, common_semi_cb, "unlink,%s", + arg0, (int)arg1 + 1); } else { s = lock_user_string(arg0); if (!s) { errno = EFAULT; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } - ret = set_swi_errno(env, remove(s)); + ret = set_swi_errno(cs, remove(s)); unlock_user(s, arg0, 0); } return ret; @@ -875,17 +900,18 @@ target_ulong do_common_semihosting(CPUState *cs) GET_ARG(2); GET_ARG(3); if (use_gdb_syscalls()) { - return arm_gdb_syscall(cpu, arm_semi_cb, "rename,%s,%s", - arg0, (int)arg1 + 1, arg2, (int)arg3 + 1); + return common_semi_gdb_syscall(cs, common_semi_cb, "rename,%s,%s", + arg0, (int)arg1 + 1, arg2, + (int)arg3 + 1); } else { char *s2; s = lock_user_string(arg0); s2 = lock_user_string(arg2); if (!s || !s2) { errno = EFAULT; - ret = set_swi_errno(env, -1); + ret = set_swi_errno(cs, -1); } else { - ret = set_swi_errno(env, rename(s, s2)); + ret = set_swi_errno(cs, rename(s, s2)); } if (s2) unlock_user(s2, arg2, 0); @@ -896,25 +922,25 @@ target_ulong do_common_semihosting(CPUState *cs) case TARGET_SYS_CLOCK: return clock() / (CLOCKS_PER_SEC / 100); case TARGET_SYS_TIME: - return set_swi_errno(env, time(NULL)); + return set_swi_errno(cs, time(NULL)); case TARGET_SYS_SYSTEM: GET_ARG(0); GET_ARG(1); if (use_gdb_syscalls()) { - return arm_gdb_syscall(cpu, arm_semi_cb, "system,%s", - arg0, (int)arg1 + 1); + return common_semi_gdb_syscall(cs, common_semi_cb, "system,%s", + arg0, (int)arg1 + 1); } else { s = lock_user_string(arg0); if (!s) { errno = EFAULT; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } - ret = set_swi_errno(env, system(s)); + ret = set_swi_errno(cs, system(s)); unlock_user(s, arg0, 0); return ret; } case TARGET_SYS_ERRNO: - return get_swi_errno(env); + return get_swi_errno(cs); case TARGET_SYS_GET_CMDLINE: { /* Build a command-line from the original argv. @@ -966,21 +992,21 @@ target_ulong do_common_semihosting(CPUState *cs) if (output_size > input_size) { /* Not enough space to store command-line arguments. */ errno = E2BIG; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } /* Adjust the command-line length. */ if (SET_ARG(1, output_size - 1)) { /* Couldn't write back to argument block */ errno = EFAULT; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } /* Lock the buffer on the ARM side. */ output_buffer = lock_user(VERIFY_WRITE, arg0, output_size, 0); if (!output_buffer) { errno = EFAULT; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } /* Copy the command-line arguments. */ @@ -996,7 +1022,7 @@ target_ulong do_common_semihosting(CPUState *cs) if (copy_from_user(output_buffer, ts->info->arg_start, output_size)) { errno = EFAULT; - status = set_swi_errno(env, -1); + status = set_swi_errno(cs, -1); goto out; } @@ -1021,8 +1047,7 @@ target_ulong do_common_semihosting(CPUState *cs) #ifdef CONFIG_USER_ONLY TaskState *ts = cs->opaque; #else - const struct arm_boot_info *info = env->boot_info; - target_ulong rambase = info->loader_start; + target_ulong rambase = common_semi_rambase(cs); #endif GET_ARG(0); @@ -1036,7 +1061,7 @@ target_ulong do_common_semihosting(CPUState *cs) abi_ulong ret; ts->heap_base = do_brk(0); - limit = ts->heap_base + ARM_ANGEL_HEAP_SIZE; + limit = ts->heap_base + COMMON_SEMI_HEAP_SIZE; /* Try a big heap, and reduce the size if that fails. */ for (;;) { ret = do_brk(limit); @@ -1064,23 +1089,19 @@ target_ulong do_common_semihosting(CPUState *cs) for (i = 0; i < ARRAY_SIZE(retvals); i++) { bool fail; - if (is_a64(env)) { - fail = put_user_u64(retvals[i], arg0 + i * 8); - } else { - fail = put_user_u32(retvals[i], arg0 + i * 4); - } + fail = SET_ARG(i, retvals[i]); if (fail) { /* Couldn't write back to argument block */ errno = EFAULT; - return set_swi_errno(env, -1); + return set_swi_errno(cs, -1); } } return 0; } case TARGET_SYS_EXIT: case TARGET_SYS_EXIT_EXTENDED: - if (nr == TARGET_SYS_EXIT_EXTENDED || is_a64(env)) { + if (common_semi_sys_exit_extended(cs, nr)) { /* * The A64 version of SYS_EXIT takes a parameter block, * so the application-exit type can return a subcode which @@ -1113,9 +1134,11 @@ target_ulong do_common_semihosting(CPUState *cs) * virtual address range. This is a nop for us since we don't * implement caches. This is only present on A64. */ - if (is_a64(env)) { +#ifdef TARGET_ARM + if (is_a64(cs->env_ptr)) { return 0; } +#endif /* fall through -- invalid for A32/T32 */ default: fprintf(stderr, "qemu: Unsupported SemiHosting SWI 0x%02x\n", nr); From patchwork Fri Jan 15 13:08:23 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: 363628 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp288995jap; Fri, 15 Jan 2021 05:22:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJxd0149ruQvh8xnijj3bFCDjSLKKEC1YkZqyQv2fvmKVZj1DgVevJ6b5mVfVpuSAkLhSQIN X-Received: by 2002:a25:ef46:: with SMTP id w6mr18017094ybm.458.1610716922933; Fri, 15 Jan 2021 05:22:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610716922; cv=none; d=google.com; s=arc-20160816; b=aioUaLhKmOUIDiQxW3fKfHFDLG3yyC1NY87TgCObDXwcvpGI0ZTwNmDhRuCKGfyswr 1f7A5dhpyAdbdjomBebebwEmLn2fH/3aRp8gT9koVuJXE7pWfiVJ42YXo8TeIzVGi9RV I26ApSrZBaSJUdkY7HWlNYExWJtkiBZm3hxFuLgtRDn56gy1zvUV0i3qLVX9xyYfp2XH u3JfcoC/ensXwEzmt7bjld/uCR3nue59pXsXnPrgZldMx61AaemmyQIEmAJ5PDhF9rf5 NzAK31jFO3QRvgMREP0AJ2CdiLHwdV6UQYbOhVVWZd7AtB/f9HjO9b8se+lRRrFN5oNy LO4A== 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=kdUcvH/D3i7eMpyjSu9D9spoJoxmIAl4kuXpl0wBNfY=; b=hJJe9gBlTy7LFiC7tJLtE/QvUnQZtoj1EngDmpE3gmTlwbVpfoLnkPzPixZkRjnuxq 0BP6H4VvFGtGAuj2qmGYgkbVsdpUq+fDAdgXFK6cirwVO47EFXOS+YnomqFkv/ZUjoC+ 4QqEDqHYXvz8Aywr7QWP+hPAThVOvY6nsN2eSb+ITk9MkLjDxtbTrPxsy9RHwrJrDZ5J y9cltAOQER8oLH3UXevijPeCwMzAiyFkHgB+5v/KPvltCqeX30T1ouD7sQSl8sHD5sjT sS3CLyUUx5AbDOfSG06Ucjb41XrIT5pAwaaId6eTNa1OP3GqgCb7XIiAXmvGnnDVZii7 pCLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=VPWGkmg2; 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 b1si8323367ybq.405.2021.01.15.05.22.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:22:02 -0800 (PST) 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=VPWGkmg2; 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]:41590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0P3C-0006Hy-CJ for patch@linaro.org; Fri, 15 Jan 2021 08:22:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0OqZ-0006LL-U8 for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:09:01 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:36448) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0OqW-0006cI-5F for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:08:59 -0500 Received: by mail-wm1-x330.google.com with SMTP id v184so3339317wma.1 for ; Fri, 15 Jan 2021 05:08:55 -0800 (PST) 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=kdUcvH/D3i7eMpyjSu9D9spoJoxmIAl4kuXpl0wBNfY=; b=VPWGkmg2YK+cJ50FQezrUKzECGeNO71bRKNcnFyrEQn/uURgTqBCfSr5GJQAGy9uKA TUYODv+feWflpZqfCYXkQf7rbuQLSac4W4zLX/qwUAfLNV0rRh6KBkbSGNfg5DySe3RI ePv4h1C25t5ITOdVYcW9XbivoXr9wSXRVdPAukICsATWoRQsdJ8KxBUrbrhnfU9EEXAo mYVmsoqPvtiMSgYKeNZAHNphYm8XYZBMs67s2mY8AXJGA9hgyaqnlzK7fmuDpUEmPuGR MYgFeObcrDlSR2aXwBNHYjzW1jI+jjnoajqx6Ut8FFl9iL39cZprfmcb/U/RVkynvJmE Y7uA== 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=kdUcvH/D3i7eMpyjSu9D9spoJoxmIAl4kuXpl0wBNfY=; b=JPxoK1myJdBv/NxcRSX5y3BUwHE101eQDGGp8NPrjcSYVwo13DIK6ZSIC/D6KQOEbU pZdTTZlVKMArEKsUkADdMjeI857VmXXJ+0+BzA/6k5Bs4TsfvV9yy0jq7b0ufC1qeQvn cr+IiuLEOnrF4RsRuQQYo/ooTOOrJMvIykriAgBEnOkia+lr5O2sWxUQhL7L6FkVc7Tz Ci42X6O3Xzrmbm2gP7PSqhcfSzc7TGpduTRJh3zDyAPb5FA+phE2YBBiRBWVtpKxnt5U 6CJGi5nqHcDVHxbjSlW+D51g+l5h9rU7M4FFfK3rMajFwtLrcHEt+rI+F4PQfbr1mt7x L+fg== X-Gm-Message-State: AOAM531fSVDw1xWgZ2vFNrBQx/gFHCEARymg3mKSq0FIDWVE8GT7jjLp UZSFq3l15zOHfQ46M2qLcF4weQ== X-Received: by 2002:a1c:2c82:: with SMTP id s124mr8456613wms.81.1610716134533; Fri, 15 Jan 2021 05:08:54 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id m14sm14328242wrh.94.2021.01.15.05.08.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:08:49 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4CB3F1FFAF; Fri, 15 Jan 2021 13:08:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 25/30] semihosting: Support SYS_HEAPINFO when env->boot_info is not set Date: Fri, 15 Jan 2021 13:08:23 +0000 Message-Id: <20210115130828.23968-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Keith Packard , =?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: Keith Packard env->boot_info is only set in some ARM startup paths, so we cannot rely on it to support the SYS_HEAPINFO semihosting function. When not available, fallback to finding a RAM memory region containing the current stack and use the base of that. Signed-off-by: Keith Packard Signed-off-by: Alex Bennée Message-Id: <20210107170717.2098982-5-keithp@keithp.com> Message-Id: <20210108224256.2321-16-alex.bennee@linaro.org> -- 2.20.1 diff --git a/hw/semihosting/arm-compat-semi.c b/hw/semihosting/arm-compat-semi.c index ac1271545e..293791f721 100644 --- a/hw/semihosting/arm-compat-semi.c +++ b/hw/semihosting/arm-compat-semi.c @@ -137,6 +137,36 @@ typedef struct GuestFD { static GArray *guestfd_array; +#ifndef CONFIG_USER_ONLY +#include "exec/address-spaces.h" +/* + * Find the base of a RAM region containing the specified address + */ +static inline hwaddr +common_semi_find_region_base(hwaddr addr) +{ + MemoryRegion *subregion; + + /* + * Find the chunk of R/W memory containing the address. This is + * used for the SYS_HEAPINFO semihosting call, which should + * probably be using information from the loaded application. + */ + QTAILQ_FOREACH(subregion, &get_system_memory()->subregions, + subregions_link) { + if (subregion->ram && !subregion->readonly) { + Int128 top128 = int128_add(int128_make64(subregion->addr), + subregion->size); + Int128 addr128 = int128_make64(addr); + if (subregion->addr <= addr && int128_lt(addr128, top128)) { + return subregion->addr; + } + } + } + return 0; +} +#endif + #ifdef TARGET_ARM static inline target_ulong common_semi_arg(CPUState *cs, int argno) @@ -175,7 +205,18 @@ common_semi_rambase(CPUState *cs) { CPUArchState *env = cs->env_ptr; const struct arm_boot_info *info = env->boot_info; - return info->loader_start; + target_ulong sp; + + if (info) { + return info->loader_start; + } + + if (is_a64(env)) { + sp = env->xregs[31]; + } else { + sp = env->regs[13]; + } + return common_semi_find_region_base(sp); } #endif From patchwork Fri Jan 15 13:08:24 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: 363644 Delivered-To: patch@linaro.org Received: by 2002:a17:906:fb05:0:0:0:0 with SMTP id lz5csp541346ejb; Fri, 15 Jan 2021 06:11:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJyN8aCgW33vnJhykwIwBjuWnVvxMj7xPREPQ1O3ZGtVfTfY5VaiQLOyFr1SItGzIGioIctL X-Received: by 2002:a25:4c8a:: with SMTP id z132mr11399603yba.350.1610719918280; Fri, 15 Jan 2021 06:11:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610719918; cv=none; d=google.com; s=arc-20160816; b=kQcHW7gZrvPZaqalmXPm7YarchXx2tyNOyrYExbqat/iC5UNKMPZrgIqkCMGFx46v1 TSHZR8uWnZ/ycFOOhA+JT/3U5OZ/8v5unzjiFOEIj321JNMR8YbHI6/3k+natX7b0pef ld5gP4x5yS0XPE+gsN7bMUigcQKppWdLEtCJToE6UOj+6ZAgHN4biF1TpVNy7HHMAnQy r4W/M8f9VuQfbKXRHPUhpG++tUoUC2gmQCCZbw1eSm6ZWnkcFm5HC7uXQsghcFuYUk4v hCtHyW9z8kcxY7zlgClVdQAIQSmd8/cH7lcXNYohyBZNAqFr6F/BIVB+U82KPzKIn+Em PdVQ== 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=TuD3MyBbI9GFDeT/ByJSV2h/ASr/XDzxKeW4MjzUVRg=; b=Yp+M9cDOnE94ZvPVjjPAjbDgiJ9QCSdA0PxK4TFA4LQRqCRhzBB9ea5RUiG2uiaYGP UnFW7Uy9BMvQbFNlDAzmgz9tAZfj9BE86xJ9AsEuS5HWy6UWaMk5VSAhYIa6CDZtyDW7 AKQwrzPOADAazS3u6Wl/Y/FlHlAjJMzP0N0M2+NQmWpC8V79ZedgOkGWFtCMAoEWYzot +CzBJ7Ym0PXzf4lp2elopNeHgc/86vd3QBN4Hz3SqMO8ctoKne/9HrGMSy2JqZw6LzWc oXT0sPl0xJXtbshZ0jbkFv7bn3HPJWPtMhQa6OdcV2p5ftj4sMaM6hEz7oPZBPVtkdYu XNww== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Q0aDtJbz; 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 n185si8597754ybn.92.2021.01.15.06.11.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 06:11:58 -0800 (PST) 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=Q0aDtJbz; 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]:37430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0PpV-0005gu-Kg for patch@linaro.org; Fri, 15 Jan 2021 09:11:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42878) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0PEc-0001LE-6K for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:50 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:45338) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0PEZ-00088M-Ga for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:49 -0500 Received: by mail-wr1-x431.google.com with SMTP id d26so9282724wrb.12 for ; Fri, 15 Jan 2021 05:33:47 -0800 (PST) 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=TuD3MyBbI9GFDeT/ByJSV2h/ASr/XDzxKeW4MjzUVRg=; b=Q0aDtJbz/fMZharRJPl2XfVSJdkHgP7oEifMypK7tBjzVd6+hLpjLBKO5FKh9TmNf+ +gYAJd+Gf5clB0Eg0673zpcRKeV9RxQksht3JsWtUE/AjbreySMeAgvCrz8yJJ2TF312 kz6LeVKkrwTNDwPqaf1J07qVI7tCa9XCq3TglTJhR5C4cv473atUXZBybo+QDpSjz2wb EoJc2qonmADuCvVKI2jUDdWnnDpm/wVb/4er9zN2/WLcGwTzjhVe3l+1g/Y69IaNVHW8 2Jc3PH1ZIhzKEnV65fW87Yhn+aySHG6Qlday3ybB2D+NoFdpxZBVv91zTAS7vtPNgqdW HMdQ== 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=TuD3MyBbI9GFDeT/ByJSV2h/ASr/XDzxKeW4MjzUVRg=; b=OH4FjHo2ROj4fuwLp4w3Z/q5Is9tEHvNnEne/DDmbccuhXbutYslB8BW2kzkuaCYPt oR3PcEgq2saM2NUl996yzgIpgINWvTXbnZmNkWT4JVPjISQPbKw536lEozLBzGool8TG pVU3d9MB68pKlGa2+69GWbJU7fY55MiM1nioxlV/0G9c7DcEeUURaLfYzk0YaEI0Prqa E1OXcM2JtfukkEOF2XT5CRD+ZLz8HLBU7DsgQR+OgzEN3bCfqUi3cJyg1iInHfLyBX07 AUc4N7VTx20Gi4belpYcNWN67WcFW9fC7/3b5oQvk4xue6f+2poi8imupLnMDXJ0I3u2 M65g== X-Gm-Message-State: AOAM531D4qW5oalpaVc8W7QGIVuEcorTZ1au5G//FyOhCykNJrdTQK9B 4ps5LQQtv/ev4BwLY62WSrKXxA== X-Received: by 2002:adf:8290:: with SMTP id 16mr12818937wrc.27.1610717626068; Fri, 15 Jan 2021 05:33:46 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h16sm14582901wrq.29.2021.01.15.05.33.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:33:40 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B3F731FFB1; Fri, 15 Jan 2021 13:08:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 26/30] riscv: Add semihosting support Date: Fri, 15 Jan 2021 13:08:24 +0000 Message-Id: <20210115130828.23968-27-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Keith Packard , "open list:RISC-V TCG CPUs" , Sagar Karandikar , Bastian Koppelmann , qemu-devel@nongnu.org, Laurent Vivier , Alistair Francis , Palmer Dabbelt , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Keith Packard Adapt the arm semihosting support code for RISCV. This implementation is based on the standard for RISC-V semihosting version 0.2 as documented in https://github.com/riscv/riscv-semihosting-spec/releases/tag/0.2 Signed-off-by: Keith Packard Signed-off-by: Alex Bennée Reviewed-by: Alistair Francis Message-Id: <20210107170717.2098982-6-keithp@keithp.com> Message-Id: <20210108224256.2321-17-alex.bennee@linaro.org> -- 2.20.1 diff --git a/default-configs/devices/riscv32-softmmu.mak b/default-configs/devices/riscv32-softmmu.mak index 94a236c9c2..d847bd5692 100644 --- a/default-configs/devices/riscv32-softmmu.mak +++ b/default-configs/devices/riscv32-softmmu.mak @@ -3,6 +3,8 @@ # Uncomment the following lines to disable these optional devices: # #CONFIG_PCI_DEVICES=n +CONFIG_SEMIHOSTING=y +CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y # Boards: # diff --git a/default-configs/devices/riscv64-softmmu.mak b/default-configs/devices/riscv64-softmmu.mak index 76b6195648..d5eec75f05 100644 --- a/default-configs/devices/riscv64-softmmu.mak +++ b/default-configs/devices/riscv64-softmmu.mak @@ -3,6 +3,8 @@ # Uncomment the following lines to disable these optional devices: # #CONFIG_PCI_DEVICES=n +CONFIG_SEMIHOSTING=y +CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y # Boards: # diff --git a/default-configs/targets/riscv32-linux-user.mak b/default-configs/targets/riscv32-linux-user.mak index dfb259e8aa..6a9d1b1bc1 100644 --- a/default-configs/targets/riscv32-linux-user.mak +++ b/default-configs/targets/riscv32-linux-user.mak @@ -2,3 +2,4 @@ TARGET_ARCH=riscv32 TARGET_BASE_ARCH=riscv TARGET_ABI_DIR=riscv TARGET_XML_FILES= gdb-xml/riscv-32bit-cpu.xml gdb-xml/riscv-32bit-fpu.xml gdb-xml/riscv-64bit-fpu.xml gdb-xml/riscv-32bit-csr.xml gdb-xml/riscv-32bit-virtual.xml +CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y diff --git a/default-configs/targets/riscv64-linux-user.mak b/default-configs/targets/riscv64-linux-user.mak index b13895f3b0..0a92849a1b 100644 --- a/default-configs/targets/riscv64-linux-user.mak +++ b/default-configs/targets/riscv64-linux-user.mak @@ -2,3 +2,4 @@ TARGET_ARCH=riscv64 TARGET_BASE_ARCH=riscv TARGET_ABI_DIR=riscv TARGET_XML_FILES= gdb-xml/riscv-64bit-cpu.xml gdb-xml/riscv-32bit-fpu.xml gdb-xml/riscv-64bit-fpu.xml gdb-xml/riscv-64bit-csr.xml gdb-xml/riscv-64bit-virtual.xml +CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y diff --git a/hw/semihosting/common-semi.h b/hw/semihosting/common-semi.h index bc53e92c79..0bfab1c669 100644 --- a/hw/semihosting/common-semi.h +++ b/hw/semihosting/common-semi.h @@ -1,6 +1,6 @@ /* * Semihosting support for systems modeled on the Arm "Angel" - * semihosting syscalls design. + * semihosting syscalls design. This includes Arm and RISC-V processors * * Copyright (c) 2005, 2007 CodeSourcery. * Copyright (c) 2019 Linaro @@ -26,6 +26,9 @@ * Semihosting for AArch32 and AArch64 Release 2.0 * https://static.docs.arm.com/100863/0200/semihosting.pdf * + * RISC-V Semihosting is documented in: + * RISC-V Semihosting + * https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc */ #ifndef COMMON_SEMI_H diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 534753ca12..17aa992165 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -109,6 +109,8 @@ typedef struct TaskState { /* FPA state */ FPA11 fpa; # endif +#endif +#if defined(TARGET_ARM) || defined(TARGET_RISCV) int swi_errno; #endif #if defined(TARGET_I386) && !defined(TARGET_X86_64) @@ -122,7 +124,7 @@ typedef struct TaskState { #ifdef TARGET_M68K abi_ulong tp_value; #endif -#if defined(TARGET_ARM) || defined(TARGET_M68K) +#if defined(TARGET_ARM) || defined(TARGET_M68K) || defined(TARGET_RISCV) /* Extra fields for semihosted binaries. */ abi_ulong heap_base; abi_ulong heap_limit; diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h index b41e8836c3..4196ef8b69 100644 --- a/target/riscv/cpu_bits.h +++ b/target/riscv/cpu_bits.h @@ -542,6 +542,7 @@ #define RISCV_EXCP_INST_PAGE_FAULT 0xc /* since: priv-1.10.0 */ #define RISCV_EXCP_LOAD_PAGE_FAULT 0xd /* since: priv-1.10.0 */ #define RISCV_EXCP_STORE_PAGE_FAULT 0xf /* since: priv-1.10.0 */ +#define RISCV_EXCP_SEMIHOST 0x10 #define RISCV_EXCP_INST_GUEST_PAGE_FAULT 0x14 #define RISCV_EXCP_LOAD_GUEST_ACCESS_FAULT 0x15 #define RISCV_EXCP_VIRT_INSTRUCTION_FAULT 0x16 diff --git a/hw/semihosting/arm-compat-semi.c b/hw/semihosting/arm-compat-semi.c index 293791f721..5fcb8663c6 100644 --- a/hw/semihosting/arm-compat-semi.c +++ b/hw/semihosting/arm-compat-semi.c @@ -1,6 +1,6 @@ /* * Semihosting support for systems modeled on the Arm "Angel" - * semihosting syscalls design. + * semihosting syscalls design. This includes Arm and RISC-V processors * * Copyright (c) 2005, 2007 CodeSourcery. * Copyright (c) 2019 Linaro @@ -25,6 +25,10 @@ * ARM Semihosting is documented in: * Semihosting for AArch32 and AArch64 Release 2.0 * https://static.docs.arm.com/100863/0200/semihosting.pdf + * + * RISC-V Semihosting is documented in: + * RISC-V Semihosting + * https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc */ #include "qemu/osdep.h" @@ -222,6 +226,42 @@ common_semi_rambase(CPUState *cs) #endif /* TARGET_ARM */ +#ifdef TARGET_RISCV +static inline target_ulong +common_semi_arg(CPUState *cs, int argno) +{ + RISCVCPU *cpu = RISCV_CPU(cs); + CPURISCVState *env = &cpu->env; + return env->gpr[xA0 + argno]; +} + +static inline void +common_semi_set_ret(CPUState *cs, target_ulong ret) +{ + RISCVCPU *cpu = RISCV_CPU(cs); + CPURISCVState *env = &cpu->env; + env->gpr[xA0] = ret; +} + +static inline bool +common_semi_sys_exit_extended(CPUState *cs, int nr) +{ + return (nr == TARGET_SYS_EXIT_EXTENDED || sizeof(target_ulong) == 8); +} + +#ifndef CONFIG_USER_ONLY + +static inline target_ulong +common_semi_rambase(CPUState *cs) +{ + RISCVCPU *cpu = RISCV_CPU(cs); + CPURISCVState *env = &cpu->env; + return common_semi_find_region_base(env->gpr[xSP]); +} +#endif + +#endif + /* * Allocate a new guest file descriptor and return it; if we * couldn't allocate a new fd then return -1. @@ -398,6 +438,12 @@ static target_ulong common_semi_flen_buf(CPUState *cs) sp = env->regs[13]; } #endif +#ifdef TARGET_RISCV + RISCVCPU *cpu = RISCV_CPU(cs); + CPURISCVState *env = &cpu->env; + + sp = env->gpr[xSP]; +#endif return sp - 64; } @@ -741,6 +787,37 @@ static const GuestFDFunctions guestfd_fns[] = { put_user_u32(val, args + (n) * 4)) #endif +#ifdef TARGET_RISCV + +/* + * get_user_ual is defined as get_user_u32 in softmmu-semi.h, + * we need a macro that fetches a target_ulong + */ +#define get_user_utl(arg, p) \ + ((sizeof(target_ulong) == 8) ? \ + get_user_u64(arg, p) : \ + get_user_u32(arg, p)) + +/* + * put_user_ual is defined as put_user_u32 in softmmu-semi.h, + * we need a macro that stores a target_ulong + */ +#define put_user_utl(arg, p) \ + ((sizeof(target_ulong) == 8) ? \ + put_user_u64(arg, p) : \ + put_user_u32(arg, p)) + +#define GET_ARG(n) do { \ + if (get_user_utl(arg ## n, args + (n) * sizeof(target_ulong))) { \ + errno = EFAULT; \ + return set_swi_errno(cs, -1); \ + } \ + } while (0) + +#define SET_ARG(n, val) \ + put_user_utl(val, args + (n) * sizeof(target_ulong)) +#endif + /* * Do a semihosting call. * @@ -1179,6 +1256,9 @@ target_ulong do_common_semihosting(CPUState *cs) if (is_a64(cs->env_ptr)) { return 0; } +#endif +#ifdef TARGET_RISCV + return 0; #endif /* fall through -- invalid for A32/T32 */ default: diff --git a/linux-user/semihost.c b/linux-user/semihost.c index a1f0f6050e..c0015ee7f6 100644 --- a/linux-user/semihost.c +++ b/linux-user/semihost.c @@ -1,11 +1,11 @@ /* - * ARM Semihosting Console Support + * ARM Compatible Semihosting Console Support. * * Copyright (c) 2019 Linaro Ltd * - * Currently ARM is unique in having support for semihosting support - * in linux-user. So for now we implement the common console API but - * just for arm linux-user. + * Currently ARM and RISC-V are unique in having support for + * semihosting support in linux-user. So for now we implement the + * common console API but just for arm and risc-v linux-user. * * SPDX-License-Identifier: GPL-2.0-or-later */ diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index a2afb95fa1..f8350f5f78 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -24,6 +24,7 @@ #include "exec/exec-all.h" #include "tcg/tcg-op.h" #include "trace.h" +#include "hw/semihosting/common-semi.h" int riscv_cpu_mmu_index(CPURISCVState *env, bool ifetch) { @@ -847,6 +848,15 @@ void riscv_cpu_do_interrupt(CPUState *cs) target_ulong htval = 0; target_ulong mtval2 = 0; + if (cause == RISCV_EXCP_SEMIHOST) { + if (env->priv >= PRV_S) { + env->gpr[xA0] = do_common_semihosting(cs); + env->pc += 4; + return; + } + cause = RISCV_EXCP_BREAKPOINT; + } + if (!async) { /* set tval to badaddr for traps with address information */ switch (cause) { diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 554d52a4be..0f28b5f41e 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -64,6 +64,7 @@ typedef struct DisasContext { uint16_t vlen; uint16_t mlen; bool vl_eq_vlmax; + CPUState *cs; } DisasContext; #ifdef TARGET_RISCV64 @@ -747,6 +748,15 @@ static bool gen_shift(DisasContext *ctx, arg_r *a, return true; } +static uint32_t opcode_at(DisasContextBase *dcbase, target_ulong pc) +{ + DisasContext *ctx = container_of(dcbase, DisasContext, base); + CPUState *cpu = ctx->cs; + CPURISCVState *env = cpu->env_ptr; + + return cpu_ldl_code(env, pc); +} + /* Include insn module translation function */ #include "insn_trans/trans_rvi.c.inc" #include "insn_trans/trans_rvm.c.inc" @@ -814,6 +824,7 @@ static void riscv_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs) ctx->lmul = FIELD_EX32(tb_flags, TB_FLAGS, LMUL); ctx->mlen = 1 << (ctx->sew + 3 - ctx->lmul); ctx->vl_eq_vlmax = FIELD_EX32(tb_flags, TB_FLAGS, VL_EQ_VLMAX); + ctx->cs = cs; } static void riscv_tr_tb_start(DisasContextBase *db, CPUState *cpu) diff --git a/target/riscv/insn_trans/trans_privileged.c.inc b/target/riscv/insn_trans/trans_privileged.c.inc index 2a61a853bf..32312be202 100644 --- a/target/riscv/insn_trans/trans_privileged.c.inc +++ b/target/riscv/insn_trans/trans_privileged.c.inc @@ -29,7 +29,42 @@ static bool trans_ecall(DisasContext *ctx, arg_ecall *a) static bool trans_ebreak(DisasContext *ctx, arg_ebreak *a) { - generate_exception(ctx, RISCV_EXCP_BREAKPOINT); + target_ulong ebreak_addr = ctx->base.pc_next; + target_ulong pre_addr = ebreak_addr - 4; + target_ulong post_addr = ebreak_addr + 4; + uint32_t pre = 0; + uint32_t ebreak = 0; + uint32_t post = 0; + + /* + * The RISC-V semihosting spec specifies the following + * three-instruction sequence to flag a semihosting call: + * + * slli zero, zero, 0x1f 0x01f01013 + * ebreak 0x00100073 + * srai zero, zero, 0x7 0x40705013 + * + * The two shift operations on the zero register are no-ops, used + * here to signify a semihosting exception, rather than a breakpoint. + * + * Uncompressed instructions are required so that the sequence is easy + * to validate. + * + * The three instructions are required to lie in the same page so + * that no exception will be raised when fetching them. + */ + + if ((pre_addr & TARGET_PAGE_MASK) == (post_addr & TARGET_PAGE_MASK)) { + pre = opcode_at(&ctx->base, pre_addr); + ebreak = opcode_at(&ctx->base, ebreak_addr); + post = opcode_at(&ctx->base, post_addr); + } + + if (pre == 0x01f01013 && ebreak == 0x00100073 && post == 0x40705013) { + generate_exception(ctx, RISCV_EXCP_SEMIHOST); + } else { + generate_exception(ctx, RISCV_EXCP_BREAKPOINT); + } exit_tb(ctx); /* no chaining */ ctx->base.is_jmp = DISAS_NORETURN; return true; diff --git a/qemu-options.hx b/qemu-options.hx index 1698a0c751..263caa21ec 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4197,10 +4197,10 @@ ERST DEF("semihosting", 0, QEMU_OPTION_semihosting, "-semihosting semihosting mode\n", QEMU_ARCH_ARM | QEMU_ARCH_M68K | QEMU_ARCH_XTENSA | QEMU_ARCH_LM32 | - QEMU_ARCH_MIPS | QEMU_ARCH_NIOS2) + QEMU_ARCH_MIPS | QEMU_ARCH_NIOS2 | QEMU_ARCH_RISCV) SRST ``-semihosting`` - Enable semihosting mode (ARM, M68K, Xtensa, MIPS, Nios II only). + Enable semihosting mode (ARM, M68K, Xtensa, MIPS, Nios II, RISC-V only). Note that this allows guest direct access to the host filesystem, so should only be used with a trusted guest OS. @@ -4212,10 +4212,10 @@ DEF("semihosting-config", HAS_ARG, QEMU_OPTION_semihosting_config, "-semihosting-config [enable=on|off][,target=native|gdb|auto][,chardev=id][,arg=str[,...]]\n" \ " semihosting configuration\n", QEMU_ARCH_ARM | QEMU_ARCH_M68K | QEMU_ARCH_XTENSA | QEMU_ARCH_LM32 | -QEMU_ARCH_MIPS | QEMU_ARCH_NIOS2) +QEMU_ARCH_MIPS | QEMU_ARCH_NIOS2 | QEMU_ARCH_RISCV) SRST ``-semihosting-config [enable=on|off][,target=native|gdb|auto][,chardev=id][,arg=str[,...]]`` - Enable and configure semihosting (ARM, M68K, Xtensa, MIPS, Nios II + Enable and configure semihosting (ARM, M68K, Xtensa, MIPS, Nios II, RISC-V only). Note that this allows guest direct access to the host filesystem, so @@ -4230,6 +4230,8 @@ SRST open/read/write/seek/select. Tensilica baremetal libc for ISS and linux platform "sim" use this interface. + On RISC-V this implements the standard semihosting API, version 0.2. + ``target=native|gdb|auto`` Defines where the semihosting calls will be addressed, to QEMU (``native``) or to GDB (``gdb``). The default is ``auto``, which From patchwork Fri Jan 15 13:08:25 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: 363645 Delivered-To: patch@linaro.org Received: by 2002:a17:906:fb05:0:0:0:0 with SMTP id lz5csp541438ejb; Fri, 15 Jan 2021 06:12:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrOZbzYy/gaPx0if/GMsjybNZ07O1rwZqt5jkDcRrRucWUierpNIxp2Wk6TLuCiddW8Nql X-Received: by 2002:a25:5e45:: with SMTP id s66mr8224985ybb.295.1610719924876; Fri, 15 Jan 2021 06:12:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610719924; cv=none; d=google.com; s=arc-20160816; b=Sbb4+NWVFZn20hSTiQ4YmK6qUAjD9ernamatBugGQjS+j4c+oxWMkjRxeLtUtExtE7 N4g8vuccOlziuNiAiso+tHFoUv+EyWBMUjfoN+rpxsPdnvVMc4Ekh7V9D+AF8ebkFa+c B+E56cZ9KyYQK2a0qd6EjLz+mF47Y3xXAejVBJagJgt38YCUbizmu5fLApAnSLoTQ6au C7i3GbhIAEAzjpZeQupD0XTbp1wl38//3g+aNFUAzi+yHqUMYJg6lJqU/yJEqT2Ff49r wfojSjrKMSrfZT3f8PVDi1WxMeTn5JFUmAhWHWdB9Eq4ViiDGcq2am+V84cmeINlekVw RUuw== 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=nX0nZR8ML7YatFNFZPaARqTOhSbYyFFOXgEPNCPi1K0=; b=gtVpMXcBXabPAsyEAAKjYJfujPRBwnNB1gjC6sJiLg2LojwO7U2QWQsIJvvwVp9Tj2 OywP10nrLLy4nOvq7gEeB4kG9r5MHjycASvwdV8EDRc4K1fhR/S389EN1c/cA8NDBhvQ boa3DKVEhfk5ynM93zqjM74S43HNFnIY/+dy/n9ldg1rXyqqSk2vrS6eif6+7XwTnxm+ +MNc2aEJhq5bGwhzRdyfnq8fmB/pJUCNEibFrcKdSVHMhqU2jleT50nQXB/LnsnZ2m+b jnPJmGEk2oMCQmIoBMO2Nec6dIdePD5BPikTi2rsVFf6evBOc98GkzDgfKDBM/cCLyKR X7Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=qRdBArrx; 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 s4si8813828ybm.126.2021.01.15.06.12.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 06:12:04 -0800 (PST) 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=qRdBArrx; 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]:37256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Ppc-0005cP-AH for patch@linaro.org; Fri, 15 Jan 2021 09:12:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0PEV-00015E-7t for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:43 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:33803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0PEP-00082g-7X for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:33:42 -0500 Received: by mail-wm1-x330.google.com with SMTP id o10so1904621wmc.1 for ; Fri, 15 Jan 2021 05:33:36 -0800 (PST) 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=nX0nZR8ML7YatFNFZPaARqTOhSbYyFFOXgEPNCPi1K0=; b=qRdBArrxhbyczAAg/gGAt9VhAGoaX191RUCq6rAOK1YV7su7KepAPsZpdqMRRQQeqp 2XaSeTgRCkwKFPHBIl2jI0z6vl4ZKCmnSIUzeZANSl79/F4QI3Dv7a0avkRZfd1u7UNW aWgpoR/90wrA9VnR3OLWW929c7iGwaHkSSCDo+J4rD2okgESH7m89rVsHdFtoa0ZrdGA UabbIYJJq+FrH/d7QSwswFkL6IlP/khl+tCVKvn2557cvhlyxU3ZakYgarNWOFrnrUrZ +CIAxO7Q/AscUOVnjxlm5YXKUHUKRTNMiMKh52l7JVG2k0krN2Yq7JZHH8eA9zENLaJ5 ms0w== 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=nX0nZR8ML7YatFNFZPaARqTOhSbYyFFOXgEPNCPi1K0=; b=fpz+v0fvQx9FyB30yjrrw3KdUxEQKcftDD0KBx/gFFG0IQZ+acfeWB+Lt7FUFzI2+3 ttS2Rbx3gTCoGsqze6YBQTqPJrO6ORQ5sr4ir1V4S68qFAGUHjG/Zcw2hNslMTL1xdgl 5gWsMBWrKDyt0fSpz9uL3XPQ8uX1p5r8M2niPBzYfIjaQUjiER4uXkvvGEFVz3UTVVm8 +96PMSpgVNWCNRqDxCI25cYthfnUSvTWgorOGbZUI6fWK1qrfYUoCPNd5awHlHIObN0T FWiX0E6WkFnsC56daGpma42zlg5C2YODaO6vir9b7EhCq+a5GQlXz6xeYATKQbMpQf5S gqPg== X-Gm-Message-State: AOAM532XMIfLdC283CCP/1drIX3Hk+MKCWX1zlzTWWhwP7nvjTbF7IMo TPHclFM0ijsbKRWnpUc/i9kKkA== X-Received: by 2002:a1c:8195:: with SMTP id c143mr8653328wmd.59.1610717615541; Fri, 15 Jan 2021 05:33:35 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a12sm16384923wrh.71.2021.01.15.05.33.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:33:32 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F03731FF7E; Fri, 15 Jan 2021 13:08:34 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 27/30] riscv: Add semihosting support for user mode Date: Fri, 15 Jan 2021 13:08:25 +0000 Message-Id: <20210115130828.23968-28-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Keith Packard , qemu-devel@nongnu.org, =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= , Alistair Francis , Kito Cheng , =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Kito Cheng This could made testing more easier and ARM/AArch64 has supported on their linux user mode too, so I think it should be reasonable. Verified GCC testsuite with newlib/semihosting. Signed-off-by: Kito Cheng Signed-off-by: Alex Bennée Reviewed-by: Keith Packard Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210107170717.2098982-7-keithp@keithp.com> Message-Id: <20210108224256.2321-18-alex.bennee@linaro.org> -- 2.20.1 diff --git a/linux-user/riscv/cpu_loop.c b/linux-user/riscv/cpu_loop.c index aa9e437875..9665dabb09 100644 --- a/linux-user/riscv/cpu_loop.c +++ b/linux-user/riscv/cpu_loop.c @@ -23,6 +23,7 @@ #include "qemu.h" #include "cpu_loop-common.h" #include "elf.h" +#include "hw/semihosting/common-semi.h" void cpu_loop(CPURISCVState *env) { @@ -91,6 +92,10 @@ void cpu_loop(CPURISCVState *env) sigcode = TARGET_SEGV_MAPERR; sigaddr = env->badaddr; break; + case RISCV_EXCP_SEMIHOST: + env->gpr[xA0] = do_common_semihosting(cs); + env->pc += 4; + break; case EXCP_DEBUG: gdbstep: signum = TARGET_SIGTRAP; From patchwork Fri Jan 15 13:08:26 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: 363635 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp302154jap; Fri, 15 Jan 2021 05:37:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6pAF+T+t0Gea0xCKPDOYUW/LMvUP3LmOpuX10Cp/E0bBR80in0HTg/DHmZiXOrn+XyxnV X-Received: by 2002:a25:3d81:: with SMTP id k123mr17142377yba.430.1610717872866; Fri, 15 Jan 2021 05:37:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610717872; cv=none; d=google.com; s=arc-20160816; b=oTEwQFAvq99wRuyHHb6ezBWq4UTMSCKIuCFZ6gQWa5gFMI57gYwr3DPel3VoRNQbz6 7/pP7Hefl4cZCe0nHz6mMjxYwm1RAAREyAB1o5dsQa+/Xax53GWZWJBUlZPtx4eB6Aik bj9ElSxnXox2qRV2jh07R5zvuMheQUcbE/TFgzN/KfykJN7OeTf0pkc5GX2/Yz1q9X8N qpT7iqFrrN8l5glTjySZA3zqmvWMc+6MAFfUjyQpaQt1xJsdia2FIgh6xEkYDTWTIywL vxC2swmusyKUvxq/h5mh3FrNc8cuFGD8umHZB+7H9T5ljNrSeCQE8sc55Sds4x+gQDDD egag== 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=7kYCjAdFXPUkM10wP/gFX4tRyZKG7p65iiW2L3+wBKM=; b=LKuW4uCAt5eL97+2hjoyy02411xsoKJ7XBJDGsoO6k1MIy7hU8NW0ErEucF1liSlvK xHSairhvbl+spVpjXxWuJg2hMRI0PT2B5oM4/XUAFlkpsjlPCmeVulT4IumVcuTOBBol 4c9OjCMWWGva0zhEDKQhxPxNU9i1Y2LzgvdqZmT7z+dNkCjnLLD8z6HeUNGEncCmGJ5D fiQRWSZOejf4pqa9dY+8dPOu0HFA7n0qY6zvn5d4Id1v0p+E9hQG1hK7qYyAeBfhgfbV nGmoLTLfiFnZy6ZmekWfkz5DIVw3HDSquGplatPDYUrcZ8IgagDjUxJ6yz6nhGt8GYXy i7Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="L6cjWEy/"; 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 j67si8613401ybg.290.2021.01.15.05.37.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:37:52 -0800 (PST) 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="L6cjWEy/"; 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]:51500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0PIW-0005fi-Bk for patch@linaro.org; Fri, 15 Jan 2021 08:37:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0P0B-0005I8-0A for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:18:55 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:34759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0P08-0002Mh-AT for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:18:54 -0500 Received: by mail-wm1-x330.google.com with SMTP id o10so1880365wmc.1 for ; Fri, 15 Jan 2021 05:18:51 -0800 (PST) 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=7kYCjAdFXPUkM10wP/gFX4tRyZKG7p65iiW2L3+wBKM=; b=L6cjWEy/oBuTSMfycwHxssPlgw4BzuGAEcN2PHtSWIhUO+pADupPAwa0KX6VyWABqb ATl+xSJDIMiquGXrcjvTLMvRnym2P0TAVQJcqA5+Xj0vposetN9dVSvBD0ApW+TzoeBC IQQ0gaOCtlKdLMRyY3X6+2o34s0ygQIYTrrZpTDCxHbTYX6ZyCArTJl4PoZeMZQaXw0Z 8OnjXA+Q5aG0yMUmQhvx9DOvqFCeGURaU9bwLE9MfQ8pc8oWeXurM8EhJjRKAorTAf+3 Uqz71XSorAj7Tp4HWu5qmw4nIDd57VBsnV7Fdupgy68lG+qsn0/f7cVt4SID3FkXRVIM Qb7A== 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=7kYCjAdFXPUkM10wP/gFX4tRyZKG7p65iiW2L3+wBKM=; b=K690phszN3d0vyXy9UTfRfNoUc+gXXLo6exgl7LXRTa/8qE+F5TknOUxVIt2ADBYLd e4WqSC10RHgbDtOSYglmfLWqKZFJgHf47zidG21eEsWg3RG6uJC71Z6GQ8xDf9IqFvwG i4Bv47D1RKZlAyDIkq4WBevUkbtijTrvLvjEqUoczFNTrENaFVPUArGPp35fTMH634Kc /UFte0Wzlwb3zN0PhNIfsd8PZbmtxnU4qSXd857fZZvyYrk+7JtgGaF7Y+NYOOv0VOH8 xMcHcyR+Qg+d2mCXzUpaZ5MKloE8A23a+NfDYcxgi/O7Wvmass7mzpmlYqxoQYOo9ar7 LPqw== X-Gm-Message-State: AOAM533VXutyGMoT4GCMWsXxBViUlLWdA3S0DEGaetwXmJU4YOsVmtyW BJOuDUMNWPmpf8QYVyciQRWkBQ== X-Received: by 2002:a7b:ce17:: with SMTP id m23mr8694324wmc.117.1610716730615; Fri, 15 Jan 2021 05:18:50 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r1sm15222794wrl.95.2021.01.15.05.18.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:18:46 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 339CB1FFB3; Fri, 15 Jan 2021 13:08:35 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 28/30] semihosting: Implement SYS_ELAPSED and SYS_TICKFREQ Date: Fri, 15 Jan 2021 13:08:26 +0000 Message-Id: <20210115130828.23968-29-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Keith Packard , =?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: Keith Packard These are part of Semihosting for AArch32 and AArch64 Release 2.0 Signed-off-by: Keith Packard Signed-off-by: Alex Bennée Message-Id: <20210107170717.2098982-8-keithp@keithp.com> Message-Id: <20210108224256.2321-19-alex.bennee@linaro.org> -- 2.20.1 diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 61296ea980..1678238384 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -808,6 +808,8 @@ static inline int64_t get_clock_realtime(void) return tv.tv_sec * 1000000000LL + (tv.tv_usec * 1000); } +extern int64_t clock_start; + /* Warning: don't insert tracepoints into these functions, they are also used by simpletrace backend and tracepoints would cause an infinite recursion! */ diff --git a/hw/semihosting/arm-compat-semi.c b/hw/semihosting/arm-compat-semi.c index 5fcb8663c6..3d6604dcdd 100644 --- a/hw/semihosting/arm-compat-semi.c +++ b/hw/semihosting/arm-compat-semi.c @@ -38,6 +38,7 @@ #include "hw/semihosting/console.h" #include "hw/semihosting/common-semi.h" #include "qemu/log.h" +#include "qemu/timer.h" #ifdef CONFIG_USER_ONLY #include "qemu.h" @@ -73,6 +74,8 @@ #define TARGET_SYS_EXIT 0x18 #define TARGET_SYS_SYNCCACHE 0x19 #define TARGET_SYS_EXIT_EXTENDED 0x20 +#define TARGET_SYS_ELAPSED 0x30 +#define TARGET_SYS_TICKFREQ 0x31 /* ADP_Stopped_ApplicationExit is used for exit(0), * anything else is implemented as exit(1) */ @@ -837,6 +840,7 @@ target_ulong do_common_semihosting(CPUState *cs) uint32_t ret; uint32_t len; GuestFD *gf; + int64_t elapsed; (void) env; /* Used implicitly by arm lock_user macro */ nr = common_semi_arg(cs, 0) & 0xffffffffU; @@ -1246,6 +1250,18 @@ target_ulong do_common_semihosting(CPUState *cs) } gdb_exit(ret); exit(ret); + case TARGET_SYS_ELAPSED: + elapsed = get_clock() - clock_start; + if (sizeof(target_ulong) == 8) { + SET_ARG(0, elapsed); + } else { + SET_ARG(0, (uint32_t) elapsed); + SET_ARG(1, (uint32_t) (elapsed >> 32)); + } + return 0; + case TARGET_SYS_TICKFREQ: + /* qemu always uses nsec */ + return 1000000000; case TARGET_SYS_SYNCCACHE: /* * Clean the D-cache and invalidate the I-cache for the specified diff --git a/util/qemu-timer-common.c b/util/qemu-timer-common.c index baf3317f74..cc1326f726 100644 --- a/util/qemu-timer-common.c +++ b/util/qemu-timer-common.c @@ -27,6 +27,8 @@ /***********************************************************/ /* real time host monotonic timer */ +int64_t clock_start; + #ifdef _WIN32 int64_t clock_freq; @@ -41,6 +43,7 @@ static void __attribute__((constructor)) init_get_clock(void) exit(1); } clock_freq = freq.QuadPart; + clock_start = get_clock(); } #else @@ -55,5 +58,6 @@ static void __attribute__((constructor)) init_get_clock(void) if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) { use_rt_clock = 1; } + clock_start = get_clock(); } #endif From patchwork Fri Jan 15 13:08:27 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: 363638 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp307471jap; Fri, 15 Jan 2021 05:44:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJyPyYRhqRZ+Ls1D/juxj6GciMv7ECnwzZOwe1+DVfehbGc9U75eAc0qG+8lv46VzzAiPfkg X-Received: by 2002:a25:c614:: with SMTP id k20mr9759490ybf.371.1610718279008; Fri, 15 Jan 2021 05:44:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610718279; cv=none; d=google.com; s=arc-20160816; b=hRwbegQsOhgGyXuPWFOegKJNlgDuy1omVzozIOgDyDhxspEYH56m/KvVu/HNTi7PxW AQwgC6ATu0//p05vmXz614GGqtEUiZOwzWxoW9PI7kA26U0zpOZwNBATWK/uswVb2GPS emu3vzZ6R0vCNOSAOmlZFbmkzgq+Lu+4n6QUu+ISq4gYMsN2ayGNaJYOwbBzqukF4Sdk dSwboSduzzY3hpT/W+WsA4aZ2+OnamaWppmnrlA01OpD1K7Sdi8sVvVWR1xIBZGRLKNi S+3h2xIQ46gvNgkXgLseQR1bulD/UL42Bld0BiGHoXwLORhWObjL25xyoPhmxxlriuS1 ACDw== 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=muCsYbQEcoe3YnIMkqZAOUWb9L93swjFn/KxNUvS9X4=; b=NnrktHpneUjP3RPz0maxUyO6GhF0KwmtSMH/PqPAj3QTJmomYAurCE6vAQNdrz9Yca RQJqtyofcbhQWjhlkYPVXiqQfsiSYjwHcZQhENt/Y3hwVEOHXYuEhplzrPlw6If2RXfg /4zVfb7R+68wX75zSmw0og94dagSvnuBSe6mxIFXgLXNQaysn5E294pw1MfEexLbQwgt /e6cQvn1FHU+CDoRW5g4LOAd76n7t+JY02VzvPNEJ5F37k/yL5t1UyUTO8nZFSFQTEGr xdWDgKG4vImkDah4mEGukx8JhVyxgPoKi2i4vnzv1z08JmcQTs5Xd9UUlSnil4Hzspku hDWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=cm8QpXwU; 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 s5si8181941ybq.464.2021.01.15.05.44.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:44:38 -0800 (PST) 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=cm8QpXwU; 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]:41970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0PP4-00052E-CG for patch@linaro.org; Fri, 15 Jan 2021 08:44:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0P0A-0005GV-0K for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:18:54 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:39076) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0P04-0002Lk-AA for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:18:53 -0500 Received: by mail-wr1-x431.google.com with SMTP id c5so9249525wrp.6 for ; Fri, 15 Jan 2021 05:18:45 -0800 (PST) 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=muCsYbQEcoe3YnIMkqZAOUWb9L93swjFn/KxNUvS9X4=; b=cm8QpXwUSuihR+6C1Lt4bH5gTT4ymKGuR4utKpSgrPJWxHtmewtUJWMvcprAHu19ab mGdKHYYvCPfTIngViG77DmRbcRl26YTCLots5v6pn8tefs/WtXhK5a6rVuET2e98PGi7 uEuBYDho8BCt6P5hvwO+vmH17MFU1ljKwT2wXUr3QKgRkMbItJEZHqv24ibmfWjHQG7L cGyv5eBkZVggVXANqQRJCphn64u+x4iipyYnvwllUahpM5IvL8U0MM3kERKOdPgH3Mw2 VY5NUtqRjwVYrpU384pq68yEJ8PuQFht0mkhXHCNFvkNGyvsMHrN5J+sGijIk7cPrtXH F+3w== 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=muCsYbQEcoe3YnIMkqZAOUWb9L93swjFn/KxNUvS9X4=; b=pmht1oxKpbGyy+OtDnRFPAn+ux6lxAKdmLw9xQWsOp8jxVj6GjpLOyJm/VcyR/4fAF fPHeruJcJJjAMofESHq47Sj783XpL75hWZ+lL7GeBptRW6MgRwTwQKvoe4orbacQqimg JPOYjHlmtBgnZSFac70NH/sMW5a3yTPB8nv+46SJn/ZiC7h4D5vLYQiBg1MDDaQf0pGw lS3O18Eo2Hlka5uKLEsvA+FXf8FACjnQUmxwdFVj67quDeNq4ZXRn7uxg69Hl7hjMdsT XuFS/98gz6suTbSmQuvtfVQ5Y4+Br30RnOJbeBG5lTGTkiBja+xo7kVArtTSlY5kA2Qu L/Kg== X-Gm-Message-State: AOAM532KnEs2yKf1kO0W+y+hvKdmpdfl9+l6f0z+pTwzyaKBFFutKQiX aYua8YsC/bX02vu9Ua7O4BloFw== X-Received: by 2002:a5d:5704:: with SMTP id a4mr13211102wrv.37.1610716724818; Fri, 15 Jan 2021 05:18:44 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id c190sm12346612wme.19.2021.01.15.05.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:18:33 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 61B3C1FFB4; Fri, 15 Jan 2021 13:08:35 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 29/30] semihosting: Implement SYS_TMPNAM Date: Fri, 15 Jan 2021 13:08:27 +0000 Message-Id: <20210115130828.23968-30-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Keith Packard , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Keith Packard Part of Semihosting for AArch32 and AArch64 Release 2.0 Signed-off-by: Keith Packard Signed-off-by: Alex Bennée Message-Id: <20210107170717.2098982-9-keithp@keithp.com> Message-Id: <20210108224256.2321-20-alex.bennee@linaro.org> -- 2.20.1 diff --git a/hw/semihosting/arm-compat-semi.c b/hw/semihosting/arm-compat-semi.c index 3d6604dcdd..a631904fb0 100644 --- a/hw/semihosting/arm-compat-semi.c +++ b/hw/semihosting/arm-compat-semi.c @@ -835,6 +835,7 @@ target_ulong do_common_semihosting(CPUState *cs) CPUArchState *env = cs->env_ptr; target_ulong args; target_ulong arg0, arg1, arg2, arg3; + target_ulong ul_ret; char * s; int nr; uint32_t ret; @@ -998,8 +999,24 @@ target_ulong do_common_semihosting(CPUState *cs) return guestfd_fns[gf->type].flenfn(cs, gf); case TARGET_SYS_TMPNAM: - qemu_log_mask(LOG_UNIMP, "%s: SYS_TMPNAM not implemented", __func__); - return -1; + GET_ARG(0); + GET_ARG(1); + GET_ARG(2); + if (asprintf(&s, "/tmp/qemu-%x%02x", getpid(), + (int) (arg1 & 0xff)) < 0) { + return -1; + } + ul_ret = (target_ulong) -1; + + /* Make sure there's enough space in the buffer */ + if (strlen(s) < arg2) { + char *output = lock_user(VERIFY_WRITE, arg0, arg2, 0); + strcpy(output, s); + unlock_user(output, arg0, arg2); + ul_ret = 0; + } + free(s); + return ul_ret; case TARGET_SYS_REMOVE: GET_ARG(0); GET_ARG(1); From patchwork Fri Jan 15 13:08:28 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: 363633 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp294721jap; Fri, 15 Jan 2021 05:29:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMcr5MFewso2EIUrN+7nmvPlkIzBamS0tXcYhYOUBrLO0y2lg2NpkJEHMNeEbqVEd9cgiv X-Received: by 2002:a25:48c8:: with SMTP id v191mr16184227yba.311.1610717355940; Fri, 15 Jan 2021 05:29:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610717355; cv=none; d=google.com; s=arc-20160816; b=sc4KZru6T9bRLM0Qz+8zbKcZmP1DZKE7pvB+u983ASMeGDCZILL3ProcrO5Jmz7BF3 OHsVAltJMymAiuPVRcWqVdsFqW21y4HL7BeLR7B4PjzkUoWZTJzZfbD93PnN1/RZpktV Sw3ukKa/vD3q/vthICEZH7SUTL7nWnehUWgA8mU8oHBx0SOPPF/aJh6iQ3wgPUEIXhkb WJ2nrF3JmoVJF6vcIYyHbWraK3Uow69Pfff6eTM1KVdwiGBdXSY0KBJvnt4PCkKNwk8T gKrNP0LVFLWmHfIWGxtVodqXyDHsEUVslLdd/rU4q2wjPT8RzfoFz11p9lhY0FASiJ8+ o6+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=CjGD2CqnC4W2kjPV2Ui5zP08M1Vc7R0wTAQHoMDZ3xQ=; b=c/DUs3BStz0700vUXRQolGDNv2QYZp0Qx/UUzTrW8MPS8r60O7JudG9nkrmfqLEkyb E9xTIWg+F8wO2nH4u63MsWdkUt1puAdibI1GdRxgD/gdYxav39pmRYL6Refrp+41o8zZ BBxj0F1QqKcsVkQmJZyNUjbHlpfa1IMatjKa1egxrhPX6x45yoVvtcwcptEBhJVtvJSL lWKem6P2lHRPFeHLW48Or8li6Tu6SplatSFVY7FSQz0SNOVHRk7ouLwDPx4W9q7t9lgz wg+KVL6/vPSaGGbJbddMAcBWbkX2UXgVBg7Y9ywvpqUFbLBf83oCuy7Lv2sRnFPz4255 viZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=SM0pcsPu; 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 i13si841360ybq.228.2021.01.15.05.29.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 05:29:15 -0800 (PST) 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=SM0pcsPu; 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]:56566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0PAB-0004M9-Ev for patch@linaro.org; Fri, 15 Jan 2021 08:29:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0P08-0005Dd-Jb for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:18:52 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:38856) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0Ozz-0002Ks-K6 for qemu-devel@nongnu.org; Fri, 15 Jan 2021 08:18:52 -0500 Received: by mail-wr1-x434.google.com with SMTP id a9so5794848wrt.5 for ; Fri, 15 Jan 2021 05:18:43 -0800 (PST) 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=CjGD2CqnC4W2kjPV2Ui5zP08M1Vc7R0wTAQHoMDZ3xQ=; b=SM0pcsPuMYzaCKr7m9/Ke5cDRK1VhdyqwArzqAC8q2c1k+YfMrbbE6j7FybqRPBg0I FBEHTu1NUQkJkDlNx8MBoza5SfV4aZqZmvozQmL4+153bZFxW9kmyYqBOWIrwYYOTctI zcYD38VMH0TM3gMnEiSH93IOpQvG0snlThD1NoqHAf6TWqnnIyme6r7skywlIlCxqdTB 0Ek1c/8oo0Vi+3y3qWY5/Bs1PFNnBEx5pqCeImWninSkw6wDFRRT38g7PItg7HeUDWSE 2pl/XKDpll1j4Dfhxu8d7hAluROoA2d3LacjuY/BE7WqmC3XUv+WD2HPz1L2DC0C7D6U K+bQ== 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=CjGD2CqnC4W2kjPV2Ui5zP08M1Vc7R0wTAQHoMDZ3xQ=; b=I1fewPaKpKhLz5udjrFmDVRoxRcWGNpefXxGwY0Jx1x0vaNoQHfo7liaIsgtVhuHop D0nSbhTAW1IL9WXd5agS202BZ1UTaTn17aMoY51WkpX5QVVJBHPnPgRy7FoUlEKJkWIw 2/cYrmcXGCG5awCSZ7jKm/022phHIhY8aq7CK8sDb13A0FOGMVzIEhWizTf5Qf/rMjHo UheBK+9nrJhjfOtgz9+ceJWZw+Qzy1fg0qTS3kkbcT0fBxZcSElDD3CCOnYUWDQuExP6 itw2BEqefdrz1TKTpYKiJVOWQmZ0vzbPxAuKELVKWAUFXS1BHbdbbXadUj+roXdAn3+h 4gDQ== X-Gm-Message-State: AOAM531arV9laz5tVO4BuYKR91gNgFZS82K8qcIBgnNYc/rkb3MbL96T HBd5L8rHignm1XCJlDbViU6aKg== X-Received: by 2002:a5d:4712:: with SMTP id y18mr13303498wrq.229.1610716722332; Fri, 15 Jan 2021 05:18:42 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z130sm12761226wmb.33.2021.01.15.05.18.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 05:18:33 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9749D1FFB5; Fri, 15 Jan 2021 13:08:35 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 30/30] semihosting: Implement SYS_ISERROR Date: Fri, 15 Jan 2021 13:08:28 +0000 Message-Id: <20210115130828.23968-31-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115130828.23968-1-alex.bennee@linaro.org> References: <20210115130828.23968-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: Keith Packard , =?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: Keith Packard Part of Semihosting for AArch32 and AArch64 Release 2.0 Signed-off-by: Keith Packard Signed-off-by: Alex Bennée Message-Id: <20210107170717.2098982-10-keithp@keithp.com> Message-Id: <20210108224256.2321-21-alex.bennee@linaro.org> -- 2.20.1 diff --git a/hw/semihosting/arm-compat-semi.c b/hw/semihosting/arm-compat-semi.c index a631904fb0..23c6e3edcb 100644 --- a/hw/semihosting/arm-compat-semi.c +++ b/hw/semihosting/arm-compat-semi.c @@ -59,6 +59,7 @@ #define TARGET_SYS_WRITE 0x05 #define TARGET_SYS_READ 0x06 #define TARGET_SYS_READC 0x07 +#define TARGET_SYS_ISERROR 0x08 #define TARGET_SYS_ISTTY 0x09 #define TARGET_SYS_SEEK 0x0a #define TARGET_SYS_FLEN 0x0c @@ -967,6 +968,9 @@ target_ulong do_common_semihosting(CPUState *cs) return guestfd_fns[gf->type].readfn(cs, gf, arg1, len); case TARGET_SYS_READC: return qemu_semihosting_console_inc(cs->env_ptr); + case TARGET_SYS_ISERROR: + GET_ARG(0); + return (target_long) arg0 < 0 ? 1 : 0; case TARGET_SYS_ISTTY: GET_ARG(0);