[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] Boot PV guests with more than 128GB (v2) for 3.7
On Mon, Aug 13, 2012 at 08:54:47AM +0100, Jan Beulich wrote: > >>> On 03.08.12 at 16:46, Konrad Rzeszutek Wilk <konrad@xxxxxxxxxx> wrote: > > Didn't get to it yet. Sorry for top posting. If you have a patch ready I > > can test it on Monday - travelling now. > > So here's what I was thinking of (compile tested only). Wow. It took me a whole year to get back to this. Anyhow I did test it and it worked rather nicely for 64-bit guests. I didn't even try to boot 32-bit guests as the pvops changes I did were only for 64-bit guests. But if you have a specific kernel for a 32-bit guest I still have the 1TB machine for a week and can boot it up there. > > Jan > > --- a/tools/libxc/xc_dom_x86.c > +++ b/tools/libxc/xc_dom_x86.c > @@ -241,7 +241,7 @@ static int setup_pgtables_x86_32_pae(str > l3_pgentry_64_t *l3tab; > l2_pgentry_64_t *l2tab = NULL; > l1_pgentry_64_t *l1tab = NULL; > - unsigned long l3off, l2off, l1off; > + unsigned long l3off, l2off = 0, l1off; > xen_vaddr_t addr; > xen_pfn_t pgpfn; > xen_pfn_t l3mfn = xc_dom_p2m_guest(dom, l3pfn); > @@ -283,8 +283,6 @@ static int setup_pgtables_x86_32_pae(str > l2off = l2_table_offset_pae(addr); > l2tab[l2off] = > pfn_to_paddr(xc_dom_p2m_guest(dom, l1pfn)) | L2_PROT; > - if ( l2off == (L2_PAGETABLE_ENTRIES_PAE - 1) ) > - l2tab = NULL; > l1pfn++; > } > > @@ -296,8 +294,13 @@ static int setup_pgtables_x86_32_pae(str > if ( (addr >= dom->pgtables_seg.vstart) && > (addr < dom->pgtables_seg.vend) ) > l1tab[l1off] &= ~_PAGE_RW; /* page tables are r/o */ > + > if ( l1off == (L1_PAGETABLE_ENTRIES_PAE - 1) ) > + { > l1tab = NULL; > + if ( l2off == (L2_PAGETABLE_ENTRIES_PAE - 1) ) > + l2tab = NULL; > + } > } > > if ( dom->virt_pgtab_end <= 0xc0000000 ) > @@ -340,7 +343,7 @@ static int setup_pgtables_x86_64(struct > l3_pgentry_64_t *l3tab = NULL; > l2_pgentry_64_t *l2tab = NULL; > l1_pgentry_64_t *l1tab = NULL; > - uint64_t l4off, l3off, l2off, l1off; > + uint64_t l4off, l3off = 0, l2off = 0, l1off; > uint64_t addr; > xen_pfn_t pgpfn; > > @@ -364,8 +367,6 @@ static int setup_pgtables_x86_64(struct > l3off = l3_table_offset_x86_64(addr); > l3tab[l3off] = > pfn_to_paddr(xc_dom_p2m_guest(dom, l2pfn)) | L3_PROT; > - if ( l3off == (L3_PAGETABLE_ENTRIES_X86_64 - 1) ) > - l3tab = NULL; > l2pfn++; > } > > @@ -376,8 +377,6 @@ static int setup_pgtables_x86_64(struct > l2off = l2_table_offset_x86_64(addr); > l2tab[l2off] = > pfn_to_paddr(xc_dom_p2m_guest(dom, l1pfn)) | L2_PROT; > - if ( l2off == (L2_PAGETABLE_ENTRIES_X86_64 - 1) ) > - l2tab = NULL; > l1pfn++; > } > > @@ -389,8 +388,17 @@ static int setup_pgtables_x86_64(struct > if ( (addr >= dom->pgtables_seg.vstart) && > (addr < dom->pgtables_seg.vend) ) > l1tab[l1off] &= ~_PAGE_RW; /* page tables are r/o */ > + > if ( l1off == (L1_PAGETABLE_ENTRIES_X86_64 - 1) ) > + { > l1tab = NULL; > + if ( l2off == (L2_PAGETABLE_ENTRIES_X86_64 - 1) ) > + { > + l2tab = NULL; > + if ( l3off == (L3_PAGETABLE_ENTRIES_X86_64 - 1) ) > + l3tab = NULL; > + } > + } > } > return 0; > } > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel Attachment:
debug.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |