From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buJXr-0007W8-31 for qemu-devel@nongnu.org; Wed, 12 Oct 2016 09:26:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buJXl-0008WP-4N for qemu-devel@nongnu.org; Wed, 12 Oct 2016 09:26:06 -0400 Received: from mail-io0-x233.google.com ([2607:f8b0:4001:c06::233]:33819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buJXl-0008WH-0h for qemu-devel@nongnu.org; Wed, 12 Oct 2016 09:26:01 -0400 Received: by mail-io0-x233.google.com with SMTP id r30so50296439ioi.1 for ; Wed, 12 Oct 2016 06:26:00 -0700 (PDT) Sender: Richard Henderson References: <1475316333-9776-1-git-send-email-atar4qemu@gmail.com> <1475316333-9776-4-git-send-email-atar4qemu@gmail.com> <8028f779-8a8f-0427-418e-fe61e044ba43@twiddle.net> <91251f7d-94ef-e3cd-34cc-859c88de2604@twiddle.net> From: Richard Henderson Message-ID: Date: Wed, 12 Oct 2016 08:25:52 -0500 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 03/29] target-sparc: add UA2005 TTE bit #defines List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko Cc: Mark Cave-Ayland , qemu-devel On 10/12/2016 06:18 AM, Artyom Tarasenko wrote: >> What I would most like to see, for QEMU, is an artificial sun4v compatible >> machine that implements a "hardware" page table walk. I.e. no use of >> SparcTLBEntry, but walking the page tables directly. >> >> Because QEMU can then satisfy a page lookup internally, without having to >> longjmp out of a memory reference in progress in order to restart the cpu >> for the software TLB miss handler, the emulation runs about 30-50% faster. >> At least that has been my experience emulating Alpha vs MIPS. >> >> It would require custom roms, but those should be fairly easy to modify from >> the existing source. >> > > Maybe it's even possible without the modifications. For instance, > implement the table walk compatible with the current hypervisor, and > then just add possibility to overlay hypervisor call using some CPU > feature flag. Maybe so. What we lack is being given direct access to the page table base. But we know that the CPU structure is in the hypervisor shadow register 0, and that offset CPU_ROOT is the page table base. As long as we're willing to hard-code these two facts concerning any rom we care to load, we could in fact implement the tlb miss success path inside QEMU. We would let the rom re-do the work for the tlb miss failure path, on the way to raising the exception with the supervisor. r~