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] fix vtlb flush

To: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH] fix vtlb flush
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Wed, 13 Aug 2008 12:45:27 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 12 Aug 2008 20:45:31 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <7kiqu5wtto.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <7kiqu5wtto.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
Hi.
The Hunks in vhpt.c look good.
But, is the hunk in vtlb.c really necessary?
vmx_vcpu_flush_vtlb_all() is called only by domain_flush_vtlb_all()
which checks is_initialized member.

thanks,

On Wed, Aug 13, 2008 at 11:08:03AM +0900, Kouya Shimura wrote:
Content-Description: message body text
> Live migration with uninitialized vcpu will crash xen by null pointer.
> 
> Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
> 

> diff -r d24bc5f549ba xen/arch/ia64/vmx/vtlb.c
> --- a/xen/arch/ia64/vmx/vtlb.c        Mon Aug 11 11:04:52 2008 +0900
> +++ b/xen/arch/ia64/vmx/vtlb.c        Wed Aug 13 10:50:00 2008 +0900
> @@ -633,6 +633,9 @@ static void __thash_purge_all(void *arg)
>  
>  void vmx_vcpu_flush_vtlb_all(VCPU *v)
>  {
> +    if (!v->is_initialised)
> +        return;
> +
>      if (v == current) {
>          thash_purge_all(v);
>          return;
> diff -r d24bc5f549ba xen/arch/ia64/xen/vhpt.c
> --- a/xen/arch/ia64/xen/vhpt.c        Mon Aug 11 11:04:52 2008 +0900
> +++ b/xen/arch/ia64/xen/vhpt.c        Wed Aug 13 10:21:45 2008 +0900
> @@ -526,6 +526,8 @@ void flush_tlb_for_log_dirty(struct doma
>       /* NB. There is no race because all vcpus are paused. */
>       if (is_hvm_domain(d)) {
>               for_each_vcpu (d, v) {
> +                     if (!v->is_initialised)
> +                             continue;
>                       /* XXX: local_flush_tlb_all is called redundantly */
>                       thash_purge_all(v);
>               }
> @@ -533,6 +535,8 @@ void flush_tlb_for_log_dirty(struct doma
>                                       NULL, 1, 1);
>       } else if (HAS_PERVCPU_VHPT(d)) {
>               for_each_vcpu (d, v) {
> +                     if (!v->is_initialised)
> +                             continue;
>                       vcpu_purge_tr_entry(&PSCBX(v,dtlb));
>                       vcpu_purge_tr_entry(&PSCBX(v,itlb));
>                       vcpu_vhpt_flush(v);

> _______________________________________________
> 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