WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel] PAGE_ED in translate_domain_pte

To: Tristan Gingold <Tristan.Gingold@xxxxxxxx>
Subject: Re: [Xen-ia64-devel] PAGE_ED in translate_domain_pte
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 27 Jul 2006 17:01:28 +0900
Cc: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 27 Jul 2006 01:02:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200607270931.10734.Tristan.Gingold@xxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200607270931.10734.Tristan.Gingold@xxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
It seems that you are right.
Probably I was somewhat confused at that time.

On Thu, Jul 27, 2006 at 09:31:06AM +0200, Tristan Gingold wrote:
> Hi,
> 
> I have a few questions about this changeset.
> See questions in XXXXXXXXXXXX sections.
> 
> # HG changeset patch
> # User awilliam@xxxxxxxxxxx
> # Node ID bbf325d767687745c6838ac43fe48692b6792e54
> # Parent  bd264ded5becccb904ce64c771e3853cca6abeef
> [IA64] translate_domain_pte must handle ED bit and ignre bit[63:53]
> 
> made translate_domain_pte() aware _PAGE_ED bits.
> _PAGE_PPN_MASK doesn't mask ED bit.
> ED bit must be handled explicitly.
> This case can occur by vcpu_itc_d().
> 
> Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
> 
> diff -r bd264ded5bec -r bbf325d76768 xen/arch/ia64/xen/process.c
> --- a/xen/arch/ia64/xen/process.c     Fri Apr 21 09:11:46 2006 -0600
> +++ b/xen/arch/ia64/xen/process.c     Fri Apr 21 09:20:13 2006 -0600
> @@ -87,9 +87,12 @@ unsigned long translate_domain_pte(unsig
>       struct domain *d = current->domain;
>       unsigned long mask, pteval2, mpaddr;
>  
> +     pteval &= ((1UL << 53) - 1);// ignore [63:53] bits
> +
>       // FIXME address had better be pre-validated on insert
>       mask = ~itir_mask(itir);
> -     mpaddr = ((pteval & _PAGE_PPN_MASK) & ~mask) | (address & mask);
> +     mpaddr = (((pteval & ~_PAGE_ED) & _PAGE_PPN_MASK) & ~mask) |
> +              (address & mask);
> XXXXXXXXXXXXXXXXXXXXX
> (pteval &~_PAGE_ED) & _PAGE_PPN_MASK
> is equivalent to: pteval & (_PAGE_PPN_MASK & ~_PAGE_ED)
> However _PAGE_PPN_MASK & _PAGE_ED = 0, so it is equivalent to
> pteval & _PAGE_PPN_MASK
> Therefore this change is useless.
> Correct ?
> XXXXXXXXXXXXXXXXXXX
>       if (d == dom0) {
>               if (mpaddr < dom0_start || mpaddr >= dom0_start + dom0_size) {
>                       /*
> @@ -114,6 +117,7 @@ unsigned long translate_domain_pte(unsig
>       }
>       pteval2 = lookup_domain_mpa(d,mpaddr);
>       pteval2 &= _PAGE_PPN_MASK; // ignore non-addr bits
> +     pteval2 |= (pteval & _PAGE_ED);
>       pteval2 |= _PAGE_PL_2; // force PL0->2 (PL3 is unaffected)
>       pteval2 = (pteval & ~_PAGE_PPN_MASK) | pteval2;
> XXXXXXXXXXXXXXXX
> ~_PAGE_PPN_MASK | _PAGE_ED = ~_PAGE_PPN_MASK
> Therefore the added line (+   ) is useless.
> Correct ?
> XXXXXXXXXXXXXXXX
> 
> Tristan.
> 
> _______________________________________________
> Xen-ia64-devel mailing list
> Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-ia64-devel

-- 
yamahata

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

<Prev in Thread] Current Thread [Next in Thread>