From patchwork Wed Jul 31 21:24:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815673 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp922978wrs; Wed, 31 Jul 2024 14:25:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXqR8TQgEupZ5H1tTsgLAEU+GWEWaqPcfFhMycRyNFUlAOiEt8SbQFhOyYOviQ8JKqF6XNSiSPXkIsLI1T3G2xi X-Google-Smtp-Source: AGHT+IHgPPQ0OSSjhtg5r53rfy3mT+ax8+Gv6KyDxlvrroXzUXb4aNWvz55R+uBSZ/7n4mX71HJN X-Received: by 2002:a05:6830:b94:b0:709:674:6e4 with SMTP id 46e09a7af769-7096b83ae92mr557469a34.19.1722461157549; Wed, 31 Jul 2024 14:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722461157; cv=none; d=google.com; s=arc-20160816; b=UKIwgt0mcWafSsPzyACBFFr3ejR/aG2L3t+FxYZh1G6tJSyAncSlw4U4SF/ss4rcyS V9UvWLWwwCRxNG2nlLRpvJ58u9Gu+J4iN2w9DyIR5VNDLpxKigQOn1dwTjE+IXvKjleK oM6j/xD8ENGJYkMcYQFj+xibTxxwhDVEYur0t5EuJw/v7/okWqNq8XMTk2tYpRlFKjvT mgs10lZLPa1r7fSNbKwHOO4svgJ+XVan8BfeJMAMtOCJB7CFGxILbhHK0WQgUkht9XEu hr5DUOGkQ1hOZsnzAeKOvWGPTPPho0wA/UE4sR50j7oZsQ7PeIq+AjNJRc2RBbJBdvhC nd4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=YsjYVkRSnsXvC6SnYIGaU9fq114orUELIsO6B55S/bE=; fh=ADixSG9ElpvNvhE8iTAdMizg2dtG0TYj8XBNEB0E9kY=; b=U2vPCDG7yydzjgustZV1jy4CKHlMwpVvnFxsSGReKW6JWzVsPSp070zrhDErRFih6H mysggiHd0wzcqhqKLLV+eDkdRfswAQQK92AJar4t4ZXhHddVbJZ5oUqgjyeKRU9KVjBK ystWl/kQVWI5yGjnNk3cv0EzJce6CVYy5nFkEa0QBAI1uJy6jefz59sxKNcatZSS1A+J yO7fULqK7IWWcuEDXKEybPLqYJJFhSxWfh0GC8kMJn6xUUjSk7bFdfbmlk0/G7Wk6OmV JR0+/dJMuFDRtM24t2aij+i1lC487+RsCqUBlPGX7CW+DzQKO/ZRVkQR1qPmUvXAhCdD ABfQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D+sAHf1t; 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-44fe840851bsi160153801cf.491.2024.07.31.14.25.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Jul 2024 14:25: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=D+sAHf1t; 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 1sZGoo-0007aR-Sc; Wed, 31 Jul 2024 17:25:10 -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 1sZGom-0007Yl-JQ for qemu-devel@nongnu.org; Wed, 31 Jul 2024 17:25:08 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sZGok-00029F-Uu for qemu-devel@nongnu.org; Wed, 31 Jul 2024 17:25:08 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-3685b3dbcdcso3469177f8f.3 for ; Wed, 31 Jul 2024 14:25:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722461105; x=1723065905; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=YsjYVkRSnsXvC6SnYIGaU9fq114orUELIsO6B55S/bE=; b=D+sAHf1tRc15AlYOT64pb0noWE6Nki8hSl57dwchUbPcvJjB/Uv3TtCntswti7XJBZ n0Fv5IjqSkzTa4fW/5oj/pWUOMlMKK0f0G+scfrmptL41yVElgx1NUeIoxlsacZo0a10 tfOADXF6AFUZi82kAuqpkgJWFbSNAZ5UVQhLPHu7rON7k8VtZF+6X/UNzV+8UPF2j37K FMq/JPUr7l7zSD8GJbQn8fbs/t1qQ6n01xOqGILCYzMUyl0DGqixHxNyPj/DrRsY2I06 9dBCg4bI70isZNbQR8Br6AX37ViVB0Sl7yrlx83c/npOGLwnbLMGsmKxGHGLzqIT5NM1 fpyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722461105; x=1723065905; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YsjYVkRSnsXvC6SnYIGaU9fq114orUELIsO6B55S/bE=; b=TTelUloXnqdocpXaSAYVFlSnCTSPHplm2xfM/GE58fvTpg9Fl5NZj/FXbrN62co/XO HQD3gyM9L3oSBc43JRaTG3+Kzy1tqAl9MIOZSBKX/BanibJ01XC8as3ZAETKyYwag6yX N+ADH4EMPtmjBCowH27qONgcuIW55pMb3vPH2R1kmK9NOKvnspoYMx4yf4N8bq/ZDlW4 6zI0IO1UMnb2rg8nBgEAMfrtR71dHTSyBr2AkRFgpzwR/kZig0qE6v6gFNVzWq6mWTJ6 Rm710qhQXpBTRdgPWGjTFiLXBaT1DYzrSx9FMXGhaZN7D3XZwo15nv6JgBGmaKgLhTvI Z4vg== X-Gm-Message-State: AOJu0YzHUYRZJ8yURepvBhrq2bmNLcAS365a/FO0GcSLR6cQzq1Fg3uu yYsSFCaSaKZ2+hJ5Gx0MiQK1QdDDjQL/rAnTD0OAwtX5XcSYYFXgdhYmmrfqXFy0auSW2Y2SSkw i X-Received: by 2002:a5d:6510:0:b0:367:326b:f257 with SMTP id ffacd0b85a97d-36baace4feamr316595f8f.33.1722461104967; Wed, 31 Jul 2024 14:25:04 -0700 (PDT) Received: from m1x-phil.lan ([176.176.130.148]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36857dc2sm17849498f8f.77.2024.07.31.14.25.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 31 Jul 2024 14:25:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Bin Meng Subject: [PATCH-for-9.1? v2 0/4] hw/sd/sdhci: Check ADMA descriptors can be accessed Date: Wed, 31 Jul 2024 23:24:57 +0200 Message-ID: <20240731212501.44385-1-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 Since v1: - split patch - do not return MemTxResult from get_adma_description() - single DMA read in SDHC_CTRL_ADMA2_64 case Based-on: <20240730092138.32443-5-philmd@linaro.org> Philippe Mathieu-Daudé (4): hw/sd/sdhci: Reduce variables scope in sdhci_do_adma() hw/sd/sdhci: Reduce variables scope in get_adma_description() hw/sd/sdhci: Read ADMA2_64 descriptor with a single dma_memory_read() hw/sd/sdhci: Check ADMA descriptors can be accessed hw/sd/sdhci.c | 117 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 70 insertions(+), 47 deletions(-)