From nobody Tue Feb 10 17:31:00 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1590947890; cv=none; d=zohomail.com; s=zohoarc; b=e2wSf7nwuf300MjPs/LjhwL/1P2E+m7oHbM0Z3b6pclwv8gzFiYd7eacOE0lg6HlY2nRoo/bREqJkQLZ4acAiLKuLH4Mw9WQacAXQqCoHzwDi4IZzqP2/HoXLRFm42l0eVNb+gUsu3yFsguJc4RSIsdJjnP+w0YdOUpkWon0KBI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590947890; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=o8b6+X1LLYHejSweB/c4hEC47Dl6kTi087mc3N8TiLA=; b=Oej4Swct68mAEgJgyYQBfAbScWONOTPVTvRa3oljkDEDMDeQPaj/Q6uTFgs2jmkMEItRwC9WdKdkRjBt+yREv/TWvJ4mbyg1+qeR28+ZSThjBRdKznMbIO6NYiwK48VWj8uFN6eL8pgpXmt2+FZRKhIFipE6gaMsDe6uCnXySvw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590947890880175.95727835172988; Sun, 31 May 2020 10:58:10 -0700 (PDT) Received: from localhost ([::1]:54056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jfSDp-0000Wl-Oj for importer@patchew.org; Sun, 31 May 2020 13:58:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfSAQ-0003nX-RP; Sun, 31 May 2020 13:54:38 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:54318) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfSAP-0007gj-Tf; Sun, 31 May 2020 13:54:38 -0400 Received: by mail-wm1-x342.google.com with SMTP id g10so1003202wmh.4; Sun, 31 May 2020 10:54:36 -0700 (PDT) Received: from localhost.localdomain (43.red-83-51-162.dynamicip.rima-tde.net. [83.51.162.43]) by smtp.gmail.com with ESMTPSA id z7sm17862531wrt.6.2020.05.31.10.54.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 May 2020 10:54:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=o8b6+X1LLYHejSweB/c4hEC47Dl6kTi087mc3N8TiLA=; b=ldCRS+zcerY/fL38TEcn9Q/4Q/0bc5RQ01rWlVEoyJuZZcK7/AEPS3jwvEfR88dPIy yGmY36bBRNcPQhwhu5rz7K6UQuJVi0+k42YRwMRofsKi42xDxawpqH0fxIsbTn3VxKSb ojCEt/l0qS+xgZFDl5L3/AV4sx5XmsTvY7A1jlXoiTP3bDh4+V0nm0xinG23YDGeK3M1 ckCvNNit8cPrs1IRIct+DRtIF7S8UQP/05bDBI4d5LeDyC4HOVS8isSkvz/hZamciIiO MI/hflFE3377syDgWbAHIYC8tdYuwWf11AbL1bKMQE3+KBCWKupkKJhWT3/4w+a/vxJj +s5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=o8b6+X1LLYHejSweB/c4hEC47Dl6kTi087mc3N8TiLA=; b=BieQXDhJ37r0eON0xyC0UMXMVNWHU+63/iS2J1SbZUT+zemlS6uO5FhdK4/M2/2Pwq QkUSI0kZPINBXTonWNdEcR7UNO2a3g+0VCuZwDzmBsQSf/qZepLQhx+jlZMYKRSUSU20 CEDY35B1or+1D/VEaC3ZpvKbhFgcNGN75os+9a8Zq08tNKVFqnuEcVW5/q8IqEoOa0VA 2Egpqc04UqYK54xTPbOUDWk6tictlp+lmL3X+e8az3GOCn7xwdpWpILv0MpFCv+RTXhn zqbDD6ar04Pt6yFOr1HfDAhZ+YLaTAraQZgRyiirsF8ZjOTF/fgDQ9OBbfVPfFU0iEOA a8Tw== X-Gm-Message-State: AOAM533u+tpLiMsaNwx04UafYX9PMlt61YDSbnWGlIqzIdYTHTe0n+Oy lxUl/CpiP584YFphou4QRsNbX3DK X-Google-Smtp-Source: ABdhPJyFXiBmYlgd9smjQLW518laiLxXT1vvTA3PiyU15lWvlXIgEa+2EZnAY3GF2/sJXehrqbTcYA== X-Received: by 2002:a7b:cb99:: with SMTP id m25mr17938496wmi.0.1590947675719; Sun, 31 May 2020 10:54:35 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [RFC PATCH 6/6] memory: Use CPU register size as default access_size_max Date: Sun, 31 May 2020 19:54:25 +0200 Message-Id: <20200531175425.10329-7-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200531175425.10329-1-f4bug@amsat.org> References: <20200531175425.10329-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x342.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Aleksandar Rikalo , David Hildenbrand , Cornelia Huck , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Beniamino Galvani , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Gerd Hoffmann , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Do not restrict 64-bit CPU to 32-bit max access by default. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- RFC because this probably require an audit of all devices used on 64-bit targets. But if we find such problematic devices, they should instead enforce their access_size_max =3D 4 rather than expecting the default value to be valid... --- memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memory.c b/memory.c index fd6f3d6aca..1d6bb5cdb0 100644 --- a/memory.c +++ b/memory.c @@ -1370,7 +1370,7 @@ bool memory_region_access_valid(MemoryRegion *mr, =20 access_size_max =3D mr->ops->valid.max_access_size; if (!mr->ops->valid.max_access_size) { - access_size_max =3D 4; + access_size_max =3D TARGET_LONG_SIZE; } =20 access_size =3D MAX(MIN(size, access_size_max), access_size_min); --=20 2.21.3