|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
Re: [Xen-ia64-devel] PAGE_ED in translate_domain_pte
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
|
|
|
|
|