aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_domain_save.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-01-24 14:49:14 +0100
committerJan Beulich <jbeulich@suse.com>2013-01-24 14:49:14 +0100
commit60ee4fbc385f386dc46ba5e61c9fe280424ed368 (patch)
tree78f9ee1f9111e57b3edf4dc4920dff748982ff2c /tools/libxc/xc_domain_save.c
parent3e9ba471226315fd54e52594ecc021155ef31221 (diff)
downloadxen-60ee4fbc385f386dc46ba5e61c9fe280424ed368.tar.gz
xen-60ee4fbc385f386dc46ba5e61c9fe280424ed368.tar.bz2
xen-60ee4fbc385f386dc46ba5e61c9fe280424ed368.zip
libxc: drop relics of running on non-PAE 32-bit hosts
Additionally drop unused (and dangerous) defines and typedefs, plus a minor legibility improvement to setup_pgtables_x86_{32_pae,64}(). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Diffstat (limited to 'tools/libxc/xc_domain_save.c')
-rw-r--r--tools/libxc/xc_domain_save.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c
index dad681a1d0..d95d59fe87 100644
--- a/tools/libxc/xc_domain_save.c
+++ b/tools/libxc/xc_domain_save.c
@@ -423,10 +423,7 @@ static int canonicalize_pagetable(struct save_ctx *ctx,
** reserved hypervisor mappings. This depends on the current
** page table type as well as the number of paging levels.
*/
- xen_start = xen_end = pte_last = PAGE_SIZE / ((ctx->pt_levels == 2) ? 4 : 8);
-
- if ( (ctx->pt_levels == 2) && (type == XEN_DOMCTL_PFINFO_L2TAB) )
- xen_start = (ctx->hvirt_start >> L2_PAGETABLE_SHIFT);
+ xen_start = xen_end = pte_last = PAGE_SIZE / 8;
if ( (ctx->pt_levels == 3) && (type == XEN_DOMCTL_PFINFO_L3TAB) )
xen_start = L3_PAGETABLE_ENTRIES_PAE;
@@ -474,10 +471,7 @@ static int canonicalize_pagetable(struct save_ctx *ctx,
{
unsigned long pfn, mfn;
- if ( ctx->pt_levels == 2 )
- pte = ((const uint32_t*)spage)[i];
- else
- pte = ((const uint64_t*)spage)[i];
+ pte = ((const uint64_t*)spage)[i];
if ( (i >= xen_start) && (i < xen_end) )
pte = 0;
@@ -515,10 +509,7 @@ static int canonicalize_pagetable(struct save_ctx *ctx,
pte &= ~(_PAGE_USER|_PAGE_RW|_PAGE_ACCESSED);
}
- if ( ctx->pt_levels == 2 )
- ((uint32_t*)dpage)[i] = pte;
- else
- ((uint64_t*)dpage)[i] = pte;
+ ((uint64_t*)dpage)[i] = pte;
}
return race;