From patchwork Fri Feb 13 04:00:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 44653 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 89AC621527 for ; Fri, 13 Feb 2015 04:00:38 +0000 (UTC) Received: by mail-wi0-f200.google.com with SMTP id r20sf5070085wiv.3 for ; Thu, 12 Feb 2015 20:00:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=aNmqr/CtP+9OANig71qC/hKG4WbvJZGmI0pWs1/tt5M=; b=SdwqMNWWge6Nz9DB1xC2dr0n71VlDAGArNtlmTzHLjIGBLoV0s0tlZM2aqf5+qRBKz 0nxNd5tZNZji0E/7ZsOIuYjMDCf/ip8nbpDh5oHM+UE8sHZtfwnfkvJ6HEka7XnnFeds FkLp9B/RVkQtGJodeaooYQkJOUTIqroOKOWzSdypphaf2BO5HKgMP/oqCWhJe/6RJNrL ysiqvzi95ljYUflsffbCNB/pQ3wqX2fYvPT3v5SdcejDZILthOof1LKOaL0/+pkyWII+ f4SkWU0g4XsKsXNJu8YUDTnXvmN35rCVEDjwqJz4xG6UGLBsiodJlFTDCFsDGxNSeRFb maYw== X-Gm-Message-State: ALoCoQm1EueLimB6reXXduJpJ6rBB7EhH6WtuTWKhgVaNelglWqOx0ep63kII6/vfj+ZWKdmZjRu X-Received: by 10.112.124.142 with SMTP id mi14mr1013239lbb.1.1423800037639; Thu, 12 Feb 2015 20:00:37 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.242.164 with SMTP id wr4ls303009lac.79.gmail; Thu, 12 Feb 2015 20:00:37 -0800 (PST) X-Received: by 10.152.44.137 with SMTP id e9mr6180846lam.100.1423800037304; Thu, 12 Feb 2015 20:00:37 -0800 (PST) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id lm3si641977lac.166.2015.02.12.20.00.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Feb 2015 20:00:37 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by labgf13 with SMTP id gf13so14082458lab.9 for ; Thu, 12 Feb 2015 20:00:37 -0800 (PST) X-Received: by 10.152.28.227 with SMTP id e3mr2184973lah.117.1423800037178; Thu, 12 Feb 2015 20:00:37 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.35.133 with SMTP id h5csp828747lbj; Thu, 12 Feb 2015 20:00:33 -0800 (PST) X-Received: by 10.194.185.15 with SMTP id ey15mr14413184wjc.3.1423800030892; Thu, 12 Feb 2015 20:00:30 -0800 (PST) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com. [74.125.82.178]) by mx.google.com with ESMTPS id fh2si1452545wib.100.2015.02.12.20.00.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Feb 2015 20:00:30 -0800 (PST) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 74.125.82.178 as permitted sender) client-ip=74.125.82.178; Received: by mail-we0-f178.google.com with SMTP id w62so14091779wes.9 for ; Thu, 12 Feb 2015 20:00:30 -0800 (PST) X-Received: by 10.180.90.37 with SMTP id bt5mr12173111wib.29.1423800030630; Thu, 12 Feb 2015 20:00:30 -0800 (PST) Received: from midway01-04-00.lavalab ([81.128.185.50]) by mx.google.com with ESMTPSA id a13sm8231982wjx.30.2015.02.12.20.00.29 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Feb 2015 20:00:29 -0800 (PST) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, christoffer.dall@linaro.org, qemu-devel@nongnu.org, alex.williamson@redhat.com, peter.maydell@linaro.org, agraf@suse.de, b.reynal@virtualopensystems.com, feng.wu@intel.com Cc: kvmarm@lists.cs.columbia.edu, patches@linaro.org, pbonzini@redhat.com, afaerber@suse.de, kim.phillips@freescale.com, Bharat.Bhushan@freescale.com, a.rigo@virtualopensystems.com, a.motakis@virtualopensystems.com Subject: [RFC 1/3] linux-headers: Update KVM header for KVM-VFIO FORWARD/UNFORWARD Date: Fri, 13 Feb 2015 04:00:18 +0000 Message-Id: <1423800020-10940-2-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1423800020-10940-1-git-send-email-eric.auger@linaro.org> References: <1423800020-10940-1-git-send-email-eric.auger@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: eric.auger@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Integrate updated KVM-VFIO API related to forwarded IRQ Update according to header found in http://git.linaro.org/people/eric.auger/linux.git branch irqfd_integ_v9 Signed-off-by: Eric Auger --- v8 -> v9: use new kvm_vfio_dev_irq struct --- linux-headers/linux/kvm.h | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index 12045a1..73b8194 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -647,11 +647,7 @@ struct kvm_ppc_smmu_info { #define KVM_CAP_MP_STATE 14 #define KVM_CAP_COALESCED_MMIO 15 #define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */ -#define KVM_CAP_DEVICE_ASSIGNMENT 17 #define KVM_CAP_IOMMU 18 -#ifdef __KVM_HAVE_MSI -#define KVM_CAP_DEVICE_MSI 20 -#endif /* Bug in KVM_SET_USER_MEMORY_REGION fixed: */ #define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21 #define KVM_CAP_USER_NMI 22 @@ -663,10 +659,6 @@ struct kvm_ppc_smmu_info { #endif #define KVM_CAP_IRQ_ROUTING 25 #define KVM_CAP_IRQ_INJECT_STATUS 26 -#define KVM_CAP_DEVICE_DEASSIGNMENT 27 -#ifdef __KVM_HAVE_MSIX -#define KVM_CAP_DEVICE_MSIX 28 -#endif #define KVM_CAP_ASSIGN_DEV_IRQ 29 /* Another bug in KVM_SET_USER_MEMORY_REGION fixed: */ #define KVM_CAP_JOIN_MEMORY_REGIONS_WORKS 30 @@ -946,6 +938,9 @@ struct kvm_device_attr { #define KVM_DEV_VFIO_GROUP 1 #define KVM_DEV_VFIO_GROUP_ADD 1 #define KVM_DEV_VFIO_GROUP_DEL 2 +#define KVM_DEV_VFIO_DEVICE 2 +#define KVM_DEV_VFIO_DEVICE_FORWARD_IRQ 1 +#define KVM_DEV_VFIO_DEVICE_UNFORWARD_IRQ 2 enum kvm_device_type { KVM_DEV_TYPE_FSL_MPIC_20 = 1, @@ -963,6 +958,15 @@ enum kvm_device_type { KVM_DEV_TYPE_MAX, }; +struct kvm_vfio_dev_irq { + __u32 argsz; /* structure length */ + __u32 fd; /* file descriptor of the VFIO device */ + __u32 index; /* VFIO device IRQ index */ + __u32 start; /* start of subindex range */ + __u32 count; /* size of subindex range */ + __u32 gsi[]; /* gsi, ie. virtual IRQ number */ +}; + /* * ioctls for VM fds */ @@ -1107,9 +1111,6 @@ struct kvm_s390_ucas_mapping { #define KVM_X86_SETUP_MCE _IOW(KVMIO, 0x9c, __u64) #define KVM_X86_GET_MCE_CAP_SUPPORTED _IOR(KVMIO, 0x9d, __u64) #define KVM_X86_SET_MCE _IOW(KVMIO, 0x9e, struct kvm_x86_mce) -/* IA64 stack access */ -#define KVM_IA64_VCPU_GET_STACK _IOR(KVMIO, 0x9a, void *) -#define KVM_IA64_VCPU_SET_STACK _IOW(KVMIO, 0x9b, void *) /* Available with KVM_CAP_VCPU_EVENTS */ #define KVM_GET_VCPU_EVENTS _IOR(KVMIO, 0x9f, struct kvm_vcpu_events) #define KVM_SET_VCPU_EVENTS _IOW(KVMIO, 0xa0, struct kvm_vcpu_events)