From nobody Sun Feb 8 17:47:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) client-ip=209.85.128.53; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-f53.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1646571631; cv=none; d=zohomail.com; s=zohoarc; b=lkip4PuVUbcuoX/FUA99Iw26DwFNpk5sqDuPDZhmlgy5lcRzFIVXVqgSg0s90FDN2zdC8DMW/yUvLW+VXO89PsRpitS1EV3RJ+b61aHpucfS/0RJbGaR2Bu106k8WvkWBfdXzHHkaMJz8sGKa5CXiEd1EiFki5f7NAiZovdEvBc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646571631; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=cur85e8fjNdHGR2x3SpT7ZDFtyqnHC+TGOwb1mTbPeE=; b=hwK+dayemYd5l/6CawOzrzXvmPZDNWdCfKVd1ZQ0WIw7nW4RsvlL4xLmVsdh3Oc14UtD5sPjO52N47CbYAR0hT1X1bZJOPhKajP3ixAq/fkHA3w9nanao3PFl8MtL+W+uAtXWsETg18/PkYpojzOxfme0CSouRMS5axktedYXsY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.128.53 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=pass header.from= (p=none dis=none) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mx.zohomail.com with SMTPS id 1646571631793410.909131276768; Sun, 6 Mar 2022 05:00:31 -0800 (PST) Received: by mail-wm1-f53.google.com with SMTP id bg31-20020a05600c3c9f00b00381590dbb33so7729160wmb.3 for ; Sun, 06 Mar 2022 05:00:31 -0800 (PST) Return-Path: Return-Path: Received: from nuc.lan ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id l10-20020a7bc44a000000b003899263bab1sm4258011wmi.20.2022.03.06.05.00.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Mar 2022 05:00:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cur85e8fjNdHGR2x3SpT7ZDFtyqnHC+TGOwb1mTbPeE=; b=gfO4ePThlPzQrHZE18vm4y9IcKwivTa2XHfY1DJAmXOIPv+ccvX/6zRLMNz+TM/Ybm BYgfWNqO312/6MGD5d3dHOGQ+yrhUcha4CP7B2s2draHaJMbSOUZzaEhak1DFEOztuAV vCDY+bCTvDodYs7o02rSqiwCEIYJahgfoK54IZkQg8plyYq1xr+ui30TAfPEqqp7VywV eZAjL1u65gXhMF97fg+5ZSR2X2DApKfGGCZuzfdUvB0zMpUgT+6bQZrs6J0mYHywjr7n tjCcHaIG0kpZoZ8U+QvXve2GG260LQ5DPrO4d+AWJy+AZ0ismXMewWFD1atv9Re2faWa k1Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cur85e8fjNdHGR2x3SpT7ZDFtyqnHC+TGOwb1mTbPeE=; b=xFCaDLxiOvC91A4O4Yh9L/KopiOvQKVImr+pdNz9Gk9nKMe9hRTY0DdPIrKuYwip4v 9Ig5C9K/dwn/V5z/V0u5T2e0mJMzf3C6p9+TRtUawasNIQxB2+oB3f9CISJ+/0fItGJG VMOaOf5egtOQU4Qh9+bItFy1sIudQEK2g69NruM5li7OTjqaDpjSeYxiiEOqyF7NdchW 1vykvSeyzQY7Fw16pJFZE2la+CBJiE0Ie9l0vQu4d26cfO9GhxpS9ldNg0LDx61szfNI 6ck9jKIR6W5bN2iZeo8uwtQw1lT0yI5gfKFv6B0qRDbETCl/Od+v5jZYD8n2xbgx2l+g EdVQ== X-Gm-Message-State: AOAM530unlf5i1AaGDw7jCEX7EZGwbevB2KmYHABipTBgUlW77JyQ6+C jAx+7263V8DWFl5YblLg50g= X-Google-Smtp-Source: ABdhPJxeRDLXo1eKG6uywjg6/lknqPnXgnUjdsPTjZibAeqHQ5Tttlpde9nBMgQY3uet275NHN4wiA== X-Received: by 2002:a05:600c:4f8f:b0:383:d0b:3706 with SMTP id n15-20020a05600c4f8f00b003830d0b3706mr5719522wmq.117.1646571630006; Sun, 06 Mar 2022 05:00:30 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Thomas Huth , Eduardo Habkost , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 05/33] sysemu/memory_mapping: Become target-agnostic Date: Sun, 6 Mar 2022 13:59:32 +0100 Message-Id: <20220306130000.8104-6-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220306130000.8104-1-philippe.mathieu.daude@gmail.com> References: <20220306130000.8104-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1646571633818100001 From: Philippe Mathieu-Daud=C3=A9 target_ulong is target-specific, while vaddr isn't. Remove the unnecessary "exec/cpu-defs.h" target-speficic header from "memory_mapping.h" and use the target-agnostic "hw/core/cpu.h" locally in memory_mapping.c. Remove "exec/memory.h" since MemoryRegion is forward-declared in "qemu/typedefs.h". Reviewed-by: Richard Henderson Reviewed-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20220207075426.81934-6-f4bug@amsat.org> --- include/sysemu/memory_mapping.h | 5 ++--- softmmu/memory_mapping.c | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/sysemu/memory_mapping.h b/include/sysemu/memory_mappin= g.h index 4b20f1a639e..3bbeb1bcb41 100644 --- a/include/sysemu/memory_mapping.h +++ b/include/sysemu/memory_mapping.h @@ -15,8 +15,7 @@ #define MEMORY_MAPPING_H =20 #include "qemu/queue.h" -#include "exec/cpu-defs.h" -#include "exec/memory.h" +#include "exec/cpu-common.h" =20 typedef struct GuestPhysBlock { /* visible to guest, reflects PCI hole, etc */ @@ -43,7 +42,7 @@ typedef struct GuestPhysBlockList { /* The physical and virtual address in the memory mapping are contiguous. = */ typedef struct MemoryMapping { hwaddr phys_addr; - target_ulong virt_addr; + vaddr virt_addr; ram_addr_t length; QTAILQ_ENTRY(MemoryMapping) next; } MemoryMapping; diff --git a/softmmu/memory_mapping.c b/softmmu/memory_mapping.c index a62eaa49ccb..8320165ea24 100644 --- a/softmmu/memory_mapping.c +++ b/softmmu/memory_mapping.c @@ -17,6 +17,7 @@ #include "sysemu/memory_mapping.h" #include "exec/memory.h" #include "exec/address-spaces.h" +#include "hw/core/cpu.h" =20 //#define DEBUG_GUEST_PHYS_REGION_ADD =20 --=20 2.35.1