From patchwork Fri Oct 19 20:33:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 1619631 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 98AA83FC1A for ; Fri, 19 Oct 2012 20:33:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932797Ab2JSUdx (ORCPT ); Fri, 19 Oct 2012 16:33:53 -0400 Received: from mail-vb0-f46.google.com ([209.85.212.46]:35094 "EHLO mail-vb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753723Ab2JSUdw convert rfc822-to-8bit (ORCPT ); Fri, 19 Oct 2012 16:33:52 -0400 Received: by mail-vb0-f46.google.com with SMTP id ff1so958558vbb.19 for ; Fri, 19 Oct 2012 13:33:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=SjdZ0vbN6ny2mUSYn0ak+ZsJvlnvk2pn+TspzeldKuY=; b=MB5F/bCHbbdBOWSfod1U/E/R1ncFr+AGtzB18AGjDIj1GeK4XFedVS0NUDAVyHa6Kp iwKQ03fKGtOc5Gs4sjmSXYRmZXqYI8+5eUPirTJk2Fd62/ijoeVnM0U0Sk4m6LR2V9oO dLaynJMR9k0oJj86K3NZg+p6U/Y0FIdNHozqeKzNyGEJlJGIpf2mBGLmSdnx1GKsPaVW R9H1NS7aZOvQI3TZfPdNhov1pOjhbi/JAmiSwDCN7MtRt/38l+hQrrg4snvaNMg94xtN LVukNX7G30S9iztVWTIgxJQbcTlxV6zXQrwnyYLgcHFA4HHoliWXVbzByAT3i1EhQOzg 4+KA== MIME-Version: 1.0 Received: by 10.221.0.78 with SMTP id nl14mr3187679vcb.21.1350678830489; Fri, 19 Oct 2012 13:33:50 -0700 (PDT) Received: by 10.58.230.229 with HTTP; Fri, 19 Oct 2012 13:33:50 -0700 (PDT) X-Originating-IP: [128.59.22.176] In-Reply-To: References: <1350173065-35350-1-git-send-email-c.dall@virtualopensystems.com> <1350173065-35350-3-git-send-email-c.dall@virtualopensystems.com> Date: Fri, 19 Oct 2012 16:33:50 -0400 Message-ID: Subject: Re: [RFC PATCH 2/3] KVM: ARM: Introduce KVM_SET_DEVICE_ADDRESS ioctl From: Christoffer Dall To: Peter Maydell Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, marc.zyngier@arm.com X-Gm-Message-State: ALoCoQkcWPxsRdd5JyKQQn5YmPYNQ99Osl6ZXv6Jj19QA1aQX/6mEChA81XlE0C12RAd/PMIfcyj Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Fri, Oct 19, 2012 at 4:27 PM, Christoffer Dall wrote: > On Fri, Oct 19, 2012 at 4:24 PM, Peter Maydell wrote: >> On 19 October 2012 19:46, Christoffer Dall >> wrote: >>> On Wed, Oct 17, 2012 at 4:29 PM, Peter Maydell wrote: >>>> This doesn't say whether userspace is allowed to make this ioctl >>>> multiple times for the same device. This could be any of: >>>> * undefined behaviour >>>> * second call fails with some errno >>>> * second call overrides first one >>>> >>> >>> I added an error condition EEXIST, but since this is trying to not be >>> arm-vgic specific this is really up to the individual device - maybe >>> we can have some polymorphic device that moves around later. >>> >>>> It also doesn't say that you're supposed to call this after CREATE >>>> and before INIT of the irqchip. (Nor does it say what happens if >>>> you call it at some other time.) >>>> >>> >>> same non-device specific argument as above. >> >> We could have a section in the docs that says "On ARM platforms >> there are devices X and Y and they have such-and-such properties >> and requirements" [and other devices later can have further docs >> as appropriate]. >> --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 65aacc5..1380885 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@ -2131,6 +2131,12 @@ specific to the individual device.  bits: | 31 ... 16 | 15 ... 0 | field: | device id | addr type id | +ARM currently only require this when using the in-kernel GIC support for the +hardware vGIC features, using KVM_ARM_DEVICE_VGIC_V2 as the device id. When +setting the base address for the guest's mapping of the vGIC virtual CPU +and distributor interface, the ioctl must be called after calling +KVM_CREATE_IRQCHIP, but before calling KVM_RUN on any of the VCPUs. Calling +this ioctl twice for any of the base addresses will return -EEXIST. 5. The kvm_run structure