qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Michael Tokarev" <mjt@tls.msk.ru>,
	"Peter Xu" <peterx@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	qemu-trivial@nongnu.org,
	"Dr. David Alan Gilbert" <dave@treblig.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"David Hildenbrand" <david@redhat.com>
Subject: [PATCH 3/3] system/physmem: Assign global system I/O Memory to machine
Date: Fri,  9 Feb 2024 16:00:39 +0100	[thread overview]
Message-ID: <20240209150039.22211-4-philmd@linaro.org> (raw)
In-Reply-To: <20240209150039.22211-1-philmd@linaro.org>

So far there is only one system I/O and one system
memory per machine.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 system/physmem.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/system/physmem.c b/system/physmem.c
index 5e66d9ae36..50947a374e 100644
--- a/system/physmem.c
+++ b/system/physmem.c
@@ -2554,12 +2554,13 @@ static void memory_map_init(void)
 {
     system_memory = g_malloc(sizeof(*system_memory));
 
-    memory_region_init(system_memory, NULL, "system", UINT64_MAX);
+    memory_region_init(system_memory, OBJECT(current_machine),
+                       "system", UINT64_MAX);
     address_space_init(&address_space_memory, system_memory, "memory");
 
     system_io = g_malloc(sizeof(*system_io));
-    memory_region_init_io(system_io, NULL, &unassigned_io_ops, NULL, "io",
-                          65536);
+    memory_region_init_io(system_io, OBJECT(current_machine),
+                          &unassigned_io_ops, NULL, "io", 65535);
     address_space_init(&address_space_io, system_io, "I/O");
 }
 
-- 
2.41.0



  parent reply	other threads:[~2024-02-09 15:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09 15:00 [PATCH 0/3] system/memory: Trivial fixes Philippe Mathieu-Daudé
2024-02-09 15:00 ` [PATCH 1/3] cpu-target: Include missing 'exec/memory.h' header Philippe Mathieu-Daudé
2024-02-09 16:01   ` Peter Maydell
2024-02-09 16:31     ` Philippe Mathieu-Daudé
2024-02-09 15:00 ` [PATCH 2/3] monitor/target: " Philippe Mathieu-Daudé
2024-02-09 16:01   ` Peter Maydell
2024-02-09 15:00 ` Philippe Mathieu-Daudé [this message]
2024-02-09 16:06   ` [PATCH 3/3] system/physmem: Assign global system I/O Memory to machine Peter Maydell
2024-02-09 16:41     ` Philippe Mathieu-Daudé
2024-02-09 21:33 ` [PATCH 0/3] system/memory: Trivial fixes Michael Tokarev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240209150039.22211-4-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=dave@treblig.org \
    --cc=david@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).