Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1204281

[PATCH v5 4/5] KVM: introduce kvm_arch functions for IRQ bypass

Path csiph.com!goblin2!goblin.stu.neva.ru!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Eric Auger <eric.auger@linaro.org>
Newsgroups linux.kernel
Subject [PATCH v5 4/5] KVM: introduce kvm_arch functions for IRQ bypass
Date Mon, 10 Aug 2015 15:40:03 +0200
Message-ID <pVVt1-7LE-33@gated-at.bofh.it> (permalink)
References <pVVt0-7LE-11@gated-at.bofh.it>
X-Original-To eric.auger@st.com, eric.auger@linaro.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, alex.williamson@redhat.com, pbonzini@redhat.com, feng.wu@intel.com
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=U+gBX2kamKHqJuQRU385PZZQlQXLPF09Xxdf69XHWik=; b=K6wP58/AneEf0FctIh1h9YX/MRqZLbzMY1qNoUY1fl89QrFRts/yEfVHEiaX29qM8i 3UihAsDSMOHyEGAqfIPoKEkAbpX9F8Ht2leqESiLobhtfTzw0pQ7txg1lAjSgLrYuVC+ 2Fr50+rvI52lm0D87LJ95OTTmoXnhjxr0jjohA9Xf9g88nddwyODflxF9OLfkrwO4S8n 9hcbAryuRA3gRe7rv5q4+Vkqif94G5x51XJ47OFlsOUauEV+aOvo3rNXEZ56VGmBAlc8 yk+CDtypd8fFs9JkNd9n2x9O0ICufP/N8ikNMFXY2xg/jFXCkU9FNTkoy3f/yifFDtJi 71Tg==
X-Gm-Message-State ALoCoQniejMxVz7C0ovQavgW1sUPb4dnuaSq7FqJGXoWwCjB6neauZ/n2ihp4u2tbvTPUT0DKiLN
X-Received by 10.194.90.225 with SMTP id bz1mr29046882wjb.110.1439213520336; Mon, 10 Aug 2015 06:32:00 -0700 (PDT)
X-Mailer git-send-email 1.9.1
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 77
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, patches@linaro.org, christoffer.dall@linaro.org, marc.zyngier@arm.com
X-Original-Date Mon, 10 Aug 2015 15:31:06 +0200
X-Original-Message-ID <1439213467-13668-5-git-send-email-eric.auger@linaro.org>
X-Original-References <1439213467-13668-1-git-send-email-eric.auger@linaro.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1204281

Show key headers only | View raw


This patch introduces
- kvm_arch_irq_bypass_add_producer
- kvm_arch_irq_bypass_del_producer
- kvm_arch_irq_bypass_stop
- kvm_arch_irq_bypass_start

They make possible to specialize the KVM IRQ bypass consumer in
case CONFIG_KVM_HAVE_IRQ_BYPASS is set.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Feng Wu <feng.wu@intel.com>

---
v4 -> v5:
- remove static inline stub functions

v2 -> v3 (Feng Wu):
- use 'kvm_arch_irq_bypass_start' instead of 'kvm_arch_irq_bypass_resume'
- Remove 'kvm_arch_irq_bypass_update', which is not needed to be
  a irqbypass callback per Alex's comments.
- Make kvm_arch_irq_bypass_add_producer return 'int'

v1 -> v2:
- use CONFIG_KVM_HAVE_IRQ_BYPASS instead CONFIG_IRQ_BYPASS_MANAGER
- rename all functions according to Paolo's proposal
- add kvm_arch_irq_bypass_update according to Feng's need
---
 include/linux/kvm_host.h | 10 ++++++++++
 virt/kvm/Kconfig         |  3 +++
 2 files changed, 13 insertions(+)

diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 05e99b8..5ac8d21 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -24,6 +24,7 @@
 #include <linux/err.h>
 #include <linux/irqflags.h>
 #include <linux/context_tracking.h>
+#include <linux/irqbypass.h>
 #include <asm/signal.h>
 
 #include <linux/kvm.h>
@@ -1151,5 +1152,14 @@ static inline void kvm_vcpu_set_dy_eligible(struct kvm_vcpu *vcpu, bool val)
 {
 }
 #endif /* CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT */
+
+#ifdef CONFIG_HAVE_KVM_IRQ_BYPASS
+int kvm_arch_irq_bypass_add_producer(struct irq_bypass_consumer *,
+			   struct irq_bypass_producer *);
+void kvm_arch_irq_bypass_del_producer(struct irq_bypass_consumer *,
+			   struct irq_bypass_producer *);
+void kvm_arch_irq_bypass_stop(struct irq_bypass_consumer *);
+void kvm_arch_irq_bypass_start(struct irq_bypass_consumer *);
+#endif /* CONFIG_HAVE_KVM_IRQ_BYPASS */
 #endif
 
diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig
index e2c876d..9f8014d 100644
--- a/virt/kvm/Kconfig
+++ b/virt/kvm/Kconfig
@@ -47,3 +47,6 @@ config KVM_GENERIC_DIRTYLOG_READ_PROTECT
 config KVM_COMPAT
        def_bool y
        depends on COMPAT && !S390
+
+config HAVE_KVM_IRQ_BYPASS
+       bool
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v5 0/5] KVM: irqfd consumer based on IRQ bypass manager Eric Auger <eric.auger@linaro.org> - 2015-08-10 15:40 +0200
  [PATCH v5 5/5] KVM: eventfd: add irq bypass consumer management Eric Auger <eric.auger@linaro.org> - 2015-08-10 15:40 +0200
    Re: [PATCH v5 5/5] KVM: eventfd: add irq bypass consumer management Alex Williamson <alex.williamson@redhat.com> - 2015-08-12 21:10 +0200
      Re: [PATCH v5 5/5] KVM: eventfd: add irq bypass consumer management Eric Auger <eric.auger@linaro.org> - 2015-08-13 11:30 +0200
  [PATCH v5 4/5] KVM: introduce kvm_arch functions for IRQ bypass Eric Auger <eric.auger@linaro.org> - 2015-08-10 15:40 +0200

csiph-web