virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Matias Zabaljauregui <zabaljauregui-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Jeremy Fitzhardinge <jeremy-TSDbQ3PG+2Y@public.gmane.org>
Cc: virtualization-qjLDD68F18O7TbgM5vRIOg@public.gmane.org,
	lguest-mnsaURCQ41sdnm+yROfE0A@public.gmane.org
Subject: lguest PAE
Date: Mon, 25 May 2009 13:25:49 -0300	[thread overview]
Message-ID: <1243268749.7267.40.camel@zetabook> (raw)
In-Reply-To: <49E7785D.1040501-TSDbQ3PG+2Y@public.gmane.org>

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

  parent reply	other threads:[~2009-05-25 16:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-16 17:21 NULL pointer dereference at __switch_to() ( __unlazy_fpu ) with lguest PAE patch Matias Zabaljauregui
2009-04-16 18:26 ` Jeremy Fitzhardinge
     [not found]   ` <49E7785D.1040501-TSDbQ3PG+2Y@public.gmane.org>
2009-04-17  0:45     ` Matias Zabaljauregui
2009-05-25 16:25     ` Matias Zabaljauregui [this message]
2009-05-26 19:58       ` lguest PAE Jeremy Fitzhardinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1243268749.7267.40.camel@zetabook \
    --to=zabaljauregui-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=jeremy-TSDbQ3PG+2Y@public.gmane.org \
    --cc=lguest-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    --cc=virtualization-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).