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] [patch 07/14] Kexec: Fix ia64_do_tlb_purge so that

To: SUZUKI Kazuhiro <kaz@xxxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [patch 07/14] Kexec: Fix ia64_do_tlb_purge so that it works with XEN
From: Horms <horms@xxxxxxxxxxxx>
Date: Thu, 13 Sep 2007 15:31:43 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 12 Sep 2007 23:32:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070912.180830.235260170.kaz@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>
References: <20070912080845.674923870@xxxxxxxxxxxx> <20070912082602.515298466@xxxxxxxxxxxx> <20070912.180830.235260170.kaz@xxxxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: mutt-ng/devel-r804 (Debian)
On Wed, Sep 12, 2007 at 06:08:30PM +0900, SUZUKI Kazuhiro wrote:
> Hi Simon,
> 
> I have some comments.
> 
> > 1. Make all calls to GET_THIS_PADDR before purging the DTR for PERCPU.
> >    This is because the kernel registers are saved in per_cpu data to allow
> >    the real kernel registers to be used by domains.
> 
> I did not notice that ia64_do_tlb_purge is called from ia64_jump_to_sal.
> SET_PER_CPU_DATA() is called in ia64_os_mca_dispatch that calls
> ia64_do_tlb_purge, because SET_PER_CPU_DATA() has to be called once.

Thanks for pointing this out. Originally I had the code setup as
desribed in point 1. above. But latter you pointed out to me that
I should just call SET_PER_CPU_DATA(). I now make that all in
ia64_do_tlb_purge, and everything seems fine. I will update
the comment accordingly.

> > 2. Wrap the purging of the DTR for PERCPU in #ifdef XEN as Linux
> >    doesn't seem to do this (any more?)
> 
> The following lines are found in Linux tree.
> 
> arch/ia64/kernel/mca_asm.S:
> 104           // 2. Purge DTR for PERCPU data.
> 105           movl r16=PERCPU_ADDR
> 106           mov r18=PERCPU_PAGE_SHIFT<<2
> 107           ;;
> 108           ptr.d r16,r18
> 109           ;;
> 110           srlz.d
> 111           ;;
> 
> Isn't it such a meaning?

Indeed. It seems that the code is present in 2.6.18 - which Xen is
currently based on - but not ~2.6.22, which I was looking at.
I have removed this portion of the patch.

> > 4. Fix VHPT purging code to treat what is at the IA64_DOMAIN_FLAGS_OFFSET
> >    offset as a litteral value (flag) rather than a pointer to a literal.
> 
> Suppose that,
> 
> struct domain *dom            = 0xf000000007ccc080;
> IA64_DOMAIN_FLAGS_OFFSET      = 0x688
> 
>    And I show how the value of r3 becomes since each instruction is executed.
> 
> @@ -289,25 +304,24 @@ ia64_do_tlb_purge:
>       ld8 r3=[r3];;      // r3=0xf000000007ccc080 virtual address of dom
>       dep r3=0,r3,60,4;; // r3=0x0000000007ccc080 physical address of dom
>       add r3=IA64_DOMAIN_FLAGS_OFFSET,r3;; // r3=0x0000000007ccc708 physical 
> address of dom->arch.flags
>       ld8 r3=[r3];;      // r3=2       load the value of domain->arch.flags
> 
> So 'r3=[r3]' is necessary.

Understood. I am pretty sure that this was causing a problem.
I will look into it again.

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/


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

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