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] Re: [PATCH] Fix mca handler so as not to destroy ar

Hi,

I think gp passed from SAL is changed to a virtual address by
DATA_PA_TO_VA() in VIRTUAL_MODE_ENTER().

#define DATA_PA_TO_VA(addr,temp)                        \
        mov     temp    = 0xf   ;;                      \
        dep     addr    = temp, addr, 60, 4

Could you please explain the issue a little more in detail?

Thanks,
KAZ


From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] Re: [PATCH] Fix mca handler so as not to destroy 
ar
Date: Thu, 7 Aug 2008 19:30:11 +0900

> On Tue, Aug 05, 2008 at 02:19:06PM +0900, Isaku Yamahata wrote:
> > On Tue, Aug 05, 2008 at 12:37:17PM +0900, Isaku Yamahata wrote:
> > > 
> > > Hi Kazu. Sorry for late alert.
> > > VIRTUAL_MODE_ENTER() still refers ar.k6.
> > > Could you fix it?
> > 
> > One more.
> > Before pinning down vpd and vhpt, it's necessary to
> > make sure that they doesn't overlap with stack like __vmxswitch_rr7()
> > and ia64_new_rr7().
> 
> And more.
> VIRTUAL_MODE_ENTER() sets gp (r1) to ia64_os_mca_virtual_begin
> and then call ia64_mca_ucmc_handler().
> It this correct? It looks like that accessing global variable
> in ia64_mca_ucmc_handler() results in rondom place access.
> 
> Linux has the related fix. What do you think?
> 
> commit f5a3f3dc189485d607fbd42678cc23958acc0a6e
> Author: Zou Nan hai <nanhai.zou@xxxxxxxxx>
> Date:   Thu Sep 14 08:25:15 2006 +0800
> 
>     [IA64] Make gp value point to Region 5 in mca handler
>     
>     MCA dispatch code take physical address of GP passed from SAL, then call
>     DATA_PA_TO_VA twice on GP before call into C code.  The first time is
>     in ia64_set_kernel_register, the second time is in VIRTUAL_MODE_ENTER.
>     The gp is changed to a virtual address in region 7 because DATA_PA_TO_VA
>     is implemented by dep instruction.
>     
>     However when notify blocks were called from MCA handler code, because
>     notify blocks are supported by callback function pointers, gp value
>     value was switched to region 5 again.
>     
>     The patch set gp register to kernel gp of region 5 at entry of MCA
>     dispatch.
>     
>     Signed-off-by: Zou Nan hai <nanhai.zou@xxxxxxxxx>
>     Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
> 
> 
> -- 
> yamahata

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