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

RE: [Xen-ia64-devel] Mapping invalid address


  • To: "Tristan Gingold" <Tristan.Gingold@xxxxxxxx>, <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Magenheimer, Dan (HP Labs Fort Collins)" <dan.magenheimer@xxxxxx>
  • Date: Fri, 17 Mar 2006 12:19:48 -0800
  • Delivery-date: Fri, 17 Mar 2006 20:20:45 +0000
  • List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
  • Thread-index: AcZJz2L5WYLPogZ8Q3GapWrrmIW7UAAL4gpw
  • Thread-topic: [Xen-ia64-devel] Mapping invalid address

And lookup_domain_mpa() may return zero if there is
no existing ("legal") mapping and it is unable to
"create" a mapping.

Yes, this should be fixed, but its not clear *how* it
should be fixed.  If a native OS tries to access a
non-existent machine address, I think an MCA happens,
so Xen should probably do the same, killing the guest.
However, I have seen this problem occur sometimes and I am
not sure of the cause, so left it as a printk.  Perhaps,
at a minimum, the printk in lookup_domain_mpa should
shout ***FIXME!*** louder.

Note also that an itc.d instruction is defined to
only return an illop fault if psr.ic is on so the
failure return in vcpu_itc_d is also wrong (especially
if translate_domain_pte() *does* get changed to return
a zero on failure. 

Dan

> -----Original Message-----
> From: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf 
> Of Tristan Gingold
> Sent: Friday, March 17, 2006 7:35 AM
> To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-ia64-devel] Mapping invalid address
> 
> Hi,
> 
> when domU tries to map an bad mpa, it maps page 0 instead.
> 
> This is how vcpu_itc_d works:
>       pteval = translate_domain_pte(pte,ifa,itir);
>       if (!pteval) return IA64_ILLOP_FAULT;
> 
> Because translate_domain_pte end is:
>       pteval2 = lookup_domain_mpa(d,mpaddr);
>       pteval2 &= _PAGE_PPN_MASK; // ignore non-addr bits
>       pteval2 |= _PAGE_PL_2; // force PL0->2 (PL3 is unaffected)
>       pteval2 = (pteval & ~_PAGE_PPN_MASK) | pteval2;
>       return pteval2;
> }
> 
> Therefore, translate_domain_pte never returns 0.
> 
> it is expected, or should we fix this behavior ?
> 
> Tristan.
> 
> 
> 
> _______________________________________________
> Xen-ia64-devel mailing list
> Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-ia64-devel
> 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.