From patchwork Thu Jun 5 16:26:34 2025 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: 894180 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp42711wrb; Thu, 5 Jun 2025 09:27:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU+mMzo2v2ydNaWTc6q5QHFXNfM8qZXYczEiiFegge2o/lvP8XTs6taHV0nTlWRMCoU2rMFGg==@linaro.org X-Google-Smtp-Source: AGHT+IHUzvo9WxRB5m2hpreP8bxzALr2vVrjogOX9F0fDvUzdDpidg4Od8QEyxVPkwHb9ECdw3fx X-Received: by 2002:a05:622a:40c5:b0:49d:89bf:2982 with SMTP id d75a77b69052e-4a5b9e206e4mr5079231cf.17.1749140858243; Thu, 05 Jun 2025 09:27:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749140858; cv=none; d=google.com; s=arc-20240605; b=jyFNVZxODZxEA+VsYkXOWDngXxeqO+V1IZsf/5/zaFWqD1CfiBjifK2VbCHnFx3/KO X0FVYctdCZN/27SoHKfBGvmGh0AiSsC/y4rXSiFOZwKPBU7qO+NmP8O6yAu+mpojwNs7 4wFVsfM3Hpvf9eu+tN/+jwoQh3mZFkcLzvoHDfpUMJAGiA4/O7mfvZA3Ct3wV0mnxVsE AVHxrNSI1ZU35gdGlcHx6v50S78gopP+KvtGaYxTVFiRz1EKdjPZ88sSLAnBynamu8Er MoKge0TG/0hmHql6ZaQB4uwyt6zlSYS6q3lb0RGvJX3xIr45VXuvU1JXd8Ue0kY8j5Xr oISw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Enpaw/TOWx9LZ6jBQIu+TvwC3h63Ulsf0shXSFkVJbI=; fh=OcaYDyibnksHeS5Q4sYP8x74o+MLuRR8AV9fLekR3K8=; b=Y56xNzG4gA/MwYXMe3VsBmPyItKdPx7Yo67WTv1CocXeCoi9qli88X+RK6wzbDzVwh ZFRukM6Tvg1TF2aF+O0j8D6/3ViuFsQWtwxLRBLu7V9rNJIWV2NJJuO0akYr5ixEjvjF j8OF4AF12+lXwBUTBebbOyApDOKwhpCNJu2dSN+wwZcX4x9JkdL2p7lYUzQnYrBYR6nr nsGYRY2Xl8WtsNc+gTv/prSNmTMc9RESG3fMmL1/JN4ynrYede2HCwCKeDGZOR+LC0tl kJYDLyrbtFfLhakAvcrKSF5znvuio2Jq/g/qmoO7QrXgGWecVfHuFkXNovkDEUjXSSWg UD5g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CnwldyBB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4a4359f915fsi175861731cf.307.2025.06.05.09.27.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:27:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CnwldyBB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDQh-0006yH-Cj; Thu, 05 Jun 2025 12:26:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDQf-0006xj-GU for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:26:57 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDQc-0007vX-Nt for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:26:57 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-addda47ebeaso240695266b.1 for ; Thu, 05 Jun 2025 09:26:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749140812; x=1749745612; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Enpaw/TOWx9LZ6jBQIu+TvwC3h63Ulsf0shXSFkVJbI=; b=CnwldyBBc/sWYkRgSz/StxA2A2Q2mSMHDqGDMkIFrNNm340QahWbcEvifILl0Pl17m zgc0s/v10azQLExNJ8VaABo94gh7EqYr+5ZzbxyKjUDNWvvq3v5ZYBtzwLAw15OGpZEL 6jUiYQuxI92HGx/jrBmJe8xgwiRScSbzYQol44CJb8DIi8OTPAtFlrrZc5dJ6z57ocsO T2Fmmx/RCkGhWbRq8STuvwi/45vz/9U8GL2J3dXDYT6SeyIJzFnQn2iE5bSQ8/j55mIf LHhhy2SQqNCr6e9j6TrPXSy0RLbf7g7FGuxGnuVcvGgKi3XsZshMd32K8GF2ATmlCwoR YLmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749140812; x=1749745612; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Enpaw/TOWx9LZ6jBQIu+TvwC3h63Ulsf0shXSFkVJbI=; b=kTeY+aW1fUAIO+pgz/2lL4Krtb6gyluAuK7mB6D7/5qJZ7KbvznlMGccsXE1ngKQUF QnpR2Ec/ey+JpgtYCyT7BsHYPdwy8bhfGZGN2Pqyq9EJ1X/YWtZ5XwINUzuOwwij1SfY Qld3hTG35SV883QputmcAG5kozETwCTidUfVjY4nhaSruDEaU+GXnqX34DAY/zf0Qc+3 EMcFWsorzkPvDqw5klv0S6PkeOzhHpmSed4Z3fBYRln1bnQp05oviBVDWmM0RxUA2cu/ EXKqSPVKZxypPdsdLpZx8qNgn+y8ZEvkC6YZSAJE43sey5bKO9n2Hghzis+8hX3gEOOZ T7uA== X-Gm-Message-State: AOJu0Yw9JaS+bWsYI17zp0sxfpO3aoWqHjtfholGiLgwXnYFrUh5kU9I PHKQ97RZR9fya4muzlp/sRF1ptnbVqhDVRgViJlQPczF+467fwekeb55El+Fxeci0rk= X-Gm-Gg: ASbGncuaNLggMjRuJpljxhDuA+/OuIwkvPoWU9pB5OcRKr25qmmMZnmrwSlULtz9cfk 3m25pNwpAhtz3lGZYBYO99WtHJrYG2zSPaW+rkUaw8m1Y259WMffu82t2PD+TuWA6zJu1UD+Ld5 m82WOGDnyH8QdshhKSpGjOqY2GEEHOASZZYzrAUsFMJiHiXG93kA34jXWENKyNjU5QS3j8+8Jsh /YyuxNqsErTxsH/bv+kysnif3dTGzOOUo6jgOcaCKO4SxGi5KTviPjg4z8ctqtdun7a5hR0ftjM hZEyIOEA8a4Pa8m4l4Er0LmYZnnvOlfm2tQemrCQpGLNvaW+klg/ X-Received: by 2002:a17:907:9624:b0:ad2:1f65:8562 with SMTP id a640c23a62f3a-addf8cea96fmr729697466b.14.1749140812585; Thu, 05 Jun 2025 09:26:52 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5dd043edsm1293770566b.96.2025.06.05.09.26.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:26:52 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 70CCF5F7F3; Thu, 05 Jun 2025 17:26:51 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 01/17] tests/docker: expose $HOME/.cache/qemu as docker volume Date: Thu, 5 Jun 2025 17:26:34 +0100 Message-ID: <20250605162651.2614401-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62a.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org If you want to run functional tests we should share .cache/qemu so we don't force containers to continually re-download images. We also move ccache to use this shared area. Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-2-alex.bennee@linaro.org> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index fa1cbb6726..3959d8a028 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -185,8 +185,10 @@ docker: docker-help: docker +# Where QEMU caches build artefacts +DOCKER_QEMU_CACHE_DIR := $$HOME/.cache/qemu # Use a global constant ccache directory to speed up repetitive builds -DOCKER_CCACHE_DIR := $$HOME/.cache/qemu-docker-ccache +DOCKER_QEMU_CCACHE_DIR := DOCKER_QEMU_CACHE_DIR/docker-ccache # This rule if for directly running against an arbitrary docker target. # It is called by the expanded docker targets (e.g. make @@ -195,7 +197,7 @@ DOCKER_CCACHE_DIR := $$HOME/.cache/qemu-docker-ccache # For example: make docker-run TEST="test-quick" IMAGE="debian:arm64" EXECUTABLE=./aarch64-linux-user/qemu-aarch64 # docker-run: docker-qemu-src - @mkdir -p "$(DOCKER_CCACHE_DIR)" + @mkdir -p "$(DOCKER_QEMU_CCACHE_DIR)" @if test -z "$(IMAGE)" || test -z "$(TEST)"; \ then echo "Invalid target $(IMAGE)/$(TEST)"; exit 1; \ fi @@ -222,8 +224,8 @@ docker-run: docker-qemu-src -e V=$V -e J=$J -e DEBUG=$(DEBUG) \ -e SHOW_ENV=$(SHOW_ENV) \ $(if $(NOUSER),, \ - -e CCACHE_DIR=/var/tmp/ccache \ - -v $(DOCKER_CCACHE_DIR):/var/tmp/ccache:z \ + -v $(DOCKER_QEMU_CACHE_DIR):$(DOCKER_QEMU_CACHE_DIR) \ + -e CCACHE_DIR=$(DOCKER_QEMU_CCACHE_DIR) \ ) \ -v $$(readlink -e $(DOCKER_SRC_COPY)):/var/tmp/qemu:z$(COMMA)ro \ $(IMAGE) \ From patchwork Thu Jun 5 16:26:35 2025 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: 894183 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp43329wrb; Thu, 5 Jun 2025 09:28:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWHTBGa+Qi0SjoFU+4OlaxPkakCWtQXJe1qcjbH1GDf3GsDjrBMFLBzPNz301A3nSMMyeHamg==@linaro.org X-Google-Smtp-Source: AGHT+IGqjtjvNuaLKR4vBFdtR6uHFVPWYscTZpEWmuMp0HqhxnLIZ6XTijvU22AEed0b5Z8v/fAs X-Received: by 2002:a05:620a:40d2:b0:7c7:a604:d28e with SMTP id af79cd13be357-7d2298ca8damr31497885a.33.1749140938304; Thu, 05 Jun 2025 09:28:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749140938; cv=none; d=google.com; s=arc-20240605; b=B6twn9XNtf4gzMAcx8tXjrevEzADvmDlt5sCmCxZ4uWOS+ZV/AH9KQhXRfQpztSJAR 4M9Aug/PWPgQBal2yMWN6oMz7iLM4tmSJ/rPFj0LNEeov+mxgsTvTW01G2vxcjv/xozo RR6un+yGFbCsy567q9eyrwTc5+Fv3zMjiDfxah9fH7Th/DRa2SmkhFtfyir9i7HLEzRB t0Fuy4vXnVOtoMP5/cX1QwSlPc+U5L+NjXtr9CCsIqnwjQIQWi1KN8w7JjQtlxpt18yQ CnxrDGdHRw7idK6MuTngskjT8KzYonZtAxcXnEw26lyhL1BVNy73oh6XCRJ22NhXVqFT Zh9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FTYdr84tCNHvOUWyneCXSwfyApd3PWJITaMticHbWrg=; fh=OcaYDyibnksHeS5Q4sYP8x74o+MLuRR8AV9fLekR3K8=; b=T0FCowy4o1hLaCwCxjy5L0rLpmOBudAdnRuMe9nRwphG01u76G3zu/ysYpQslaVbXi 5ZvCgeVmBLqd/sf0yLnbrOex3YJwNS4W317oRT80uWicTOHrkg78XTANhJLQpO30NAwo 0iZyNt7o35oxJ3VajzT2kyvlveiddR5bvG5ZV2vBCsG6F+vVHOot0Q7vONY4jYWNXkaO ePJGRyGCrzn3U2xj0N9cEGT2+63YMkr+xzq2W2rKpj7BVTXALtJ/oy9am3jnY7SzRsrE YpEcY5ELefuNL2MfKgT92B+ErjQzEY008o2Kr2VobMSwqqHeaSKK+Atk6k53nZPfhmUU zpdg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SuBc+Xr5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7d09a306b1csi1746424485a.540.2025.06.05.09.28.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:28:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SuBc+Xr5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDQh-0006yI-L2; Thu, 05 Jun 2025 12:26:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDQf-0006xi-7x for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:26:57 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDQc-0007va-Py for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:26:56 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-602c3f113bbso2218335a12.0 for ; Thu, 05 Jun 2025 09:26:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749140813; x=1749745613; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FTYdr84tCNHvOUWyneCXSwfyApd3PWJITaMticHbWrg=; b=SuBc+Xr5v7RwYrJU5FgZsYvHbHl6bKwJyPRWtMC8h6+CPx3N/+9AGSRAE8RXpwfmpa TNoK087NLfCNW5fGzqOLEAsYSxF5XOzkeKcz2NrgSYH2h7kN/jnrftwC6nplKFN0QRxV 5TTlGLe4EgjpTdqawbEv/G+vKNd6X1dIyf4GjCOGeo0nltfPkDEW9aVo+X08Wu12Uff3 ouu2hlG0KRjEKMUytsrDwTpePDiJx7vDDgNe5INnGXtirskbyac+e9cyHQcafBYGebun 15Kx/ylSOnZwAsLewFmeSroPUjcdoUpDsftujOscqF5XsAHTzswCm9QfBnRTXwk5st1S Qe1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749140813; x=1749745613; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FTYdr84tCNHvOUWyneCXSwfyApd3PWJITaMticHbWrg=; b=r0YSF4+KEmjDj42YjjF9QFVMhKvhf30McJsLpWsPRJRtOfwPZ5NX6Q3dvHv4tQzKux BtNOIauByhYF+IkfvptcyUivD9g8j8q1hOqNN5V1+Lbps/b5CRq7Wo9btMV8KJcfb30A +YP6Lsp/VBeVQgmLxtsASW5XyzmIc8uN3iMt1aFLthsSwPwHRsdE6FCSUkSjJn+I+3X9 CrgW23K5sL+H4qNS6QJHZvRv3eSnvqxuF/z4cgnDV5TqugfvmRG4rQ8DMc0iVUljYzlC hawsguCfUIIGciE6N0VPWuvNSTzYgdOtqkrrVky5C1aZVaWe7Z+998TsyeodrrMwlY3N GPYQ== X-Gm-Message-State: AOJu0YzQcvOoUcjNEg+eMOP/uPW3IhoSu4jJlku0fWmeQrPFQVoywXzZ 4r0TiI0wRMzKFkeEwi7m8k/GmFFR713oYYDgCTR7aN/X+LShOV7H5DLAbnghfk4sgx8= X-Gm-Gg: ASbGncvLqu/5lKC0u0thsui5XD8oXHitxFXVobJFPfhu+sNItxwWDqgazlKmD4K/0yl zYvI+djbIdYPdyvWQwS9kxLhwoeUbY57VfwTsUbpieHInmz493VZEIr6I6qv9OUpMMazq4CVpbX njDf0gcPpvMNRrAFqbTc9llUe9/57V8jxh+J2+X2Eoh2nfbTtLDviAdjW+IZrDz4/KqaHEpxkrM kSP9lt0t7sD3H1fx2PVgwErtnjwBxCdbT3Gb8lzOV17TOEbBFzh7O6WmNJf4E3CRBkRQrCXQkDW o2lGqR54doswWWyREVlCW4aKthcjSBJrQec0UP9V6tg5YMEJroby X-Received: by 2002:a17:907:5c1:b0:ad8:89f8:3f51 with SMTP id a640c23a62f3a-addf8c9b571mr642591166b.6.1749140813184; Thu, 05 Jun 2025 09:26:53 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5d84f2dfsm1272659766b.78.2025.06.05.09.26.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:26:52 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 87CA65F7F4; Thu, 05 Jun 2025 17:26:51 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 02/17] gitlab: disable debug info on CI builds Date: Thu, 5 Jun 2025 17:26:35 +0100 Message-ID: <20250605162651.2614401-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x534.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Our default build enables debug info which adds hugely to the size of the builds as well as the size of cached objects. Disable debug info across the board to save space and reduce pressure on the CI system. We still have a number of builds which explicitly enable debug and related extra asserts like --enable-debug-tcg. Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-3-alex.bennee@linaro.org> diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-template.yml index 118371e377..19663126ca 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -24,6 +24,7 @@ - ccache --zero-stats - section_start configure "Running configure" - ../configure --enable-werror --disable-docs --enable-fdt=system + --disable-debug-info ${TARGETS:+--target-list="$TARGETS"} $CONFIGURE_ARGS || { cat config.log meson-logs/meson-log.txt && exit 1; } From patchwork Thu Jun 5 16:26:36 2025 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: 894192 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp44483wrb; Thu, 5 Jun 2025 09:31:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVfYEQmt9otZo3Gz3lKLNaomUXlS5bke+TXZLJlm5x3niqJ6NgD0GraSYe9Jjw07nYllVEnaQ==@linaro.org X-Google-Smtp-Source: AGHT+IEyUjNRy4sWsr2QbEPLr/5qUIZCzj+SnsBprExerEfGD2sn2IrS/XL5UIjnUF5EkyQcielq X-Received: by 2002:a05:620a:44c1:b0:7d0:69ff:385a with SMTP id af79cd13be357-7d229933d8dmr26470885a.58.1749141071122; Thu, 05 Jun 2025 09:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749141071; cv=none; d=google.com; s=arc-20240605; b=auTDrOfH6htHv30fwnpMZSG3YnhWwvad0rbugr64atu//NCnQw+CZJ4ibPrRBCUrEf iYuv+P3EGIUbT/hkoXzoeMMa9loOPZBYKTEGwHicCmRXrzyyclqH45CrPe2S0n8+r8Jw lKf7MOnN/tLPeAJwrQha3WUk/8vn9ZTxDSP/FtgQNPIhzm9e8uUBL0vwOLGXuYje+c0M wNASUCdrWFLMEILZ8Yhj2hTBA2OwFgEs4CmlLcvWOMvNsL80CxUnRBfigTmqhB/UnY+d ivKf1hqgj9ktNgQtPh+N2Fqxssi945RJ0+FN7o5pzzZGanMIsV0iAPQo9FjFuzwcg6yV gI1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QmEv0t2K65ULl4o62PaYkBn9JBHNC8LgfDFkj21skSI=; fh=dZznhUmv3m4/9nlU8js4cHmFtElOiaZFME1vT0PIAzU=; b=YIZhLfDlFclFc6xbz6mLDmG0nuIRonsjBOWa9VDriUBKZlPwM/MvEQVhgdec8VmaE8 GMhHqEy6WCVhMOrfUpuWNPDzQF0h76gHpwmydW0zkvDgDKJuRRa40FKgDpTzAxCEtXJ9 0jX8KUOPFzbNpcAKkekWDpauusj5M8zyj9R28wTiFaYqmYOh0teT9/kP4yvh9jnNpHbn fBBzcgPVjKb2PXJMe7i6kCxcX33MRAdJqF3ALI0hKBrwj2mSzqMcvy2tAzwqNSmuofbX AuoUJ0AKO8FspRpHDtXOhtCokanxnVm37Aa85yBt/cjHNUKQH9yU7UjaTmp7IJN9X56D ZppA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=isMBnWfO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7d09a1e06d6si1726749485a.313.2025.06.05.09.31.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:31:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=isMBnWfO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDQj-0006zZ-AK; Thu, 05 Jun 2025 12:27:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDQi-0006yv-7g for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:00 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDQe-0007vp-CX for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:26:59 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-acb39c45b4eso187173066b.1 for ; Thu, 05 Jun 2025 09:26:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749140814; x=1749745614; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QmEv0t2K65ULl4o62PaYkBn9JBHNC8LgfDFkj21skSI=; b=isMBnWfORyJ24LBUsYeWmB8IKn5VXKT9BPC2qZra5WgPeVOlbYDh9aRAcbzCfCFj8+ 7fgxdY7LXdJSO2rbuNPngDO41BhKekt4HTfhTuYH8p5/iC9XqEl1HNP9SD7aeBYCL3R7 YoDqika75F//vy6YAcnOnHiU74dLHjVMq8mZYLpyrZ8EadCbZ7lZ7ePxijWfGXvjwAwQ Tp3QczmkxPv5ass0UalgJeRAeJcesMGnAExZt14NChSyzecy1patUuvWcDQfKV1Hknbe MMn86uGUS7z9209GMEpVRAUSan8N+HXgS5UfwGKamruCREeFfk/nxMzYXqZm2kQJTxT+ pwVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749140814; x=1749745614; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QmEv0t2K65ULl4o62PaYkBn9JBHNC8LgfDFkj21skSI=; b=Ls7NDi7PklQQIZIZ6K7Qb2XdrlOXv5tfPBmMfwSauKAEu9os5zSIouHD407pcEevJJ Qs0qir4GpUBDq9j6Pl5HEGjUPpGAtOBMP6C5MVZ/czvlrEkAHhX+xIee6p2xv5vSFGOg HwKc2H3wx7/dty0ttJFN+vlFdHejbQ+xmeSzQo2ghYxYaYfXHmBezUiX8enHyi0MuseB xMQyvSaDpbnLwIGlCEMV+obqPAZaI5LPB00MuGnZpDi5pGO8Bgk8baGaG8c6Pzj3+8Dx GbI1JZULq3nPv4rPNOZMZ1QWI05HiMN7dkgKBUVkGELs7eJKdpVmplddCd16j9Oo1zJC OKIQ== X-Gm-Message-State: AOJu0Yy9nnGZvkGke7ixi1wHL1VX1GFMF6ZmFt0MDQdd6YuieqeL44t1 JNg+YA1/KABifA9LBVErvBFn2HCHlo/8To1bkI39AkkJZrPg5WT/oH1j6yWGQ184Wpo= X-Gm-Gg: ASbGncvai3b8bbJNW8QSH8Z/QHrYoyKcAfTOiYTxQH0VwhH4lrZRwU7MsA2lKMzOIbs eV54URVfLXwkQYkdXMk9iLucIOFroffCGX/OcCtw1wHI7gxN5tMkxQCE4pgk9ThYeTdrVC2bFEz KJe0ZjEbeFh8vIojmniCDfbhrylAdiOlsVUpRoAocjiSEWVHm5ii5ADn7itZdl4/6awLTMbjZPo HKFtwaaSpcdUq2N3su/WcVGJg9+KFg1Zbi147aQt7XIXpjE8aymD6ZwteQkbf923ZdhGXHqgrlI bdzWFfouSfYIhJ4IyZk3uZ6kehyPvdJ5+8LVHawtemXZdARxOLTraNVlS2Ozn/8= X-Received: by 2002:a17:906:9f8f:b0:acb:abff:a5b6 with SMTP id a640c23a62f3a-addf8c87401mr692490566b.13.1749140814332; Thu, 05 Jun 2025 09:26:54 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5d850d88sm1280215966b.77.2025.06.05.09.26.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:26:52 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id A1D955F7F5; Thu, 05 Jun 2025 17:26:51 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Julian Armistead , Jim MacArthur , Peter Maydell , qemu-arm@nongnu.org (open list:ARM TCG CPUs) Subject: [PULL 03/17] tests/tcg: make aarch64 boot.S handle different starting modes Date: Thu, 5 Jun 2025 17:26:36 +0100 Message-ID: <20250605162651.2614401-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62b.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Currently the boot.S code assumes everything starts at EL1. This will break things like the memory test which will barf on unaligned memory access when run at a higher level. Adapt the boot code to do some basic verification of the starting mode and the minimal configuration to move to the lower exception levels. With this we can run the memory test with: -M virt,secure=on -M virt,secure=on,virtualization=on -M virt,virtualisation=on If a test needs to be at a particular EL it can use the semihosting command line to indicate the level we should execute in. Cc: Julian Armistead Cc: Jim MacArthur Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-4-alex.bennee@linaro.org> diff --git a/tests/tcg/aarch64/Makefile.softmmu-target b/tests/tcg/aarch64/Makefile.softmmu-target index 9c52475b7a..f7a7d2b800 100644 --- a/tests/tcg/aarch64/Makefile.softmmu-target +++ b/tests/tcg/aarch64/Makefile.softmmu-target @@ -68,7 +68,8 @@ run-plugin-semiconsole-with-%: semiconsole # vtimer test needs EL2 QEMU_EL2_MACHINE=-machine virt,virtualization=on,gic-version=2 -cpu cortex-a57 -smp 4 -run-vtimer: QEMU_OPTS=$(QEMU_EL2_MACHINE) $(QEMU_BASE_ARGS) -kernel +QEMU_EL2_BASE_ARGS=-semihosting-config enable=on,target=native,chardev=output,arg="2" +run-vtimer: QEMU_OPTS=$(QEMU_EL2_MACHINE) $(QEMU_EL2_BASE_ARGS) -kernel # Simple Record/Replay Test .PHONY: memory-record diff --git a/tests/tcg/aarch64/system/boot.S b/tests/tcg/aarch64/system/boot.S index a5df9c173d..8bfa4e4efc 100644 --- a/tests/tcg/aarch64/system/boot.S +++ b/tests/tcg/aarch64/system/boot.S @@ -16,6 +16,7 @@ #define semihosting_call hlt 0xf000 #define SYS_WRITEC 0x03 /* character to debug channel */ #define SYS_WRITE0 0x04 /* string to debug channel */ +#define SYS_GET_CMDLINE 0x15 /* get command line */ #define SYS_EXIT 0x18 .align 12 @@ -70,21 +71,172 @@ lower_a32_sync: lower_a32_irq: lower_a32_fiq: lower_a32_serror: + adr x1, .unexp_excp +exit_msg: mov x0, SYS_WRITE0 - adr x1, .error semihosting_call mov x0, 1 /* EXIT_FAILURE */ bl _exit /* never returns */ .section .rodata -.error: - .string "Terminated by exception.\n" +.unexp_excp: + .string "Unexpected exception.\n" +.high_el_msg: + .string "Started in lower EL than requested.\n" +.unexp_el0: + .string "Started in invalid EL.\n" + + .align 8 +.get_cmd: + .quad cmdline + .quad 128 .text .align 4 .global __start __start: + /* + * Initialise the stack for whatever EL we are in before + * anything else, we need it to be able to _exit cleanly. + * It's smaller than the stack we pass to the C code but we + * don't need much. + */ + adrp x0, system_stack_end + add x0, x0, :lo12:system_stack_end + mov sp, x0 + + /* + * The test can set the semihosting command line to the target + * EL needed for the test. However if no semihosting args are set we will + * end up with -kernel/-append data (see semihosting_arg_fallback). + * Keep the normalised target in w11. + */ + mov x0, SYS_GET_CMDLINE + adr x1, .get_cmd + semihosting_call + adrp x10, cmdline + add x10, x10, :lo12:cmdline + ldrb w11, [x10] + + /* sanity check, normalise char to EL, clamp to 1 if outside range */ + subs w11, w11, #'0' + b.lt el_default + cmp w11, #3 + b.gt el_default + b 1f + +el_high: + adr x1, .high_el_msg + b exit_msg + +el_default: + mov w11, #1 + +1: + /* Determine current Exception Level */ + mrs x0, CurrentEL + lsr x0, x0, #2 /* CurrentEL[3:2] contains the current EL */ + + /* Are we already in a lower EL than we want? */ + cmp w11, w0 + bgt el_high + + /* Branch based on current EL */ + cmp x0, #3 + b.eq setup_el3 + cmp x0, #2 + b.eq setup_el2 + cmp x0, #1 + b.eq at_testel /* Already at EL1, skip transition */ + + /* Should not be at EL0 - error out */ + adr x1, .unexp_el0 + b exit_msg + +setup_el3: + /* Ensure we trap if we get anything wrong */ + adr x0, vector_table + msr vbar_el3, x0 + + /* Does the test want to be at EL3? */ + cmp w11, #3 + beq at_testel + + /* Configure EL3 to for lower states (EL2 or EL1) */ + mrs x0, scr_el3 + orr x0, x0, #(1 << 10) /* RW = 1: EL2/EL1 execution state is AArch64 */ + orr x0, x0, #(1 << 0) /* NS = 1: Non-secure state */ + msr scr_el3, x0 + + /* + * We need to check if EL2 is actually enabled via ID_AA64PFR0_EL1, + * otherwise we should just jump straight to EL1. + */ + mrs x0, id_aa64pfr0_el1 + ubfx x0, x0, #8, #4 /* Extract EL2 field (bits 11:8) */ + cbz x0, el2_not_present /* If field is 0 no EL2 */ + + + /* Prepare SPSR for exception return to EL2 */ + mov x0, #0x3c9 /* DAIF bits and EL2h mode (9) */ + msr spsr_el3, x0 + + /* Set EL2 entry point */ + adr x0, setup_el2 + msr elr_el3, x0 + + /* Return to EL2 */ + eret + +el2_not_present: + /* Initialize SCTLR_EL1 with reset value */ + msr sctlr_el1, xzr + + /* Set EL1 entry point */ + adr x0, at_testel + msr elr_el3, x0 + + /* Prepare SPSR for exception return to EL1h with interrupts masked */ + mov x0, #0x3c5 /* DAIF bits and EL1h mode (5) */ + msr spsr_el3, x0 + + isb /* Synchronization barrier */ + eret /* Jump to EL1 */ + +setup_el2: + /* Ensure we trap if we get anything wrong */ + adr x0, vector_table + msr vbar_el2, x0 + + /* Does the test want to be at EL2? */ + cmp w11, #2 + beq at_testel + + /* Configure EL2 to allow transition to EL1 */ + mrs x0, hcr_el2 + orr x0, x0, #(1 << 31) /* RW = 1: EL1 execution state is AArch64 */ + msr hcr_el2, x0 + + /* Initialize SCTLR_EL1 with reset value */ + msr sctlr_el1, xzr + + /* Set EL1 entry point */ + adr x0, at_testel + msr elr_el2, x0 + + /* Prepare SPSR for exception return to EL1 */ + mov x0, #(0x5 << 0) /* EL1h (SPx), with interrupts disabled */ + msr spsr_el2, x0 + + /* Return to EL1 */ + eret + + /* + * At the target EL for the test, usually EL1. Note we still + * set everything up as if we were at EL1. + */ +at_testel: /* Installs a table of exception vectors to catch and handle all exceptions by terminating the process with a diagnostic. */ adr x0, vector_table @@ -100,7 +252,7 @@ __start: * maps RAM to the first Gb. The stage2 tables have two 2mb * translation block entries covering a series of adjacent * 4k pages. - */ + */ /* Stage 1 entry: indexed by IA[38:30] */ adr x1, . /* phys address */ @@ -198,7 +350,8 @@ __start: orr x0, x0, #(3 << 16) msr cpacr_el1, x0 - /* Setup some stack space and enter the test code. + /* + * Setup some stack space before we enter the test code. * Assume everything except the return value is garbage when we * return, we won't need it. */ @@ -233,6 +386,11 @@ __sys_outc: ret .data + + .align 8 +cmdline: + .space 128, 0 + .align 12 /* Translation table @@ -246,6 +404,10 @@ ttb_stage2: .space 4096, 0 .align 12 +system_stack: + .space 4096, 0 +system_stack_end: + stack: .space 65536, 0 stack_end: From patchwork Thu Jun 5 16:26:37 2025 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: 894187 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp43406wrb; Thu, 5 Jun 2025 09:29:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVJjMsEnZDo6SLNxzmFODNvXRYb0wPjzltIn6n4XzK05GY2KrtpP2JGr1QDve8A6zGsexBdEg==@linaro.org X-Google-Smtp-Source: AGHT+IE9ZZmETjbMWkw6TVoZ5XRP3+fgjvQNtkOVhbpJd04DYFW5NLrc0rnTY6Q8/aHMvWyf9KaY X-Received: by 2002:a05:6214:e49:b0:6fa:faf7:7545 with SMTP id 6a1803df08f44-6fb08f89f5emr1271986d6.31.1749140950346; Thu, 05 Jun 2025 09:29:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749140950; cv=none; d=google.com; s=arc-20240605; b=ajOD6KlHL3QqqzF8OCE+KTJZbKRrZDYCm4cPZnJjvuFKVtqf2QBiVh5KUznL+Dvf5n 0qJ8LJTnfsDCe09d+HdEYFzIF0QQcJ26u9tQKqrFxLPKRDXdIz0oPpGo39FwhS6XT/8o lpjcRxSkErA9CgKZN7QZ2w8TxGKgxsm0uZtvrjhU+AwucZWeiB+pD1mJdOzBF3sIaDv5 TA4dfZ3k1dO0Rbj3jCFImrgUxpM0opXdfVAZzBQrq7Vesoga4hMZ/DhD1KGjJUS/ub38 Vr+pVSPhZi59BXSLOwGAv62z1PTw+X10sAV63ANw1t606e14GlvUO06453gUl0gat77k VXfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0vA5SxIxLA+Xz/34QHBA8A6/byxaPtxZW/N/rmkKPYk=; fh=mY856SNJwkgjlqivCByJ577Y3zGjlHxCpwtRxQKZ10E=; b=Q/+EdSRmzHZKdn6FkHqPGeYuzht/yv4urHb10868OuvgT8omK0Gk/5tAg100Rkljoa KrnCq1oXnW/INoVKsIWmAE2LC1rZyaQrLk9KY1bekkOOYuVfMrK63pq3UpbDUj/GijI9 VN4UAkcu/wumki1CIxPSLZ+yHkrTPX5R0lAS5UrqdLu8gQ4d4nsYmRUy8EKJLLoRqUyW EUuxyouKFRYMPtFtsDquRRHCn1yRM3mII/jYoo7xZuSJ36b7L+9YI+cvgDnDi8D37cIQ Bxzvw3npambGTxcBOY5v8W6AreOgNDMjqZX+gHhfrvR733kKLJtaBHeCvyyaa8APjlQ1 3pHQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uEZ7qWLz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7d09a1f9558si1760183285a.340.2025.06.05.09.29.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:29:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uEZ7qWLz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDQi-0006yt-9Y; Thu, 05 Jun 2025 12:27:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDQg-0006y2-Ts for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:26:59 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDQe-0007vu-J2 for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:26:58 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-adb2bd27c7bso188933366b.2 for ; Thu, 05 Jun 2025 09:26:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749140815; x=1749745615; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0vA5SxIxLA+Xz/34QHBA8A6/byxaPtxZW/N/rmkKPYk=; b=uEZ7qWLz25JECCmRG1Dv0PEnbJwYYiYSd//yzthQnfyhFor5fkpjyf8ZKQKt9+yn8k yoQCZEjY25QiBrB1m+CDtRA6HL2TwziOeswEeuN9n0pGyDx+XWsy8GIlAyS/i35BcM1b Vt0wOoZGszzyjlP4n9Fhw3sJusrH+ckTsS/3wspGYoQsShclxQeHPc3k0pO43KmjNhAi Ri51qo3R5J4DZfg6pkJz+7/cnCEnYXt++RgHDry95aEo2/GmfNAgRGkqSwW3h1FxtzsR +hGdvEt9T41COnvgcdzkXwnw4bljedTzMt8osMxHV8xag7NWXUlxyws4XXK1HAhtEH01 l7iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749140815; x=1749745615; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0vA5SxIxLA+Xz/34QHBA8A6/byxaPtxZW/N/rmkKPYk=; b=j/7Bwue1xMOS0NSRxnZSj5ABggPhtmXmwQnU2jTWd6KeTglmLiBCnlLHTLCmY3twqS HhmqIIfKOuj+M7pmPPB1bqebziqU+ZVOeVm+N4/JzV85LFRYV6OwNSCDY1/MEKD4eXKt p8t3PkU/FWGefdFpeRYn2AxySQiRtkiDyQC9m04QpMzamPv06wlyJfLvDwgSwtiQEh0Z uHTSw6pFRrDjO6BFH4XePTOQiNTZsJUIRj0C6gOLdxHlDdQ24oAcPxYp4YyyTosxUvL9 z1i1sCT5d2OoZDGL28WjjJLfFrGaLjC7wRr0anyK1KyU2iirTSZ4dRb4EgKI2J0odktk QcSQ== X-Gm-Message-State: AOJu0YybDT7b5qsf1S26uaw1Og26IKBYd8fAJ2/hO4c36QYhjvno7oeA mwPozjVEXlQjX7Rm4Mb1H2GzhilcCWwK2Qq7VQaGR2k8glJr2rixeCbsM83rYOzceUU= X-Gm-Gg: ASbGncvgrMrzhgByv+X7DWp9mlDkMEu0Ge9d1LbdM4qLLtMdtk6B17VVBYGIbaYvRFg kR60+u/Osz97o6FRP96ms1n4PcvlZ+9TUlXD3sH1h4nulPcI7ED3veS+tdLZH7oTOPXF8jrm+pO 6B0RWoZwWD3ZNQsZNeudmkh5mcHMLdJVFbnlC0WIft2yiN9iQ0ual2/q+6RAtYTXGhY0rxfr+Y5 jGpNfjuyD66YOsQZ3HBJ3gaI+MkewRfqt0CFRBlChVXtXtNRv3+uqWBrDsyo5IOBa2Kds3dyhK8 1O7uMIkMvVAF+n0Z2o2wEZsLKsel/T7FpaYU4naTHl9SskJt9RJE X-Received: by 2002:a17:907:1c1e:b0:add:ed0d:a56c with SMTP id a640c23a62f3a-addf8a813cbmr718258566b.0.1749140814716; Thu, 05 Jun 2025 09:26:54 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-addfae39c05sm260326266b.156.2025.06.05.09.26.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:26:53 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B6EE15F7F6; Thu, 05 Jun 2025 17:26:51 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Nabih Estefan , Laurent Vivier , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Akihiko Odaki , Sriram Yagnaraman , Fabiano Rosas , Paolo Bonzini Subject: [PULL 04/17] tests/qtest: Avoid unaligned access in IGB test Date: Thu, 5 Jun 2025 17:26:37 +0100 Message-ID: <20250605162651.2614401-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x629.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Nabih Estefan ../tests/qtest/libqos/igb.c:106:5: runtime error: load of misaligned address 0x562040be8e33 for type 'uint32_t', which requires 4 byte alignment Instead of straight casting the uint8_t array, we can use ldl_le_p and lduw_l_p to assure the unaligned access works properly against uint32_t and uint16_t. Signed-off-by: Nabih Estefan Reviewed-by: Laurent Vivier Tested-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20250429155621.2028198-1-nabihestefan@google.com> [AJB: fix commit message, remove unneeded casts] Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-5-alex.bennee@linaro.org> Reviewed-by: Akihiko Odaki diff --git a/tests/qtest/libqos/igb.c b/tests/qtest/libqos/igb.c index f40c4ec4cd..ab3ef6f0c3 100644 --- a/tests/qtest/libqos/igb.c +++ b/tests/qtest/libqos/igb.c @@ -104,10 +104,10 @@ static void igb_pci_start_hw(QOSGraphObject *obj) e1000e_macreg_write(&d->e1000e, E1000_RDT(0), 0); e1000e_macreg_write(&d->e1000e, E1000_RDH(0), 0); e1000e_macreg_write(&d->e1000e, E1000_RA, - le32_to_cpu(*(uint32_t *)address)); + ldl_le_p(address)); e1000e_macreg_write(&d->e1000e, E1000_RA + 4, E1000_RAH_AV | E1000_RAH_POOL_1 | - le16_to_cpu(*(uint16_t *)(address + 4))); + lduw_le_p(address + 4)); /* Set supported receive descriptor mode */ e1000e_macreg_write(&d->e1000e, From patchwork Thu Jun 5 16:26:38 2025 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: 894191 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp44482wrb; Thu, 5 Jun 2025 09:31:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW8Xe5Eyw/wj4lJDB+1Vh0w/GchJpcADnwVI1VadBBPSSFoMBdsnzIDKUJErEgUUDhq1pFSfw==@linaro.org X-Google-Smtp-Source: AGHT+IEG1hpPrrbLzNGl7N0IMwFLnIlDS/giOQ7v0RslQ7/7ufauztfWFM5yrX3vLvsa36a/z/P7 X-Received: by 2002:a05:6808:1998:b0:3f6:a9ea:eab3 with SMTP id 5614622812f47-40905097472mr358027b6e.5.1749141071088; Thu, 05 Jun 2025 09:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749141071; cv=none; d=google.com; s=arc-20240605; b=hoKZvAp3wz8GSH6/rz+WcUW919eqgqsjOMR1uv/UbyU3LsRfeFmW9gAMo7Jm832Rqx WmRSMeQfg8K1h4JtBZWa3F4fDy8izlizu6KTqfxbYDqKwSu60NeeuVEnCYL3OmZWj8K/ 78k+AtwAMbH6MZkh5aws5HXw5Y+7iyP8YenIkSjZBym8IjuY03wnDddbLV4WsFQ/1bQg onaj+WPZtBnMTor/JV/iCOJlWjFxUrmK1PIZ3LyToriAm9bm1ijvUQ4xbHuKKvkAoCG+ VSQHA5eucknpDtRK0v37NQUCyX+LdC0+zw8kiplnjzyjTgGkqzQXHG+6ZXkRGcaWhM8N XgtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1RYsWu2FLtSlw32TxI54Iy1CVKbOUEX/+7bcau3xMfg=; fh=OKPV2P4508qC/I56dRWB9cUXOgLlJvy5mUvS6JzYKt4=; b=HAz2Se3s1Q0dRa+qflMfE/TKpWJxVBsD/WS9prU6F0hotpN5empdx4xgfbhcAV1M1W ie4yQSeP6hsdgPPxN7UWASfsWAF9mGIbr0VzcFHbJAZk8KeEfGcPEzeNfr3bTqRNccQf Y1xPlrDydBFJGzdHPm2RwGwBiTgl3QhnvwUfQinAsVmD79JfmNdU6EoY4a27SobaX0op w4JyZC1JzSWEEj5+rqcmyxECCDIyAFYgCY9nZcWtKOlJmoIEBnpqk/yGw5NgRUbmdrYD 89iQqkIgvvtZ2ArckCDKjlWTwr4guBjBZqp76bxhFqVJt6RSD7iloIATjc3937sastq6 +ZEg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dyDN1xUE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a1e0cc1a2514c-87e2a4ac5cdsi5112890241.92.2025.06.05.09.31.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:31:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dyDN1xUE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDQj-0006zv-Lt; Thu, 05 Jun 2025 12:27:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDQi-0006yi-4e for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:00 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDQe-0007vx-Si for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:26:59 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-606b6dbe316so2085756a12.3 for ; Thu, 05 Jun 2025 09:26:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749140815; x=1749745615; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1RYsWu2FLtSlw32TxI54Iy1CVKbOUEX/+7bcau3xMfg=; b=dyDN1xUEOlHmgMMBi/PLhp5QJeEl/GIO1LWdKWzwVHTzVGvqbEiQkKpZxWvwE8uHQO vEcZvQeB/DtX5ZMW/T4L1vm+70NIDNIC4tT8CqiH+nkQyzj4P8h4AxlWo3gXKWyXtGhD gpq/Le0GX6avOCc+G/DO/JHbRI4VPB1wUitMCdPkYhy1Zst1C2qg5z6C5kc0mLxSJwKX 2xH//DdV0QVsog16ZD7w/OkNtnUpD6SOvTl/FTdVt7Z7NtpaG00JK6Gi6bljGMWr9ik9 Cq7sZ1bRJcMxvHn3AsjiwMIYZWuAwQk0Y6cjzsBEN1URAuTDPEgaI1s8Yx8ry4jODzEE K/1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749140815; x=1749745615; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1RYsWu2FLtSlw32TxI54Iy1CVKbOUEX/+7bcau3xMfg=; b=TPYaBYUGnT7tmN1I2Ao1quV27AggIWvRKUWMYFeV5TaW5eu+VFbzspXKLGmjLbgoXe 8U7Twc7cU5X2xaHyWt2l45kxhhV/WFS94dsz/qjXkS0KVmrjpaXo1gV/lHL4VHHk8ugq pjqQdY0/lxfQV8cgj5VO43z1ldBdw9FOOX1s6GF22/ywGydNVCUwQK1SzGDDVw5o6Wmz vh8oa+xTUDmus7l5NnjO5lcMYcliCcXM+Z69yCIXMONiBIm/Ma67YvjFg51maG1yXRuA H5lZ6SlC+/TCPgAAgP0Mnq7kMUx/cmufaqn7h4DPWNgutAvKoQk6UvwfsVnZmLBfUpZ1 0i5w== X-Gm-Message-State: AOJu0YyuvYKL20B3+kndQIcfDkTIGhCazouF8ax2DkU8io//BdzDUVGS 3A1mkKDRIggCzaHEgYZpO27bk7W9P+FspeFjGA4LZeyM90ls07oVE1vf9SNstI4Ym3Q= X-Gm-Gg: ASbGncvZ4HhY89zNdDQdVqc0bA/Z+4jDThMPiimlnMNUowZjpt8tqmjxDWc8MB55PvB SM3bGX1Eyiomc7ek52yIb9VZW8YNZjOx+Rn/DWvXtMV8CmKDEedOcyr/HbGbCYrosZ464EVH2Wi j3HztxGtuEvnl1Wxtb6DbJVR7QXgT3uyDr58furMC79oHK9ID6RM3gZXG6MSizPIsGJyUsz47Vx Rlc3o10ZRkS54qCK06lp80K5hXRgdy9jpjK3pOBb5xrZGTle4+Omio3ioq1q6QH7zB8BXkIp6ud 14e6NEbUljcqRvHYSQmOn1i4xIUlCNUjOhSMpMQRiOi9aEDbg2NzPwG/lT6Y48k= X-Received: by 2002:a17:906:7311:b0:ad8:a9fc:8146 with SMTP id a640c23a62f3a-addf8f5a697mr705689266b.44.1749140815089; Thu, 05 Jun 2025 09:26:55 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5e8780besm1293932266b.94.2025.06.05.09.26.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:26:54 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CF3E75F7F7; Thu, 05 Jun 2025 17:26:51 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 05/17] contrib/plugins: add a scaling factor to the ips arg Date: Thu, 5 Jun 2025 17:26:38 +0100 Message-ID: <20250605162651.2614401-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52a.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org It's easy to get lost in zeros while setting the numbers of instructions per second. Add a scaling suffix to make things simpler. Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-6-alex.bennee@linaro.org> diff --git a/contrib/plugins/ips.c b/contrib/plugins/ips.c index e5297dbb01..d067971135 100644 --- a/contrib/plugins/ips.c +++ b/contrib/plugins/ips.c @@ -129,6 +129,18 @@ static void plugin_exit(qemu_plugin_id_t id, void *udata) qemu_plugin_scoreboard_free(vcpus); } +typedef struct { + const char *suffix; + unsigned long multipler; +} ScaleEntry; + +/* a bit like units.h but not binary */ +static const ScaleEntry scales[] = { + { "k", 1000 }, + { "m", 1000 * 1000 }, + { "g", 1000 * 1000 * 1000 }, +}; + QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, int argc, char **argv) @@ -137,12 +149,32 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, char *opt = argv[i]; g_auto(GStrv) tokens = g_strsplit(opt, "=", 2); if (g_strcmp0(tokens[0], "ips") == 0) { - max_insn_per_second = g_ascii_strtoull(tokens[1], NULL, 10); + char *endptr = NULL; + max_insn_per_second = g_ascii_strtoull(tokens[1], &endptr, 10); if (!max_insn_per_second && errno) { fprintf(stderr, "%s: couldn't parse %s (%s)\n", __func__, tokens[1], g_strerror(errno)); return -1; } + + if (endptr && *endptr != 0) { + g_autofree gchar *lower = g_utf8_strdown(endptr, -1); + unsigned long scale = 0; + + for (int j = 0; j < G_N_ELEMENTS(scales); j++) { + if (g_strcmp0(lower, scales[j].suffix) == 0) { + scale = scales[j].multipler; + break; + } + } + + if (scale) { + max_insn_per_second *= scale; + } else { + fprintf(stderr, "bad suffix: %s\n", endptr); + return -1; + } + } } else { fprintf(stderr, "option parsing failed: %s\n", opt); return -1; From patchwork Thu Jun 5 16:26:39 2025 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: 894178 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp42709wrb; Thu, 5 Jun 2025 09:27:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUu7CoM4kOzW8CPeIf1e6+rBfwfRFlo+hMZnPF8BMtVtsIZ5UhDR69hM/k2SW5pYeCaO566mg==@linaro.org X-Google-Smtp-Source: AGHT+IFl7TjWKnALDzdUlk+kQfD+4uk03HkzzcDI1u0z2znPcQ8Rx7qA7pVA0DH0eibvkSEblPbe X-Received: by 2002:a05:622a:4c85:b0:494:b924:1374 with SMTP id d75a77b69052e-4a5b9ecb9afmr5224711cf.43.1749140858154; Thu, 05 Jun 2025 09:27:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749140858; cv=none; d=google.com; s=arc-20240605; b=lFDcCvmyN9VIL+R87x+85PwJUIiuXhN2GDAkick7oS8fBdrdINJCpOk6uL1wk/4atC dFlaea6idFL84V/aN8H3JX3jLz4DY8KtD8wa3+JJIFbJ/KmMlUOTVbjKDASL/uuqdHql xDgD9GOxBheyq7yoPvGfxlm13FILwhlPZf3A1S/n3Fljkd15wMRAhOc4temyhP38oytx 0h2GfTzcoz2DVf34idVgU411LEUrg0H/83FuJuobiBiJOKT5xMDj7/GCdg1dxflZjN0Y 85xRJdrPkIsm/pIA/eNPxCo2XbfzHC/vcHcWesnUrTLys/6GgVGRO6wU7xnT8H4UJqlt n9cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GQwrdoDZTl53LB+IkPogNbh7NAW9W/1iQ9BQhh4VHRk=; fh=OKPV2P4508qC/I56dRWB9cUXOgLlJvy5mUvS6JzYKt4=; b=hFrCZQhUbgvTcXtRZtJTe0KOXz3t+7hnxOiBG03xU2WxIhZ8RzNNJ2Dd2K77jz5vAP PYniMUoQkxPumVGv9lS472KftTYlwJFf32ZCgH9Zk3XdIcN2u/xiZbK0dM+X4L7Z2kng r7wrO9nVmcJ8RI+qFmotqEZGSOSp4uSdNr4VnnpDGY5SLCPuH/G6U4CJ4g82JZLBPBW+ gqSB/QLJbP2KjjJ3Ty3eK4xKLO5oAdQ7ZXaBNT9I+bLRlZHmxEOZF80IMZnJ91C/SBqM hQn9kLphFjuFG+2Yu4k4t/84bMfEImXzvHJ0LC/edl9rmSisGA5QpzcNdNUYq7JJzZ7h yusg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="o2+I/oS8"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4a4358aab8csi176745091cf.140.2025.06.05.09.27.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:27:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="o2+I/oS8"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDQk-00070T-3y; Thu, 05 Jun 2025 12:27:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDQi-0006z5-CF for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:00 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDQf-0007w9-Gu for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:00 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-ad55d6aeb07so229673266b.0 for ; Thu, 05 Jun 2025 09:26:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749140816; x=1749745616; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GQwrdoDZTl53LB+IkPogNbh7NAW9W/1iQ9BQhh4VHRk=; b=o2+I/oS8bJuUmh4V0o9C2t/ccYckPszbnTRUHOgkLILK35Tyw7UIKHeyM2v8NjxRop LQIBm+5hkVWZFvrYzxdEuZlS+VgK7pMYY513De2WUk+ePthJR99Q+Z6pK+9BdmUNsw5v nQMKKJlQLGKTtc19UZKu40AR8lZen5m0x/+8LSUSDeFrDJSGbm4XVQivJZ7PywdookIw QUpHqI41SRQ64xBH9twMX0sZoXmAMaRHmnMjMymgc01hFM7xoF7j3rpXwFHJqTrAkmNU EZLk108v3qbZVfb9stOeENA8mtlRgB0o07PYz4YsQBJHJkoq7sIa5iKx6LQ/ywLf3R7x boMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749140816; x=1749745616; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GQwrdoDZTl53LB+IkPogNbh7NAW9W/1iQ9BQhh4VHRk=; b=TL49xacE0zsbMzGOPfH4XTzLzidqGIexdHtVOsaLcTNpnj4hfOTCMWJm/wdv0VI689 9g0YBwZhuIB0WosMh5MRGEhBWx6gcNn6sXiPYAxF+aiYU8dedJkSUE7Qr5MVa4c36IuO 1vc1/O1NPpYwRP18/QhT0nQRJP3ZzHONbDGAB0MbMvxKmP0B/6HigYqqgIaCu43AGtB8 zydKJ14JI6BsMN9CPTIRRD+ecqha9+B37wUo6k7ekT2hx1fT0EhNI3+iN6F/qqOCBDfE 3UIyb6cij+BgRMrI7okLYgT40dk6ROIaIWl5lV5lXkiSCi+tQJrWWP3C/VNGldoT/q+C hzxQ== X-Gm-Message-State: AOJu0Yx2/CHIfCo4hTQ1YG3DRQEFBTh3Vj27KSz6/JM2CG5kQlFhSqki WGGzaAE0byKS3vPixIKB13HoJbQvyvf8kh6dTbNSs3goZ51mRS275gBELsCwM2X4Sws= X-Gm-Gg: ASbGncsizhGeobaquUT5V6mEtPlExo+vpL3IJWGn1oiePL8AwB78b8V1eRA1cle+GZA SCXqU8rcMDgxQF8KJQIwIoVwTSgg70rd6hofVHFGHlG107lsEDdIRruT5PzPGhJy9kWKiInWdSX p6eHMrorjTpLOMs4wyr+Tb4vtnPQ72/caLY/rRjbzAQOuW+b9bg7/v0yZ5rCaFSkVh8wJYx5oVH koDFiYcZi1LSmvNgBHJVLCgvfl6X+RteiZVg2b4hoz1Y9dW1GlSmWc1jaD8Fl57FAXdCbbZXKhF ZgFmXY0fFQFFydbZBmgcKgaJk9zsL8e28GoRd247KFp2i6hLtZcM X-Received: by 2002:a17:907:3da3:b0:ad8:9a86:cf52 with SMTP id a640c23a62f3a-addf8c995c5mr769111066b.11.1749140815913; Thu, 05 Jun 2025 09:26:55 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5d7fec76sm1284384766b.20.2025.06.05.09.26.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:26:54 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E677C5F81D; Thu, 05 Jun 2025 17:26:51 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , Alexandre Iooss , Mahmoud Mandour Subject: [PULL 06/17] contrib/plugins: allow setting of instructions per quantum Date: Thu, 5 Jun 2025 17:26:39 +0100 Message-ID: <20250605162651.2614401-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62a.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The default is we update time every 1/10th of a second or so. However for some cases we might want to update time more frequently. Allow this to be set via the command line through the ipq argument. Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-7-alex.bennee@linaro.org> diff --git a/docs/about/emulation.rst b/docs/about/emulation.rst index a72591ee4d..456d01d5b0 100644 --- a/docs/about/emulation.rst +++ b/docs/about/emulation.rst @@ -811,6 +811,10 @@ This plugin can limit the number of Instructions Per Second that are executed:: * - ips=N - Maximum number of instructions per cpu that can be executed in one second. The plugin will sleep when the given number of instructions is reached. + * - ipq=N + - Instructions per quantum. How many instructions before we re-calculate time. + The lower the number the more accurate time will be, but the less efficient the plugin. + Defaults to ips/10 Other emulation features ------------------------ diff --git a/contrib/plugins/ips.c b/contrib/plugins/ips.c index d067971135..f110c565bc 100644 --- a/contrib/plugins/ips.c +++ b/contrib/plugins/ips.c @@ -145,6 +145,8 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, int argc, char **argv) { + bool ipq_set = false; + for (int i = 0; i < argc; i++) { char *opt = argv[i]; g_auto(GStrv) tokens = g_strsplit(opt, "=", 2); @@ -175,6 +177,14 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, return -1; } } + } else if (g_strcmp0(tokens[0], "ipq") == 0) { + max_insn_per_quantum = g_ascii_strtoull(tokens[1], NULL, 10); + + if (!max_insn_per_quantum) { + fprintf(stderr, "bad ipq value: %s\n", tokens[0]); + return -1; + } + ipq_set = true; } else { fprintf(stderr, "option parsing failed: %s\n", opt); return -1; @@ -182,7 +192,10 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, } vcpus = qemu_plugin_scoreboard_new(sizeof(vCPUTime)); - max_insn_per_quantum = max_insn_per_second / NUM_TIME_UPDATE_PER_SEC; + + if (!ipq_set) { + max_insn_per_quantum = max_insn_per_second / NUM_TIME_UPDATE_PER_SEC; + } if (max_insn_per_quantum == 0) { fprintf(stderr, "minimum of %d instructions per second needed\n", From patchwork Thu Jun 5 16:26:40 2025 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: 894185 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp43332wrb; Thu, 5 Jun 2025 09:28:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUfh5tGPAz5kKPEwufC5Xsmpvse42fJb1speLTOfkj0s+yaaDf8agPx5Hu3IuesdT1lbav6rg==@linaro.org X-Google-Smtp-Source: AGHT+IGZdA3b9UnAwQ3kLAovX/CWpIHPPxjWrEcB6ZettOcgcx38zN+hWWOW88mywlJbBSeozB4H X-Received: by 2002:a05:620a:4495:b0:7d0:9a17:7b93 with SMTP id af79cd13be357-7d2224388dfmr617079785a.25.1749140938570; Thu, 05 Jun 2025 09:28:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749140938; cv=none; d=google.com; s=arc-20240605; b=UAbRPJKeKax3GoOQ7SLzFbRbMQ1EwFLIp/jVRPqqU04WGeTBzPUXzGTCfBfCkLUy4X Y87Qcq15i3tnoxQZ/j0VJx9MKv4hsusPWDJA6nmqjOZ3WaUarVeYq+1yqIBqeRFdKVVU C9dEN8Dk9a0T9uDKKy/q37Ib5QB11gYizlrp2skw/16T7jbGH+xIeSt8zD6MOmrDt1A1 HwKJ5fp2M6J4A/vewgCSgIVHJR5Pi9i967ove+sBn32s20pLwK7MW0H2Yoos4boJHC12 gmVJJxioy1/hxMa0QQeWwtoj2k6+Nv9C0RC/HhR2rNyLAotxhjE4PEsGApDOFVN2pqsd aqzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=U2bAjqn2l1sYmqIqqjIVtgsfD4EifRV4UThIaUxbMJI=; fh=021ER8C389ODzC8zCxJt0jYhSGK4ww38g0R7u3m+fSk=; b=EtHOkwDsUCkzti62sLMoxF0rnTo+arSqLT4NOTDeQCIuByLv8mjk11TnJrTExva3Rv xV8gWRgQkvYJSLD6criK0uM53V/qImV1XYJi2IHtD+G4qAMrtlojPKlln0bsUXsJXzxa ZnYggxggYHHSlLKyR+hIGGy6PYFRtG4s9Xb3cT2kuZyx1EZP1W1Ks+4Zxvxf9aRpe+el awYTWvLOnZnnWs/Yn3YkpfiL4MO278xu3exCmC+NGjj7v8cj4UvrTbsvG6kA8sGARnVj yR/pBl7e99UtlpQFFSJ86vgpgBDT4J8l/uygUB3Z6W0t7aLWrLggxNcOqrCMH4y6whcp kFAw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="k/GozYxc"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7d09a1e106esi1740821485a.310.2025.06.05.09.28.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:28:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="k/GozYxc"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDQm-000721-81; Thu, 05 Jun 2025 12:27:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDQj-0006zf-EW for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:01 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDQh-0007wU-Lt for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:01 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-6020ff8d51dso2171180a12.2 for ; Thu, 05 Jun 2025 09:26:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749140817; x=1749745617; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=U2bAjqn2l1sYmqIqqjIVtgsfD4EifRV4UThIaUxbMJI=; b=k/GozYxcofK0NPUAlYIXSpSB8ArTQhrKoOAiXbZydDrInyk0xJ08VVU+y23Pv5uvmc D/XQJJ4ig4+5XWBRceXiNmniIMXV4tXRA38bdstN/Qz6yeI+fXzKQ19QvE2c87sL6grD 5za7e6tPnlqS3MpBB3IJvdav4Pj/xUQaNo2TNMJEA/rPKbqK+0fyymT1IxQRju39SSUj Cs/RUh4U/9jntxWEjD9c7Av675fo9glh8bnW4PAQ8fvwuig6f1uscK3jqywQ9EcJBdiL y38sVj1L4+fWgQbCVaQHb5RH29Ujuzgj7BLcXXmS7U1qDtQsSezibQAD30vsDNrlvK7p rhlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749140817; x=1749745617; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U2bAjqn2l1sYmqIqqjIVtgsfD4EifRV4UThIaUxbMJI=; b=v9djL2OATmqnsaDXXgZXrjuu++bY4fehFOtRkURlSoYvo9ijppgb3TqQjhAYOcvL9G sM8frEe+ogWfgI2v+Y8cMRep9bawWymZ9VMCRtFNlq6xqccE+cHgoAizHCVPj2Nq5iS3 A+0yv5dq/U/I+qPdTL1c+c7R6qFGW4hHH67QDvvV6wb6RWkRQ3sAm3CXN/+Nhh2Ix9M/ kQf4dJ+80pRNCHB0y2OJWM768+eSJNtc75yrjzX3gxpHHH6WlggrO9s6n669190whbml B6XXRliRCIwJjU1LsquVTiRUKnajauTuXb2Q6NpWloJgNcrwGbNwvvJHlfD/D8zjvUvv P1OQ== X-Gm-Message-State: AOJu0YzK+1QJuO9a8m5ywmJLcZ1JKhlF+Ay3/zagw8Keq8jWHAsYf8fh 1qvGUQzJ+sl52ZAHi5Np8P/wc7SiWPYLPoFIk9kf3+Nu/NE63y3BvtLxOadw7QvE9iM= X-Gm-Gg: ASbGncspzk+jVeGQ487DW9tuyFjKho1vrdph1fnNAr6ZvqfRKrPX8SrrDo2oG3DeA4m Ur4Ka7Ys2XWEsXN9kcCy1JSqB3X68CUS0ZYC0GLuYs/j+WNhdJq6HeGB4JzNxi2fvj/W6na7wkH CLC5v5XoQvHV+lnQcD32MDl2GZuFIWAVH1ZwvS+VmU1Wyen1avqVc3/8RTJXsl9ZYFstQ3NRP5D tb0GDnw9rlqOl8631OYzUjBYb4Rk8SEVtMf86mR+nWLpPm2ZxYUrf7JhjaoRRPYfBbQXZ9bGH1c x59olmHxMmqyJmZuDqKanXKInJNLK728vOw99fA/e1dyrTO1muI/OtgzRrDtKn0= X-Received: by 2002:a17:907:7fa2:b0:ad8:a50c:f6cb with SMTP id a640c23a62f3a-addf8d5ec0amr666246966b.26.1749140817129; Thu, 05 Jun 2025 09:26:57 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-607341e69fbsm619848a12.47.2025.06.05.09.26.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:26:54 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 092625F828; Thu, 05 Jun 2025 17:26:52 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Markus Armbruster Subject: [PULL 07/17] MAINTAINERS: add myself to virtio-gpu for Odd Fixes Date: Thu, 5 Jun 2025 17:26:40 +0100 Message-ID: <20250605162651.2614401-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x534.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Seeing as I've taken a few patches to here now I might as well put myself forward to maintain virtio-gpu. I've marked it as Odd Fixes as it is not my core focus. If someone with more GPU experience comes forward we can always update again. Reviewed-by: Markus Armbruster Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-8-alex.bennee@linaro.org> diff --git a/MAINTAINERS b/MAINTAINERS index 16af37986a..7718199979 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2668,7 +2668,8 @@ F: hw/display/ramfb*.c F: include/hw/display/ramfb.h virtio-gpu -S: Orphan +M: Alex Bennée +S: Odd Fixes F: hw/display/virtio-gpu* F: hw/display/virtio-vga.* F: include/hw/virtio/virtio-gpu.h From patchwork Thu Jun 5 16:26:41 2025 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: 894190 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp43808wrb; Thu, 5 Jun 2025 09:30:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUtUfPAaSyXmRI3YmY1eJN+QVYP6BDyqFaaq01HZyPxnE6biXOpnus1qJ4prfJjFLUTYuJBNw==@linaro.org X-Google-Smtp-Source: AGHT+IFc74UdaCfXcBciT4DGZzXdcFN599337blXgeWFxhRipBYwxtg9n6Kp+JoYg4UpuyevcQAy X-Received: by 2002:a05:6102:3e0c:b0:4e5:9138:29ab with SMTP id ada2fe7eead31-4e746e18b70mr6625871137.15.1749141001829; Thu, 05 Jun 2025 09:30:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749141001; cv=none; d=google.com; s=arc-20240605; b=ML3NUAlaxL4Uskk7wCE9hX3NiC+Nvrk+wNgvOQtHaM5K5fJXC7MH/ZFNlswj+ZAqX8 Mc15n5C7HCrspOPRLq54QTvF7dDbagkE+qC2+bSxSs5jLtuRzMIuwBXWWPbr/ySwjEXz klTufCEVB+N3eOjaTrdzvIrJePnOwT0Xhi5xpYCN7+Ah8xS0umj0CWTe6xPxCTSQm4I+ fGKbanxgbE3QRTP6MUcjEvZIkRyPUpkMbCGpFgg31md7lkyY3ZIZ4Kl8GSGbSxpweu+y Ap5yBO8hr0iNMpRZQWCv6BMd6Fcd+XbyMfbhtgZSjwWrQ+Vn6XzT0+eGqtQvo3X2vB8Z peaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aVGmIQVUI71LwqjcHS0gv4sLRbpZFyoXIdxBn+SQNA0=; fh=Uowd4k3CXSAXtA/c+PC+C9bxCq3u/+qsMK+M/eRgflQ=; b=PQi4nJVvj+fR2nWQwuHeVUYyqPv22BpKO9EnzrMVnc/00GB0nP2v8X6LzF2QjOOhMS RmCsMUIcGGkdKP8CjQaNVTDxHzISD6n7FrY/6mRsfVA3hCmjsKjiwNxgagrAP41el0zE bwJ2fdicLANzLqOy3pBo92cSezEgi09apbBdn8/JH1TgpbfCtyCIAzaCizGdNSZR7k4+ tVbDDYOHPKPLufWvTrH6VHmBYNHDnhQW2KAZcAbNNzvM7Hf0HsO5q2FFjKE4+vd+5ghH n4RrBhrdhfrvX7oOUfyZZ56Ar6YZumBMZAMzYp6hycS66c2+AN+4hfLA7kKjS7BsPBVZ Ri8Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pTIgbQV0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4e64ea2fe2bsi6121308137.435.2025.06.05.09.30.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:30:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pTIgbQV0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDQm-000723-9r; Thu, 05 Jun 2025 12:27:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDQi-0006z6-Cq for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:00 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDQg-0007wL-8E for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:00 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-adb5cb6d8f1so191091866b.3 for ; Thu, 05 Jun 2025 09:26:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749140816; x=1749745616; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aVGmIQVUI71LwqjcHS0gv4sLRbpZFyoXIdxBn+SQNA0=; b=pTIgbQV0hf2+QNSUHOkWunGAd0+j2E7csHqiWeR/mHtV5QUcP2n2s4pBv/OVkjpBVa egr6f0E6tIMbB7vS+Wdk1+X/NoXtUgDEsAsbDbCHLLjjIIMbJ3W5zhlLVApQZCRSUdlh qDC2oJPKouhCF7gpzFPqY2i845wHc3+yapeXE6qCciZZo20oyiYmGs8SWGeaKE4QtXkN dMeHJUB4tcCUAqlu3duMbRjgex/CpaeAyJ/gx+IxrdG5LG23CX6i3BRFwA4nebNxPhfz +baim/IAtIX5tgcETH4kyxC+pGKeX/m4ce5DFUILk+cO6XXnqII8fpClUmMP3UCdD8uD bJWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749140816; x=1749745616; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aVGmIQVUI71LwqjcHS0gv4sLRbpZFyoXIdxBn+SQNA0=; b=ZVt2be+Q/l7KfRnH482/qvzSgMp5WdFUXrCPA5PlS+RRFK6GU6yTEueRmwN+M7LrsZ 3WKC/oqcpZGAb5R75tvXvvT6lIxlWYl+M3nHCVzRhbGI5Lm+0QIDhqFoqSTthRC3AAgf xoQVmTtOcZRfDc5bv85kQDNyOs1LPt/N7btQRbcmWLxDQafNx4jrgBG3St47wrytfFXi JHrwAAqtjkokHghA2j2FGmdppV6S4y0DDVnAYRIWLFWf7qfNXOKVRsKYb783DJViSaO4 TS8FbifQMYgAgsqjxkcMI7tbNodle4lmnDJ70U88mDEyQWMnyoD+dc/MamnxyDe+V9f5 WxtA== X-Gm-Message-State: AOJu0YziPDZ6W91bboHkbfcx0ORalwcrj/421MldnBzYOylI8D+taReV AKYVcipTkGpGXa7ZUmsZF1Qk2M5Eqhp+l9YyoDlJDCfupBJX3ZfJdqn9gwd9IF+LT60= X-Gm-Gg: ASbGnctYUnt8q1tXQSH/Pf7Bz2QB+bNYzWiKt299kD/8YXFMUo/IquRw6yI/KEaO4ok yYBSBHETHu8T+Warg5BfLRoLx4qw4vaWXx97LwbHN5uJ0fS+nUE8Aq0q6tfayZob5k4oi5TFdmi zRBYpFkXatyIwKXfyJkzAe8EydL69zwEKtSkTCTweypQ9HeWPZPcLVRLIvWjeGVB2a/9fRPjq5/ 2o6LrhbKNn3c/JdWBUvu7LvBFw3tS8GQbQUg9jfXQI9EI3dmF5tWuj+c9nuJ6PPxuUh0TwAZNIm 6nWbCVVHAn49tP7qA0MRuTV5cJ1QKzjKtH/rSz8ebT5jCqt10qIa X-Received: by 2002:a17:906:9fc8:b0:ad2:425c:27ce with SMTP id a640c23a62f3a-addf8caa33fmr708579166b.2.1749140816551; Thu, 05 Jun 2025 09:26:56 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5d82ccf8sm1266512566b.44.2025.06.05.09.26.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:26:54 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 211EE5F829; Thu, 05 Jun 2025 17:26:52 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Akihiko Odaki , Dmitry Osipenko , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , "Michael S. Tsirkin" Subject: [PULL 08/17] MAINTAINERS: add Akihiko and Dmitry as reviewers Date: Thu, 5 Jun 2025 17:26:41 +0100 Message-ID: <20250605162651.2614401-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62d.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Thanks for volunteering to help. Cc: Akihiko Odaki Cc: Dmitry Osipenko Reviewed-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Acked-by: Michael S. Tsirkin Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-9-alex.bennee@linaro.org> diff --git a/MAINTAINERS b/MAINTAINERS index 7718199979..194695c881 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2669,6 +2669,8 @@ F: include/hw/display/ramfb.h virtio-gpu M: Alex Bennée +R: Akihiko Odaki +R: Dmitry Osipenko S: Odd Fixes F: hw/display/virtio-gpu* F: hw/display/virtio-vga.* From patchwork Thu Jun 5 16:26:42 2025 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: 894188 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp43429wrb; Thu, 5 Jun 2025 09:29:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWTY+H1vlrNvJTkfgkkV70+v/zmNcjgKvMxSb91GFCIwn+n5sSP8Ga8bO4bQ9DiQAAyjsxf2g==@linaro.org X-Google-Smtp-Source: AGHT+IGw1e5GOm4Ib9/dquRqU3LjARnu/AoRcmkQbOmUQqfoWowKLDufyAKawMY/opu8zcd/dChq X-Received: by 2002:a05:620a:2442:b0:7c5:5a51:d2c0 with SMTP id af79cd13be357-7d2298d876dmr32272185a.52.1749140953990; Thu, 05 Jun 2025 09:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749140953; cv=none; d=google.com; s=arc-20240605; b=B2PtfDOhpbMcEw5AMha2EY0MCkKmDtlfcNKfputJuWKqqeLsiFT4jfebYwPPRlCkjP V3QXqUYSsVcRVZBw9aF5RByMVH9T0OEICK9OA15SN003sDv2W0qVR08nXpGBZBCGFN26 84wuZtNvuAGEkWUqsNUe8JDMu4+qioXUmDwg3wKqNOisZcgre+VF8S0SsvHZnre9r/yG 94EnwaH4sGhMLk9u4r7ANPXPo5djxmhtPyM1OGouww+28K/aKZZY+ZIuNwkEFJxxatIg YZvE9AEIiX69N14rX+vUWsMTZSk5aAtj9wA0WpnSp2rGqb4nSXXsmgzGVbODjRtBdgyj 5gYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cuoxJAauenUw51/a95JHVEM0kV+U0SuU6MJAfDpHlJw=; fh=cn10PGR/fkRKHq25UpS2NwcFCnDHizzUHx7tA9PHDUA=; b=R+vDmvd8tFd22FYyu8htjk+/HASs6d7PUWYHnWbTGshs+iA2uoySZ4LjmsWgor3wNo Ww6pzCpzxbEt1XFThNFcw8Iun7GuJh40riXoOZ7JCIlcVbY6PsOlQdEPMxOc5GgEEvHy ZqV7jqTFTdLg6vjUlFYMleWjJ63npbi1mSZ8RutYLY2SJsdBhVQZpV6qGwmTbwJxGWke fGQfwPONaYc5v2uf1BzrMjtjHgSMXDxZ1HYVixGVjZC0MfXVbzyvrlRGt8UJOO36iXnF exa3kIez4Ib1JqNnupId8TtYklHSnT9tlBRiWejVdZl3O1Z1WlNNlP4Hl3yjOopQx+ER 4gNg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IP05flmS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6faef31946bsi63412326d6.314.2025.06.05.09.29.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:29:13 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IP05flmS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDQn-00073S-LE; Thu, 05 Jun 2025 12:27:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDQk-00071M-Us for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:03 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDQi-0007wu-AW for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:02 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-602c4eae8d5so2272929a12.1 for ; Thu, 05 Jun 2025 09:26:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749140818; x=1749745618; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cuoxJAauenUw51/a95JHVEM0kV+U0SuU6MJAfDpHlJw=; b=IP05flmSjXuwV5SQpDp92hSyS3F2MCj7QspieGG/92bqM9UwdAHwN12PyQj7FQ5TVB nlbHRlPkIJhalkQBFv2X8cja7MEuh1XUOg15Sx4Izjt1GNY47ITVjuRSSgMSr7e8XMQf irjPALEDOzbLORdI6i7uUPIchhhnm/zDLCISPbIMwIq5GfTgu8wdk7AocIZEpEHm5Fez lEaRdvTxjYECJ3O9sKWA9HZwwYzncp7m6DoAjaUJVImjKwOHJqm/yb98h5cSpfBuCfVI d1nyBLUbMR8hnNRpa4/PNhj7kN9iPoui38gQyOycF9xW5hfO+36iEBwlvuddUk+OH6oM 4WqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749140818; x=1749745618; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cuoxJAauenUw51/a95JHVEM0kV+U0SuU6MJAfDpHlJw=; b=DG0w4Rm8CxtJcIgxDhxLeaL/tGq2EJXqtZ/ge2DFdLh6/16bxCUtCj0JDXH3jLAxdM A44lHbjKE+gADzA1W+2LmxsPvwRLMoqt4kKP6+GYJ8YRS70u64zKPgQNukT+1RR0Y3XK Rm7Qbp/AXx+K9/7anPR6Ayyni9U9ynH5nzcoRfkDPBTH40Dfe90BddnY5Ptg72tPYxer gKnRvTkwFzTZOLtFn3l5S81WoG1kk36r4YqkACrgObF1HmVzQPNlAmdhxvGfqDp3TR3D iU3BMWOofjnVuZ1+Owu6/b9Aly/Miecuqt7/n83o1lFoIK1UeQt1Fi/4AdplcV3pzJ3f kjUA== X-Gm-Message-State: AOJu0YwOVnoI6MSCeUt7+efwW4RoF/A5Ca+4TwLW0DWeJHWCBf1PPHD6 HgspEpLLEpDM8nEw/PzKL2B31wwgz5vB8NS93Q5OeQxZoOUroLbRFKbM8AYiz3wkqsc= X-Gm-Gg: ASbGncu4lve2jcBP4qZvdP2akAZDF7W6WavYGl3k4tCjyJswvhxT1FaB4PbWewdZZ2x BMEZUpgoK0fyhQfGkS8QTjyYp7x823wVvxEN4DszyCEo56GqnCqRAwLwTuqEh2dqRtj5/sb6m0l UEvctdgVZrpZiwsyyTuRUZ1IcdAYZVfkPKyWfXDGolaVbaBji0ALJ6qeMsdxjbDVVYw5d3M4b0J ZTt/UMify2mwxJ/+MHxncTtK++5/HsuedBBIa/9xff1b39dS7XRd7QrYQSxXMHyw7U890MFZXft nClzcQxyM4yqSy4TKIYGIOxL7eJhLatJLp2EzdD0T5wUL2KExOU0bGtbNaVYZPQ= X-Received: by 2002:a05:6402:50cf:b0:601:470b:6d47 with SMTP id 4fb4d7f45d1cf-60722629489mr3955407a12.1.1749140818353; Thu, 05 Jun 2025 09:26:58 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-607341e69fbsm619851a12.47.2025.06.05.09.26.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:26:54 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 3AA3E5F82A; Thu, 05 Jun 2025 17:26:52 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Manos Pitsidianakis , =?utf-8?q?Philippe_Ma?= =?utf-8?q?thieu-Daud=C3=A9?= , qemu-stable@nongnu.org, Akihiko Odaki , Dmitry Osipenko , "Michael S. Tsirkin" , Paolo Bonzini , Peter Xu , David Hildenbrand Subject: [PULL 09/17] hw/display: re-arrange memory region tracking Date: Thu, 5 Jun 2025 17:26:42 +0100 Message-ID: <20250605162651.2614401-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x534.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org QOM objects can be embedded in other QOM objects and managed as part of their lifetime but this isn't the case for virtio_gpu_virgl_hostmem_region. However before we can split it out we need some other way of associating the wider data structure with the memory region. Fortunately MemoryRegion has an opaque pointer. This is passed down to MemoryRegionOps for device type regions but is unused in the memory_region_init_ram_ptr() case. Use the opaque to carry the reference and allow the final MemoryRegion object to be reaped when its reference count is cleared. Signed-off-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20250410122643.1747913-2-manos.pitsidianakis@linaro.org> Cc: qemu-stable@nongnu.org Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-10-alex.bennee@linaro.org> diff --git a/include/system/memory.h b/include/system/memory.h index fc35a0dcad..90715ff44a 100644 --- a/include/system/memory.h +++ b/include/system/memory.h @@ -784,6 +784,7 @@ struct MemoryRegion { DeviceState *dev; const MemoryRegionOps *ops; + /* opaque data, used by backends like @ops */ void *opaque; MemoryRegion *container; int mapped_via_alias; /* Mapped via an alias, container might be NULL */ diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c index 145a0b3879..71a7500de9 100644 --- a/hw/display/virtio-gpu-virgl.c +++ b/hw/display/virtio-gpu-virgl.c @@ -52,17 +52,11 @@ virgl_get_egl_display(G_GNUC_UNUSED void *cookie) #if VIRGL_VERSION_MAJOR >= 1 struct virtio_gpu_virgl_hostmem_region { - MemoryRegion mr; + MemoryRegion *mr; struct VirtIOGPU *g; bool finish_unmapping; }; -static struct virtio_gpu_virgl_hostmem_region * -to_hostmem_region(MemoryRegion *mr) -{ - return container_of(mr, struct virtio_gpu_virgl_hostmem_region, mr); -} - static void virtio_gpu_virgl_resume_cmdq_bh(void *opaque) { VirtIOGPU *g = opaque; @@ -73,14 +67,12 @@ static void virtio_gpu_virgl_resume_cmdq_bh(void *opaque) static void virtio_gpu_virgl_hostmem_region_free(void *obj) { MemoryRegion *mr = MEMORY_REGION(obj); - struct virtio_gpu_virgl_hostmem_region *vmr; + struct virtio_gpu_virgl_hostmem_region *vmr = mr->opaque; VirtIOGPUBase *b; VirtIOGPUGL *gl; - vmr = to_hostmem_region(mr); - vmr->finish_unmapping = true; - b = VIRTIO_GPU_BASE(vmr->g); + vmr->finish_unmapping = true; b->renderer_blocked--; /* @@ -118,8 +110,8 @@ virtio_gpu_virgl_map_resource_blob(VirtIOGPU *g, vmr = g_new0(struct virtio_gpu_virgl_hostmem_region, 1); vmr->g = g; + mr = g_new0(MemoryRegion, 1); - mr = &vmr->mr; memory_region_init_ram_ptr(mr, OBJECT(mr), "blob", size, data); memory_region_add_subregion(&b->hostmem, offset, mr); memory_region_set_enabled(mr, true); @@ -131,7 +123,9 @@ virtio_gpu_virgl_map_resource_blob(VirtIOGPU *g, * command processing until MR is fully unreferenced and freed. */ OBJECT(mr)->free = virtio_gpu_virgl_hostmem_region_free; + mr->opaque = vmr; + vmr->mr = mr; res->mr = mr; return 0; @@ -142,16 +136,15 @@ virtio_gpu_virgl_unmap_resource_blob(VirtIOGPU *g, struct virtio_gpu_virgl_resource *res, bool *cmd_suspended) { - struct virtio_gpu_virgl_hostmem_region *vmr; VirtIOGPUBase *b = VIRTIO_GPU_BASE(g); MemoryRegion *mr = res->mr; + struct virtio_gpu_virgl_hostmem_region *vmr; int ret; if (!mr) { return 0; } - - vmr = to_hostmem_region(res->mr); + vmr = mr->opaque; /* * Perform async unmapping in 3 steps: From patchwork Thu Jun 5 16:26:43 2025 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: 894184 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp43325wrb; Thu, 5 Jun 2025 09:28:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXBDhUUEoVIZ9YCBsklPGQnk/JF0JC0T1X6Kc9+EW1z+G68NTWfLZYMFcwXKf4rWyE7egEe/w==@linaro.org X-Google-Smtp-Source: AGHT+IGNiDYDKBvZ8Rfxdd78p2czTQDIBdZ85+bg0gmmwm02MXuLRn59gmL6ZC0tnt9bTpxhksQx X-Received: by 2002:a05:620a:4413:b0:7d0:9d09:6009 with SMTP id af79cd13be357-7d22988a7afmr29816285a.15.1749140937970; Thu, 05 Jun 2025 09:28:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749140937; cv=none; d=google.com; s=arc-20240605; b=VA9yJMNfV7/Ri8U5EzaRgW8j5fNIJUrMD8JexzZML7rrQCkYBIP/QefbJwt0D9zkYJ g90dQgtSjW5h4uLaM43TG5rMtRpLve6b51CrmPXXthLbPca78cFqJVgfOyn6gRDpYfSS 9zvxHaum6S0JaW38Q6OfLIkaGUY5ekKUDUYTEgT7FWn0HYCbudZyH+VRO8G0MPFQ41Dx h6i+plrJlpLcOV2xkrfBR4Z97l0JaJtnD6+i8g8fmyNlq7I5fMeCwxD77aFYpYBHXWAG NXIU38EPb0HA+Oj9YpCxfvyWzx3HrT8cZmd3IAIrSmmWwTHpHVtnrtn5Pgtj93TdAcAl wbzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=frC5TwMhV/f34ENXgINk4bwryZOX0QIG0KIu5oqBjUU=; fh=n2UiWsbI159UoRW8CPISkn/80TsBb9UHfFQhyT9tdYY=; b=Zo3kDx8dThQsUwsejTC2F2kRPg3R3PYadB6kbQxOUr+v3tFgD+JXvoTOP11sexudkm gQBUxmMdZJbvy+C0Lwzsgt84jDH7IJqYQNL/F3W6VExGMMkdvEMoXrhsLaVFIx3kOPHW cdJ+HxQUrZFqupSZJo3dQduwFKE23J5fW8vAgZDlrhO/7xclqjIgDoHuctPmqRU8w1US 6Exhv64qoheNaH1qZAhRzShWo86/Lz/WyC49SjNzFpmkW52ix+itneS+wo9s+FpRrzI3 sOmfD93yk0ibr7GDn2ynfkeJ5ir3NHgnEWnB/NLQLxqOgoTXZ70M7NQnHWrypSGMH54a lK6A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OQU1IPmL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7d09a1fa416si1735650285a.342.2025.06.05.09.28.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:28:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OQU1IPmL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDQo-00073Y-8N; Thu, 05 Jun 2025 12:27:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDQl-00071P-4W for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:03 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDQi-0007wc-NZ for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:02 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-60766191202so114991a12.1 for ; Thu, 05 Jun 2025 09:27:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749140818; x=1749745618; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=frC5TwMhV/f34ENXgINk4bwryZOX0QIG0KIu5oqBjUU=; b=OQU1IPmL/E46rDbIK+yWvmaWJJAoiyzNm7F1JuJas1sXkbX5Lw9DFN+m7plyoyZWBQ ED74sJmRDm/3GVEX5LOywx9KmYXpf6M5H4K4tG+tqING+vP0iJ1yraByiqIcnk7g7ZLd +crKNOqMJTjVG/w9pb4CiQZCTPu/KFOlSEFnJaXLXnA5xgLsbfUwu1ispkhlABWEeDoO uDVsukTaZn7ZaqbA7fX1HaZNjBT+mjfVCrAeqzIKWtvoTlVpFEOPcJT23Y58ZoSRrLD/ ndxTyUpCmq7cQkBicMdFhoN2mlik1ALSDBlMvlixHTaEf0yCkvAd0yGqtuP3HIke+T2z bRkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749140818; x=1749745618; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=frC5TwMhV/f34ENXgINk4bwryZOX0QIG0KIu5oqBjUU=; b=JUrUSg+DA7qo0O0InnifHvaip4arr0kQ71hzFQ+Tp4c2BjMTkluSsjBQwEW4oY6+yf UxTnnMy58ZpJkpIeNhQEMSsxxhE6/aQtGJ/P4GccqH6EPYzuAnFKot3pY5wON6XT9zHT xtGVsGGTQMdSSxYKVwuqKBb1QUTsl5SIIcDqSQioJx4d9omfusJkXxvrUVr3W2iX5W8d SxxnJhHlzk0sMK4OCcDN6fpGvtBIm2PBfVL6sFKABcCxm2qBwBsmPONb2r7JL/ddi3pV JKKg6o2Ky8LRY9wz8PmCSj/v1xywIHPpsszE4zmjsSMN7q9p7XS3mnjb16pe9IkLB7Ym S2uw== X-Gm-Message-State: AOJu0YycxyjKlK+g1iStZFfjAGL3eAp4u9c504dDOSIoOHlShGhI5Epg EaRBBwcABAjlMiURDgbN81LY6xSSSIscFVhA4a14HAGJODsDImp59w4nhopgJsYankI= X-Gm-Gg: ASbGncvpv6TUJ9diQo7whMAIX11DrxTjnd4rAdFQFe9t0vCuscEbsfewTOOt+G+ZIAa Mtzx/2uyiitxkPiWF+hAmRFeybBBJdZ5jCHQ0Mbkpe2dfkvQ20lvnhKIjJlbOnfQgQV3qWLUpCP OdxD26Qex0brlKUclN4kyRP8VzT0DWy8LgIWO2dzfh2RAtLk1A/iwc6SrY2L4TsO1jLYGGCqIxj jE9S4CfWkkJzUJ8jko8jJxKclM+8Ck42MN99IQQwumShXU+8wq4HyvG5Sny+dW5tKF8wfrXuaDJ RQmQ3ne1LbeeTuiT8wy9SohTtrxXNH+wmkss7PP8LozhGe//BkkP X-Received: by 2002:a17:906:4794:b0:ad5:6dac:ebfa with SMTP id a640c23a62f3a-addf8fad78cmr730833366b.55.1749140817672; Thu, 05 Jun 2025 09:26:57 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5d82dd12sm1299487066b.58.2025.06.05.09.26.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:26:54 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 525275F82B; Thu, 05 Jun 2025 17:26:52 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Manos Pitsidianakis , =?utf-8?q?Philippe?= =?utf-8?q?_Mathieu-Daud=C3=A9?= , qemu-stable@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Akihiko Odaki , Dmitry Osipenko , "Michael S. Tsirkin" Subject: [PULL 10/17] virtio-gpu: refactor async blob unmapping Date: Thu, 5 Jun 2025 17:26:43 +0100 Message-ID: <20250605162651.2614401-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52d.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Manos Pitsidianakis Change the 3 part async cleanup of a blob memory mapping to check if the unmapping has finished already after deleting the subregion; this condition allows us to skip suspending the command and responding to the guest right away. Signed-off-by: Manos Pitsidianakis Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20250410122643.1747913-4-manos.pitsidianakis@linaro.org> Cc: qemu-stable@nongnu.org Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-11-alex.bennee@linaro.org> diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c index 71a7500de9..b4aa8abb96 100644 --- a/hw/display/virtio-gpu-virgl.c +++ b/hw/display/virtio-gpu-virgl.c @@ -155,7 +155,32 @@ virtio_gpu_virgl_unmap_resource_blob(VirtIOGPU *g, * asynchronously by virtio_gpu_virgl_hostmem_region_free(). * 3. Finish the unmapping with final virgl_renderer_resource_unmap(). */ + + /* 1. Check if we should start unmapping now */ + if (!vmr->finish_unmapping) { + /* begin async unmapping. render will be unblocked once MR is freed */ + b->renderer_blocked++; + + memory_region_set_enabled(mr, false); + memory_region_del_subregion(&b->hostmem, mr); + object_unparent(OBJECT(mr)); + /* + * The unmapping might have already finished at this point if no one + * else held a reference to the MR; if yes, we can skip suspending the + * command and unmap the resource right away. + */ + *cmd_suspended = !vmr->finish_unmapping; + } + + /* + * 2. if virtio_gpu_virgl_hostmem_region_free hasn't been executed yet, we + * have marked the command to be re-processed later by setting + * cmd_suspended to true. The freeing callback will be called from RCU + * context later. + */ + if (vmr->finish_unmapping) { + /* 3. MemoryRegion has been freed, so finish unmapping */ res->mr = NULL; g_free(vmr); @@ -166,16 +191,6 @@ virtio_gpu_virgl_unmap_resource_blob(VirtIOGPU *g, __func__, strerror(-ret)); return ret; } - } else { - *cmd_suspended = true; - - /* render will be unblocked once MR is freed */ - b->renderer_blocked++; - - /* memory region owns self res->mr object and frees it by itself */ - memory_region_set_enabled(mr, false); - memory_region_del_subregion(&b->hostmem, mr); - object_unparent(OBJECT(mr)); } return 0; From patchwork Thu Jun 5 16:26:44 2025 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: 894177 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp42708wrb; Thu, 5 Jun 2025 09:27:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWuD6WkpVt1695e+W5rvN1m9Q4OJZdpYDr5qG+HWhO9Y41Ox7VyjWtkmK9EQ6utULmlnW5ZDQ==@linaro.org X-Google-Smtp-Source: AGHT+IFPmBVNATilTJ1eQ2bFmj5WuRcb3lfj36+0jBhBWSJaj6RP/+eftl6prclPyK5MWACJyeJ+ X-Received: by 2002:a05:620a:f11:b0:7d0:a128:e30a with SMTP id af79cd13be357-7d229847ademr41261785a.2.1749140858132; Thu, 05 Jun 2025 09:27:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749140858; cv=none; d=google.com; s=arc-20240605; b=cZzsm+xysww07+TCRAfjW+KCuMw0A5QkVb+KHR/4tuRbVuYrJJ9rNkMyrhzq6CarWm 5XiPQp2M1YlB1JRrqgSuqDELLXvlvm0ee6lrP7x91IQXRwSAPSDs8AQDJ+MqYR0O2UXD 8w7BO4MmCCbX5ZPquNUXeylbNGtVbuk25rEXcsDsRTmiJ6BucVrMXd4nnyDwBf/8XWjA wtev9tmgJ6dcjVA2CNQREp6yBdUA/eFPy8GrtjuOm5YzSs1p49icvjJx3wz7yxo29PZs 7jcxBvnhjmAKKPusHyrNAF6ql0jFEL6fKh5HJGEGSfwu/t2mGYYVjpRie8kWlTSxill3 p82A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eS23RxNURpTKdKnQyf0A+flfVwkpy5WMSUSCIe4V0wA=; fh=Ffm67alP4V5EPoi3kSVqst+jgLaAl+V7dohoiU4rrog=; b=f+MBKdbxrSQO50THdTBzsktLon5SUtFpsXC4P9la0n96SCYrTeuJV46AfOo8au+1Gi YNQZxzZK4EbHuh9v+4E9BPXfCgwsGof7xzCuDAbv0d3mQF7oLZaZRzivkE8PUoRA81Qh grYEU91OCju+IVGa7CwTdkRcBKJX8/ChnYxMpptfP5I9ZEXmI0eT00vurd4PzP9+2jmN Gxr99+lRp89IZYkIJHkgsUyFZk2VWSfo5sDgsKvl19IKietiLcByt/dIWKE3YTykwxtK WwjoFVEMOlaEQA8XYSm5vZd6u2aZWBFyNLiGvcv1ioQ+VaMyDbieOZKRsirsCtRN4lkC xD6g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XFJLHwYT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7d09a1e22fasi1719913785a.307.2025.06.05.09.27.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:27:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XFJLHwYT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDQq-00075U-1H; Thu, 05 Jun 2025 12:27:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDQm-00072B-DU for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:04 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDQj-0007xJ-Af for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:04 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-60766191202so115048a12.1 for ; Thu, 05 Jun 2025 09:27:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749140819; x=1749745619; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eS23RxNURpTKdKnQyf0A+flfVwkpy5WMSUSCIe4V0wA=; b=XFJLHwYTJAKwmUuyk98jaHEI8BtGduUuNr4hg+mKVtrj+iVEEKTk7pcybWMvJVRFaa ID53jyBwRcXq6iuKe4IkqaorZmpXW2gKxhB6OtQuuNXijR7p3eo0e/H89YIFw/dTuq7D y5dqA0LnrNvhP9nInc9BtBz4WVMvYk93Oe/AgChNN7jzVjnGzIidaARXLnS8EdM82eKp tbldyJkCjteOdNg0I9wr1dPD2y+zySt/s8A/bhZAYJ6ybc38daOcthZLYaGy8AWZk8nd FiYoVx5JI38CGZQehOhIRYkAJ0Sh59kYdgxnzMR360Gh1kNCN321Dmnf4Hhz+x+wwCaP E+0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749140819; x=1749745619; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eS23RxNURpTKdKnQyf0A+flfVwkpy5WMSUSCIe4V0wA=; b=jyKTjuBlYWSGEsFN/QW0Y+Y5IrOB0fK/6dOg+giWxMfjd59l6TvdKeS/XyjoLyuTTC YPtvLfFgUsny9/48+B1b6fVhhIXww25gYuQgYTHLaEblTybV59U4OE1nVlk86gbLukkI 7JyX65ITAZ3czQwy0ybB3b5/h1BhsCb3HqZsgj+e5z2U9jPTlQGQmnP43pah50zXVHZF xI/0mkTYVcXsHjofNZ7n4G7zLepzyk+PJXg4DY1tOz9AHUxP0WHsNgqhae4gmpYyIYFO AzvGaJvpFPlQqpSYaiEjP5M0umZClbe/Hp77hRcUJxYaHDN2i0qT1Tfi54KT7PK2+caB 32fA== X-Gm-Message-State: AOJu0Yy2Q0EblfUz55wFyi5bvj1sRxZNyhgIeyu9rLOaeA5VyWFSqm/U Wqz4RvkFfel/AFo168IQlIfQXYXeScuhuFPoSfKSdcyO5iHyVS5JlX/UT4/t/MPRjYI= X-Gm-Gg: ASbGncuDdQYhjPsg/OfpQmwShZSLiJRpOTdc+5UjzDqAki2f6M+eI6tZ/z6UdnGivoZ x+5E41FIlvnrUFdUj3Lc77f5MUzzDz1p7i/oR7mXAr3h+rv4KY2ztq/O9+nSJqmQcxX6P9iRL7K Hwifwx451SbGMUqffiMFHqY95kOTYJA6qYVY2rkME/ImnuCfS6ia6C5K9HTn5QITPrj/zOGPcc4 0xhgEhz0tD4aQuTwaTtzVi/VTE5bjBm876+4RP2j5UNbiICS1C2zlg2njcBhdozQji1Ptf4lJ9s vgnThaPtYd5Vj/o9FVlUHNd9e8wau0k/m/zTYc0Q/KykxZcMfm3i X-Received: by 2002:a05:6402:51cf:b0:5f6:fab2:9128 with SMTP id 4fb4d7f45d1cf-606ea15f54fmr7812527a12.19.1749140819476; Thu, 05 Jun 2025 09:26:59 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-60566c2b301sm10779340a12.15.2025.06.05.09.26.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:26:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 69AB85F82C; Thu, 05 Jun 2025 17:26:52 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Dongwon Kim , Dmitry Osipenko , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Marc-Andr?= =?utf-8?q?=C3=A9_Lureau?= , Vivek Kasireddy Subject: [PULL 11/17] ui/gtk-gl-area: Remove extra draw call in refresh Date: Thu, 5 Jun 2025 17:26:44 +0100 Message-ID: <20250605162651.2614401-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52e.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Dongwon Kim This partially reverts commit 77bf310084dad38b3a2badf01766c659056f1cf2 which causes some guest display corruption when gtk-gl-area is used for GTK rendering (e.g. Wayland Compositor) possibly due to simulataneous accesses on the guest frame buffer by host compositor and the guest. Fixes: 77bf310084 ("ui/gtk: Draw guest frame at refresh cycle") Reported-by: Dmitry Osipenko Reported-by: Alex Bennée Tested-by: Alex Bennée Tested-by: Dmitry Osipenko Reviewed-by: Alex Bennée Reviewed-by: Dmitry Osipenko Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim Message-Id: <20250214170813.2234754-1-dongwon.kim@intel.com> Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-12-alex.bennee@linaro.org> diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c index 8151cc413c..429ba914e0 100644 --- a/ui/gtk-gl-area.c +++ b/ui/gtk-gl-area.c @@ -168,7 +168,6 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl) if (vc->gfx.guest_fb.dmabuf && qemu_dmabuf_get_draw_submitted(vc->gfx.guest_fb.dmabuf)) { - gd_gl_area_draw(vc); return; } From patchwork Thu Jun 5 16:26:45 2025 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: 894181 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp42792wrb; Thu, 5 Jun 2025 09:27:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUVslVTN0BtwGtESmzlwTR1ErZF1OqiRs5sc7pJ2F1Q4qlWSekSBClpm3VLIj7mhkn03vV7Yw==@linaro.org X-Google-Smtp-Source: AGHT+IG6toEnbSMYxKxRlle4qmfkpJbGGa/e+xiwTJA3WA/sdwzvAIvgTMLTXHk9g4agHN8PoGSm X-Received: by 2002:a05:622a:22a6:b0:49e:5a3:efa8 with SMTP id d75a77b69052e-4a5ae5478edmr71522251cf.0.1749140866971; Thu, 05 Jun 2025 09:27:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749140866; cv=none; d=google.com; s=arc-20240605; b=SaUMyIAnM429sHLNLwksYnYrc8rViY9qlXh2TJG9+XNKKtAgImwtEpqafoAunnDndU JOaf8utCPAf0l7AYNsoB0/vWPuIk1kwGHexfKpVZdek2Udo4lu0XDuSF5hf8qsXA0vjw X2v4z7owpqOXCde/SJ+AgYOPYq/lrsV21xJyE06I8Tf5v7CNgH8NR1F/RoQt4jmVkqRl gi2ENNXUh+bfF7pMFDfzHG0yZUuwtt4DOc1AD4uCqG+nV/n8edhguGYaqZFENz+JK9qK ZscOEPmUB4c7JLD+gaczdnvU/9iZnro5ySlLC6O0wxof3KKnZKL8DUJzJbpbV+oVE8le snDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pi6A9pXASDCw44aREzrVY17X7X6kOk2Sy2xWECnN1gI=; fh=WUAup+jSAWbrJiCUIQb+ol9Uu6E0l5YRgtDIdPfrrH8=; b=UjwUXSo7Sov/ulHZYjbyNUWpJA0nWICPMv85eMtrtWoKFDoDu+0ppgHVpkqzJSQTsq svpx2cxETvCdS1eg95g8e4KIbyDEXX8RFf3Vl75FjexOfmeDHs6J+OSyWzexFGjv53Ib iuWxLKTS/fhQPkFTTXjdQl3vCZUEH1LuLkIx7B0mx5jcv0Wd05rPxWBKYPysMcmeI+Az 3aR4SWhEXiiKOVwkR93GQzzR09+1KxZmkfGBNIumKAtu9FMF1cl7vGLxxstNIrA5fesp jZ1Eq4gIDgqipmyrApxGd7JEe5aCW4ZMidml3nKsxE5Aq+uDYCu1yM4H5rj1yV6EbcjQ JZlw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h60IYiXO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4a4359fb5b1si175920911cf.202.2025.06.05.09.27.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:27:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h60IYiXO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDQo-00073W-54; Thu, 05 Jun 2025 12:27:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDQl-00071g-GV for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:03 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDQi-0007x3-QO for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:03 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-ad88105874aso189382866b.1 for ; Thu, 05 Jun 2025 09:27:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749140819; x=1749745619; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pi6A9pXASDCw44aREzrVY17X7X6kOk2Sy2xWECnN1gI=; b=h60IYiXOJceUNvJGYkNXJAl2X7LSc0z9qEZO9LV5DiA1d+9Lp2NMNG3P2xmJOhjjZf 8ogKhF0HagDrfETbdygZeccpjhtdKK72eA80mIu5zRk2r8GlrSgNtyVGd7KR3b5OZcPC sgT+b/bSDiBsU3dbXl555MHTHN5VkcHLqvMCQbjrsDwn3AhnRWzARWnK/kJPYrCq55u+ bo1cFUYuOXLRTzA7L5eudQk812FF26bFzXr8iNjHphlMLOM9KAYNUPMdbvAJ+FVNHf3e kt0aoaur+S8Eg2jgoPtSW/kJXQm6+y0G9n+OzntB4SfEtPlWO7uUHC9+gi3CcYVBGf+I jiHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749140819; x=1749745619; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pi6A9pXASDCw44aREzrVY17X7X6kOk2Sy2xWECnN1gI=; b=obBobml1FSpltYfAgnNAlwwuw2VAWncyc7St7Q22NiKjntXoXi+TSkKIyIidRSqTka Zp/+YM0cvn+Gf7yHT4XpxTs4XWrYotK/VTaemqQVjzWZXGCL1UD44sUK0MNz1BqPzivc bqVj6wg9KpNIjdmxUka2EoD4eVZqTWpWaPEopPeeZaTbO5WpcbR7W/pB2gw5BH+LUwFy wm6SmYg8uCbZkuL7vgigvN6olnOG8Zdea3gwV96RfETatFtsRR/TFajKvGbrR7fqNEV5 fcckSs7UFz8iDFBxiGTi1bMpf4A9dUoASCKXyrEad4VZD7XxU/yHwc2T8vGG3bn9nfJR d0Dg== X-Gm-Message-State: AOJu0YwFIru6u1gVcGVlM3dNL9NL+sWaPSVXJkhQaK7295/CP2U0avtP NCxV9A1AvTc9djOSTNt0Rfa7fDT3TxJrvnCm3rYEG14qcKlUKLIjOq0rXtfMnGHjn1o= X-Gm-Gg: ASbGncu4UT/32so+3Qs5UGHEGzZ22Z415AELqYATe0g2KXKGgMhWb0w5Qq0/6YD9Tof NiRtlR5U3g9v1qNCNpfEJ5L1zjpKEeWRyxzd41jwaFub5E0YR/u5t+cPMkEUCOIb6SlIStEvsti 31nUw8GG6COh8Qj1kmmdfHwSC+xvZcalvYKRddiXxDB/R6wBuB9jm6inj/yNWprRNVZ77HdKXWb oR7tgZSwpPI5tsp80UC4+Nlr42re5nZHX2YqpiVZEvgx1tvkW4MED2VP/rZTxzUxNaDznlb7tN7 irmCLZL2t14onhzcLd9kXoG/5s+SpSDKEeBjZRJK0zArnDDsv78E X-Received: by 2002:a17:907:94cd:b0:ad8:9c97:c2de with SMTP id a640c23a62f3a-addf8cec8a1mr719972266b.16.1749140818922; Thu, 05 Jun 2025 09:26:58 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-added7edf9asm364342466b.152.2025.06.05.09.26.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:26:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 8095E5F830; Thu, 05 Jun 2025 17:26:52 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Yiwei Zhang , qemu-stable@nongnu.org, Dmitry Osipenko , =?utf-8?q?Alex_Benn=C3=A9e?= , Akihiko Odaki , "Michael S. Tsirkin" Subject: [PULL 12/17] virtio-gpu: support context init multiple timeline Date: Thu, 5 Jun 2025 17:26:45 +0100 Message-ID: <20250605162651.2614401-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x635.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Yiwei Zhang Venus and later native contexts have their own fence context along with multiple timelines within. Fences wtih VIRTIO_GPU_FLAG_INFO_RING_IDX in the flags must be dispatched to be created on the target context. Fence signaling also has to be handled on the specific timeline within that target context. Before this change, venus fencing is completely broken if the host driver doesn't support implicit fencing with external memory objects. Frames can go backwards along with random artifacts on screen if the host driver doesn't attach an implicit fence to the render target. The symptom could be hidden by certain guest wsi backend that waits on a venus native VkFence object for the actual payload with limited present modes or under special configs. e.g. x11 mailbox or xwayland. After this change, everything related to venus fencing starts making sense. Confirmed this via guest and host side perfetto tracing. Cc: qemu-stable@nongnu.org Fixes: 94d0ea1c1928 ("virtio-gpu: Support Venus context") Signed-off-by: Yiwei Zhang Reviewed-by: Dmitry Osipenko Message-Id: <20250518152651.334115-1-zzyiwei@gmail.com> [AJB: remove version history from commit message] Tested-by: Dmitry Osipenko Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-13-alex.bennee@linaro.org> diff --git a/hw/display/virtio-gpu-virgl.c b/hw/display/virtio-gpu-virgl.c index b4aa8abb96..cea2e12eb9 100644 --- a/hw/display/virtio-gpu-virgl.c +++ b/hw/display/virtio-gpu-virgl.c @@ -978,6 +978,15 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g, } trace_virtio_gpu_fence_ctrl(cmd->cmd_hdr.fence_id, cmd->cmd_hdr.type); +#if VIRGL_VERSION_MAJOR >= 1 + if (cmd->cmd_hdr.flags & VIRTIO_GPU_FLAG_INFO_RING_IDX) { + virgl_renderer_context_create_fence(cmd->cmd_hdr.ctx_id, + VIRGL_RENDERER_FENCE_FLAG_MERGEABLE, + cmd->cmd_hdr.ring_idx, + cmd->cmd_hdr.fence_id); + return; + } +#endif virgl_renderer_create_fence(cmd->cmd_hdr.fence_id, cmd->cmd_hdr.type); } @@ -991,6 +1000,11 @@ static void virgl_write_fence(void *opaque, uint32_t fence) * the guest can end up emitting fences out of order * so we should check all fenced cmds not just the first one. */ +#if VIRGL_VERSION_MAJOR >= 1 + if (cmd->cmd_hdr.flags & VIRTIO_GPU_FLAG_INFO_RING_IDX) { + continue; + } +#endif if (cmd->cmd_hdr.fence_id > fence) { continue; } @@ -1005,6 +1019,29 @@ static void virgl_write_fence(void *opaque, uint32_t fence) } } +#if VIRGL_VERSION_MAJOR >= 1 +static void virgl_write_context_fence(void *opaque, uint32_t ctx_id, + uint32_t ring_idx, uint64_t fence_id) { + VirtIOGPU *g = opaque; + struct virtio_gpu_ctrl_command *cmd, *tmp; + + QTAILQ_FOREACH_SAFE(cmd, &g->fenceq, next, tmp) { + if (cmd->cmd_hdr.flags & VIRTIO_GPU_FLAG_INFO_RING_IDX && + cmd->cmd_hdr.ctx_id == ctx_id && cmd->cmd_hdr.ring_idx == ring_idx && + cmd->cmd_hdr.fence_id <= fence_id) { + trace_virtio_gpu_fence_resp(cmd->cmd_hdr.fence_id); + virtio_gpu_ctrl_response_nodata(g, cmd, VIRTIO_GPU_RESP_OK_NODATA); + QTAILQ_REMOVE(&g->fenceq, cmd, next); + g_free(cmd); + g->inflight--; + if (virtio_gpu_stats_enabled(g->parent_obj.conf)) { + trace_virtio_gpu_dec_inflight_fences(g->inflight); + } + } + } +} +#endif + static virgl_renderer_gl_context virgl_create_context(void *opaque, int scanout_idx, struct virgl_renderer_gl_ctx_param *params) @@ -1039,11 +1076,18 @@ static int virgl_make_context_current(void *opaque, int scanout_idx, } static struct virgl_renderer_callbacks virtio_gpu_3d_cbs = { +#if VIRGL_VERSION_MAJOR >= 1 + .version = 3, +#else .version = 1, +#endif .write_fence = virgl_write_fence, .create_gl_context = virgl_create_context, .destroy_gl_context = virgl_destroy_context, .make_current = virgl_make_context_current, +#if VIRGL_VERSION_MAJOR >= 1 + .write_context_fence = virgl_write_context_fence, +#endif }; static void virtio_gpu_print_stats(void *opaque) From patchwork Thu Jun 5 16:26:46 2025 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: 894189 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp43596wrb; Thu, 5 Jun 2025 09:29:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU5TfEzAqDaL/OIoEIBMeWeQFTVXsiOoBJk93WKLmoAzchRe1kB9Fs7CgPtIIaCKoTd3YhrLw==@linaro.org X-Google-Smtp-Source: AGHT+IHFicpHY+YORFzarb4w5NnX1q/ihCgViil3+cYr6icUMA2xNdLsab8b5wwyNo+w47ybJl5A X-Received: by 2002:a05:6214:e4e:b0:6fa:fcd9:35bd with SMTP id 6a1803df08f44-6fb08fcd605mr889016d6.31.1749140972964; Thu, 05 Jun 2025 09:29:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749140972; cv=none; d=google.com; s=arc-20240605; b=TqPgme8YhKgxFV6eZY8lk/rZVQRWgX2shChZb0nxEnZxFv8lVdzXmPArh1aIlZLj06 RkF86fh+c11dEjOPsNzVT1VxROqC7WJeimyP6Qi0mjyNGljkAX520/m7BOkRCW9C7V8U k543m3ELBLhKM/M/MhGehp6Gyu7K/pirbmIq7L8c9hHPMq1LquNCzi1EnZHUnWNEx6bh va3eReBhNLBnTAi8ts3cy8jNYx1QIord8X5xGQN8VeGOSoR8uRXvTgG3nl2Y8ptbkhD4 7ga+l5PZTedGVg81ZVD4mu5y78b1x9e16R7eYggeKWezvxa0aIJa4FFQcxokureEgLsE YoLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1fvuH8HvAQx8/p/uvR6oOVun26lgz7dGSugraby/u8k=; fh=UO/vamEbGyH2emBuIB9/1oUmkv2/VSWAuhTvx6ZbGw8=; b=VJyKcPo/Psm0iXOjFpEfdjZcOWUEgTdvBG7dyr5Lw7PQ7R31b/FEnzBF5tAspY3Vhc Myp7HqK+CpQuzt5DApBceRNPclhB43BesbiMduvkquSFNKS3Of6T5RPpa1HViHjzEcUy KxX/jJ+xP1VGX6uyUYpDN/A3PGtAjpVupFfDvG+tcUbN1dA51fNwloXaUv3jzhCL6r5W Gz5A8QVklKpYQen7HSYoduw3kjwbEOVAHvdEqOZCXwMSJvvLREI6sw++/RLlka/q8yNk qUPrGWwLiweYemVtAqTeoIgnbS5iBXwcxKXkOBF+YDmNpe70A48c2qt3kf7orLAVBqBB zTwA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="x/0Q4efT"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6fac6dcaf45si173010276d6.160.2025.06.05.09.29.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:29:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="x/0Q4efT"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDQo-00074G-Sg; Thu, 05 Jun 2025 12:27:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDQm-000727-BW for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:04 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDQk-0007xh-4u for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:04 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-ad89ee255easo206240866b.3 for ; Thu, 05 Jun 2025 09:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749140820; x=1749745620; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1fvuH8HvAQx8/p/uvR6oOVun26lgz7dGSugraby/u8k=; b=x/0Q4efTfCCpsVj0Ram3oLbfU+7C0EKlA4KyC146Rt5hQJabboPM8O4KgHVM7Uo9ub 6DO5osh202N6co/3eyrTxMYMSS/xMQMMAE/OlqiQRoMg62IK9aRWitQlAde5RSDr0lXo 7KX+UtDBf0B9CFzySv8rK6F2ne09Xl05EeVq+8cipd/ENNyVc7nokTrz6Kp/HRx2bxQv FGseFF1cjRXaJTvu6f1C4SA3aDDX/xQoBsmBM84zjbQNIMzaFF5dkPcNflpjxfiMo15S bjsJJ0TbNx6NN+nYh23sqyqGkC0XjrIVeaYG+nbqaU1CkyuETKqaVfeNa1KDQj/08HwJ TlJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749140820; x=1749745620; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1fvuH8HvAQx8/p/uvR6oOVun26lgz7dGSugraby/u8k=; b=go6lfX+v3LkYm1OSY+1u2ySF7UhBifRGq6/OcOf9a0KOTK3D+MY3Axt7UWT96HRAXm m9zR6qHls2Q25GwloYzTFxKnBoYUxOUnLtc2naX722ZUDPx3ZQWqQ368YltgB+/Xkb+5 TBVxsBoivytCm8oK1se5S5YsalH9RXIRRueiXL3hv02ZwGK4+39nghYc0crcD50U0VD3 cxAkrVZcMovulLviDb36/7EJ7ZPcct+wCkE7bheNtI0GrJpQgyBvW2BB16sVpOf080tN UKxf2cXEUKoCySnh2HiG+ltD4++B0xj+S8Xr4/sx3bBirjuiz/KdhfPdjQwtJlMvFjKd XsLg== X-Gm-Message-State: AOJu0Yxl+23ksMalH0sCMoBDpsjY0WY/A6MC9B6mdVNNJkl6Hdw/Vp5k /63165m9XRrvQu4VUUa7ybCQ6RFHLbqiJM7l9vtCVAWM/XpdN07Ke27TCUvpiWTpTxY= X-Gm-Gg: ASbGncvs3UIeJEiMegzLS++WlYw92sUSrqdb5bF7F0aqtZwEHhHGc/9po4aTX1vaAdB gQ8gP6VlxGc+qxxR7aYq2fbtHgJeD1KHUR+hN7XHHVIADyyCeeUfAbktryD7+t7A05vFK+Fc7Q2 KYcEB3fFFixeuLTBZf96tnyNo2RB/8KyQCS0GI6QlrAAzDOykQPbXc2wnsC61ljwnY+/eAFk3cX M/16zdgS7o3NhpBJoRUXx33W+DINmRagYaVNi8jRb17gAWA7Z58rFsNwifwYQ5lWzvvn14abbSK Y/p+fL0Ts5WrAAqtk6RBjX8BR6VT+jMpX7VQ5lNVIlPeWaBh07DA X-Received: by 2002:a17:907:c15:b0:ad8:9e80:6bc8 with SMTP id a640c23a62f3a-addf8cdbcd4mr705086866b.19.1749140820136; Thu, 05 Jun 2025 09:27:00 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5dd045edsm1275290366b.119.2025.06.05.09.26.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:26:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 979495F831; Thu, 05 Jun 2025 17:26:52 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Paolo Bonzini , Peter Xu , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 13/17] include/exec: fix assert in size_memop Date: Thu, 5 Jun 2025 17:26:46 +0100 Message-ID: <20250605162651.2614401-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x630.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We can handle larger sized memops now, expand the range of the assert. Fixes: 4b473e0c60 (tcg: Expand MO_SIZE to 3 bits) Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-14-alex.bennee@linaro.org> diff --git a/include/exec/memop.h b/include/exec/memop.h index 407a47d82c..cf7da3362e 100644 --- a/include/exec/memop.h +++ b/include/exec/memop.h @@ -162,8 +162,8 @@ static inline unsigned memop_size(MemOp op) static inline MemOp size_memop(unsigned size) { #ifdef CONFIG_DEBUG_TCG - /* Power of 2 up to 8. */ - assert((size & (size - 1)) == 0 && size >= 1 && size <= 8); + /* Power of 2 up to 1024 */ + assert(is_power_of_2(size) && size >= 1 && size <= (1 << MO_SIZE)); #endif return (MemOp)ctz32(size); } From patchwork Thu Jun 5 16:26:47 2025 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: 894186 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp43388wrb; Thu, 5 Jun 2025 09:29:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVApLAo1mgkPCO2AkE/6RvL8sZjU3WDTBO7gjE3g0EeTeKx4LRlFdWX3JxYYnr+vFm9CUetxA==@linaro.org X-Google-Smtp-Source: AGHT+IGfPfYHyBVu9CTXjv8eMOPnpUmrEj0FMmwnEcXlQdM2qajmY+hNF8xd70739uGDKa0ijRVR X-Received: by 2002:a05:6214:f65:b0:6ec:edf9:4658 with SMTP id 6a1803df08f44-6fb08f5dca7mr1323446d6.18.1749140945410; Thu, 05 Jun 2025 09:29:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749140945; cv=none; d=google.com; s=arc-20240605; b=SxUwDzql6jZnColStuqWAZCXIIEbPhNPb2v28tsiyatVBqTdGRUS4AGiIhkm/PLcAF UIJpBi7Y/eKfPmRLOujoxmpZ0hbJlAhCraNVt46rbqXihqfnf0o7DzUwHsY8smhkMeiN vWMz4SYHAvmhnhC4V4/GSuwz87RRsz/OYpdDnoDuzN4d7g0YrsL8oUsEZPyGwabbwE4Q HIoQSMFdL3uS/epVrS5nXPvn8STzgpXKtPWrrUWSmkb14WtfvIO7959G3SNHXfscwqky 1vzkMB6I45itobPBHl2BLSuUwQogD1nOF1ZP9G2I6T2HAJnGp/QhuhSfnNXXEcQv+xKG /QDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oHGL3HnA17njL8KC/eaOFn4nJH0BP5PaQATMO4Tu+sY=; fh=Kwva4PF4MU0CAODI8dO98oDU5IqpAA4cnlOSgFn3sAk=; b=ahjAng/gU0W0O+r9g339if2HyJ8HcmgftAyvtnnPeRidByU5OAUW9ry70R476PnCJl tA80zDfRm43lUcLlt/Nqs+6+B01EosZzvkUGmv4FhTT0wVQM2yevGEtyCJoj4PvDcXUP L8AwY1VwREhNovKXPZst/GGPjH6QDtLJDdE5zphyTrBZ3gMtEuonbOONKUDIGs43xbqw G8KbqvYoukpcQU1sNfr272iBoMa7+2DaQWxzC5Km5GRG8zToUPh929EizBhkQ53G207k h684FjfDHXOTedgNgWnT0EzL7VZ4ZgifjHEYzswP2JXmcXMDUTmYXgxbXi3+myVIKd5s nfuA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vXZ1KYSd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6fac6e8d7eesi177623076d6.311.2025.06.05.09.29.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:29:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vXZ1KYSd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDQr-00076G-5T; Thu, 05 Jun 2025 12:27:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDQp-000753-HV for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:07 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDQk-0007xp-Gj for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:07 -0400 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-60461fc88d7so2268591a12.0 for ; Thu, 05 Jun 2025 09:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749140821; x=1749745621; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oHGL3HnA17njL8KC/eaOFn4nJH0BP5PaQATMO4Tu+sY=; b=vXZ1KYSd7F03LjSWAgUuv/+GbInx4hOb7MNDM+FOoyc34lqBmXaVhs1x3g2hHnrAuK aQgi8Eqwxbbd3Mi9973s36kNidKpF4751ka0gyFS8IJYhMAIVvBaF25Q3rOYGV9cet5U RrDBYwge8ebIlwfRdt0wQDnOpChx1DkFTWyoASr+WHBnMvESBFuyO7gWcdYFogcTkMQ2 lFkzIBfZh5zps2KOZCRqdLUBXaYrAzWI7d9cORPSYjTsHIv95Dkpa3uheM/7MYiME4HF NxoVt0UiIFBJ35PVP3lZPH8cSpcltRnw7fuQ3jUK/rmV6v230Bg6d9gd9TJYedjIniRs W9Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749140821; x=1749745621; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oHGL3HnA17njL8KC/eaOFn4nJH0BP5PaQATMO4Tu+sY=; b=RvOsDo+i1QoHvY5ffesTzGCPCFGzk2tuKH6hsOeQo6CHootcekplhJ9m+zSTVSCVng D/1xqUDOP5EN/OBxgR5psu/9QtYNBB8JERy6ggT1KGAEKdqtcp1KvDE4iGdgcZOESnYN ZXTfhRB5lW7/5LE6Cg8zqP5/ih73/xKb3XQd8PrArzICYqNu8vu0Wr1pJp17H+pqpz5V V5UpkO2cpedJ27Iac2yajAA1xk7wahX5npvSLrfwFYq4ZmSriACJ1okB60T7owzzTHZX eeGlELeA91rfVGHFebiRI1ZMw5i8/NKAe3zlw3ayQbuoa9reepvtfXCBw7tcNB2IW/Ah +k6w== X-Gm-Message-State: AOJu0Yy+BMsvD9KMpy8wSK18Y4VLyNVlcs+QmBE4hsZA3eyEl0GdZBuD UAcJbbr68SPLhWASxF0XMlCUKvVveLLuDhMn72T1r+iSVqIuE4y9Eg4FxFLGUx+orU0= X-Gm-Gg: ASbGncss7e6rRk7BjDQjCFuZAQtXjy5jyKy8Sgbf4qOauauzyLN1uDxzSr1iIC8eXIB 99G5sS3IvLdoiO0L24PMt+V/e0l7sfxipLXeye2hKCLrZqChu5fHosvgO7WhyzUANTdO7jfaFT/ Zic3x5apb9d59j+foFqmW70lzRL6M2KthAmCaorqpUz2XVDaFncvhzytBVakTE4uBZ6rW/jD+Z7 d9qdTMCk8Y8G95/HPuDCfBpt5wJUTLdqJE1c7SlwkksbeOJHxwgIE+fEGe83tsIxC1OIle03nuk vZYg+0Jsvimqd1+6npebi4ofcSB/4bWguw12fEd6vrWKFk7uTuZG X-Received: by 2002:a05:6402:51d2:b0:607:4625:98f5 with SMTP id 4fb4d7f45d1cf-607462599bamr1537056a12.23.1749140820658; Thu, 05 Jun 2025 09:27:00 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-60699731f06sm4651671a12.27.2025.06.05.09.26.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:26:57 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id AE1915F7F3; Thu, 05 Jun 2025 17:26:52 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [PULL 14/17] include/gdbstub: fix include guard in commands.h Date: Thu, 5 Jun 2025 17:26:47 +0100 Message-ID: <20250605162651.2614401-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52c.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-15-alex.bennee@linaro.org> diff --git a/include/gdbstub/commands.h b/include/gdbstub/commands.h index 40f0514fe9..bff3674872 100644 --- a/include/gdbstub/commands.h +++ b/include/gdbstub/commands.h @@ -1,5 +1,5 @@ #ifndef GDBSTUB_COMMANDS_H -#define GDBSTUB +#define GDBSTUB_COMMANDS_H typedef void (*GdbCmdHandler)(GArray *params, void *user_ctx); From patchwork Thu Jun 5 16:26:48 2025 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: 894179 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp42710wrb; Thu, 5 Jun 2025 09:27:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXQkxU1Jn9R/PYRepvpg8YkSujQjx7H7S9hz23B0/VdhHmf9kpnpoOhbnX/hyJ7iV2GyP6UvQ==@linaro.org X-Google-Smtp-Source: AGHT+IFtY8A1xzYHudf8PV845bqpj/VqHnr91BuuIAL4KdXa2Irox1NdZCtz7BAWK27RvkTKJflJ X-Received: by 2002:a05:6102:c11:b0:4c1:91da:dac1 with SMTP id ada2fe7eead31-4e746d021fdmr5672972137.6.1749140858227; Thu, 05 Jun 2025 09:27:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749140858; cv=none; d=google.com; s=arc-20240605; b=dePSobnTXnHlltNrWDiLDR1zRZcU8Kyd1wC7nICHBvPrrf2KoxzO7fU2QGAzj30rti Lcgfv5wfSZq/suiZnHeFXOXOEfqgVMQs1KQdr2eLttS73tWXS8CqT+YOz5W3yWC1fojV EJnCPYyHtns9J7lwhKjIy9smI78XhyUUbAk02Xmw1jr7QGxoRcSACui++g3U6hvI6rtJ 6mJbUODuNG+1G7dlDai0vxJmu2W2oyyb0RPIL6XORUph6dZ1pPBtGn7VWLFIeP99okyY xc322FrVHNM59mu5E8VsDMMSeG1DD+oXS5eoJLSnCLcaMkfWGm/hMrsHgJyKZEyg8M2l aZxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tJVseqRaD6Laof0iJpbCH6iD9WwznG/NmTZUaRCwaMA=; fh=Kwva4PF4MU0CAODI8dO98oDU5IqpAA4cnlOSgFn3sAk=; b=bZGZS0YT7frqUluh6AUbO9uPT7bdpwts2Pz2u3LjxjnAA/6R3AETgXwVPdpY3zY2ro IM4Psiq79gOXxdLzZt4O1L4NNc4WOWrBhgj00207flZNdnqeRMddUPJpP5pexP41Mlwg vdxt3qddT3QbS10dd+LAuvUz2fLkcZqXT4KHguprXhliiwVKRVWTA4vodaBX+tLAAhvc zDqy40qiCxeZ8AYA5FCvcYg7UPnV05yD0VMrvAtAgjq0lKNvim82hTyLEL34nvXZyhzK 6KykWgm61xCUwSMU55KDjzdpBdAOCXN26+/OZe1Uu4hmIEOgQlhGH68cp9TXVB1IK750 K6Ng==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oFicJmi9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-4e64e9e5dbesi5163456137.256.2025.06.05.09.27.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:27:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oFicJmi9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDQt-000773-32; Thu, 05 Jun 2025 12:27:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDQn-00073A-4w for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:05 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDQl-0007y5-7D for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:27:04 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-acacb8743a7so211291566b.1 for ; Thu, 05 Jun 2025 09:27:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749140821; x=1749745621; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tJVseqRaD6Laof0iJpbCH6iD9WwznG/NmTZUaRCwaMA=; b=oFicJmi9XhFx04le9Jr3yawLTBS3KSDvqc7aQ+35SlAqhrNuHekgJPc3O/cpXhX5wd UnuA3mgUSxqWTUggVi6HaJuuuDGmiuKpK+EbaZvkglU/9A8r4v1qjOOCWUpDWY8dWMYL lI/y9/uiy2XaBPjV/U9NW4ju/VKipY3M2+Ap8WS+jenZlWotRC7kVRzFe6xPf0daAc+Y Z8yM9zMlB2r7nnMzApcVeqFwG848ryQvIDXP6/QwEMUEuptal7xCkT9q5BpwZuMRW0g4 ws5/5f2iE2YTeHxF8ZsAEmN5WW2EbdhQPbBB4EBUs6e9OndPC10IAm84PwaDeVBSA+El 6BIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749140821; x=1749745621; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tJVseqRaD6Laof0iJpbCH6iD9WwznG/NmTZUaRCwaMA=; b=ozXiCVzOswAeXH07tt3rY4x0A2ugI28FZTnEx1ibkpPuSE6P9dxVjC09VEodQyfEnl NeAzTFqpXXHqHLnzghQDfkUctfIEnwMErNqDiIdIbB0Q1mO9VZ9goOI/EZtcPwXXEXjH sh2DlDgsGfx86mOJoUTugj781KgWfN7w3jjwGYpN5G7XA5Yh08lofb3K09MZvYwgbAPW LZFgmiGAb8vy7xiMcQOqq2vbu6IkQ6bWG/TmxA3AIsAYFwqSiV+FGvy5hAKqnmK6FoAn Qhd5CKHJfSsBLmj0wRpemW4+4BfK7MTH6vrvYu53wLwPfIdaPAFyx7O7fSmvzcZTz70k BoqA== X-Gm-Message-State: AOJu0YxMcZcaBZnkBKXs/2EcUw7n27UDrpSySDQcRtrQ7IwxI/QLhC34 bOQR8mg4DB66olCU1GhB47BQsNRwuCrHqOiku9WmIuMzY3ZVgHlvRFrOKmzC7sXqrl7KJGhVEmR ybbW9ea4= X-Gm-Gg: ASbGnctS7xanVtjaoFCwWui0R4VOmqKEqtgaO7UDXw4fBpYATYO4mBe9RHa8WrqQndv 9z1Hkr7a7oqDyBRbRSbp/12nNOJltfEwkEITaBiz/QrZnRGBHLAq5GlQP3RoaFxw57KEuUCks/d bsu36qU72mxc5gYFbEX9en3jFXN/t7D5Ok4SY//ys9kvqm4UyG8S9T0hvYQo/42f3OzwgP4JMy3 M5FSby5GJRb5osF920ZtY2pA9BRdcFNBFYWRZQFbY37RduSEQsVEbcE0rYoBEfKyonxO1GcTs1X 6D1feTUln5CfglqZBM2IylUZfRg1m2txlc8UHsDa2JpvCyzrI3tx X-Received: by 2002:a17:907:3dac:b0:ad2:2fdb:b0ab with SMTP id a640c23a62f3a-ade07901184mr448467866b.29.1749140821295; Thu, 05 Jun 2025 09:27:01 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ade125a01c3sm79920566b.95.2025.06.05.09.26.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:26:58 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C3FB85F832; Thu, 05 Jun 2025 17:26:52 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [PULL 15/17] gdbstub: assert earlier in handle_read_all_regs Date: Thu, 5 Jun 2025 17:26:48 +0100 Message-ID: <20250605162651.2614401-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62e.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org When things go wrong we want to assert on the register that failed to be able to figure out what went wrong. Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-16-alex.bennee@linaro.org> diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 565f6b33a9..6023c80d25 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -1343,8 +1343,8 @@ static void handle_read_all_regs(GArray *params, void *user_ctx) len += gdb_read_register(gdbserver_state.g_cpu, gdbserver_state.mem_buf, reg_id); + g_assert(len == gdbserver_state.mem_buf->len); } - g_assert(len == gdbserver_state.mem_buf->len); gdb_memtohex(gdbserver_state.str_buf, gdbserver_state.mem_buf->data, len); gdb_put_strbuf(); From patchwork Thu Jun 5 16:26:49 2025 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: 894193 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp46746wrb; Thu, 5 Jun 2025 09:35:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU/ogIgdAnSS7ZKBeiS56MK39Mh77zndAiB18zHtEFCUtpMCEt3p6uMV0nT7tiNtzBfqMq3vA==@linaro.org X-Google-Smtp-Source: AGHT+IGFNJ4zhmwgv/zTp5m6JuHRo8Sya5KuC/TDNe/H/hIBPb1e+aOmsxyqBZ3GUnFisqH0cmxK X-Received: by 2002:a05:622a:5a18:b0:4a4:30e7:777 with SMTP id d75a77b69052e-4a5b9a2585bmr6731311cf.12.1749141326367; Thu, 05 Jun 2025 09:35:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749141326; cv=none; d=google.com; s=arc-20240605; b=AI43BOqTD28ObuiJWLXRDBfy8Diqqxw0gZT2e09aNF86asKp7aFYpS5kTI7Ua1O2zJ yWXAWHWwYlpU5q11rS1uuUmgGLLy9Tap6X20UtepZqTCDoMy12bhNywFS+XDEn9cYKWu wLsbD/zfbzEHMZ9tKCTw+2CPBgJd1IP8oMmKz2erVo0m1OVAGZ7LCTa7LLa1XJAYGCvr ELnNu3fhRX3Rva7SWWtco/tdgFk3/l7hXBpU4iUfAe7/Z2z0rRifETO4RqcDBVjMva7k Ahnd/GHNTOUYjIogWDIFOFgOjIPrjxCvubDz2wnBm8T39xHlxquy64coFij9vg7Mmm1+ hM0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fx+h3SENZYZcIW0j7iWtLqNsUxD93YY5SPZuT4qG2WE=; fh=AufWJgNV0qGtt1t8yDU0KO3p3x7S4oVYNuZZ808NE4A=; b=gvs0anRmtkueAXxAa5pU74eX+pOVcTOHgiUVbsVnhPsEgiXgbm1gQ/OfR2Wry4Nr8p 7WobXgG6A9Tkz++nEXZh+VEIfLA/xgpGvfSJGMH89OvQqgeGpIE3vAXSuRI/icghF1dv Z4Q+Lxj8TU6AYoWuhSqx2BhDVduCRUE/sTxwiFHuPi0GPzMD9dg6/Cfjv8O3nLGxExUq kJCIfccHXsQTqEIABZ3yYTAHlOtcM7biCuCg2GYoaE2CNp+9BEWlaNefr7Xm4yGbaqTt 9AWN/pvaeBlJJRjXzB2UjjRktwTa80H9v0DdfGbkBL43x+wtrCpQrfsJdekqdhdo28pO VtRQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zZJKRzAA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-4a4359f7fe1si174383581cf.324.2025.06.05.09.35.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:35:26 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zZJKRzAA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDYe-0001lR-4y; Thu, 05 Jun 2025 12:35:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDYZ-0001iJ-9J for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:35:07 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDYX-0001xm-9X for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:35:07 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-ad55d6aeb07so231206266b.0 for ; Thu, 05 Jun 2025 09:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749141302; x=1749746102; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fx+h3SENZYZcIW0j7iWtLqNsUxD93YY5SPZuT4qG2WE=; b=zZJKRzAAPN5nr3zqJH5Ugp+Z193i38dxDLpXfN/lmlq9kr7dMglkfAKgftVbLnOpBF q1W5VzoO1QbLUrPPy8uEb164jpwdTjf9jTBpCXjVMcq5CoOF0Y02WtxLtimk+W7YXHQP YdSHGxftvHd2pGwGQnupYnxlzdchHAUbrm4XUeNMLu91z3rJbat9JjzpPM+g7T1gO4HE JaSv4Fk3cIE4A3c/JL3XaTc/ywJH0Vc9r1UQYgFd0wA8Sbaab3eK+1UwRFpTMzHZqKSL c0iAd7TxvvmAn9iyK2P7/loazOPao8ue007DoJ8jKDXC9raDBZDp2C2j8olaX/Zswm3M TSWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749141302; x=1749746102; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fx+h3SENZYZcIW0j7iWtLqNsUxD93YY5SPZuT4qG2WE=; b=qR5/I/ss2H8xGRmLn06Dedk9pFOr/nA7MyF6SiWvuTt1pSUpLYmepg/cT9O/W0QyF/ BptOGv0E67UqB+BNbr9MO8PQV7PaV6a/3WrVrhQanV+4ZD5w4vmovXVoB/+TTg/tfJa/ AZlw2N1cw8QHvda447AXjwLwwvAXIdhp8y4P05ZhM7NM/aZxLAEb/6RCTqOkFfczKj3f Qp6JfmxV39B7fLXzeASY+Ozl5g7xBCLf3JaLoYSEsDSVfNG6qGIC0W6TxWmu3uVVsL0R 3Rtrtffjq7fUy745iv92yttmal/z7qZ+1NiRJB+5AtcCtNrz79xECWfA4C46hWyMMi0p mVvw== X-Gm-Message-State: AOJu0YyZV4wom33CXyIfLtqLTYBsq8HJdkoTB8deXn5lOPfXp33gJBQf lYb142p0a6KAYkJn9XnDPFat8cIuavZowjH3wF5O4MCF8LrjVFvtaolQh1aIYAac/t0= X-Gm-Gg: ASbGnctwQdJLVmXpCwFk1NRtAsQtVTaz4SIvxgrKecpVtTG0cKHews5r36K7Ucj1TWO K/TgKXs8x4lwWBJEOublUKJV5/qchAkPcLuaPk0Gc8AjdSPEMw+LPMNcCrhjFE3R5cNT8OxsfcW joThto8tEd46cramUQz9lX7WcXc3lSEzYSyK9GzuyWatSbsmuYz0m/XFoABp58Cq0/87ALT386p FBF7eO0f3As5bz49i+VAoJekD5KCbEV0fhL3987rwvQXW+p8SAtfkxVBn0+i+m6GksCY6XfURac tlErvPHiOTshV0UKD8nwp4c53ny6fb7/UcRsUAfYQB7Mq/TKrogV X-Received: by 2002:a17:907:7f8b:b0:ad5:1c28:3c4b with SMTP id a640c23a62f3a-addf8fac686mr721005666b.52.1749141302469; Thu, 05 Jun 2025 09:35:02 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-adb35af4456sm1079335766b.182.2025.06.05.09.35.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:35:01 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id D99BB5F833; Thu, 05 Jun 2025 17:26:52 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Dominik 'Disconnect3d' Czarnota , Patryk 'patryk4815' Sondej , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= Subject: [PULL 16/17] gdbstub: Implement qGDBServerVersion packet Date: Thu, 5 Jun 2025 17:26:49 +0100 Message-ID: <20250605162651.2614401-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x631.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Dominik 'Disconnect3d' Czarnota This commit adds support for the `qGDBServerVersion` packet to the qemu gdbstub which could be used by clients to detect the QEMU version (and, e.g., use a workaround for known bugs). This packet is not documented/standarized by GDB but it was implemented by LLDB gdbstub [0] and is helpful for projects like Pwndbg [1]. This has been implemented by Patryk, who I included in Co-authored-by and who asked me to send the patch. [0] https://lldb.llvm.org/resources/lldbgdbremote.html#qgdbserverversion [1] https://github.com/pwndbg/pwndbg/issues/2648 Co-authored-by: Patryk 'patryk4815' Sondej Signed-off-by: Dominik 'Disconnect3d' Czarnota Message-Id: <20250403191340.53343-1-dominik.b.czarnota@gmail.com> [AJB: fix include, checkpatch linewrap] Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-17-alex.bennee@linaro.org> diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index 6023c80d25..def0b7e877 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -28,6 +28,7 @@ #include "qemu/cutils.h" #include "qemu/module.h" #include "qemu/error-report.h" +#include "qemu/target-info.h" #include "trace.h" #include "exec/gdbstub.h" #include "gdbstub/commands.h" @@ -1597,6 +1598,18 @@ static void handle_query_threads(GArray *params, void *user_ctx) gdbserver_state.query_cpu = gdb_next_attached_cpu(gdbserver_state.query_cpu); } +static void handle_query_gdb_server_version(GArray *params, void *user_ctx) +{ +#if defined(CONFIG_USER_ONLY) + g_string_printf(gdbserver_state.str_buf, "name:qemu-%s;version:%s;", + target_name(), QEMU_VERSION); +#else + g_string_printf(gdbserver_state.str_buf, "name:qemu-system-%s;version:%s;", + target_name(), QEMU_VERSION); +#endif + gdb_put_strbuf(); +} + static void handle_query_first_threads(GArray *params, void *user_ctx) { gdbserver_state.query_cpu = gdb_first_attached_cpu(); @@ -1842,6 +1855,10 @@ static const GdbCmdParseEntry gdb_gen_query_table[] = { .handler = handle_query_threads, .cmd = "sThreadInfo", }, + { + .handler = handle_query_gdb_server_version, + .cmd = "GDBServerVersion", + }, { .handler = handle_query_first_threads, .cmd = "fThreadInfo", From patchwork Thu Jun 5 16:26:50 2025 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: 894194 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ecd:b0:3a4:ee3f:8f15 with SMTP id ea13csp46856wrb; Thu, 5 Jun 2025 09:35:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXUggDynUOqXdNE9skOKATaHDjYiEDV+BtnCeuj0BAkKDNg7UE7A/SnJgx4v1/zW7wvGAi1nA==@linaro.org X-Google-Smtp-Source: AGHT+IEFrzftQTBnLJN6InXQmXB5HReXtAWWhguoPHD0Vqgp6UUc+h0I34pQ2ynw1l2jl1r0rl77 X-Received: by 2002:a05:6214:5086:b0:6fa:cdc9:8b02 with SMTP id 6a1803df08f44-6fb08f5487dmr1896886d6.16.1749141337110; Thu, 05 Jun 2025 09:35:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749141337; cv=none; d=google.com; s=arc-20240605; b=IWxujO1qbotnp7wjLiAmXpgtCt7vC7j6J2iB3PWYxHtV40VcoZm2b6B2we6SxVaYYO XcZm/KKkw7dyXVk+BDydvl3HJkX93kVx3HM6IKB4/XYVhxBBESoth3pnT45NP4+w4j87 Na7mZy310ZhyurAh/QAC5Gu2S9MavXL0wCklYhVtWpRSeQHNS8uTD7DsgsgEkxeDOqQm 0EIr0QUqFXGs6yGowfugZeJio8Pc1aWW+AvChw4XFUT1PvLXgCIqMc6dg2ioM5AMexhZ HVB1QNUIAbv8VxGSyavviSo2g+gFa++cps+UEgh3DjAskJl/ZN4mTJ9AUZQKf+9I28Ky +O0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uVzzb/76JOFY7jHX5yCZIpFfAYYIv9oWrL8sx1vZiVw=; fh=ShWhkiTPQgHYNu8KEO8IvLzPMupL4zEhnNYTDsqjs5U=; b=WExoR1Rg4W6xprhZi+pvJz8BDOnxzrifKTa6ge/c7VaLM9okrFdWkNMx+MradPsZil 0Pa1oHiOnBVJSuxyuIZzMhyg7WsSkfm+0sAietx/BgM21sP7DSgVO1F8IU337kRMuLcU oKxAVTDyDhBnQ5my9ZEcWGXCzIRHwgrIaIyDWqf2PhL2oDoYr/AUuvF/JgfGfI2Ek6Px u8vZ9NisDDXALAYzaeDXbl9c3Gwk/RABdU4BQr58nKnVI9M1iN0ljPhed6xQjrRM2x3Z mybJSNvllNdT9ruJWUNN4EySiPBlWV8ee00FwwC7TDAG674GTupuxYTat75JSS2cn1qg JEsA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O33EUgDu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6fac6ec7e42si170239366d6.401.2025.06.05.09.35.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 09:35:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O33EUgDu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNDYh-0001mA-83; Thu, 05 Jun 2025 12:35:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNDYZ-0001iH-95 for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:35:07 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNDYX-00021B-9m for qemu-devel@nongnu.org; Thu, 05 Jun 2025 12:35:07 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-60768f080d8so122982a12.1 for ; Thu, 05 Jun 2025 09:35:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749141303; x=1749746103; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uVzzb/76JOFY7jHX5yCZIpFfAYYIv9oWrL8sx1vZiVw=; b=O33EUgDuNxSyJljJhqFroVIFQpgKLQ5P4yHGe4Ltd6M9Qg0W3cawU5qZfSS0FxkcbH /680NtJ2V83OEcxqfNQ1rp6fAJToCNkKF+wU5gT802Lq81ybOE6wqgaowWzvwqEBGtQc ymub6ubXYpaV2QDWJPQEyJX8SnXj2Ae3AJj/YrPaKvcg5O5E0wRCWpsPw162jmM/Yrcj R8PGuf8dgCiOBc8T73cmFSedJ3nqrsLSL7GC2hitANdG54lW+ddkHixXQc4kyZaVafrs F9N+KSsSuUp9RGOA+yGZ8rILW7mAzaRxTxCBrSSVBykqcnvTaKaBVcQCoIcD3j/GZ0kq pqYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749141303; x=1749746103; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uVzzb/76JOFY7jHX5yCZIpFfAYYIv9oWrL8sx1vZiVw=; b=KQeY4idsv5nIFyxv/9PIBiyakZE6HZ9ynlvXy4IJZndZ1dagGDTTuo61AXpkGGaM71 57wsTlwwehwmcri8JM8KaiQoh9jPH+t/pFKLPciE8kuomRFhIT+sA5+NFVHpS92o/lCG u49i5AqHYMS30Ilf7TGepVno5jP1HieZM5bHhP9F2d0FeaG7+KCu2AJo0rbtI94Gh7qm +8IcprfPjtflHAE3JftTTbK4qCUE2NX8OdBJVyo4TN57MeHXlMvc0ucl3zmmhm35PuC/ vV1OIvM36fzE5EzaAXuk3q6tuvkQxQpx1OB+FVLc/f8NBzCKUDEVbVfbhCp2skgsSaoi /k/Q== X-Gm-Message-State: AOJu0YzTJtKG34DcYq5+EuFQQ55iksyMflljLGt+6Z+OP2jov3rT7bJ0 4aVoS155rwfVLBB4sHK7RhWqraWx78s7Ydb73FRR9MpPZ7zXKsem6ycXgYOR5z0QGDAH4L7YgmN PrMR+OAQ= X-Gm-Gg: ASbGnct92R5VLFmd8eVtw7memvAf7Lz9+68an8a1xJWgONnQIMluriYsNXUkEm+ny5D s5L5ZesbFsatIeaiDNTubWaHn0xkOW1vdagmkl5UN2A6MZUdzPltVM1ZUe8KQ0VMk2PVof+eDTV 6GCDq4l9T9JlOioKx3576b8VtgMU3/18lJLpJ288nTEm4ZEFNOaSSXbbh6VsWybbtktXrLO/r/R jYyT5qod2LWpslHZhQ+hAv6NdHq04KVkqz2BGc54wJwogKQHr5aTsUudEb6oPqQtiTAKYXwwF+6 ZqavBw8tn/O/G0FOCKinopouLbalSz1LppV37EAK5n66+OJsjiQJ X-Received: by 2002:a05:6402:5248:b0:5fa:fcda:bf57 with SMTP id 4fb4d7f45d1cf-606ea3b6b89mr7300232a12.17.1749141302761; Thu, 05 Jun 2025 09:35:02 -0700 (PDT) Received: from draig.lan ([185.126.160.19]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-60730b1ec8fsm859243a12.43.2025.06.05.09.35.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jun 2025 09:35:01 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id EF49E5F834; Thu, 05 Jun 2025 17:26:52 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Manos Pitsidianakis , =?utf-8?q?Alex_Ben?= =?utf-8?q?n=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= Subject: [PULL 17/17] gdbstub: update aarch64-core.xml Date: Thu, 5 Jun 2025 17:26:50 +0100 Message-ID: <20250605162651.2614401-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250605162651.2614401-1-alex.bennee@linaro.org> References: <20250605162651.2614401-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x529.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Manos Pitsidianakis Update aarch64-core.xml to include field definitions for PSTATE, which in gdb is modelled in the cpsr (current program status register) pseudo-register, named after the actual cpsr register in armv7. Defining the fields layout of the register allows easy inspection of for example, the current exception level (EL): For example. Before booting a Linux guest, EL=2, but after booting and Ctrl-C'ing in gdb, we get EL=0: (gdb) info registers $cpsr cpsr 0x20402009 [ SP EL=2 BTYPE=0 PAN C ] (gdb) cont Continuing. ^C Thread 2 received signal SIGINT, Interrupt. 0x0000ffffaaff286c in ?? () (gdb) info registers $cpsr cpsr 0x20001000 [ EL=0 BTYPE=0 SSBS C ] The aarch64-core.xml has been updated to match exactly the version retrieved from upstream gdb, retrieved in 2025-05-19 from HEAD commit 9f4dc0b137c86f6ff2098cb1ab69442c69d6023d. Link: https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/features/aarch64-core.xml;h=b8046510b9a085d30463d37b3ecc8d435f5fb7a4;hb=HEAD Signed-off-by: Manos Pitsidianakis Message-Id: <20250519-gdbstub-aarch64-pstate-xml-v1-1-b4dbe87fe7c6@linaro.org> [AJB: expanded upstream link] Signed-off-by: Alex Bennée Message-ID: <20250603110204.838117-18-alex.bennee@linaro.org> diff --git a/gdb-xml/aarch64-core.xml b/gdb-xml/aarch64-core.xml index e1e9dc3f91..b8046510b9 100644 --- a/gdb-xml/aarch64-core.xml +++ b/gdb-xml/aarch64-core.xml @@ -1,5 +1,5 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +