From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: Re: [PATCH v6 07/17] add minimal virtio support for devtree virtio-mmio Date: Fri, 11 Jul 2014 11:36:16 +0200 Message-ID: <20140711093616.GC6013@hawk.usersys.redhat.com> References: <1405066787-5793-1-git-send-email-drjones@redhat.com> <1405066787-5793-8-git-send-email-drjones@redhat.com> <53BFA133.7080608@redhat.com> <20140711090828.GB6013@hawk.usersys.redhat.com> <53BFAE1E.3020306@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, christoffer.dall@linaro.org To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:63328 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752897AbaGKJgY (ORCPT ); Fri, 11 Jul 2014 05:36:24 -0400 Content-Disposition: inline In-Reply-To: <53BFAE1E.3020306@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Jul 11, 2014 at 11:27:58AM +0200, Paolo Bonzini wrote: > Il 11/07/2014 11:08, Andrew Jones ha scritto: > >>> lib/arm/virtio.c > >>> > >>> where virtio_bind is in lib/arm/virtio.c. > >>> > >Well, virtio_bind will still need to be in lib/virtio.c, but just as > >a wrapper to arch_virtio_bind. > > Ok, that's just a naming thing. > > >And, I'm inclined to keep virtio_bind_busses > >in arm's arch_virtio_bind. > > Why? To support virtio-pci in the future? It seems like a good thing to > have (future support for virtio-pci) but even then you'd have only two tests > and that's already the exception. The common case would be just one. You > could write that as > > struct virtio_device *arch_virtio_bind(u32 devid) > { > struct virtio_device *vdev; > > vdev = arch_virtio_mmio_bind(devid); > if (!vdev) > vdev = arch_virtio_pci_bind(devid); > return vdev; > } > > (I don't see kvm-unit-tests using ACPI in the future. Having DT+ACPI x > mmio+pci would be a good reason to have the array, but even then it's Yes, that was the reason. > premature and these are unit tests not an OS...). But, true and true. I guess I'll drop the table for now. drew