x86-64: Handle exception table entries during early boot
authorH. Peter Anvin <hpa@zytor.com>
Thu, 19 Apr 2012 00:16:49 +0000 (17:16 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Thu, 19 Apr 2012 22:42:45 +0000 (15:42 -0700)
commit9900aa2f95844eb81428c1d3d202c01b7f3ac77a
tree4c93c0eebb8e645e0de8aa767913f6c4f14f1b75
parent6a1ea279c210e7dc05de86dc29c0d4f577f484fb
x86-64: Handle exception table entries during early boot

If we get an exception during early boot, walk the exception table to
see if we should intercept it.  The main use case for this is to allow
rdmsr_safe()/wrmsr_safe() during CPU initialization.

Since the exception table is currently sorted at runtime, and fairly
late in startup, this code walks the exception table linearly.  We
obviously don't need to worry about modules, however: none have been
loaded at this point.

[ v2: Use early_fixup_exception() instead of linear search ]

Link: http://lkml.kernel.org/r/1334794610-5546-5-git-send-email-hpa@zytor.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/include/asm/segment.h
arch/x86/kernel/head_64.S