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] [PATCH] xen/pci: make bus notifier handler return sane v

To: "Konrad Rzeszutek Wilk" <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xen/pci: make bus notifier handler return sane values
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Wed, 17 Aug 2011 16:37:18 +0100
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 17 Aug 2011 08:37:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110817153130.GA10185@xxxxxxxxxxxx>
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: <4E4B98C00200007800051A56@xxxxxxxxxxxxxxxxxxxx> <20110817145716.GA9680@xxxxxxxxxxxx> <4E4BF7EB0200007800051B77@xxxxxxxxxxxxxxxxxxxx> <20110817153130.GA10185@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> On 17.08.11 at 17:31, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> wrote:
> On Wed, Aug 17, 2011 at 04:18:35PM +0100, Jan Beulich wrote:
>> >>> On 17.08.11 at 16:57, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> 
>> >>> wrote:
>> > On Wed, Aug 17, 2011 at 09:32:32AM +0100, Jan Beulich wrote:
>> >> Notifier functions are expected to return NOTIFY_* codes, not -E...
>> >> ones. In particular, since the respective hypercalls failing is not
>> >> fatal to the operation of the Dom0 kernel, it must be avoided to
>> > 
>> > So if we fail adding a PCI device, won't we be unable to actually
>> > setup its MSI?
>> 
>> Sure (and you also can't pass through such a device), but that's no
>> reason to fail the notification chain. For one, you don't know whether
>> the driver is actually going to use MSI. And even if you knew, it would
>> be bad behavior imo. Plus even if you want to fail the notifier chain,
>> just returning a -E... value here is wrong; notifier_from_errno() ought
>> to be used then.
> 
> Oh, I am not disputing that. I am just wondering whether we should add
> some extra printk's if we fail, and still reutrn either NOTIFY_OK
> oir NOTIFY_DONE.
> 
> That way at least in the field we will have a good inkling of what
> went wrong.

Ah - I just assumed this being silent is intentional, and didn't want to
override whoever decided so. We're in agreement then that this
could/should change.

Jan


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