From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753721AbbIGHmY (ORCPT ); Mon, 7 Sep 2015 03:42:24 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:34782 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751298AbbIGHmW (ORCPT ); Mon, 7 Sep 2015 03:42:22 -0400 Date: Mon, 7 Sep 2015 09:42:18 +0200 From: Ingo Molnar To: "Maciej W. Rozycki" Cc: Borislav Petkov , Andy Lutomirski , Paolo Bonzini , Peter Zijlstra , Linus Torvalds , Willy Tarreau , Steven Rostedt , X86 ML , "linux-kernel@vger.kernel.org" , Thomas Gleixner , Brian Gerst Subject: Re: Dealing with the NMI mess Message-ID: <20150907074218.GC19280@gmail.com> References: <20150724195509.GM2859@worktop.programming.kicks-ass.net> <20150724205119.GM19282@twins.programming.kicks-ass.net> <55BA45A2.8050909@redhat.com> <20150731042205.GB32117@nazgul.tnic> <20150731080303.GA2128@nazgul.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Maciej W. Rozycki wrote: > I did some work on this a few years ago, including emulating DR0-7 accesses in > software down the JTAG handler upon a General Detect fault to keep the kernel > both happy and away from real debug registers. ;) Yes, you can debug any > software with this stuff, including the Linux kernel: set instruction and data > breakpoints, single-step it, poke at all hardware registers, including > descriptor registers not otherwise accessible (you can set funny modes for > segments, also in the 64-bit mode), etc. One complication though is you operate > on physical addresses when poking at memory, you can't ask the CPU's MMU to > remap them for you (you can walk page tables manually of course, just as the MMU > would). Essentially the ICE breakpoint instruction enters SMM mode? Thanks, Ingo