Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753386AbbENH7L (ORCPT ); Thu, 14 May 2015 03:59:11 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:54075 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752028AbbENH7H (ORCPT ); Thu, 14 May 2015 03:59:07 -0400 User-Agent: K-9 Mail for Android In-Reply-To: <20150514075957-mutt-send-email-mst@redhat.com> References: <1431431730-25164-1-git-send-email-mst@redhat.com> <1431431730-25164-2-git-send-email-mst@redhat.com> <871tilmwiq.fsf@x220.int.ebiederm.org> <20150513081101-mutt-send-email-mst@redhat.com> <20150514075957-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 From: "Eric W. Biederman" Date: Thu, 14 May 2015 02:58:59 -0500 To: "Michael S. Tsirkin" CC: linux-kernel@vger.kernel.org, Bjorn Helgaas , linux-pci@vger.kernel.org, Fam Zheng , Yinghai Lu , Yijing Wang , Ulrich Obergfell , Rusty Russell Message-ID: <46708A26-16CB-4417-BCFA-12F4C78FC2F7@xmission.com> X-XM-AID: U2FsdGVkX1/5SRyBRloeXrPCpqsyHpn2AGNSu6cGX9w= X-SA-Exim-Connect-IP: 67.3.205.90 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject * 0.0 T_TooManySym_02 5+ unique symbols in subject X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;"Michael S. Tsirkin" X-Spam-Relay-Country: X-Spam-Timing: total 605 ms - load_scoreonly_sql: 0.21 (0.0%), signal_user_changed: 6 (1.0%), b_tie_ro: 3.9 (0.6%), parse: 1.28 (0.2%), extract_message_metadata: 5 (0.9%), get_uri_detail_list: 1.59 (0.3%), tests_pri_-1000: 6 (1.0%), tests_pri_-950: 1.58 (0.3%), tests_pri_-900: 1.34 (0.2%), tests_pri_-400: 22 (3.6%), check_bayes: 21 (3.4%), b_tokenize: 6 (1.0%), b_tok_get_all: 6 (1.0%), b_comp_prob: 2.9 (0.5%), b_tok_touch_all: 2.7 (0.5%), b_finish: 0.76 (0.1%), tests_pri_0: 542 (89.5%), tests_pri_500: 6 (0.9%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH v6 1/2] PCI/MSI: Don't disable MSI/MSI-X at shutdown X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2087 Lines: 57 On May 14, 2015 1:06:00 AM CDT, "Michael S. Tsirkin" wrote: >On Wed, May 13, 2015 at 08:41:55AM +0200, Michael S. Tsirkin wrote: >> > This also sounds like a case for implementing a shutdown callback >and >> > disabling things properly. A properly shutdown driver should have >> > already disabled MSI's. A driver is responsible for enabling MSIs >so it >> > should be responsible for disabling it. The core disabling MSIs is >> > mostly to catch the handful of lazy drivers that forget. >> >> >> Okay! And I am saying that if the driver did forget, >> we are better off not disabling it - leave it enabled >> until kexec starts and disables it. >> >> >> > The bottom line is that there are a few things that are standard >> > behavior that we can do in the generic code, but at the end of the >day >> > it is the responsibility of the driver to shut things down and >whatever >> > driver you are dealing with clearly has a bunch of bugs and you >aren't >> > fixing it. >> >> So please let us get on with fixing it in driver and stop >> playing with device in core. > >Eric, does this argument make sense? Drivers should do the right thing >in their shutdown callback, let's not try to work around their bugs in >core. Not in context of this patch, as this change appears to be to avoid fixing the driver. Further this behavior in the core has existed for the better part of a decade. Who knows what weird behavior (called regressions) this will trigger with other drivers in other situations. I do not see any reason to change the existing behavior here. Especially as if you try and boot a non-linux kernel with kexec you are almost certainly going to subject it to a screaming MSI interrupt and there almost certainly will not be code to disable MSIs as they are disabled by at boot up by default. Eric -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/