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

[Xen-devel] Re: [PATCH] pvops: Avoid re-alloc_intr_gate of hvm evtchn ca

To: Frank Pan <frankpzh@xxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] pvops: Avoid re-alloc_intr_gate of hvm evtchn callback
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Sat, 5 Mar 2011 10:54:32 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jeremy, Fitzhardinge <Jeremy.Fitzhardinge@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Sat, 05 Mar 2011 02:55:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTinL2nYgcA3eL46JriZnNBog-qQEAaA_qQS6wfxk@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <AANLkTinL2nYgcA3eL46JriZnNBog-qQEAaA_qQS6wfxk@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Sat, 2011-03-05 at 10:11 +0000, Frank Pan wrote:
> I've met a issue that a PV-on-HVM domain become stucked after migration.
> The alloc_intr_gate(HVM_XEN_EVTCHN_CALLBACK) is called the second time
> after the migration and leads to BUG(). (The first time is at system
> initialization)
> 
> The following patch fixes this by check whether this callback is
> registered or not before calling alloc_intr_gate.

Thanks. I presume this is against xen/next-2.6.32? Please always mention
which branch a patch is for.

The upstream kernel already has this check, and it came from the
original commit 38e20b07efd5 "x86/xen: event channels delivery on HVM"
so it looks like the version in the 2.6.32 branch (b24870f7dd7a) was an
older revision of that patch which lacked this check.

I think it would be useful to mention this in the commit message, and
perhaps to use the same comment as upstream to reduce the diff when
comparing the upstream and 2.6.32 branches.

Also your patches need to include a Signed-off-by line in accordance
with Documentation/SubmittingPatches.

Perhaps you might find it useful to do a sweep through
        git://xenbits.xen.org/people/ianc/linux-2.6.git 
debian/squeeze/pvhvm-2.6.32.24
comparing it to the xen/next-2.6.32 branch?

This is a branch I prepared for the Debian Squeeze kernel which contains
a backport of the upstreamed pvhvm support onto pristine (not xen.git)
2.6.32.24. You may find other differences between the xen/next-2.6.32
branch and upstream which represent changes made during the upstreaming
process. If those are bugfixes it would be useful to suggest them for
backport (if so please identify the upstream commit rather than
providing a fresh patch). Although remember that not all the differences
you see will relate to PVHVM or necessarily be bugfixes.

Thanks,
Ian.

> ---
>  linux-2.6-xen/drivers/xen/events.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/linux-2.6-xen/drivers/xen/events.c
> b/linux-2.6-xen/drivers/xen/events.c
> index ac7b42f..77ffceb 100644
> --- a/linux-2.6-xen/drivers/xen/events.c
> +++ b/linux-2.6-xen/drivers/xen/events.c
> @@ -1500,7 +1500,9 @@ void xen_callback_vector(void)
>               }
>               printk(KERN_INFO "Xen HVM callback vector for event delivery is 
> "
>                               "enabled\n");
> -             alloc_intr_gate(XEN_HVM_EVTCHN_CALLBACK, 
> xen_hvm_callback_vector);
> +             /* xen_callback_vector will be called after every domU resume */
> +             if (!test_bit(XEN_HVM_EVTCHN_CALLBACK, used_vectors))
> +                     alloc_intr_gate(XEN_HVM_EVTCHN_CALLBACK, 
> xen_hvm_callback_vector);
>       }
>  }
>  #else
> -- 
> 1.7.0.4
> 
> 



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