Received: from eggs.gnu.org ([2001:4830:134:3::10]:41849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXCei-0008Fz-A0 for Qemu-devel@nongnu.org; Tue, 09 Aug 2016 15:25:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXCec-0008DR-6M for Qemu-devel@nongnu.org; Tue, 09 Aug 2016 15:25:39 -0400 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:37478) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXCeb-0008D2-S8 for Qemu-devel@nongnu.org; Tue, 09 Aug 2016 15:25:34 -0400 Received: by mail-wm0-x229.google.com with SMTP id i5so56564253wmg.0 for ; Tue, 09 Aug 2016 12:25:33 -0700 (PDT) Received: from ?IPv6:::ffff:192.168.1.96? ([46.143.175.75]) by smtp.gmail.com with ESMTPSA id m62sm4684088wmm.24.2016.08.09.12.25.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Aug 2016 12:25:31 -0700 (PDT) Message-ID: <57aa2e2b.41261c0a.f9cbc.9fe9@mx.google.com> MIME-Version: 1.0 From: Date: Tue, 9 Aug 2016 23:55:29 +0430 In-Reply-To: <57aa0a5c.041f1c0a.812f4.7204@mx.google.com> References: <57aa0a5c.041f1c0a.812f4.7204@mx.google.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Using memory mapped IO to read and write in guest memory data List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Qemu-devel@nongnu.org" Hi all. I have been searching thoroughly for the latest requirement I need to fulfi= ll using QEMU. The scenario is like this: =E2=80=A2 I have another simulator which is a C program, this program has a= shared memory which can be exposed to a file when need be, it can also wri= te to an address or read from it when required =E2=80=A2 I have a machine which runs FreeRTOS via QEMU, not the best opera= ting system out there, I know. But it can accept interrupts and jump to the= specified memory regions upon receiving it, so if QEMU has an address that= I can write to using the external simulator application, then I can interr= upt the OS to read the address for changes afterwards. IMHO I have figured out that I can actually create MMIO to map an IO into m= emory address, but I cant seem to figure out the how tos that have been wri= tten to expose this feature. =E2=80=A2 So how can I actually initialize a memory mapped IO in qemu optio= ns(upon runtime or build)? =E2=80=A2 How can I read and write into it, The aforementioned C program ca= n write freely to anything I desire, where and what should I write, where a= nd how should I read(from memory mapped IO) Are there also other alternatives to solve this problem? Like, can I actual= ly use a file as the QEMU guest system memory and write to it and read from= it with free will? Or is there a way to attach a process to QEMU that can = see and edit its guest memory? Thanks in advance.