From nobody Thu Nov 13 20:44:51 2025 Delivered-To: importer@patchew.org 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; 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; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1582577413; cv=none; d=zohomail.com; s=zohoarc; b=RlXgJqDFNHeHtRKfC/2YNCVl+ketyjjBSr5B6djpmg+IM7dTTnhqiqx5x2oc8q5QGAp0Uq8AYFSWryDiT/o0kIjyKQXVy+Vduxe6/0wvcqt8pbVTWaGz9JSjB6SNzMvtxWgpFXeErnYzQi3NeBHWynS/Av5w3xNYLSq2b14qPnY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582577413; 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=aBf1Nz3dO7lmnq6x8HgckUD4/9P7/UEzlUI+mgbV/5Q=; b=gPRDpTkNlK7zH2Ag1miSyiwb9dpiw7c/3GVLW+JTR0vkbau+encSd1aXzEBwWsVgiboymh3xG7P9PgsjyT8zXmTTFB7CdTJScDLjCAaE7wT+Fnel93+b1EbKpIaeWZIJTzyr8OQbAp4bZgn8+3tulo9u2KAldYEnS7ehr6XDo08= 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582577413759575.4080268741598; Mon, 24 Feb 2020 12:50:13 -0800 (PST) Received: from localhost ([::1]:42142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6Kg7-0003oj-GR for importer@patchew.org; Mon, 24 Feb 2020 15:50:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48566) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6Keg-0000n2-Ah for qemu-devel@nongnu.org; Mon, 24 Feb 2020 15:48:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6Kef-00060T-9W for qemu-devel@nongnu.org; Mon, 24 Feb 2020 15:48:42 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:28934 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j6Kef-000609-5a for qemu-devel@nongnu.org; Mon, 24 Feb 2020 15:48:41 -0500 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-426-E_QdaMtbMTSy5Mf8Nm1AAg-1; Mon, 24 Feb 2020 15:48:35 -0500 Received: by mail-wr1-f72.google.com with SMTP id c6so6133889wrm.18 for ; Mon, 24 Feb 2020 12:48:35 -0800 (PST) Received: from x1w.redhat.com (47.red-88-21-205.staticip.rima-tde.net. [88.21.205.47]) by smtp.gmail.com with ESMTPSA id t81sm863436wmg.6.2020.02.24.12.48.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 12:48:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582577320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aBf1Nz3dO7lmnq6x8HgckUD4/9P7/UEzlUI+mgbV/5Q=; b=UJiKXsqYoZH39Vy5amsYnhSHCMJV/gludANRIJ09mbCqgVyo36ppRn7P/6pfg79bCmdw79 eNjUfKhyyIOoF0yozO5EjDzVSf7Hnzww4O9Co8avW9Zw7YZWzQ8dJyo5TXnUsP4SA7hcFA VZ08XcQbH5m/T1tYrG0Kknty01Lg6rw= X-MC-Unique: E_QdaMtbMTSy5Mf8Nm1AAg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=T9F9enB4mqr+YPnaVrLHGBnKs+NXe+icyfAm27ef64A=; b=BKYNsZYGPCTxRzw7n1ZqwLReiMbYj3JtCZQZG9VIJ/bSjXFEh4G+JWChVUw4vZmusP BI/xHqlDrV0ch0WMevHHz3TSgg5Uc4uQ2MjThhPbG4XipOxgQy2UpEixmdHtGaCU4rBU n78quzIut0oGVAnk58kaHR2h9JZPgnAnBg68mfSRLiTSWzglpDbYnvupFL4bMA8gbAls ZwekINYGYsgpYEq7ZtvfgAO0Xt8CLBbLrgVEeRNaFhcCC2za2AsHUqZ8/7gM2OY7wGd8 WMlXYjXKGGr9zV0j1x7iGrp8XEZ2r7hhkv/Cv/CWXWhvDKI3y2RM9Djw23EJPdiq3D0h toVQ== X-Gm-Message-State: APjAAAW8SQoMOGgYzQqPnss2rgMsThqmK5UQkpC90bKik8N+2nnl3otE xVUh06DMKIR/XZ13hiBHtL/jxNQy9jSYpwUXO1sa41lUtB7bIpsi3HRXkwLocDIVeuH/RNtfw8A Q/kWBOG6wSzdyQf4= X-Received: by 2002:a7b:c759:: with SMTP id w25mr805780wmk.15.1582577314794; Mon, 24 Feb 2020 12:48:34 -0800 (PST) X-Google-Smtp-Source: APXvYqwxBizVAfehGk3miduLVPYkPJAIfgR+35+r8qEsbPuDdZQRaeyaOJy4zQqQ4Y2N2h4q3ZdVrQ== X-Received: by 2002:a7b:c759:: with SMTP id w25mr805686wmk.15.1582577313662; Mon, 24 Feb 2020 12:48:33 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Peter Maydell , Paolo Bonzini , qemu-devel@nongnu.org Subject: [PATCH v2 01/32] memory: Correctly return alias region type Date: Mon, 24 Feb 2020 21:47:57 +0100 Message-Id: <20200224204828.23167-2-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200224204828.23167-1-philmd@redhat.com> References: <20200224204828.23167-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 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: Sagar Karandikar , "Michael S. Tsirkin" , Jason Wang , Mark Cave-Ayland , KONRAD Frederic , Alistair Francis , "Edgar E. Iglesias" , Max Reitz , qemu-block@nongnu.org, qemu-trivial@nongnu.org, Magnus Damm , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Joel Stanley , Palmer Dabbelt , Aleksandar Rikalo , Richard Henderson , Artyom Tarasenko , Eduardo Habkost , Alistair Francis , Fabien Chouteau , qemu-arm@nongnu.org, Peter Chubb , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Subbaraya Sundeep , David Gibson , Kevin Wolf , qemu-riscv@nongnu.org, Igor Mitsyanko , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Jean-Christophe Dubois , Michael Walle , qemu-ppc@nongnu.org, Aleksandar Markovic , Bastian Koppelmann , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8"; text/plain; charset="utf-8" Since memory region aliases are neither rom nor ram, they are described as i/o, which is often incorrect. Return instead the type of the original region we are aliasing. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis --- Cc: qemu-trivial@nongnu.org memory.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/memory.c b/memory.c index aeaa8dcc9e..ce1179874e 100644 --- a/memory.c +++ b/memory.c @@ -2818,6 +2818,9 @@ void address_space_destroy(AddressSpace *as) =20 static const char *memory_region_type(MemoryRegion *mr) { + if (mr->alias) { + return memory_region_type(mr->alias); + } if (memory_region_is_ram_device(mr)) { return "ramd"; } else if (memory_region_is_romd(mr)) { --=20 2.21.1