From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzsWE-0001g2-JK for qemu-devel@nongnu.org; Tue, 02 Jun 2015 16:10:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzsWB-0001vC-QO for qemu-devel@nongnu.org; Tue, 02 Jun 2015 16:10:38 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:101::1]:34534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzsWB-0001ux-KZ for qemu-devel@nongnu.org; Tue, 02 Jun 2015 16:10:35 -0400 Date: Tue, 2 Jun 2015 22:10:32 +0200 From: Aurelien Jarno Message-ID: <20150602201032.GA5379@aurel32.net> References: <1433244411-9693-1-git-send-email-aurelien@aurel32.net> <1433244411-9693-4-git-send-email-aurelien@aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433244411-9693-4-git-send-email-aurelien@aurel32.net> Subject: Re: [Qemu-devel] [PATCH RFC 3/5] softmmu: add a tlb_vaddr_to_host_fill function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Alexander Graf , Yongbok Kim , Paolo Bonzini , Leon Alrae , Andreas =?iso-8859-15?Q?F=E4rber?= , Richard Henderson On 2015-06-02 13:26, Aurelien Jarno wrote: > The softmmu code already provides a tlb_vaddr_to_host function, which > returns the host address corresponding to a guest virtual address, > *if it is already in the QEMU MMU TLB*. > > This patch is an attempt to have a function which try to fill the TLB > entry if it is not already in the QEMU MMU TLB, possibly trigger a guest > fault. It can be used directly in helpers. For that it creates a common > function with a boolean to tell if the TLB needs to be filled or not. If > yes, it causes tlb_fill, which might trigger an exception or succeed in > which case the tlbentry pointer need to be reloaded. > > I also had to change the MMIO test part. It seems that in write mode > some TLB entries are filled with TLB_NOTDIRTY. They are caught by the > MMIO test and a NULL pointer is returned instead. I am not sure of my > change, but I guess the current softmmu code has the same issue. It looks like we have to go through the MMIO functions to get the TLB_NOTDIRTY bit cleaned correctly. This is something we don't want for probe_write, so we definitely want two different functions. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net