From patchwork Mon Apr 24 20:15:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Ostrovsky X-Patchwork-Id: 9697137 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6B2FA601E9 for ; Mon, 24 Apr 2017 20:18:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 610AD28066 for ; Mon, 24 Apr 2017 20:18:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5548A28419; Mon, 24 Apr 2017 20:18:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E412028066 for ; Mon, 24 Apr 2017 20:18:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2kOB-0001i9-LM; Mon, 24 Apr 2017 20:15:15 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d2kOA-0001i3-0o for xen-devel@lists.xen.org; Mon, 24 Apr 2017 20:15:14 +0000 Received: from [85.158.143.35] by server-11.bemta-6.messagelabs.com id AC/B2-03587-1DC5EF85; Mon, 24 Apr 2017 20:15:13 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrAIsWRWlGSWpSXmKPExsXSO6nOVfdCzL8 Ig+P7jCyWfFzM4sDocXT3b6YAxijWzLyk/IoE1ow3c1eyF2wRqeia0cjWwLhXoIuRi0NIYDKT RP/5aWwQzm9Gicv7DjFDOBsZJbqff2KFcLYzSky7sYuxi5GTQ1ggUuLniXZWEFtEwE/i2LQ+R oiiqUwSfS+2MYEkmAWkJa49ecsGYrMJGEmcPTodrJlXwFZi7bcVQM0cHCwCqhL/DsaAhEUFwi XeNh5hgSgRlDg58wkLSAmngJPEtZteEBPVJf7Mu8QMYctLbH87B8yWEDCWaH97kW0Co+AsJN2 zkLTMQtKygJF5FaNGcWpRWWqRrqGRXlJRZnpGSW5iZo6uoYGZXm5qcXFiempOYlKxXnJ+7iZG YOgyAMEOxssbAw4xSnIwKYnyesn9ixDiS8pPqcxILM6ILyrNSS0+xCjDwaEkwasTDZQTLEpNT 61Iy8wBRhFMWoKDR0mE1xEkzVtckJhbnJkOkTrFqMvxbumH90xCLHn5ealS4rxmIEUCIEUZpX lwI2ARfYlRVkqYlxHoKCGegtSi3MwSVPlXjOIcjErCvCIgU3gy80rgNr0COoIJ6Iip9n9Ajih JREhJNTAWKPle3vJEWY5vxueNlwXkhXtc10gdP7k8v9bxl8g9Br71V1ryz1yqVjWImzh5w76z GksNdz33kP/zqtVsXrvpkqM2l/tufw/la9qxRWf1xP2afvadvRnszN1OlzZPFcy6eqfj5ZU56 5KmzLi+l0u4vOLI893cPL/YRFZdvHWzdta071IXbc/7K7EUZyQaajEXFScCAEt8vo3jAgAA X-Env-Sender: boris.ostrovsky@oracle.com X-Msg-Ref: server-13.tower-21.messagelabs.com!1493064910!59242173!1 X-Originating-IP: [141.146.126.69] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTQxLjE0Ni4xMjYuNjkgPT4gMjc3MjE4\n X-StarScan-Received: X-StarScan-Version: 9.4.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 16229 invoked from network); 24 Apr 2017 20:15:12 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-13.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 24 Apr 2017 20:15:12 -0000 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v3OKF7oI027161 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 24 Apr 2017 20:15:07 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v3OKF6mG006705 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 24 Apr 2017 20:15:07 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v3OKF5C3016143; Mon, 24 Apr 2017 20:15:05 GMT Received: from dhcp-burlington7-2nd-B-east-10-152-55-162.usdhcp.oraclecorp.com (/10.152.52.138) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 24 Apr 2017 13:15:05 -0700 To: Sander Eikelenboom , Juergen Gross References: <2dbeed46-7a4b-5b0b-3fd8-742357c89748@eikelenboom.it> <817555fb-c551-413d-3926-e86b69c20316@oracle.com> <144cd857-6bea-ef6d-a08c-fb28f93d3ef6@eikelenboom.it> <2cc07cdc-aa11-d709-e964-36580634310f@oracle.com> <3fe6cf0d-9ae6-1a25-b379-65f4b8bafc7d@eikelenboom.it> From: Boris Ostrovsky Message-ID: <58c48218-b7d8-51d4-981d-4302b1b70aa8@oracle.com> Date: Mon, 24 Apr 2017 16:15:03 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <3fe6cf0d-9ae6-1a25-b379-65f4b8bafc7d@eikelenboom.it> X-Source-IP: aserv0022.oracle.com [141.146.126.234] Cc: xen-devel@lists.xen.org Subject: Re: [Xen-devel] Resend: Linux 4.11-rc7: kernel BUG at drivers/xen/events/events_base.c:1221 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP On 04/24/2017 12:10 PM, Sander Eikelenboom wrote: > On 24/04/17 17:49, Boris Ostrovsky wrote: >> On 04/24/2017 10:20 AM, Sander Eikelenboom wrote: >>> Hi Boris, >>> >>> Nope, not that i am aware of. >> If you can keep console while running this, can you add these changes >> and see if we ever unbind the work vector (you can even add dump_stack() >> in __unbind_from_irq() for good measure)? (I added HHH for easy grepping) >> >> Also do 'grep -i work /proc/interrupts' so that we know which IRQ the >> work interrupt is. >> >> -boris > Hmmm i f*cked up and accidently compiled a tree with "for linus 4.12" > pulled in and ran that instead of the vanilla 4.11-rc7 (while not naming > it "xen-next" as i normally do. > So 4.11-rc7 is most probably fine, sorry for that noise. > > Since your patch doesn't apply the smp part is changed. Seems the > problem somewhere lies in there (Vitaly's patches, general x86 stuff > being pulled in to base that on). I can see if i can adapt the patch > to for linus 4.12 and retest, instead of waiting for it to be pulled in > into Linus his tree in the next merge window. This is trivially reproduced on 4.12 branch with if (!alloc_cpumask_var(&xen_cpu_initialized_map, GFP_KERNEL)) -boris ... diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c index 84106f9..065728f 100644 --- a/drivers/xen/sys-hypervisor.c +++ b/drivers/xen/sys-hypervisor.c @@ -148,7 +148,7 @@ static int __init xen_sysfs_uuid_init(void) } /* xen compilation attributes */ - +void arch_irq_work_raise(void ); static ssize_t compiler_show(struct hyp_sysfs_attr *attr, char *buffer) { int ret = -ENOMEM; @@ -161,7 +161,7 @@ static ssize_t compiler_show(struct hyp_sysfs_attr *attr, char *buffer) ret = sprintf(buffer, "%s\n", info->compiler); kfree(info); } - + arch_irq_work_raise(); return ret; } and then (if you manage to boot): [root@vm-0238 ~]# grep proc /proc/cpuinfo processor : 0 [root@vm-0238 ~]# [root@vm-0238 ~]# cat /sys/hypervisor/compilation/compiler [ 502.160472] ------------[ cut here ]------------ [ 502.160491] kernel BUG at drivers/xen/events/events_base.c:1221! and the fix is diff --git a/arch/x86/xen/smp_pv.c b/arch/x86/xen/smp_pv.c index c0e3b96..aae3253 100644 --- a/arch/x86/xen/smp_pv.c +++ b/arch/x86/xen/smp_pv.c @@ -249,7 +249,7 @@ static void __init xen_pv_smp_prepare_cpus(unsigned int max_cpus) xen_pmu_init(0); - if (xen_smp_intr_init(0)) + if (xen_smp_intr_init(0) || xen_smp_intr_init_pv(0)) BUG();