search for: pgdir_shift

Displaying 20 results from an estimated 53 matches for "pgdir_shift".

2009 Sep 21
0
[PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
We still assume the Guest and Host have the same PAGE_OFFSET settings, but now we don't assume 0xC0000000. Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> Cc: Matias Zabaljauregui <zabaljauregui at gmail.com> --- drivers/lguest/page_tables.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/lguest/page_tables.c
2009 Sep 24
0
[Lguest] [PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
On Mon, Sep 21, 2009 at 04:52:21PM +0930, Rusty Russell wrote: > > We still assume the Guest and Host have the same PAGE_OFFSET settings, > but now we don't assume 0xC0000000. > > Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> > Cc: Matias Zabaljauregui <zabaljauregui at gmail.com> > --- > drivers/lguest/page_tables.c | 6 ++---- > 1 file
2009 Sep 21
0
[PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
We still assume the Guest and Host have the same PAGE_OFFSET settings, but now we don't assume 0xC0000000. Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> Cc: Matias Zabaljauregui <zabaljauregui at gmail.com> --- drivers/lguest/page_tables.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/lguest/page_tables.c
2009 Sep 24
0
[Lguest] [PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
On Mon, Sep 21, 2009 at 04:52:21PM +0930, Rusty Russell wrote: > > We still assume the Guest and Host have the same PAGE_OFFSET settings, > but now we don't assume 0xC0000000. > > Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> > Cc: Matias Zabaljauregui <zabaljauregui at gmail.com> > --- > drivers/lguest/page_tables.c | 6 ++---- > 1 file
2020 Jul 14
0
[PATCH v4 13/75] x86/boot/compressed/64: Rename kaslr_64.c to ident_map_64.c
...c13d979b..d9932a133ac9 100644 --- a/arch/x86/boot/compressed/kaslr_64.c +++ b/arch/x86/boot/compressed/ident_map_64.c @@ -29,6 +29,15 @@ #define __PAGE_OFFSET __PAGE_OFFSET_BASE #include "../../mm/ident_map.c" +#ifdef CONFIG_X86_5LEVEL +unsigned int __pgtable_l5_enabled; +unsigned int pgdir_shift = 39; +unsigned int ptrs_per_p4d = 1; +#endif + +/* Used by PAGE_KERN* macros: */ +pteval_t __default_kernel_pte_mask __read_mostly = ~0; + /* Used to track our page table allocation area. */ struct alloc_pgt_data { unsigned char *pgt_buf; diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x8...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 04/13] Useful debugging
...page+idx*sizeof(u64)); +} + +static void print_pte(u64 pte, u64 pgd_idx, u64 pud_idx, u64 pmd_idx, u64 pte_idx) +{ + printk(" %3llx: %llx\n", pte_idx, pte); + printk (" (%llx)\n", + ((pgd_idx&(1<<8)?(-1ULL):0ULL)<<48) | + (pgd_idx<<PGDIR_SHIFT) | + (pud_idx<<PUD_SHIFT) | + (pmd_idx<<PMD_SHIFT) | + (pte_idx<<PAGE_SHIFT)); +} + +static void print_pmd(struct lguest_vcpu *vcpu, + u64 pmd, u64 pgd_idx, u64 pud_idx, u64 pmd_idx) +{ + u64 pte; + u64 ptr; + u64 i; + + printk(" %3llx: %llx\n", pmd_idx,...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 04/13] Useful debugging
...page+idx*sizeof(u64)); +} + +static void print_pte(u64 pte, u64 pgd_idx, u64 pud_idx, u64 pmd_idx, u64 pte_idx) +{ + printk(" %3llx: %llx\n", pte_idx, pte); + printk (" (%llx)\n", + ((pgd_idx&(1<<8)?(-1ULL):0ULL)<<48) | + (pgd_idx<<PGDIR_SHIFT) | + (pud_idx<<PUD_SHIFT) | + (pmd_idx<<PMD_SHIFT) | + (pte_idx<<PAGE_SHIFT)); +} + +static void print_pmd(struct lguest_vcpu *vcpu, + u64 pmd, u64 pgd_idx, u64 pud_idx, u64 pmd_idx) +{ + u64 pte; + u64 ptr; + u64 i; + + printk(" %3llx: %llx\n", pmd_idx,...
2007 May 29
0
Fw: [RFC] makedumpfile: xen extraction
...is_xen_vaddr(kvaddr)) + return 0; + + if (is_direct(kvaddr)) + return (unsigned long)kvaddr - DIRECTMAP_VIRT_START; + + if (!is_frame_table_vaddr(kvaddr)) + return 0; + + addr = kvaddr - VIRT_FRAME_TABLE_ADDR; + + dirp = SYMBOL(frametable_pg_dir) - DIRECTMAP_VIRT_START; + dirp += ((addr >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1)) * sizeof(unsigned long long); + if (!readpmem(info, dirp, &entry, sizeof(entry))) + return FALSE; + + dirp = entry & _PFN_MASK; + if (!dirp) + return 0; + dirp += ((addr >> PMD_SHIFT) & (PTRS_PER_PMD - 1)) * sizeof(unsigned long long); + if (!readpmem...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 01/13] HV VM Fix map area for HV.
...I want this to work for + * all addresses, regardless of where they are mapped. + */ + + /* FIXME: Do this better!! */ + + /* grab the start of the page tables */ + asm ("movq %%cr3, %0" : "=r"(cr3)); + + p = get_vaddr(cr3); + + offset = (unsigned long)addr; + offset >>= PGDIR_SHIFT; + offset &= PTRS_PER_PGD-1; + + pgd = p[offset]; + + if (!(pgd & 1)) + return 0; + + p = get_vaddr(pgd); + + offset = (unsigned long)addr; + offset >>= PUD_SHIFT; + offset &= PTRS_PER_PUD-1; + + pud = p[offset]; + + if (!(pud & 1)) + return 0; + + p = get_vaddr(pud); + + of...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 01/13] HV VM Fix map area for HV.
...I want this to work for + * all addresses, regardless of where they are mapped. + */ + + /* FIXME: Do this better!! */ + + /* grab the start of the page tables */ + asm ("movq %%cr3, %0" : "=r"(cr3)); + + p = get_vaddr(cr3); + + offset = (unsigned long)addr; + offset >>= PGDIR_SHIFT; + offset &= PTRS_PER_PGD-1; + + pgd = p[offset]; + + if (!(pgd & 1)) + return 0; + + p = get_vaddr(pgd); + + offset = (unsigned long)addr; + offset >>= PUD_SHIFT; + offset &= PTRS_PER_PUD-1; + + pud = p[offset]; + + if (!(pud & 1)) + return 0; + + p = get_vaddr(pud); + + of...
2008 Feb 25
6
[PATCH 0/4] ia64/xen: paravirtualization of hand written assembly code
Hi. The patch I send before was too large so that it was dropped from the maling list. I'm sending again with smaller size. This patch set is the xen paravirtualization of hand written assenbly code. And I expect that much clean up is necessary before merge. We really need the feed back before starting actual clean up as Eddie already said before. Eddie discussed how to clean up and suggested
2008 Feb 25
6
[PATCH 0/4] ia64/xen: paravirtualization of hand written assembly code
Hi. The patch I send before was too large so that it was dropped from the maling list. I'm sending again with smaller size. This patch set is the xen paravirtualization of hand written assenbly code. And I expect that much clean up is necessary before merge. We really need the feed back before starting actual clean up as Eddie already said before. Eddie discussed how to clean up and suggested
2019 Jul 15
5
[PATCH 0/2] Remove 32-bit Xen PV guest support
The long term plan has been to replace Xen PV guests by PVH. The first victim of that plan are now 32-bit PV guests, as those are used only rather seldom these days. Xen on x86 requires 64-bit support and with Grub2 now supporting PVH officially since version 2.04 there is no need to keep 32-bit PV guest support alive in the Linux kernel. Additionally Meltdown mitigation is not available in the
2019 Jul 15
5
[PATCH 0/2] Remove 32-bit Xen PV guest support
The long term plan has been to replace Xen PV guests by PVH. The first victim of that plan are now 32-bit PV guests, as those are used only rather seldom these days. Xen on x86 requires 64-bit support and with Grub2 now supporting PVH officially since version 2.04 there is no need to keep 32-bit PV guest support alive in the Linux kernel. Additionally Meltdown mitigation is not available in the
2012 Nov 20
12
[PATCH v2 00/11] xen: Initial kexec/kdump implementation
Hi, This set of patches contains initial kexec/kdump implementation for Xen v2 (previous version were posted to few people by mistake; sorry for that). Currently only dom0 is supported, however, almost all infrustructure required for domU support is ready. Jan Beulich suggested to merge Xen x86 assembler code with baremetal x86 code. This could simplify and reduce a bit size of kernel code.
2012 Nov 20
12
[PATCH v2 00/11] xen: Initial kexec/kdump implementation
Hi, This set of patches contains initial kexec/kdump implementation for Xen v2 (previous version were posted to few people by mistake; sorry for that). Currently only dom0 is supported, however, almost all infrustructure required for domU support is ready. Jan Beulich suggested to merge Xen x86 assembler code with baremetal x86 code. This could simplify and reduce a bit size of kernel code.
2012 Nov 20
12
[PATCH v2 00/11] xen: Initial kexec/kdump implementation
Hi, This set of patches contains initial kexec/kdump implementation for Xen v2 (previous version were posted to few people by mistake; sorry for that). Currently only dom0 is supported, however, almost all infrustructure required for domU support is ready. Jan Beulich suggested to merge Xen x86 assembler code with baremetal x86 code. This could simplify and reduce a bit size of kernel code.
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...unctions just like the above two, except they access the Guest * page tables. Hence they return a Guest address. */ -static unsigned long gpgd_addr(struct lg_cpu *cpu, unsigned long vaddr) +static pgd_t *gpgd_addr(struct lg_cpu *cpu, unsigned long vaddr) { unsigned int index = vaddr >> (PGDIR_SHIFT); - return cpu->lg->pgdirs[cpu->cpu_pgd].gpgdir + index * sizeof(pgd_t); + return cpu->lg->pgdirs[cpu->cpu_pgd].gpgdir + index; +} + +#ifdef CONFIG_X86_PAE +static unsigned long gpmd_addr(pgd_t gpgd, unsigned long vaddr) +{ + unsigned long gpage = pgd_pfn(gpgd) << PAGE_SHIFT...
2009 Apr 16
1
NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch
...unctions just like the above two, except they access the Guest * page tables. Hence they return a Guest address. */ -static unsigned long gpgd_addr(struct lg_cpu *cpu, unsigned long vaddr) +static pgd_t *gpgd_addr(struct lg_cpu *cpu, unsigned long vaddr) { unsigned int index = vaddr >> (PGDIR_SHIFT); - return cpu->lg->pgdirs[cpu->cpu_pgd].gpgdir + index * sizeof(pgd_t); + return cpu->lg->pgdirs[cpu->cpu_pgd].gpgdir + index; +} + +#ifdef CONFIG_X86_PAE +static unsigned long gpmd_addr(pgd_t gpgd, unsigned long vaddr) +{ + unsigned long gpage = pgd_pfn(gpgd) << PAGE_SHIFT...
2007 Apr 18
1
[RFC/PATCH LGUEST X86_64 03/13] lguest64 core
...PAGE_SHIFT, + 1, write, 1, &page, &vma) == 1) + ret = page_to_pfn(page); + up_read(&current->mm->mmap_sem); + return ret; +} + +static int is_hv_page(int pgd_idx, int pud_idx, int pmd_idx, int pte_idx) +{ + /* Never release the hv pages */ + u64 addr = (u64)pgd_idx << PGDIR_SHIFT | + (u64)pud_idx << PUD_SHIFT | + (u64)pmd_idx << PMD_SHIFT | + (u64)pte_idx << PAGE_SHIFT; + /* sign extend */ + if (pgd_idx & (1<<8)) + addr |= 0xffffULL << 48; + return (addr >= HVVM_START) && + (addr < (HVVM_START + HV_VIRT_SIZE)); +} + +stat...