Chris Lalancette
2008-May-21 13:13 UTC
[Fwd: [PATCH]: Fix silly output for virtio devices in /proc/interrupts]
(sent to the kvm list erroneously) -------------- next part -------------- An embedded message was scrubbed... From: Chris Lalancette <clalance at redhat.com> Subject: [PATCH]: Fix silly output for virtio devices in /proc/interrupts Date: Wed, 21 May 2008 14:51:45 +0200 Size: 4582 Url: http://lists.linux-foundation.org/pipermail/virtualization/attachments/20080521/38a29f92/attachment.eml
Rusty Russell
2008-May-22 12:38 UTC
[Fwd: [PATCH]: Fix silly output for virtio devices in /proc/interrupts]
On Wednesday 21 May 2008 23:13:05 Chris Lalancette wrote:> Author: Chris Lalancette <clalance at redhat.com> > 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. The following patch should fix it for s/390 (it's identical to the lguest patch), but would prefer testing (S/390-ers cc'd). ==virtio: S/390 set name of virtio devices directly. Chris has a patch 'Fix silly output for virtio devices in /proc/interrupts' which requires callers to the virtio driver infrastructure to set the bus_ids themselves. This does that for s/390. Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> Cc: Christian Borntraeger <borntraeger at de.ibm.com> Cc: Martin Schwidefsky <schwidefsky at de.ibm.com> Cc: Carsten Otte <cotte at de.ibm.com> Cc: Heiko Carstens <heiko.carstens at de.ibm.com> Cc: Chris Lalancette <clalance at redhat.com> --- drivers/s390/kvm/kvm_virtio.c | 2 ++ 1 file changed, 2 insertions(+) diff -r c903ef6b391f drivers/s390/kvm/kvm_virtio.c --- a/drivers/s390/kvm/kvm_virtio.c Thu May 22 22:31:31 2008 +1000 +++ b/drivers/s390/kvm/kvm_virtio.c Thu May 22 22:32:55 2008 +1000 @@ -265,6 +265,8 @@ static void add_kvm_device(struct kvm_de kdev->vdev.dev.parent = &kvm_root; kdev->vdev.index = dev_index++; + snprintf(kdev->vdev.dev.bus_id, BUS_ID_SIZE, "virtio%d", + kdev->vdev.index); kdev->vdev.id.device = d->type; kdev->vdev.config = &kvm_vq_configspace_ops; kdev->desc = d;
Apparently Analagous Threads
- [Fwd: [PATCH]: Fix silly output for virtio devices in /proc/interrupts]
- [patch 0/4] Revised softlockup watchdog improvement patches
- [patch 0/4] Revised softlockup watchdog improvement patches
- [PATCH]: Make Xen 3.1 IDE flush on O_DIRECT with drive caching off
- [PATCH]: Fix syscall return code when ptrace or audit is active