From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751651AbbBGFNv (ORCPT ); Sat, 7 Feb 2015 00:13:51 -0500 Received: from mail-bn1bn0101.outbound.protection.outlook.com ([157.56.110.101]:30848 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750716AbbBGFNt convert rfc822-to-8bit (ORCPT ); Sat, 7 Feb 2015 00:13:49 -0500 X-Greylist: delayed 43268 seconds by postgrey-1.27 at vger.kernel.org; Sat, 07 Feb 2015 00:13:49 EST From: Jake Oshins To: Vitaly Kuznetsov CC: "gregkh@linuxfoundation.org" , KY Srinivasan , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "olaf@aepfle.de" , "apw@canonical.com" Subject: RE: [PATCH v2 1/1] drivers:hv:vmbus drivers:hv:vmbus Allow for more than one MMIO range for children Thread-Topic: [PATCH v2 1/1] drivers:hv:vmbus drivers:hv:vmbus Allow for more than one MMIO range for children Thread-Index: AQHQQh4vGx+zwrc33Uazffsi3BQt3Jzj13swgADIzzA= Date: Sat, 7 Feb 2015 04:57:48 +0000 Message-ID: References: <1422311390-23312-1-git-send-email-jakeo@microsoft.com> <87y4obaxp8.fsf@vitty.brq.redhat.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [174.21.192.40] authentication-results: redhat.com; dkim=none (message not signed) header.d=none; x-microsoft-antispam: BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0717; x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB0717; x-forefront-prvs: 0480A51D4A x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(164054003)(51704005)(377454003)(99286002)(76576001)(106116001)(74316001)(19580395003)(19580405001)(50986999)(40100003)(86612001)(46102003)(76176999)(92566002)(2656002)(87936001)(33656002)(2950100001)(122556002)(110136001)(2900100001)(86362001)(62966003)(54356999)(77156002)(102836002)(66066001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR0301MB0717;H:DM2PR0301MB1232.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: microsoft.onmicrosoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Feb 2015 04:57:48.9252 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0717 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > -----Original Message----- > > From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com] > > Sent: Friday, February 6, 2015 7:04 AM > > To: Jake Oshins > > Cc: gregkh@linuxfoundation.org; KY Srinivasan; linux-kernel@vger.kernel.org; > > devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com > > Subject: Re: [PATCH v2 1/1] drivers:hv:vmbus drivers:hv:vmbus Allow for more > > than one MMIO range for children > > > > Sorry for beeing late with this message but I'm seeing issues with this > > commit. I added some debug to figure out what's going on and here is > > what I see: > > > > With Gen1 VM we end up doing request_resource for two ranges: > > f8000000 - fffbffff > > fe0000000 - fffefffff > > > > request_resource() fails (as we already have PCI device at f8000000 I > > suppose?) but we don't check the return value. release_resource on > > module unload crashes the kernel: > > [ 78.314344] BUG: unable to handle kernel NULL pointer dereference at > > 0000000000000030 > > [ 78.315021] IP: [] release_resource+0x25/0x90 > > [ 78.315021] PGD 78c67067 PUD 78c5a067 PMD 0 > > [ 78.315021] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC > > [ 78.315021] Modules linked in: hv_vmbus(-) > > ... > > If I'm not mistaken, before the change we didn't do any > > request_resource() for Gen1 VMs at all. > > > > With Gen2 VM we do request_resource for fe0000000 - fffffffff range > > only, that means this commit doesn't change anything. > > > > Can you please take a look? I'd like to help but I don't completely > > understand the essense of the change wrt Gen1 VMs with PCI devices. > > > > I'll take a look immediately. > > Thanks, > Jake I looked at this and I realize that I need to fix this problem structurally. The intent is that VMBus-enumerated paravirtual "devices" suballocate from everything granted to the ACPI node above VMBus, in its _CRS object. But since PCI devices also have to suballocate from those ranges, I need a different approach. I'll work up a fix for this and send it around for review. -- Jake Oshins