From patchwork Mon Sep 30 15:28:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonios Motakis X-Patchwork-Id: 2966271 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2AB039F88A for ; Mon, 30 Sep 2013 15:30:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0D47220268 for ; Mon, 30 Sep 2013 15:30:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6E8662018E for ; Mon, 30 Sep 2013 15:29:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756198Ab3I3P3a (ORCPT ); Mon, 30 Sep 2013 11:29:30 -0400 Received: from mail-we0-f178.google.com ([74.125.82.178]:62724 "EHLO mail-we0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756194Ab3I3P33 (ORCPT ); Mon, 30 Sep 2013 11:29:29 -0400 Received: by mail-we0-f178.google.com with SMTP id u57so5757214wes.37 for ; Mon, 30 Sep 2013 08:29:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=grDKShW3enZXUW+sYHkAQPmF1NzBSVnz1J4gchJGZl4=; b=g17XW6AY3IeJw/rgaTmm/jH2tBp/03M7BJMkfd4EfpNsXy1+IjZpxDHKc5BX6yCYug 9ihtLv9hnTUZx8KP9bQBA3ARdUX5rBOxjIiTu04l5ts09MO8GrAO1m1CvLSEyIIrU/Fs QY4PZBuKSUU6VqA2ZWrxw57yxEc2GvC23u2wUipYNL1aOaIPN+QzZu81hV8RC8UPV87R mUGcOjfPkG/Ckk4ed3I8fzWhmySYkiWomgTle2Hj+1+oDMvrqrsBI3WYJ43AEV2wXqjx JzeM5ttMEmSG+V3z9xacD6Z5CegUW4lzrjnwcSbI9UWOk0nhUYRUZpS/I+xykNKw8kqs wdEA== X-Gm-Message-State: ALoCoQnsZq/aJ5OxzRETRwdEMu8DT1gItLd4SsLc+AuLXUp+CNLmIAO+mkYvjVurLZiXJNCAC+94 X-Received: by 10.194.122.99 with SMTP id lr3mr17653853wjb.21.1380554967988; Mon, 30 Sep 2013 08:29:27 -0700 (PDT) Received: from localhost.localdomain (home.tvelocity.eu. [82.67.68.96]) by mx.google.com with ESMTPSA id ey4sm2015579wic.11.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 30 Sep 2013 08:29:27 -0700 (PDT) From: Antonios Motakis To: kvmarm@lists.cs.columbia.edu, alex.williamson@redhat.com Cc: iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, kvm@vger.kernel.org, agraf@suse.de, B08248@freescale.com, tech@virtualopensystems.com, Antonios Motakis Subject: [PATCH 7/7] VFIO: VFIO_PLATFORM: Update documentation for platform specific devices Date: Mon, 30 Sep 2013 17:28:43 +0200 Message-Id: <1380554923-17818-8-git-send-email-a.motakis@virtualopensystems.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1380554923-17818-1-git-send-email-a.motakis@virtualopensystems.com> References: <1380554923-17818-1-git-send-email-a.motakis@virtualopensystems.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Update Documentation/vfio.txt with information regarding the device tree based platform devices support. What is still missing in this RFC series, is information on how to bind the driver to platform devices, as there is currently for PCI. This will be added when proper VFIO driver binding is implemented. --- Documentation/vfio.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/vfio.txt b/Documentation/vfio.txt index b4eafa6..e8daa2b 100644 --- a/Documentation/vfio.txt +++ b/Documentation/vfio.txt @@ -237,6 +237,23 @@ group and can access them as follows: /* Gratuitous device reset and go... */ ioctl(device, VFIO_DEVICE_RESET); +For platform devices, if a device has multiple regions and multiple IRQs the +index that will be assigned by VFIO to those resources will correspond to the +order within the associated "reg" and "interrupt" properties in the device tree +representation of the target device. + +For example, if a device is represented like this in the device tree: + + reg = <0x101e2000 0x1000 0x101e4000 0x1000>; + interrupts = <24 25 26 27>; + +Region #0 is 0x101e2000, region #1 is 0x101e4000 +Interrupt #0 is 24, and so on. + +Additionally for a platform device, unlike PCI devices, an offset referring to +a region within a VFIO device file descriptor will match the physical address +of that region as defined in the device tree. + VFIO User API -------------------------------------------------------------------------------