From: Boris Derzhavets Subject: Re: 2.6.30 dom0 Xen patches Date: Thu, 2 Jul 2009 08:51:13 -0700 (PDT) Message-ID: <7751.72328.qm@web56103.mail.re3.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0971643773==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Andrew Lyon , Jan Beulich Cc: Xen-devel List-Id: xen-devel@lists.xenproject.org --===============0971643773== Content-Type: multipart/alternative; boundary="0-1296431066-1246549873=:72328" --0-1296431066-1246549873=:72328 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Not sure i did right thing, i've edited 60036_xen3-patch-2.6.30.patch1 as f= ollows:- @@ -3957,7 +3982,29 @@ void __init probe_nr_irqs_gsi(void) =A0 =A0=A0=A0=A0 printk(KERN_DEBUG "nr_irqs_gsi: %d\n", nr_irqs_gsi); =A0} + +#ifdef CONFIG_GENERIC_HARDIRQS +int __init arch_probe_nr_irqs(void) +{ +=A0=A0=A0 int nr; + +=A0=A0=A0 if (nr_irqs > (NR_VECTORS * nr_cpu_ids)) +=A0=A0=A0 =A0=A0=A0 nr_irqs =3D NR_VECTORS * nr_cpu_ids; + +=A0=A0=A0 nr =3D nr_irqs_gsi + 8 * nr_cpu_ids; +#if defined(CONFIG_PCI_MSI) || defined(CONFIG_HT_IRQ) +=A0=A0=A0 /* +=A0=A0=A0 =A0* for MSI and HT dyn irq +=A0=A0=A0 =A0*/ +=A0=A0=A0 nr +=3D nr_irqs_gsi * 16; =A0#endif allows to compile unbind_from_irq() in ./linux-2drivers/xen/core/evtchn.c w= ith no errors and xenified kernel been built seems to work OK Make menuconfig didn't require any changes to enable Xen Dom0 support . In .config :- Before build CONFIG_SPARSE_IRQ=3Dy After build # CONFIG_SPARSE_IRQ is not set Boris --- On Thu, 7/2/09, Jan Beulich wrote: From: Jan Beulich Subject: Re: [Xen-devel] 2.6.30 dom0 Xen patches To: "Andrew Lyon" Cc: "Xen-devel" Date: Thursday, July 2, 2009, 2:53 AM >>> Andrew Lyon 01.07.09 19:15 >>> >I have rebased the xen-patches from opensuse >kernel-source-2.6.30-50.1.src.rpm so that they can be applied to >vanilla 2.6.30, the usual patches tarball and gentoo ebuild are >available at http://code.google.com/p/gentoo-xen-kernel/downloads/list=20 >, if you are not using Gentoo simply apply the patches in numeric >order. > >Some notes: > >both dom0 and domU require CONFIG_SPARSE_IRQ=3Dy and CONFIG_HOTPLUG=3Dy >64 bit dom0/domU requires CONFIG_IA32_EMULATION=3Dy May I ask why you found the first and third ones to be necessary? Unless it's because of the conditional in the loop right after the commen "Zap stats across IRQ changes of use." in unbind_from_irq(), which I fixed a few days ago, but didn't push out to our internal repo so far. (The fix is to change the dependency from CONFIG_SPARSE_IRQ to CONFIG_GENERIC_HARDIRQS in the 2.6.30 patch.) The second one seems less meaningful, as I wouldn't think anyone would build a general use (Xen) kernel with EMBEDDED=3Dy, and HOTPLUG is not user selectable without EMBEDDED. May I also ask for you to let us know about fixes to the patches that you find necessary which aren't just due to you applying them to plain 2.6.30? Thanks, Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel =0A=0A=0A --0-1296431066-1246549873=:72328 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Not sure i did right thing, i've edited 60036= _xen3-patch-2.6.30.patch1 as follows:-

@@ -3957,7 +3982,29 @@ void _= _init probe_nr_irqs_gsi(void)
 
     printk(= KERN_DEBUG "nr_irqs_gsi: %d\n", nr_irqs_gsi);
 }
+
+#ifdef CO= NFIG_GENERIC_HARDIRQS
+int __init arch_probe_nr_irqs(void)
+{
+&nb= sp;   int nr;
+
+    if (nr_irqs > (NR_VE= CTORS * nr_cpu_ids))
+        nr_irqs =3D = NR_VECTORS * nr_cpu_ids;
+
+    nr =3D nr_irqs_gsi + 8= * nr_cpu_ids;
+#if defined(CONFIG_PCI_MSI) || defined(CONFIG_HT_IRQ)+    /*
+     * for MSI and HT dyn i= rq
+     */
+    nr +=3D nr_irqs_g= si * 16;
 #endif

allows to compile unbind_from_irq() in ./linux-2drivers/xen/core/evtchn.c with no errors and xenified kernel been= built seems to work OK
Make menuconfig didn't require any changes to en= able Xen Dom0 support .

In .config :-

Before build CONFIG_SPA= RSE_IRQ=3Dy
After build # CONFIG_SPARSE_IRQ is not set

Boris
<= br>--- On Thu, 7/2/09, Jan Beulich <JBeulich@novell.com> wrote:

From: Jan Beulich <JBeulich@nov= ell.com>
Subject: Re: [Xen-devel] 2.6.30 dom0 Xen patches
To: "And= rew Lyon" <andrew.lyon@gmail.com>
Cc: "Xen-devel" <xen-devel@li= sts.xensource.com>
Date: Thursday, July 2, 2009, 2:53 AM

>>> Andrew Lyon <andrew.ly= on@gmail.com> 01.07.09 19:15 >>>
>I have rebased the xen-patches from opensuse
>kernel-source-2.6.30-50.1.src.rpm so that= they can be applied to
>vanilla 2.6.30, the usual patches tarball an= d gentoo ebuild are
>available at http://code.google.com= /p/gentoo-xen-kernel/downloads/list
>, if you are not using Gent= oo simply apply the patches in numeric
>order.
>
>Some no= tes:
>
>both dom0 and domU require CONFIG_SPARSE_IRQ=3Dy and CO= NFIG_HOTPLUG=3Dy
>64 bit dom0/domU requires CONFIG_IA32_EMULATION=3Dy=

May I ask why you found the first and third ones to be necessary? U= nless
it's because of the conditional in the loop right after the commen= "Zap
stats across IRQ changes of use." in unbind_from_irq(), which I fi= xed a
few days ago, but didn't push out to our internal repo so far. (Th= e fix
is to change the dependency from CONFIG_SPARSE_IRQ to
CONFIG_GENERIC_HARDIRQS in the 2.6.30 patch.)

The second one = seems less meaningful, as I wouldn't think anyone would
build a general = use (Xen) kernel with EMBEDDED=3Dy, and HOTPLUG is not
user selectable w= ithout EMBEDDED.

May I also ask for you to let us know about fixes t= o the patches that you
find necessary which aren't just due to you apply= ing them to plain 2.6.30?

Thanks, Jan


___________________= ____________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen= -devel

=0A=0A --0-1296431066-1246549873=:72328-- --===============0971643773== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0971643773==--