[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 3/4] x86/debug: move debugger_trap_entry into debugger.c not inlined
On 13.07.2021 03:59, Bobby Eshleman wrote: > The function debugger_trap_entry() is rather large for an inlined > function. Well, yes, perhaps. > --- a/xen/arch/x86/Makefile > +++ b/xen/arch/x86/Makefile > @@ -32,6 +32,7 @@ obj-y += emul-i8254.o > obj-y += extable.o > obj-y += flushtlb.o > obj-$(CONFIG_CRASH_DEBUG) += gdbstub.o > +obj-$(CONFIG_CRASH_DEBUG) += debugger.o Please insert at the appropriate location, rather than breaking the (mostly) alphabetical sorting. > --- /dev/null > +++ b/xen/arch/x86/debugger.c > @@ -0,0 +1,41 @@ > +/****************************************************************************** > + * x86 crash debug hooks > + * > + * 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/>. > + */ > + > +#include <asm/debugger.h> > +#include <xen/domain.h> > +#include <xen/event.h> > +#include <xen/sched.h> > + > +bool debugger_trap_entry( > + unsigned int vector, struct cpu_user_regs *regs) As you have to touch this anyway, can you please bring it in line with the stubs introduced in the first patch, by constifying the 2nd parameter? > +{ > + /* > + * This function is called before any checks are made. Amongst other > + * things, be aware that during early boot, current is not a safe pointer > + * to follow. > + */ > + struct vcpu *v = current; This one can (and hence better would) gain a "const" as well. Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |