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

Re: [Xen-devel] apic probe of 2.6.32.41 pv linux

To: Jiageng Yu <yujiageng734@xxxxxxxxx>
Subject: Re: [Xen-devel] apic probe of 2.6.32.41 pv linux
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Fri, 27 May 2011 16:22:45 +0100
Cc: "Xen-devel@xxxxxxxxxxxxxxxxxxx" <Xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Fri, 27 May 2011 17:12:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <BANLkTinydmZz5z+oiJGdjMDOtAd87Ooh2w@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>
References: <BANLkTimUY4cLyZeff=N4tRU+1c3=KimTSw@xxxxxxxxxxxxxx> <20110527135756.GB6734@xxxxxxxxxxxx> <BANLkTinydmZz5z+oiJGdjMDOtAd87Ooh2w@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Fri, 27 May 2011, Jiageng Yu wrote:
> 2011/5/27 Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>:
> > On Fri, May 27, 2011 at 05:58:51PM +0800, Jiageng Yu wrote:
> >> I have updated the pv linux kernel from 2.6.32.40 to 2.6.32.41. I
> >> found the generic_apic_probe always led to a kernel panic when I try
> >> to make the minimal DomU kernel.
> >>
> >> The 2.6.32.41 pv linux use the new apic probe mechanism:
> >
> > new..? What was it before?
> 
> 
> The linux kernel will invoke probe_default, which permanently returns 1.
> I wander to know may I just return 1 in 2.6.32.41 kernel? If there is
> no further problems.
> 

It seems to me that we have to return 1 unless CONFIG_X86_LOCAL_APIC is
disabled, and in that case we wouldn't need to set anything at all.
Considering that the default apic probe function will just return 1, I
suggest we just remove xen_safe_probe completely.
In fact we don't have it upstream.

Patch completely untested below:

---

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 0493093..0c31ceb 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -759,14 +759,6 @@ static __init int xen_safe_flat_acpi_madt_oem_check(char 
*oem_id,
        return 1;
 }
 
-static __init int xen_safe_probe(void) {
-
-       if (!xen_initial_domain())
-               return 0;
-
-       return 1;
-}
-
 struct apic apic_xen = {
        .name   = "xen",
 };
@@ -779,7 +771,6 @@ static __init void set_xen_basic_apic_ops(void)
        apic->icr_write = xen_apic_icr_write;
        apic->wait_icr_idle = xen_apic_wait_icr_idle;
        apic->safe_wait_icr_idle = xen_safe_apic_wait_icr_idle;
-       apic->probe = xen_safe_probe;
        apic->acpi_madt_oem_check  = xen_safe_flat_acpi_madt_oem_check;
        /* Copy over the full contents of the newly modified apic into
         * our apic_xen, which is to be called first by apic_probe[]. */

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

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