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: Eric Auger X-Patchwork-Id: 6709391 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D5172C05AC for ; Thu, 2 Jul 2015 13:22:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 16C182065A for ; Thu, 2 Jul 2015 13:22:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E7D6C206E0 for ; Thu, 2 Jul 2015 13:22:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZAePB-0006Ss-Hc; Thu, 02 Jul 2015 13:19:53 +0000 Received: from mail-wi0-f182.google.com ([209.85.212.182]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZAeNy-0004NE-Jb for linux-arm-kernel@lists.infradead.org; Thu, 02 Jul 2015 13:18:39 +0000 Received: by wiwl6 with SMTP id l6so196706009wiw.0 for ; Thu, 02 Jul 2015 06:18:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mwUmQhgWsVyMjkzV8xKWH+H80F7qkO6obUeCaX23rgs=; b=c6FW6MrJyZ+p+DImFjpsVkoerQsAr4T8F6RhoMAJDxa4UtLRD4IlO4BKx8StC1tFTE Q+hU4vdiWcgiPe4dHhnHpavidL85lLiiY/UDkq439ObQZLbqKRiye12329fjQ+tzaank hOuaVqqm2BrZve+lku3gFBCK98PbCb66RZUKOLRfmg4cPj1qlLl8oujvXB4U99KuKApa WMvqR2jRdsOymdTR0rBSOVcFJcQdvSu7bKq14dnhgBZaaov/vMGafwwOTwt//G1OQq+c hnLJ14SOMPLUN6oUxN9uNsQDpoSbGEbEFOJ7kE4euHcj/M6/wQau0iTE7huyMTf65WyZ zCFQ== X-Gm-Message-State: ALoCoQmdVsg+TLANaVpOx4buowBKuDP0Ox27GD63R4SoWdqIJ6Ydd42O5LDgcBITYXCoxGu5OcK0 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150702_061838_870939_03602878 X-CRM114-Status: GOOD ( 12.00 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, patches@linaro.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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