Received: from eggs.gnu.org ([2001:4830:134:3::10]:39327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVFfP-0000dq-5w for qemu-devel@nongnu.org; Mon, 15 Feb 2016 04:42:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVFfM-0001TC-59 for qemu-devel@nongnu.org; Mon, 15 Feb 2016 04:42:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40677) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVFfL-0001Su-Se for qemu-devel@nongnu.org; Mon, 15 Feb 2016 04:41:59 -0500 From: Markus Armbruster References: <1455330939.21653.YahooMailMobile@web140503.mail.bf1.yahoo.com> Date: Mon, 15 Feb 2016 10:41:57 +0100 In-Reply-To: <1455330939.21653.YahooMailMobile@web140503.mail.bf1.yahoo.com> (sridhar kulkarni's message of "Fri, 12 Feb 2016 18:35:39 -0800") Message-ID: <87twla5mze.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] IVSHMEM support on qemu-system-arm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: sridhar kulkarni Cc: qemu-devel sridhar kulkarni writes: > We have two applications running on real custom board with custom asic > and has two arm cores. Each application runs on different core, and > uses shared memory for inter application high bandwidth > transferss. The trigger for this RPC mailbox communication where each > core can send interrupt to other core to initiate a shared memory IPC. > > We are trying to simulate this whole thing on qemu virtual platform by > running two vm's. Our goal is to run the whole application as is > without any hacks. Application s really shouldn't know if its > running on real hardware or virtual platform. > > That's the reason I wanted to understand if ivshmem can be used here.. To "simulate the whole thing" so that your software runs unmodified, you have to model your board, including the cores, their local memory, shared memory, and inter-processor interrupts. Anything less requires some kind of hardware abstraction layer in your software. Note that this would most likely run in a *single* QEMU process. Less faithful emulation + more hardware abstraction can be cheaper to build, but it's usually less useful for the purpose of developing low-level software for the physical board. With ivshmem, you can share memory among separate QEMU processes, with an optional interrupt capability. ivshmem and your ASIC will look quite different to software, unless you designed your ASIC to look like ivshmem (and why would anybody do that?). Your hardware abstraction layer would have to encapsulate all ASIC access, and implement it separately for physical hardware and your simulator. If that much abstraction is fine for you, then I'd seriously consider abstracting away one more layer: provide an IPC interface, implement it separately for physical hardware and your simulator. But if you need a more faithful simulator, you better emulate your actual hardware.