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: 6709411 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 436C09F380 for ; Thu, 2 Jul 2015 13:22:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A10A206F4 for ; Thu, 2 Jul 2015 13:22:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 43521206E0 for ; Thu, 2 Jul 2015 13:22:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753242AbbGBNWU (ORCPT ); Thu, 2 Jul 2015 09:22:20 -0400 Received: from mail-wg0-f45.google.com ([74.125.82.45]:33522 "EHLO mail-wg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753279AbbGBNSX (ORCPT ); Thu, 2 Jul 2015 09:18:23 -0400 Received: by wgck11 with SMTP id k11so63131271wgc.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=kMyJApNHFIOSXLXXyZKAfjGKjYBq5X7ipsU15x1wt9C29FFO2wfwn3sskadL681QUG t3TGXYYOGqUi8PGF8g7Wa/w6IzcJTubiE7OaI4BCu1nbc4qFJ2CnPcQQqwkpXQs1PHcp SKwjw9MdyOusPEhcFgFzPtK0Y6GQweDGalYkuaz2UbunId2Y2ehsLGsQaIDyXWnCm9SU XciyeRyNPffSJ4C7blywSSVboJqwd/mykO2wGbmgjP/I/Qk6iyyy3JLARRx+31avMAtP L1QHIC7Je5RUAj+MdVvbFdliAmhMQUIdzmpZk0VlPc6yRpKbo++79qx7vY8ekRHbytA4 0t7w== X-Gm-Message-State: ALoCoQlTZOPYIRjo2dwiA6uTmB1Iv27nRkbSsw/XeDUJITeKDzLFQREhm1tZwrb9v9VKQu07H3ZW 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> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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