x86/pv: Simplify access to the LDT/GDT ptes
authorAndrew Cooper <andrew.cooper3@citrix.com>
Sat, 26 Aug 2017 11:11:07 +0000 (11:11 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 30 Aug 2017 10:03:08 +0000 (11:03 +0100)
commitd4c5054907f93f87b805501980bf764db7988ee8
tree8b1769fc302cb862af4536973d42f3cc19d9b086
parent2f7cc6005a19b1945dd41af6e5fe0ad348c21d66
x86/pv: Simplify access to the LDT/GDT ptes

Rename gdt_ldt_ptes() to pv_gdt_ptes() and drop the domain parameter, as it is
incorrect to use the helper with d != v->domain.

Introduce pv_ldt_ptes() to abstract away the fact that the LDT mapping is 16
slots after the GDT, and adjust the callers accordingly.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/domain.c
xen/arch/x86/mm.c
xen/include/asm-x86/domain.h