From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755212AbbDTOcj (ORCPT ); Mon, 20 Apr 2015 10:32:39 -0400 Received: from mail-by2on0127.outbound.protection.outlook.com ([207.46.100.127]:55776 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755092AbbDTOci convert rfc822-to-8bit (ORCPT ); Mon, 20 Apr 2015 10:32:38 -0400 From: KY Srinivasan To: Vitaly Kuznetsov CC: "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "olaf@aepfle.de" , "apw@canonical.com" , "jasowang@redhat.com" Subject: RE: [PATCH 5/5] Drivers: hv: vmbus: Implement the protocol for tearing down vmbus state Thread-Topic: [PATCH 5/5] Drivers: hv: vmbus: Implement the protocol for tearing down vmbus state Thread-Index: AQHQe3SxW0gQ75ctKkmuoFyfbnEJFp1V9n1A Date: Mon, 20 Apr 2015 14:32:36 +0000 Message-ID: References: <1429515878-13710-1-git-send-email-kys@microsoft.com> <1429515905-13749-1-git-send-email-kys@microsoft.com> <1429515905-13749-5-git-send-email-kys@microsoft.com> <87twwbcf4h.fsf@vitty.brq.redhat.com> <87vbgqc2ag.fsf@vitty.brq.redhat.com> In-Reply-To: <87vbgqc2ag.fsf@vitty.brq.redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none; x-originating-ip: [2601:8:9b00:fd:f59b:ca03:dea9:2f51] x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0711; x-microsoft-antispam-prvs: x-forefront-antispam-report: BMV:1;SFV:NSPM;SFS:(10019020)(6009001)(52604005)(13464003)(51704005)(377454003)(74316001)(33656002)(46102003)(86362001)(76576001)(93886004)(122556002)(40100003)(19580395003)(2900100001)(62966003)(99286002)(76176999)(2950100001)(50986999)(19580405001)(92566002)(106116001)(102836002)(110136001)(77156002)(54356999)(87936001)(2656002)(3826002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0301MB0711;H:BY2PR0301MB0711.namprd03.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(5002010);SRVR:BY2PR0301MB0711;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0711; x-forefront-prvs: 05529C6FDB 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: 20 Apr 2015 14:32:36.6478 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB0711 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: Monday, April 20, 2015 7:17 AM > To: KY Srinivasan > Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; > devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com; > jasowang@redhat.com > Subject: Re: [PATCH 5/5] Drivers: hv: vmbus: Implement the protocol for > tearing down vmbus state > > KY Srinivasan writes: > > >> -----Original Message----- > >> From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com] > >> Sent: Monday, April 20, 2015 2:40 AM > >> To: KY Srinivasan > >> Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; > >> devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com; > >> jasowang@redhat.com > >> Subject: Re: [PATCH 5/5] Drivers: hv: vmbus: Implement the protocol for > >> tearing down vmbus state > >> > >> "K. Y. Srinivasan" writes: > >> > >> > Implement the protocol for tearing down the monitor state established > >> with > >> > the host. > >> > > >> > Signed-off-by: K. Y. Srinivasan > >> > >> Unfortunatelly this patch leads to the following crash: > > > > Thanks for testing Vitaly. The unload handling is what we want, maybe I > need to > > Invoke unload a little earlier. > > I actually sent two letters this morning :-) The other was: > > The problem is that we call vmbus_disconnect() too late in > vmbus_exit(). We need to call it: > 1) Before hv_cleanup() call as we free hypercall page there (that's what > you see in my crash) > 2) Before hv_remove_vmbus_irq() as we're waiting for the hypervisor to > reply. > > This simple patch fixes the issue: > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c > index 7870a90..2b56260 100644 > --- a/drivers/hv/vmbus_drv.c > +++ b/drivers/hv/vmbus_drv.c > @@ -1106,6 +1106,7 @@ static void __exit vmbus_exit(void) > > vmbus_connection.conn_state = DISCONNECTED; > hv_synic_clockevents_cleanup(); > + vmbus_disconnect(); > hv_remove_vmbus_irq(); > vmbus_free_channels(); > if (ms_hyperv.features & > HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) { > @@ -1118,7 +1119,6 @@ static void __exit vmbus_exit(void) > smp_call_function_single(cpu, hv_synic_cleanup, NULL, > 1); > acpi_bus_unregister_driver(&vmbus_acpi_driver); > hv_cpu_hotplug_quirk(false); > - vmbus_disconnect(); > } > > I suggest we incorporate it into your PATCH 5/5. Thank you; I will resend the patch with your fix. Regards, K. Y > > -- > Vitaly