From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [PATCH 3/7] Return info for device and its memory regions and interrupts Date: Tue, 01 Oct 2013 13:41:40 -0600 Message-ID: <1380656500.14271.40.camel@ul30vt.home> References: <1380554923-17818-1-git-send-email-a.motakis@virtualopensystems.com> <1380554923-17818-4-git-send-email-a.motakis@virtualopensystems.com> <1380562776.2674.177.camel@ul30vt.home> <9F6FE96B71CF29479FF1CDC8046E15036D3803@039-SN1MPN1-003.039d.mgd.msft.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <9F6FE96B71CF29479FF1CDC8046E15036D3803-TcFNo7jSaXOLgTCmFNXF2K4g8xLGJsHaLnY5E4hWTkheoWH0uzbU5w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Yoder Stuart-B08248 Cc: Linux Samsung SOC , KVM devel mailing list , Alexander Graf , Linux IOMMU , Antonios Motakis , VirtualOpenSystems Technical Team , kvm-arm List-Id: iommu@lists.linux-foundation.org On Tue, 2013-10-01 at 19:32 +0000, Yoder Stuart-B08248 wrote: > > Antonios Motakis wrote > > > Alex Williamson wrote: > > > I notice all the open firmware calls here and I'm curious, > > > will all platform devices be making use of open firmware? > > > I don't know if this is synonymous with device tree or not. > > > Thanks, > > > > This VFIO driver will support only devices implemented > > on the device tree. While there can be platform devices > > outside the device tree, I don't think it makes sense > > to support them from the same driver. This is why I > > originally called the driver VFIO_DT, however I renamed > > it to VFIO_PLATFORM after feedback from the first > > RFC. However personally, I still think the VFIO_DT name > > is more appropriate since we don't support all platform > > devices, only those that use the device tree. > > But there is no 'device tree' bus. The bus type we're > dealing with is a platform bus. > > vfio for platform devices should be independent of whether > the device was discovered in a device tree or not. > All you're doing is exposing mappable regions and IRQs > to user space and it does not matter where the info originated. > > You should be using platform bus structs here not > reparsing device tree nodes. The struct > platform_device already has resource info in the > struct: > > struct platform_device { > const char *name; > u32 id; > struct device dev; > u32 num_resources; > struct resource *resource; > }; It seems likely(?) that platform devices could be described via ACPI at some point, so keeping this abstraction would be a plus. Thanks, Alex