[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 6/6] x86: change asm/debugger.h to xen/debugger.h
- To: Bobby Eshleman <bobby.eshleman@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Tue, 28 Sep 2021 22:25:27 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=FfVQOJQU/3cOO6NgzgvvzaHk93JVCT/jCrFjKqyGcbI=; b=kGOPXSmfZlDY9aoAqxybah/6HEpD0CQXR5zfdAr60xwSLi2iSES2V6wqub+G6xk7cM+m8EHUp42mDCo+FbvuSWVRXP8ygpB7LYk8F3cBauR8yN+R9T/wROP5J4iCectn1mtXGvMwSW82A+RNmZydVyRx+ODxyyR1SmAl7GNt95dw/5FJ3vDQAyqE9lorQwS4seWid4v5ph03ovfLd+0KWT+IGeJ5gqZi8Qydn+txVqV+sKwyzR4iJSw3eI29rUuo+GcQgB87x2/usQc4aOBAG41x8ATcc23tMea4DwORrL5gI5Y7oqZFqgSAZPSk/EOe/hqe2G9P0ogLkK+8fH545Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QqrsB+p+vWAVd1ITKTTmP/ehRe6aJFHcG8zg5LPqom6yIvubE0ePtk4Uhp/2KKtsycTSz5EXaYDpI3FFSOWEr1htj5s8rZZUJHJuK116VO63CZcVlATBM+qJ81q7puGEFoYnrBABH32LaD4rz4J2WUW5QDRkiMOU46WKZp4ueACWUFxK9PqQHWYF65o09g8MSRsU7VNlENnuLOkWviqsEETLn68nb4vH8XKL1jQBBX6+IEpZdOMs4Wskz5DpEPE6TGIapBF/PIX3J7lTVh5CyZ4R1uy09uxMYUptYaW0Tt+eh3+kk1AVpajz2ShSLmAh2/ZKJukw6MwfYuhS8LAhbA==
- Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Elena Ufimtseva <elena.ufimtseva@xxxxxxxxxx>, "George Dunlap" <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>
- Delivery-date: Tue, 28 Sep 2021 21:25:54 +0000
- Ironport-data: A9a23:XYRm0qNVd21QDsnvrR3QkcFynXyQoLVcMsEvi/4bfWQNrUpw1WZTn DccDD2POquJNDP2KYtyO9ux/U4P7JeGyIA2SAto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdpJYz/uUGuCJQUNUjMlkfZKhTr6ZUsxNbVU8En552Egzw7VRbrNA2rBVPSvc4 bsenOWHULOV82Yc3rU8sv/rRLtH5ZweiRtA1rAMTakjUGz2zhH5OKk3N6CpR0YUd6EPdgKMq 0Qv+5nilo/R109F5tpICd8XeGVSKlLZFVDmZna7x8FOK/WNz8A/+v9TCRYSVatYoxHZtvkqw YVWiZahbiR5JJPPgcpCbBYNRkmSPYUekFPGCX22sMjVxEzaaXr8hf5pCSnaP6VBpLwxWzsXs 6VFdnZdNXhvhMrvqF6/YsBqit4uM4/AO4QHt2s75TrYEewnUdbIRKCiCdpwgWxg2pwUQ6q2i 8wxZ2o3STHSbzZ2Hlo6FJ4fkraXqWfCSmgNwL6SjfVuuDWCpOBr65D2K8bccNGOQcRTn26bq 3jA8mC/BQsVXPSd1D6E/3SEluLJ2yThV+o6Hrqy/O8sjUaTwm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j92dcsFWjcyiJV1QvhF1fd3AeKxSJ 3wW7NVDxGh3pYQ8oZq1mLa1V
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 28/09/2021 21:30, Bobby Eshleman wrote:
> This commit allows non-x86 architecture to omit the file asm/debugger.h
> if they do not require it. It changes debugger.h to be a general
> xen/debugger.h which, if CONFIG_CRASH_DEBUG, resolves to include
> asm/debugger.h.
>
> It also changes all asm/debugger.h includes to xen/debugger.h.
>
> Because it is no longer required, arm/debugger.h is removed.
>
> Signed-off-by: Bobby Eshleman <bobby.eshleman@xxxxxxxxx>
Julien also acked this patch.
> diff --git a/xen/include/xen/debugger.h b/xen/include/xen/debugger.h
> new file mode 100644
> index 0000000000..ddaa4a938b
> --- /dev/null
> +++ b/xen/include/xen/debugger.h
> @@ -0,0 +1,51 @@
> +/******************************************************************************
> + * Generic hooks into arch-dependent Xen.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; If not, see <http://www.gnu.org/licenses/>.
> + *
> + * Each debugger should define two functions here:
> + *
> + * 1. debugger_trap_fatal():
> + * Called when Xen is about to give up and crash. Typically you will use
> this
> + * hook to drop into a debug session. It can also be used to hook off
> + * deliberately caused traps (which you then handle and return non-zero).
> + *
> + * 2. debugger_trap_immediate():
> + * Called if we want to drop into a debugger now. This is essentially the
> + * same as debugger_trap_fatal, except that we use the current register
> state
> + * rather than the state which was in effect when we took the trap.
> + * For example: if we're dying because of an unhandled exception, we call
> + * debugger_trap_fatal; if we're dying because of a panic() we call
> + * debugger_trap_immediate().
This comment is now duplicated in x86's asm/debugger.h. The x86 copy
wants deleting as part of this move.
> + */
> +
> +#ifndef __XEN_DEBUGGER_H__
> +#define __XEN_DEBUGGER_H__
> +
> +#ifdef CONFIG_CRASH_DEBUG
> +
> +#include <asm/debugger.h>
> +
> +#else
#include <xen/types.h> because you need bool and false to make this compile.
~Andrew
> +
> +struct cpu_user_regs;
> +
> +static inline bool debugger_trap_fatal(
> + unsigned int vector, const struct cpu_user_regs *regs)
> +{
> + return false;
> +}
> +
> +static inline void debugger_trap_immediate(void)
> +{
> +}
> +
> +#endif /* CONFIG_CRASH_DEBUG */
> +
> +#endif /* __XEN_DEBUGGER_H__ */
|