aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/domain.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-01-17 10:56:34 +0100
committerJan Beulich <jbeulich@suse.com>2013-01-17 10:56:34 +0100
commitcda084b3d8901dab95f22aa6047e103e1032d486 (patch)
tree1667d5ddff071a9be2a3be8d57237cebc3dd2d34 /xen/arch/x86/domain.c
parent39bc4673785f6455242f514ea0fa9359bdf1639c (diff)
downloadxen-cda084b3d8901dab95f22aa6047e103e1032d486.tar.gz
xen-cda084b3d8901dab95f22aa6047e103e1032d486.tar.bz2
xen-cda084b3d8901dab95f22aa6047e103e1032d486.zip
miscellaneous cleanup
... noticed while putting together the 16Tb support patches for x86. Briefly, this (in order of the changes below) - fixes an inefficiency in x86's context switch code (translations to/ from struct page are more involved than to/from MFNs) - drop unnecessary MFM-to-page conversions - drop a redundant call to destroy_xen_mappings() (an indentical call is being made a few lines up) - simplify a VA-to-MFN translation - drop dead code (several occurrences) - add a missing __init annotation Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/domain.c')
-rw-r--r--xen/arch/x86/domain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index a40a95077b..a1e16887ef 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -1512,12 +1512,12 @@ static void __context_switch(void)
per_cpu(compat_gdt_table, cpu);
if ( need_full_gdt(n) )
{
- struct page_info *page = virt_to_page(gdt);
+ unsigned long mfn = virt_to_mfn(gdt);
unsigned int i;
for ( i = 0; i < NR_RESERVED_GDT_PAGES; i++ )
l1e_write(n->arch.perdomain_ptes +
FIRST_RESERVED_GDT_PAGE + i,
- l1e_from_page(page + i, __PAGE_HYPERVISOR));
+ l1e_from_pfn(mfn + i, __PAGE_HYPERVISOR));
}
if ( need_full_gdt(p) &&