From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v6 07/17] add minimal virtio support for devtree virtio-mmio Date: Fri, 11 Jul 2014 11:27:58 +0200 Message-ID: <53BFAE1E.3020306@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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, christoffer.dall@linaro.org To: Andrew Jones Return-path: Received: from mail-ig0-f169.google.com ([209.85.213.169]:61206 "EHLO mail-ig0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751076AbaGKJ2D (ORCPT ); Fri, 11 Jul 2014 05:28:03 -0400 Received: by mail-ig0-f169.google.com with SMTP id r10so348443igi.4 for ; Fri, 11 Jul 2014 02:28:02 -0700 (PDT) In-Reply-To: <20140711090828.GB6013@hawk.usersys.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 premature and these are unit tests not an OS...). Paolo