From patchwork Thu Aug 31 12:56:23 2023 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: 718995 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp462161wrn; Thu, 31 Aug 2023 06:10:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDkm95ISczR+IKDsTQ5U4Egims1fFwmHwakssSohClHAhEtCDGmQZU02RG4mi8yiwgHu0q X-Received: by 2002:a05:6808:2228:b0:3a5:a78b:f773 with SMTP id bd40-20020a056808222800b003a5a78bf773mr7069530oib.6.1693487438488; Thu, 31 Aug 2023 06:10:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693487438; cv=none; d=google.com; s=arc-20160816; b=JvSMUSb2I/nn4PPR9X1ZHolhY7VPbINdL4IIKVxbnyLOPPXS+F0/vw5F32llFWqibx S2HqIwLdJn4RFrKZn9MDp41v3Pf0mkb1YVt/U7i8s+wh4+BUUYvjLTCTe/3rdGq++2we 13UP2rUqGryLlOvEjQoTDek4FgeIa2QvSRiWU6pWggQiXKDoabUHMLxFHJiZsnBYT7EW /Hh9rY1fXdks2R2o5cIDQvzzXF/2J9Q5MeEcezdIzgZskZDYLbtOuFqE24ccS6mLjNT7 dA4Dwg7lY4NirjaM2t8H0GbViN2RzvrvyPjE5P8TutOG2c6q/Mi75tN4bS6e2c5VdQJL tarA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+5bbQfYGZZhyRdQ+SvkDiLWY1Nv20tz8tbv49oHFS9o=; fh=L9Oo008+Nqsfk0USGXpaDe087xqX7JUXX6SpSZBrdUE=; b=wKJzLGw10sKYvNRCPhBzqdYHBul1TSnJHcP0Iz1Ydbq3O6JfkJ+VPBVwacRapoMN31 iYBbcXBwj/6BCVqTG2ISS944OrFinb5DrSNyC2a/EZpYDmwIU2ymxVIzoBoyZ52sBwVe Q+gZJTswkcX82jVfxAjjOBr74a9i9V8eFxjJ8qUlkSxtMpZxAU9WWh01TxBOTZLAltgh h47c8zzpfTPcTu5qZAjBQiEw9ZbGfMSYqdLif1CSFFw71bNbh0EnlIPZB6ig2ba+gAJz l4Cc6UqHV16H9/ZxfeRP6VdhUB2GP9snIsdPAi6fYPb5xZHKWkuGSQti+nG7YxLRsmb7 2owg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="M9Kat/cj"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 14-20020ac8570e000000b00403a7a5ace0si834689qtw.382.2023.08.31.06.10.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 06:10: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="M9Kat/cj"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbhKT-0006y7-TO; Thu, 31 Aug 2023 09:03:21 -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 1qbhGI-00046X-AV for qemu-devel@nongnu.org; Thu, 31 Aug 2023 08:59:07 -0400 Received: from mail-qk1-x734.google.com ([2607:f8b0:4864:20::734]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbhGA-0005l1-F6 for qemu-devel@nongnu.org; Thu, 31 Aug 2023 08:58:57 -0400 Received: by mail-qk1-x734.google.com with SMTP id af79cd13be357-76df3d8fb4eso43065985a.1 for ; Thu, 31 Aug 2023 05:58:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693486733; x=1694091533; 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=+5bbQfYGZZhyRdQ+SvkDiLWY1Nv20tz8tbv49oHFS9o=; b=M9Kat/cjpOlQ4+vKeehxL0ZEAhBnTWjoAVq2lrBsC41Cv76EbGJqlK0c41PF1KA9oe zT5iegc6BRHpyKo0C15n4FFT+uavz+/xeYTohsNFKqn7pSukA/wg4ltULf4aRu4qY3ub 76VgYQa+nFm62a0dEtAFIE9yreLgWhQ5/rQyyTWOOUsAzMDOBVqNNtTs8Tgse9peZS87 Zo/I89VYStVcc3RNL9Wqbf5JPwwIRlmxyN+GFzuC8qs9069O6vbxKUAEj5KgivXpQiT2 IB96Ow6jzI00aloAeg1ml0paT7kyV6/FSV2ss42whd5C2JWH1jCrqDuuuwKkeFCqg+3X fZlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693486733; x=1694091533; 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=+5bbQfYGZZhyRdQ+SvkDiLWY1Nv20tz8tbv49oHFS9o=; b=Fzfx5yxcAGS78p2l4n+3HoLcoWHmMhyB3bzXrEV06+lxNdIimiBANjVk+6p37olWnp 0GaCovtuTjKfpfl+ElNmxE4NhK11T8B7t+bJ3wWjWkFIkYnv28JSuWp8towQ4rGy9QCl qLgBx9TBzbiv6DMf36a6YJTjt85unjuTqmRR5zMLhGNLJr/VZk/SlbOVmZ7kLiXjHbGa jZx0Yfsg9E3hcd4/6IsLca8hUoGurSze+25QnTweEWi2oIq4TPOunSnRBSyjcqguCesE MC+KDMSks1L61x/+xYRGHcPTqv5x8LS0Tgzim1u80AKU9dVdyd6GZcfkLCtik95aHTQd 3o8w== X-Gm-Message-State: AOJu0YzbLWTJmvVuUMqwHVasn76fxMOSRsbXIKzjfAqxAVZ+HBzKN8tq LwGnU0sK2NWsMloMKbr15/uPHa0Y9haoMwf5BG0= X-Received: by 2002:a05:620a:17ac:b0:76c:aff9:9f27 with SMTP id ay44-20020a05620a17ac00b0076caff99f27mr2915897qkb.59.1693486732897; Thu, 31 Aug 2023 05:58:52 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id r4-20020a05620a03c400b0076cd2591629sm576981qkm.6.2023.08.31.05.58.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 05:58:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Da?= =?utf-8?q?ud=C3=A9?= , Richard Henderson , Peter Maydell , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini Subject: [PULL 21/41] hw/char/pl011: Restrict MemoryRegionOps implementation access sizes Date: Thu, 31 Aug 2023 14:56:23 +0200 Message-ID: <20230831125646.67855-22-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230831125646.67855-1-philmd@linaro.org> References: <20230831125646.67855-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::734; envelope-from=philmd@linaro.org; helo=mail-qk1-x734.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.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 pl011_read() and pl011_write() handlers shift the offset argument by 2, so are implemented on a 32-bit boundary. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230710175102.32429-2-philmd@linaro.org> --- hw/char/pl011.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/char/pl011.c b/hw/char/pl011.c index 77bbc2a982..73f1a3aea2 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -358,6 +358,8 @@ static const MemoryRegionOps pl011_ops = { .read = pl011_read, .write = pl011_write, .endianness = DEVICE_NATIVE_ENDIAN, + .impl.min_access_size = 4, + .impl.max_access_size = 4, }; static bool pl011_clock_needed(void *opaque)