From patchwork Tue Oct 23 10:50:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 12435 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id D943E23FB9 for ; Tue, 23 Oct 2012 10:50:38 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 263CBA18AF5 for ; Tue, 23 Oct 2012 10:50:38 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so2756076iag.11 for ; Tue, 23 Oct 2012 03:50:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=eeLfXUPFlCmOZg2ZqDg/nIZ88HWtPR7G1LJACypaqH4=; b=kofVuKDbb+PpdjLzUyogBAGYi9YQiuinp4pahpfZu8Icy8eMuQAT47bcxOY2v9L2Gs IovUNn9ynWqfTaHyCP5cpxvOQ3UKGrydPsTDXf5+d7qjR+JzAalgCstGvkF1Le7K0O72 ZKMRKf7hbA/EMsUvAEX9CGZ4qXApu9G7e3hCnVOhW2NK8dRmcwj44Gwpy0+eABUHmvfH l/ZRt1smfw9mGk+qpqCKrmn68LJX5aqkelMHZZYOWRUYO0L+fryPkYiTVLz3H0diqvzY M0O+HSMOn/NBiBG9Ll6NMKCFekXq9ziI8+TcEI3m57UcXWC46Oy7qLUUe+5n7ALNvABf 6wsA== Received: by 10.50.168.37 with SMTP id zt5mr12219106igb.57.1350989437592; Tue, 23 Oct 2012 03:50:37 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp403698igt; Tue, 23 Oct 2012 03:50:35 -0700 (PDT) Received: by 10.216.145.227 with SMTP id p77mr6750981wej.58.1350989434453; Tue, 23 Oct 2012 03:50:34 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id ex5si11178576wib.10.2012.10.23.03.50.33 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 23 Oct 2012 03:50:34 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1TQc44-0000Fm-GL; Tue, 23 Oct 2012 11:50:28 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, patches@linaro.org, Blue Swirl , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Avi Kivity , Marcelo Tosatti Subject: [RFC v3 5/8] linux-headers: update with VGIC related headers (not for upstream) Date: Tue, 23 Oct 2012 11:50:25 +0100 Message-Id: <1350989428-941-6-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1350989428-941-1-git-send-email-peter.maydell@linaro.org> References: <1350989428-941-1-git-send-email-peter.maydell@linaro.org> X-Gm-Message-State: ALoCoQl+8ayFSYJ7+8ujTQQr8uFM2Unj6vtpaXk1Wt6tueD9fNhpzAa+Z/3Eb+yvJDc0/XDlrMY3 This updates the headers to match Christoffer's kvm-arm-v13-vgic-timers branch (commit e1414f8), which adds the VGIC related ioctls/definitions. --- linux-headers/asm-arm/kvm.h | 13 +++++++++++++ linux-headers/linux/kvm.h | 8 ++++++++ 2 files changed, 21 insertions(+) diff --git a/linux-headers/asm-arm/kvm.h b/linux-headers/asm-arm/kvm.h index fb41608..a7ae073 100644 --- a/linux-headers/asm-arm/kvm.h +++ b/linux-headers/asm-arm/kvm.h @@ -42,6 +42,19 @@ struct kvm_regs { #define KVM_ARM_TARGET_CORTEX_A15 0 #define KVM_ARM_NUM_TARGETS 1 +/* KVM_SET_DEVICE_ADDRESS ioctl id encoding */ +#define KVM_DEVICE_TYPE_SHIFT 0 +#define KVM_DEVICE_TYPE_MASK (0xffff << KVM_DEVICE_TYPE_SHIFT) +#define KVM_DEVICE_ID_SHIFT 16 +#define KVM_DEVICE_ID_MASK (0xffff << KVM_DEVICE_ID_SHIFT) + +/* Supported device IDs */ +#define KVM_ARM_DEVICE_VGIC_V2 0 + +/* Supported VGIC address types */ +#define KVM_VGIC_V2_ADDR_TYPE_DIST 0 +#define KVM_VGIC_V2_ADDR_TYPE_CPU 1 + struct kvm_vcpu_init { __u32 target; __u32 features[7]; diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index 4f309db..60ee3a0 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -631,6 +631,7 @@ struct kvm_ppc_smmu_info { #endif #define KVM_CAP_IRQFD_RESAMPLE 82 #define KVM_CAP_PPC_BOOKE_WATCHDOG 83 +#define KVM_CAP_SET_DEVICE_ADDR 84 #ifdef KVM_CAP_IRQ_ROUTING @@ -778,6 +779,11 @@ struct kvm_msi { __u8 pad[16]; }; +struct kvm_device_address { + __u32 id; + __u64 addr; +}; + /* * ioctls for VM fds */ @@ -861,6 +867,8 @@ struct kvm_s390_ucas_mapping { #define KVM_CREATE_SPAPR_TCE _IOW(KVMIO, 0xa8, struct kvm_create_spapr_tce) /* Available with KVM_CAP_RMA */ #define KVM_ALLOCATE_RMA _IOR(KVMIO, 0xa9, struct kvm_allocate_rma) +/* Available with KVM_CAP_SET_DEVICE_ADDR */ +#define KVM_SET_DEVICE_ADDRESS _IOW(KVMIO, 0xaa, struct kvm_device_address) /* * ioctls for vcpu fds