Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OB0yF-0008BN-Lw for qemu-devel@nongnu.org; Sun, 09 May 2010 03:30:39 -0400 Received: from [140.186.70.92] (port=52379 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OB0y3-00088V-8g for qemu-devel@nongnu.org; Sun, 09 May 2010 03:30:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OB0xl-0005qI-KO for qemu-devel@nongnu.org; Sun, 09 May 2010 03:30:24 -0400 Received: from mail-pv0-f173.google.com ([74.125.83.173]:59023) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OB0xi-0005pg-0W for qemu-devel@nongnu.org; Sun, 09 May 2010 03:30:07 -0400 Received: by pvc22 with SMTP id 22so521130pvc.4 for ; Sun, 09 May 2010 00:30:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1273327815-21408-1-git-send-email-atar4qemu@gmail.com> References: <1273327815-21408-1-git-send-email-atar4qemu@gmail.com> Date: Sun, 9 May 2010 10:30:04 +0300 Message-ID: From: Blue Swirl Content-Type: text/plain; charset=UTF-8 Subject: [Qemu-devel] Re: [PATCH 1/2] Pad iommu with an empty slot (necessary for SunOS 4.1.4) List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko Cc: qemu-devel@nongnu.org, Artyom Tarasenko On 5/8/10, Artyom Tarasenko wrote: > On the real hardware (SS-5, LX) the MMU is not padded, but aliased. > Software shouldn't use aliased addresses, neither should it crash > when it uses (on the real hardware it wouldn't). Using empty_slot > instead of aliasing can help with debugging such accesses. TurboSPARC Microprocessor User's Manual shows that there are additional pages after the main IOMMU for AFX registers. So this is not board specific, but depends on CPU/IOMMU versions. One approach would be that IOMMU_NREGS would be increased to cover these registers (with the bump in savevm version field) and iommu_init1() should check the version field to see how much MMIO to provide. But in order to avoid the savevm version change, iommu_init1() could just install dummy MMIO (in the TurboSPARC case), if OBP does not care if the read back data matches what has been written earlier. Because from OBP point of view this is identical to what your patch results in, I'd suppose this approach would also work.