From patchwork Thu Jul 2 13:17:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 50587 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D5393214B3 for ; Thu, 2 Jul 2015 13:18:36 +0000 (UTC) Received: by wipp2 with SMTP id p2sf3295161wip.2 for ; Thu, 02 Jul 2015 06:18:36 -0700 (PDT) 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=mwUmQhgWsVyMjkzV8xKWH+H80F7qkO6obUeCaX23rgs=; b=NkLYxx+tkj2wk3uJBMp4gR8SJM6Fb42PHrw8RoMHp1/7ce+bof+ldJr/ZgZTe/0mY+ 4aYSnrEtNvlgJCjpC44LZ9hEs+h089WiNAK1oMgurZcyz4LDgf8Pgu8o34eCSlkPpidd dMwQUQMNDGBBvc7j/OIf324YP9yNYEezXVPMspODxZX3QrWeUAK/FA5NR+rdAQ/PJ4+J pzu0E1WMJCsS+X0WM1GL5x0i3D5o3TuiA0733ijCkd7sBxJvJvEeCguDleCn5gSijSyk pSZyl/FpfvLIqagoSz0rbP56RlGtAjtnIBU0mrTC+N0WGo0pv0uve+ET+J6NBEb1pV4l pECw== X-Gm-Message-State: ALoCoQmd3ZVeLX1ZIZyP7TuUuJnlA8s3nGKYibjDVt7hM3zPWbxa06RJUZXVWSBhnLEyVSlwbMsY X-Received: by 10.112.26.5 with SMTP id h5mr20023488lbg.4.1435843116114; Thu, 02 Jul 2015 06:18:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.230 with SMTP id y6ls362307lae.20.gmail; Thu, 02 Jul 2015 06:18:35 -0700 (PDT) X-Received: by 10.152.43.110 with SMTP id v14mr30473499lal.4.1435843115722; Thu, 02 Jul 2015 06:18:35 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id du6si4462836lbc.41.2015.07.02.06.18.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jul 2015 06:18:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by lagc2 with SMTP id c2so60989453lag.3 for ; Thu, 02 Jul 2015 06:18:35 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr30505423lbc.19.1435843115502; Thu, 02 Jul 2015 06:18:35 -0700 (PDT) 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.108.230 with SMTP id hn6csp476411lbb; Thu, 2 Jul 2015 06:18:35 -0700 (PDT) X-Received: by 10.152.179.162 with SMTP id dh2mr1977098lac.53.1435843101685; Thu, 02 Jul 2015 06:18:21 -0700 (PDT) Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com. [74.125.82.48]) by mx.google.com with ESMTPS id s8si3010392wiv.31.2015.07.02.06.18.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jul 2015 06:18:21 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 74.125.82.48 as permitted sender) client-ip=74.125.82.48; Received: by wgjx7 with SMTP id x7so62924828wgj.2 for ; Thu, 02 Jul 2015 06:18:21 -0700 (PDT) X-Received: by 10.180.88.196 with SMTP id bi4mr55183887wib.70.1435843101377; Thu, 02 Jul 2015 06:18:21 -0700 (PDT) Received: from gnx2579.home (LCaen-156-56-7-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by mx.google.com with ESMTPSA id tl3sm8157099wjc.20.2015.07.02.06.18.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jul 2015 06:18:20 -0700 (PDT) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, christoffer.dall@linaro.org, marc.zyngier@arm.com, alex.williamson@redhat.com, pbonzini@redhat.com, avi.kivity@gmail.com, mtosatti@redhat.com, feng.wu@intel.com, joro@8bytes.org, b.reynal@virtualopensystems.com Cc: linux-kernel@vger.kernel.org, patches@linaro.org Subject: [RFC 13/17] KVM: introduce kvm_arch functions for IRQ bypass Date: Thu, 2 Jul 2015 15:17:23 +0200 Message-Id: <1435843047-6327-14-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435843047-6327-1-git-send-email-eric.auger@linaro.org> References: <1435843047-6327-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.46 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: , This patch introduces - kvm_arch_add_producer - kvm_arch_del_producer - kvm_arch_stop_consumer - kvm_arch_resume_consumer They make possible to specialize the KVM IRQ bypass consumer. Signed-off-by: Eric Auger --- include/linux/kvm_host.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 9564fd7..8e981e9 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -1133,5 +1134,31 @@ static inline void kvm_vcpu_set_dy_eligible(struct kvm_vcpu *vcpu, bool val) { } #endif /* CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT */ + +#ifdef CONFIG_IRQ_BYPASS_MANAGER + +void kvm_arch_add_producer(struct irq_bypass_consumer *, + struct irq_bypass_producer *); +void kvm_arch_del_producer(struct irq_bypass_consumer *, + struct irq_bypass_producer *); +void kvm_arch_stop_consumer(struct irq_bypass_consumer *); +void kvm_arch_resume_consumer(struct irq_bypass_consumer *); + +#else +void kvm_arch_add_producer(struct irq_bypass_consumer *, + struct irq_bypass_producer *) +{ +} +void kvm_arch_del_producer(struct irq_bypass_consumer *, + struct irq_bypass_producer *) +{ +} +void kvm_arch_stop_consumer(struct irq_bypass_consumer *) +{ +} +void kvm_arch_resume_consumer(struct irq_bypass_consumer *) +{ +} +#endif /* CONFIG_IRQ_BYPASS_MANAGER */ #endif