From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qo7rQ-0007pd-Bg for qemu-devel@nongnu.org; Tue, 02 Aug 2011 01:49:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qo7rP-0004SA-9T for qemu-devel@nongnu.org; Tue, 02 Aug 2011 01:49:48 -0400 Received: from mail.mc.net ([209.172.128.24]:43332) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Qo7rP-0004S6-4F for qemu-devel@nongnu.org; Tue, 02 Aug 2011 01:49:47 -0400 Message-ID: <4E37925A.6010800@mc.net> Date: Tue, 02 Aug 2011 00:59:54 -0500 From: Bob Breuer MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Sparc: fix non-faulting unassigned memory accesses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel Blue Swirl wrote: > Commit b14ef7c9ab41ea824c3ccadb070ad95567cca84e > introduced cpu_unassigned_access() function. On Sparc, > the function does not restore AREG0 used for global CPUState > on function exit, causing bugs with non-faulting unassigned > memory accesses. Alpha, Microblaze and MIPS are not affected. > > Fix by restoring AREG0 on exit. Remove excess saving by > do_unassigned_access() functions. > > Also ignore unassigned accesses outside of CPU context. > > Reported-by: Bob Breuer > Signed-off-by: Blue Swirl > --- > target-sparc/op_helper.c | 25 ++++++++----------------- > 1 files changed, 8 insertions(+), 17 deletions(-) > [snip] Works for my testcases. Tested-by: Bob Breuer