]> xenbits.xensource.com Git - xen.git/commit
x86/PV: properly populate descriptor tables
authorJan Beulich <jbeulich@suse.com>
Fri, 25 Sep 2015 07:05:29 +0000 (09:05 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 25 Sep 2015 07:05:29 +0000 (09:05 +0200)
commitcf6d39f81992c29a637c603dbabf1e21a0ea563f
treeb77d6297fa7bb187609c9a81f937d0648387c264
parent8d6ff9ef259e296e6aee32ad8840cc5081280e0d
x86/PV: properly populate descriptor tables

Us extending the GDT limit past the Xen descriptors so far meant that
guests (including user mode programs) accessing any descriptor table
slot above the original OS'es limit but below the first Xen descriptor
caused a #PF, converted to a #GP in our #PF handler. Which is quite
different from the native behavior, where some of such accesses (LAR
and LSL) don't fault. Mimic that behavior by mapping a blank page into
unused slots.

While not strictly required, treat the LDT the same for consistency.

Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm.c