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

[Xen-ia64-devel] PAGE_ED in translate_domain_pte

To: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>, Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Subject: [Xen-ia64-devel] PAGE_ED in translate_domain_pte
From: Tristan Gingold <Tristan.Gingold@xxxxxxxx>
Date: Thu, 27 Jul 2006 09:31:06 +0200
Delivery-date: Thu, 27 Jul 2006 00:26:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.5
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

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