From patchwork Thu Jan 30 16:11:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 23932 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 493C220341 for ; Thu, 30 Jan 2014 16:11:24 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id fa1sf7981285pad.8 for ; Thu, 30 Jan 2014 08:11:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=IsOQUzqh5ikkpzF62upRHOD7M1CGBjeilhpJEzD9Ye8=; b=jrh7qgHaN24/Iaj79ihjKmWQODbjNQNGnbTfBqfPincAJuvQq3U33YBMDUi/A+slDt 50j4bSr+bUDeVnsK6badGpyMwjTVOmowQOtxC77X2IwjGhcTD4a+6Q+WkVOAW5eZcLLo SfgpVjU5Ov2IqujPlIMQ46o5IKhTPhGq2FS3+diPlVQlk0MFfYHlhAaQ+Fj1ZGVwyB2P 2LzBqIJHtGW/P/dWcwAzDeYSWxmUKJ/KueEA+Ri9j5lM5dG3rgbUScQ/8r/Dyl25tNgl cLzMNuX0qtesIiB7YAX4Sl3K67s+hTqAG5uzlcdXS9fsGuIqqc1xulS6JdA99LlP7kqu qw0g== X-Gm-Message-State: ALoCoQlnqMPbM47cXhA5g9beC5fb1qtEriA+GhLR44uqH7rbVM7Kr5MNwfAS15869p7GhBVowlOp X-Received: by 10.66.172.103 with SMTP id bb7mr4786515pac.44.1391098283595; Thu, 30 Jan 2014 08:11:23 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.39.37 with SMTP id u34ls654236qgu.37.gmail; Thu, 30 Jan 2014 08:11:23 -0800 (PST) X-Received: by 10.52.170.241 with SMTP id ap17mr10396836vdc.13.1391098283411; Thu, 30 Jan 2014 08:11:23 -0800 (PST) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id c14si2242183veu.66.2014.01.30.08.11.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Jan 2014 08:11:23 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id oz11so2253309veb.7 for ; Thu, 30 Jan 2014 08:11:23 -0800 (PST) X-Received: by 10.58.7.1 with SMTP id f1mr12293720vea.15.1391098283279; Thu, 30 Jan 2014 08:11:23 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp24797vcz; Thu, 30 Jan 2014 08:11:22 -0800 (PST) X-Received: by 10.66.139.100 with SMTP id qx4mr15219551pab.141.1391098281238; Thu, 30 Jan 2014 08:11:21 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tq3si6990004pab.299.2014.01.30.08.11.20; Thu, 30 Jan 2014 08:11:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753666AbaA3QLK (ORCPT + 27 others); Thu, 30 Jan 2014 11:11:10 -0500 Received: from smtp.citrix.com ([66.165.176.89]:43070 "EHLO SMTP.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753605AbaA3QLE (ORCPT ); Thu, 30 Jan 2014 11:11:04 -0500 X-IronPort-AV: E=Sophos;i="4.95,750,1384300800"; d="scan'208";a="98154827" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 30 Jan 2014 16:11:03 +0000 Received: from norwich.cam.xci-test.com (10.80.248.129) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.2.342.4; Thu, 30 Jan 2014 11:11:03 -0500 Received: from cosworth.uk.xensource.com ([10.80.16.52] helo=cosworth.uk.xensource.com.) by norwich.cam.xci-test.com with esmtp (Exim 4.72) (envelope-from ) id 1W8uCk-0001TB-N8; Thu, 30 Jan 2014 16:11:02 +0000 From: Ian Campbell To: CC: Ian Campbell , Rob Herring , Pawel Moll , Mark Rutland , Kumar Gala , Olof Johansson , Arnd Bergmann , Marc Zyngier , Will Deacon , Stefano Stabellini , , Subject: [PATCH] arm: document "mach-virt" platform. Date: Thu, 30 Jan 2014 16:11:02 +0000 Message-ID: <1391098262-15944-1-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-DLP: MIA2 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , mach-virt has existed for a while but it is not written down what it actually consists of. Although it seems a bit unusual to document a binding for an entire platform since mach-virt is entirely virtual it is helpful to have something to refer to in the absence of a single concrete implementation. I've done my best to capture the requirements based on the git log and my memory/understanding. While here remove the xenvm dts example, the Xen tools will now build a suitable mach-virt compatible dts when launching the guest. Signed-off-by: Ian Campbell Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Cc: Kumar Gala Cc: Olof Johansson Cc: Arnd Bergmann Cc: Marc Zyngier Cc: Will Deacon Cc: Stefano Stabellini Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org --- I'm not sure which tree this sort of thing should go though, sorry for the huge Cc. --- .../devicetree/bindings/arm/mach-virt.txt | 32 ++++++++ arch/arm/boot/dts/xenvm-4.2.dts | 81 -------------------- 2 files changed, 32 insertions(+), 81 deletions(-) create mode 100644 Documentation/devicetree/bindings/arm/mach-virt.txt delete mode 100644 arch/arm/boot/dts/xenvm-4.2.dts diff --git a/Documentation/devicetree/bindings/arm/mach-virt.txt b/Documentation/devicetree/bindings/arm/mach-virt.txt new file mode 100644 index 0000000..562bcda --- /dev/null +++ b/Documentation/devicetree/bindings/arm/mach-virt.txt @@ -0,0 +1,32 @@ +* Mach-virt "Dummy Virtual Machine" platform + +"mach-virt" is the smallest, dumbest platform possible, to be used as +a guest for Xen, KVM and other hypervisors. It has no +properties/functionality of its own and is driven entirely by device +tree. + +This document defines the requirements for such a platform. + +* Required properties: + +- compatible: should be one of: + "linux,dummy-virt" + "xen,xenvm" + +In addition to the standard nodes (chosen, cpus, memory etc) the +platform is required to provide certain other basic functionality +which must be described in the device tree: + + The platform must provide an ARM Generic Interrupt Controller + (GIC), defined in Documentation/devicetree/bindings/arm/gic.txt. + + The platform must provide ARM architected timer, defined in + Documentation/devicetree/bindings/arm/arch_timer.txt. + + If the platform is SMP then it must provide the Power State + Coordination Interface (PSCI) described in + Documentation/devicetree/bindings/arm/psci.txt. + +The platform may also provide hypervisor specific functionality +(e.g. PV I/O), if it does so then this functionality must be +discoverable (directly or indirectly) via device tree. diff --git a/arch/arm/boot/dts/xenvm-4.2.dts b/arch/arm/boot/dts/xenvm-4.2.dts deleted file mode 100644 index 3369151..0000000 --- a/arch/arm/boot/dts/xenvm-4.2.dts +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Xen Virtual Machine for unprivileged guests - * - * Based on ARM Ltd. Versatile Express CoreTile Express (single CPU) - * Cortex-A15 MPCore (V2P-CA15) - * - */ - -/dts-v1/; - -/ { - model = "XENVM-4.2"; - compatible = "xen,xenvm-4.2", "xen,xenvm"; - interrupt-parent = <&gic>; - #address-cells = <2>; - #size-cells = <2>; - - chosen { - /* this field is going to be adjusted by the hypervisor */ - bootargs = "console=hvc0 root=/dev/xvda"; - }; - - cpus { - #address-cells = <1>; - #size-cells = <0>; - - cpu@0 { - device_type = "cpu"; - compatible = "arm,cortex-a15"; - reg = <0>; - }; - - cpu@1 { - device_type = "cpu"; - compatible = "arm,cortex-a15"; - reg = <1>; - }; - }; - - psci { - compatible = "arm,psci"; - method = "hvc"; - cpu_off = <1>; - cpu_on = <2>; - }; - - memory@80000000 { - device_type = "memory"; - /* this field is going to be adjusted by the hypervisor */ - reg = <0 0x80000000 0 0x08000000>; - }; - - gic: interrupt-controller@2c001000 { - compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic"; - #interrupt-cells = <3>; - #address-cells = <0>; - interrupt-controller; - reg = <0 0x2c001000 0 0x1000>, - <0 0x2c002000 0 0x100>; - }; - - timer { - compatible = "arm,armv7-timer"; - interrupts = <1 13 0xf08>, - <1 14 0xf08>, - <1 11 0xf08>, - <1 10 0xf08>; - }; - - hypervisor { - compatible = "xen,xen-4.2", "xen,xen"; - /* this field is going to be adjusted by the hypervisor */ - reg = <0 0xb0000000 0 0x20000>; - /* this field is going to be adjusted by the hypervisor */ - interrupts = <1 15 0xf08>; - }; - - motherboard { - arm,v2m-memory-map = "rs1"; - }; -};