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] bug fix new_tlbflush_clock_period()

To: Kouya SHIMURA <kouya@xxxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH] bug fix new_tlbflush_clock_period()
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Mon, 5 Feb 2007 10:45:24 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 04 Feb 2007 17:44:54 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200702020647.l126lK0G012157@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/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: <200702020647.l126lK0G012157@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
Hi Kouya.
Good catch!
Although this patch already commited and I made the bug,
vti domain also relies on tlb flush lock.
(See flush_vtlb_for_context_switch())

So we should do
  if (!test_bit(_VCPUF_initialize))
        continue
  if (VMX_DOMAIN(v))
        <flush all hash and collision chain of v>
  else
        vcpu_vhpt_flush()

Or

  disable the tlb flush clock usage in flush_vtlb_for_context_switch().

On Fri, Feb 02, 2007 at 03:58:12PM +0900, Kouya SHIMURA wrote:
Content-Description: message body text
> Hi,
> 
> __vhpt_flush() might be called from new_tlbflush_clock_period()
> even if the vcpu doesn't have the per-vcpu-vhpt. 
> It erases 64KB memory content that starts from machine address 0.
> 
> Thanks,
> Kouya
> 
> Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
> 

> diff -r 0df9dc2f1d03 xen/arch/ia64/xen/flushtlb.c
> --- a/xen/arch/ia64/xen/flushtlb.c    Thu Feb 01 13:54:26 2007 -0700
> +++ b/xen/arch/ia64/xen/flushtlb.c    Fri Feb 02 14:29:45 2007 +0900
> @@ -88,6 +88,9 @@ new_tlbflush_clock_period(void)
>      smp_mb();
>      for_each_domain(d) {
>          for_each_vcpu(d, v) {
> +            if (!test_bit(_VCPUF_initialised, &v->vcpu_flags) ||
> +                VMX_DOMAIN(v))
> +                continue;
>              if (HAS_PERVCPU_VHPT(v->domain))
>                  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