From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoDXu-0002FA-MM for qemu-devel@nongnu.org; Wed, 04 Dec 2013 09:35:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoDXc-00034r-QV for qemu-devel@nongnu.org; Wed, 04 Dec 2013 09:35:22 -0500 Received: from e9.ny.us.ibm.com ([32.97.182.139]:37255) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoDXc-00034N-M8 for qemu-devel@nongnu.org; Wed, 04 Dec 2013 09:35:04 -0500 Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 4 Dec 2013 09:35:04 -0500 From: Michael Roth Date: Wed, 4 Dec 2013 08:34:29 -0600 Message-Id: <1386167679-13021-23-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1386167679-13021-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1386167679-13021-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 22/32] exec: fix breakpoint_invalidate when pc may not be translated List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org From: Max Filippov This fixes qemu abort with the following message: include/qemu/int128.h:22: int128_get64: Assertion `!a.hi' failed. which happens due to attempt to invalidate breakpoint by virtual address for which get_phys_page_debug couldn't find mapping. For more details see http://lists.nongnu.org/archive/html/qemu-devel/2013-09/msg04582.html Cc: qemu-stable@nongnu.org Signed-off-by: Max Filippov Reviewed-by: Paolo Bonzini (cherry picked from commit e8262a1b5b7cfbcbc80c46e4ce6ff7c517b7b2f6) Signed-off-by: Michael Roth --- exec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/exec.c b/exec.c index f6674e5..667a718 100644 --- a/exec.c +++ b/exec.c @@ -425,8 +425,10 @@ static void breakpoint_invalidate(CPUState *cpu, target_ulong pc) #else static void breakpoint_invalidate(CPUState *cpu, target_ulong pc) { - tb_invalidate_phys_addr(cpu_get_phys_page_debug(cpu, pc) | - (pc & ~TARGET_PAGE_MASK)); + hwaddr phys = cpu_get_phys_page_debug(cpu, pc); + if (phys != -1) { + tb_invalidate_phys_addr(phys | (pc & ~TARGET_PAGE_MASK)); + } } #endif #endif /* TARGET_HAS_ICE */ -- 1.7.9.5