From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eACph-0007PW-HF for qemu-devel@nongnu.org; Thu, 02 Nov 2017 06:34:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eACpe-0005Xr-BX for qemu-devel@nongnu.org; Thu, 02 Nov 2017 06:34:45 -0400 From: Luc MICHEL Date: Thu, 2 Nov 2017 11:35:58 +0100 Message-Id: <20171102103559.7382-1-luc.michel@git.antfield.fr> Subject: [Qemu-devel] [PATCH 0/1] target-ppc: booke206 tlb: fix tlbwe instruction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Luc MICHEL , qemu-ppc@nongnu.org, David Gibson , Alexander Graf Hi, I was experiencing random segmentation faults of userland applications in a guest e500 powerpc Linux. After investigating, I found that this bug appeared with commit 9fb044911444fdd09f5f072ad0ca269d7f8b841d. This commit introduces more MMU indices to avoid unnecessary TLB flushes when the CPU changes mode. It triggers a new bug however, that I finally traced down into the tlbwe instructions simulation. When replacing a valid TLB entry with a new one, the previous page was not flushed from QEMU TLB. This fixes my random crashes in guest Linux. Note that I think there is a similar issue in booke206_invalidate_ea_tlb but in my case, Linux never triggers this code so I was not able to test. Luc MICHEL (1): target-ppc: Fix booke206 tlbwe TLB instruction target/ppc/mmu_helper.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) -- 2.14.3