Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752515AbbLKUHF (ORCPT ); Fri, 11 Dec 2015 15:07:05 -0500 Received: from mail-ob0-f180.google.com ([209.85.214.180]:36805 "EHLO mail-ob0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751358AbbLKUHD (ORCPT ); Fri, 11 Dec 2015 15:07:03 -0500 MIME-Version: 1.0 In-Reply-To: <456153d09e85f2f139020a051caed3ca8f8fca73.1449861203.git.tony.luck@intel.com> References: <456153d09e85f2f139020a051caed3ca8f8fca73.1449861203.git.tony.luck@intel.com> From: Andy Lutomirski Date: Fri, 11 Dec 2015 12:06:42 -0800 Message-ID: Subject: Re: [PATCHV2 1/3] x86, ras: Add new infrastructure for machine check fixup tables To: Tony Luck Cc: Ingo Molnar , Borislav Petkov , Andrew Morton , Andy Lutomirski , Dan Williams , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , linux-nvdimm , X86 ML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1131 Lines: 32 On Thu, Dec 10, 2015 at 1:58 PM, Tony Luck wrote: > Copy the existing page fault fixup mechanisms to create a new table > to be used when fixing machine checks. Note: > 1) At this time we only provide a macro to annotate assembly code > 2) We assume all fixups will in code builtin to the kernel. > 3) Only for x86_64 > 4) New code under CONFIG_MCE_KERNEL_RECOVERY > > Signed-off-by: Tony Luck > --- > +#ifdef CONFIG_MCE_KERNEL_RECOVERY > +int fixup_mcexception(struct pt_regs *regs, u64 addr) > +{ > + const struct exception_table_entry *fixup; > + unsigned long new_ip; > + > + fixup = search_mcexception_tables(regs->ip); > + if (fixup) { > + new_ip = ex_fixup_addr(fixup); > + > + regs->ip = new_ip; > + regs->ax = BIT(63) | addr; Can this be an actual #define? --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/