lguest PAE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeremy, I fixed the code following your comments (hope you still
remember).

I'd like to ask you again about this one:
  
> >  /* Found in switcher.S */
> >  extern unsigned long default_idt_entries[];
> > diff --git a/arch/x86/include/asm/lguest_hcall.h b/arch/x86/include/asm/lguest_hcall.h
> > index 0f4ee71..3860153 100644
> > --- a/arch/x86/include/asm/lguest_hcall.h
> > +++ b/arch/x86/include/asm/lguest_hcall.h
> > @@ -17,6 +17,7 @@
> >  #define LHCALL_SET_PMD		15
> >  #define LHCALL_LOAD_TLS		16
> >  #define LHCALL_NOTIFY		17
> > +#define LHCALL_SET_PUD		18
> >   
> 
> PGD is more accurate than PUD (here, and the rest of the patch).  The 
> pud level of the pagetable is the 4th level used by 64-bit; PAE just has 
> PGD, PMD and PTE levels.  Due to pagetable level folding, the PGD is 
> sometimes referred to as the PUD when looking "up" the pagetable tree 
> (ie, the PUD is logically the next level up from the PMD), but its still 
> just an alias for the PGD.  Since the hypervisor interface shouldn't 
> care about how the guest OS manages its pagetables, it should use a 
> consistent naming for the levels as they "really" are.  Lguest 
> traditionally uses the same names that Linux does, so PGD is appropriate.
  
I understand, but then should we change also the LHCALL_SET_PMD name ?
this is the one used for setting a new pgd when PAE is NOT activated.


So, just to confirm:  even if we are implementing pv_mmu_ops.set_pud
replacement (lguest_set_pud in our case), we should use LHCALL_SET_PGD
hypercall name in this code because that is what host is going to
actually do? 

static void lguest_set_pud(pud_t *pudp, pud_t pudval)
{
	native_set_pud(pudp, pudval);

	/* 32 bytes aligned pdpt address. */
	lazy_hcall2(LHCALL_SET_PUD, __pa(pudp) & 0xFFFFFFE0,
		   (__pa(pudp) & 0x1F) / sizeof(pud_t));
}


Thanks, 
Matias

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization

[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux