From patchwork Sun May 31 17:38:06 2020 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: 11580875 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4EFF8913 for ; Sun, 31 May 2020 17:40:15 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 281C92074B for ; Sun, 31 May 2020 17:40:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RRupkXgr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 281C92074B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jfRue-0003XJ-Te; Sun, 31 May 2020 17:38:20 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jfRud-0003XE-Co for xen-devel@lists.xenproject.org; Sun, 31 May 2020 17:38:19 +0000 X-Inumbo-ID: 83958332-a365-11ea-8993-bc764e2007e4 Received: from mail-wr1-x432.google.com (unknown [2a00:1450:4864:20::432]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 83958332-a365-11ea-8993-bc764e2007e4; Sun, 31 May 2020 17:38:18 +0000 (UTC) Received: by mail-wr1-x432.google.com with SMTP id p5so3252198wrw.9 for ; Sun, 31 May 2020 10:38:18 -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:mime-version :content-transfer-encoding; bh=szrK4QZPlIWx7hRKiEEGeyw3BNLUYHyOmBgpWr2R+Zs=; b=RRupkXgrGQxJyX5hU1YPGP3v77tjIwZaUEnwXH0Ycbz02nIC6z6jqL9K8VtpiGoZir oA5pe+0bmwn1mXRbgMEVLrpCh0d0sQKIqycavfwLuiXSOjZIKwvCbubwBhoyDEBNPMCT s+JJpU2UR3ihqsLIA18rk+lRx9dyVpfl+cDN3EjfVf2e36iXhgEEGnJ27Qv/8ZBGlMox ykuYCjITpXiI6USr1w2maE1SCHGk41hkpnblFQV9vLwdJzdQ3YlpFxieC+56rAU2D7yq 5PNPRsTkvV+wrpFl90mqzCJzSIssp7+Q7OTmU3vfT7rPQLnXsnh1Vs2G+XHB/+/JcrN8 ISPA== 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 :mime-version:content-transfer-encoding; bh=szrK4QZPlIWx7hRKiEEGeyw3BNLUYHyOmBgpWr2R+Zs=; b=iaEx/eA5Oy1smoexw5EvhpmlJJan0tebB+f5rkecZP4x1mIqUk3EgCw7eaezH4EF3o b1rS6wK4UrjKVfld4D043hpn9ki3OYif1EfNqW7sbFUYNFYQaHNxuB/n8TQBoMJci/Fi NE+HSYjon57+mHol8rgyvSQhSmgRSow7ASCLHws3KRQorF0d6BX4GugnT9FvbBWc2rlz ouLbeyS5RLOBhpO7JKTADfiAV04TBH1HlhLbTaD9U+u7Sl+Py6o7Y5+FH2Vns0GCrpgh 4NrUDSO9IFZdiyKhfjql34Q/vsLwtAAzLexX4CMQn7JW544wbRVKPxjqii+8PBwkIDl/ OLdA== X-Gm-Message-State: AOAM531O4/O5du2Q7rERE2vP3Mz6Zvn1aViY4BBEOw+iNPp9HXh3jn0m fJZ7Qnz5naMuoK426upaSpY= X-Google-Smtp-Source: ABdhPJzi1VbONK1FgNfUM2ScOB+Tk4wTN8mIKjCc/CNlbtzbBZvFo/IjBHFzqkbrQE86Hdu0UVxctg== X-Received: by 2002:adf:8b55:: with SMTP id v21mr19093025wra.187.1590946697876; Sun, 31 May 2020 10:38:17 -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 l19sm7973121wmj.14.2020.05.31.10.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 May 2020 10:38:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 0/8] hw: Fix some incomplete memory region size Date: Sun, 31 May 2020 19:38:06 +0200 Message-Id: <20200531173814.8734-1-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefano Stabellini , Eduardo Habkost , Paul Durrant , Andrew Jeffery , Helge Deller , "Michael S. Tsirkin" , Joel Stanley , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-trivial@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Herv=C3=A9_Poussine?= =?utf-8?q?au?= , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Marcel Apfelbaum , Paolo Bonzini , Anthony Perard , xen-devel@lists.xenproject.org, qemu-ppc@nongnu.org, Richard Henderson Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" memory_region_set_size() handle the 16 Exabytes limit by special-casing the UINT64_MAX value. This is not a problem for the 32-bit maximum, 4 GiB, but in some places we incorrectly use UINT32_MAX instead of 4 GiB, and end up missing 1 byte in the memory region. This series fixes the cases I encountered. Also included few patches while reviewing, I replaced some magic values by the IEC binary prefix equivalent. Regards, Phil. Philippe Mathieu-Daudé (8): hw/arm/aspeed: Correct DRAM container region size hw/pci-host/prep: Correct RAVEN bus bridge memory region size hw/pci/pci_bridge: Correct pci_bridge_io memory region size hw/pci/pci_bridge: Use the IEC binary prefix definitions hw/pci-host: Use the IEC binary prefix definitions hw/hppa/dino: Use the IEC binary prefix definitions hw/i386/xen/xen-hvm: Use the IEC binary prefix definitions target/i386/cpu: Use the IEC binary prefix definitions hw/arm/aspeed.c | 2 +- hw/hppa/dino.c | 4 ++-- hw/i386/xen/xen-hvm.c | 3 ++- hw/pci-host/i440fx.c | 3 ++- hw/pci-host/prep.c | 2 +- hw/pci-host/q35.c | 2 +- hw/pci-host/versatile.c | 5 +++-- hw/pci/pci_bridge.c | 7 ++++--- target/i386/cpu.c | 2 +- 9 files changed, 17 insertions(+), 13 deletions(-) Reviewed-by: Peter Maydell