From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Lalancette Subject: Re: [Fwd: [PATCH]: Fix silly output for virtio devices in /proc/interrupts] Date: Thu, 22 May 2008 14:51:17 +0200 Message-ID: <48356C45.2020802@redhat.com> References: <48341FE1.4070305@redhat.com> <200805222238.58166.rusty@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, Christian Borntraeger , Martin Schwidefsky , Carsten Otte , Heiko Carstens To: Rusty Russell Return-path: Received: from mx1.redhat.com ([66.187.233.31]:39853 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760382AbYEVNAd (ORCPT ); Thu, 22 May 2008 09:00:33 -0400 In-Reply-To: <200805222238.58166.rusty@rustcorp.com.au> Sender: kvm-owner@vger.kernel.org List-ID: Rusty Russell wrote: > On Wednesday 21 May 2008 23:13:05 Chris Lalancette wrote: >> Author: Chris Lalancette >> Date: Thu May 15 09:04:55 2008 -0400 >> >> register_virtio_device was doing something silly, in that it was >> overwriting what the calling driver stuck into .bus_id" for the name. This >> caused problems in the output of /proc/interrupts, since when you >> request_irq(), it doesn't actually copy the devname you pass in but just >> stores a pointer to the data. The fix is to just not have >> register_virtio_device do anything with the bus_id, and assume the higher >> level driver set it up properly. > > OK, but only one higher-level driver will set it up properly: kvm. Neither > lguest nor s/390 do this, and as a result, they fail to register *any* > devices. Ah, OK. Alternatively, we could do: snprintf(bus_id, BUS_ID_SIZE, "virtio%d", index) in register_virtio_device(), and just fix the one user who does it themselves (kvm) to not duplicate the work. Either way is fine with me. Chris Lalancette