From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 30/62] x86/head/64: Move early exception dispatch to C code Date: Wed, 12 Feb 2020 13:39:02 +0100 Message-ID: <20200212123902.GG20066@8bytes.org> References: <20200211135256.24617-1-joro@8bytes.org> <20200211135256.24617-31-joro@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Andy Lutomirski Cc: X86 ML , "H. Peter Anvin" , Dave Hansen , Peter Zijlstra , Thomas Hellstrom , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , LKML , kvm list , Linux Virtualization , Joerg Roedel List-Id: virtualization@lists.linuxfoundation.org On Tue, Feb 11, 2020 at 02:44:45PM -0800, Andy Lutomirski wrote: > How about int (or bool) handled; Or just if (!early_make_pgtable) > return; This would also be nicer if you inverted the return value so > that true means "I handled it". Okay, makes sense. Changed the return value of early_make_pgtable() to bool and this function to: void __init early_exception(struct pt_regs *regs, int trapnr) { if (trapnr == X86_TRAP_PF && early_make_pgtable(native_read_cr2())) return; early_fixup_exception(regs, trapnr); } Regards, Joerg