From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXnq4-0005HU-1F for qemu-devel@nongnu.org; Mon, 22 Feb 2016 05:35:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXnpz-0008Pj-Vf for qemu-devel@nongnu.org; Mon, 22 Feb 2016 05:35:35 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:42639) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXnpz-0008PP-QQ for qemu-devel@nongnu.org; Mon, 22 Feb 2016 05:35:31 -0500 References: From: Leon Alrae Message-ID: <56CAE46A.2050707@imgtec.com> Date: Mon, 22 Feb 2016 10:35:22 +0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Memory mapping on MIPS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor R , QEMU Developers On 22/02/16 06:56, Igor R wrote: > Here is an excerpt from r4k_map_address(), related to addresses >= 0x80000000. > Actually, it maps 0x80000010 and 0xA0000010 to the same physical > address. What's the idea behind that? 0x80000010 is kseg0 whereas 0xA0000010 is kseg1, both segments are unmapped thus both refer to the same 0x10 physical address. The difference between them is that the latter is uncached, i.e. all accesses to this segment bypass the caches, but in QEMU we don't model caches so they do the same thing. > What should happen if I map KSEG2 directly as a continuation of KSEG1, > i.e. substitute TLB lookup with "address - (int32_t)KSEG1_BASE"? Guest > Linux seems to work correctly (but maybe it's just a matter of luck?). With such a change it's very likely that guest through kseg2 will be accessing different physical addresses than it expects... Regards, Leon