All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel()
@ 2012-07-26 14:35 Peter Maydell
  2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 1/7] kvm: Decouple 'async interrupt delivery' from 'kernel irqchip' Peter Maydell
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Peter Maydell @ 2012-07-26 14:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alexander Graf, Marcelo Tosatti, Jan Kiszka, Avi Kivity, patches

This patch series removes all uses of kvm_irqchip_in_kernel()
from architecture-independent code, by creating a set of more
specific functions instead to test for the particular aspects
of behaviour that the calling code is actually interested in.

The uses in x86-specific code could in theory be further broken
down into kvm_ioapic(), kvm_pit(), etc, but I leave that for
one of the x86 maintainers if they think it's worthwhile.

Changes v1->v2:
 * more blank lines round kvm.h doc comments / macros
 * 1: fn name changed to: kvm_async_interrupts_enabled()
      (and corresponding bool is now kvm_async_interrupts_allowed,
      so we are consistent about the enabled/allowed convention)
 * 2: fn name changed to: kvm_set_irq()
 * 3: fix return type of kvm_allows_irq0_override() to bool
 * 5 (and new patch 6): split out separate kvm_gsi_routing_enabled()
      check for use in kvm_irqchip_add_msi_route()

Peter Maydell (7):
  kvm: Decouple 'async interrupt delivery' from 'kernel irqchip'
  kvm: Rename kvm_irqchip_set_irq() to kvm_set_irq()
  kvm: Move kvm_allows_irq0_override() to target-i386, fix return type
  kvm: Decouple 'irqfds usable' from 'kernel irqchip'
  kvm: Decouple 'MSI routing via irqfds' from 'kernel irqchip'
  kvm: Decouple 'GSI routing' from 'kernel irqchip'
  kvm: Add documentation comment for kvm_irqchip_in_kernel()

 cpus.c                    |    3 +-
 hw/kvm/i8259.c            |    2 +-
 hw/kvm/ioapic.c           |    2 +-
 hw/pc.c                   |    1 +
 hw/virtio-pci.c           |    4 +-
 kvm-all.c                 |   25 ++++++++++--------
 kvm-stub.c                |    9 +++---
 kvm.h                     |   60 ++++++++++++++++++++++++++++++++++++++++++--
 target-i386/Makefile.objs |    1 +
 target-i386/kvm-stub.c    |   18 +++++++++++++
 target-i386/kvm.c         |   13 +++++++++
 target-i386/kvm_i386.h    |   16 ++++++++++++
 12 files changed, 130 insertions(+), 24 deletions(-)
 create mode 100644 target-i386/kvm-stub.c
 create mode 100644 target-i386/kvm_i386.h

-- 
1.7.5.4

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH v2 1/7] kvm: Decouple 'async interrupt delivery' from 'kernel irqchip'
  2012-07-26 14:35 [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel() Peter Maydell
@ 2012-07-26 14:35 ` Peter Maydell
  2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 2/7] kvm: Rename kvm_irqchip_set_irq() to kvm_set_irq() Peter Maydell
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Peter Maydell @ 2012-07-26 14:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alexander Graf, Marcelo Tosatti, Jan Kiszka, Avi Kivity, patches

On x86 userspace delivers interrupts to the kernel asynchronously
(and therefore VCPU idle management is done in the kernel) if and
only if there is an in-kernel irqchip. On other architectures this
isn't necessarily true (they may always send interrupts
asynchronously), so define a new kvm_async_interrupts_enabled()
function instead of misusing kvm_irqchip_in_kernel().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 cpus.c     |    3 ++-
 kvm-all.c  |    7 ++++++-
 kvm-stub.c |    1 +
 kvm.h      |   13 +++++++++++++
 4 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/cpus.c b/cpus.c
index 756e624..8c54dd0 100644
--- a/cpus.c
+++ b/cpus.c
@@ -69,7 +69,8 @@ static bool cpu_thread_is_idle(CPUArchState *env)
     if (env->stopped || !runstate_is_running()) {
         return true;
     }
-    if (!env->halted || qemu_cpu_has_work(env) || kvm_irqchip_in_kernel()) {
+    if (!env->halted || qemu_cpu_has_work(env) ||
+        kvm_async_interrupts_enabled()) {
         return false;
     }
     return true;
diff --git a/kvm-all.c b/kvm-all.c
index 2148b20..0a38ba1 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -100,6 +100,7 @@ struct KVMState
 
 KVMState *kvm_state;
 bool kvm_kernel_irqchip;
+bool kvm_async_interrupts_allowed;
 
 static const KVMCapabilityInfo kvm_required_capabilites[] = {
     KVM_CAP_INFO(USER_MEMORY),
@@ -857,7 +858,7 @@ int kvm_irqchip_set_irq(KVMState *s, int irq, int level)
     struct kvm_irq_level event;
     int ret;
 
-    assert(kvm_irqchip_in_kernel());
+    assert(kvm_async_interrupts_enabled());
 
     event.level = level;
     event.irq = irq;
@@ -1201,6 +1202,10 @@ static int kvm_irqchip_create(KVMState *s)
         s->irqchip_inject_ioctl = KVM_IRQ_LINE_STATUS;
     }
     kvm_kernel_irqchip = true;
+    /* If we have an in-kernel IRQ chip then we must have asynchronous
+     * interrupt delivery (though the reverse is not necessarily true)
+     */
+    kvm_async_interrupts_allowed = true;
 
     kvm_init_irq_routing(s);
 
diff --git a/kvm-stub.c b/kvm-stub.c
index d23b11c..a7a03e1 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -19,6 +19,7 @@
 
 KVMState *kvm_state;
 bool kvm_kernel_irqchip;
+bool kvm_async_interrupts_allowed;
 
 int kvm_init_vcpu(CPUArchState *env)
 {
diff --git a/kvm.h b/kvm.h
index 2617dd5..09818f3 100644
--- a/kvm.h
+++ b/kvm.h
@@ -24,13 +24,26 @@
 
 extern int kvm_allowed;
 extern bool kvm_kernel_irqchip;
+extern bool kvm_async_interrupts_allowed;
 
 #if defined CONFIG_KVM || !defined NEED_CPU_H
 #define kvm_enabled()           (kvm_allowed)
 #define kvm_irqchip_in_kernel() (kvm_kernel_irqchip)
+
+/**
+ * kvm_async_interrupts_enabled:
+ *
+ * Returns: true if we can deliver interrupts to KVM
+ * asynchronously (ie by ioctl from any thread at any time)
+ * rather than having to do interrupt delivery synchronously
+ * (where the vcpu must be stopped at a suitable point first).
+ */
+#define kvm_async_interrupts_enabled() (kvm_async_interrupts_allowed)
+
 #else
 #define kvm_enabled()           (0)
 #define kvm_irqchip_in_kernel() (false)
+#define kvm_async_interrupts_enabled() (false)
 #endif
 
 struct kvm_run;
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH v2 2/7] kvm: Rename kvm_irqchip_set_irq() to kvm_set_irq()
  2012-07-26 14:35 [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel() Peter Maydell
  2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 1/7] kvm: Decouple 'async interrupt delivery' from 'kernel irqchip' Peter Maydell
@ 2012-07-26 14:35 ` Peter Maydell
  2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 3/7] kvm: Move kvm_allows_irq0_override() to target-i386, fix return type Peter Maydell
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Peter Maydell @ 2012-07-26 14:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alexander Graf, Marcelo Tosatti, Jan Kiszka, Avi Kivity, patches

Rename the function kvm_irqchip_set_irq() to kvm_set_irq(),
since it can be used for sending (asynchronous) interrupts whether
there is a full irqchip model in the kernel or not. (We don't
include 'async' in the function name since asynchronous is the
normal case.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/kvm/i8259.c  |    2 +-
 hw/kvm/ioapic.c |    2 +-
 kvm-all.c       |    6 +++---
 kvm.h           |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/hw/kvm/i8259.c b/hw/kvm/i8259.c
index 94d1b9a..1e24cd4 100644
--- a/hw/kvm/i8259.c
+++ b/hw/kvm/i8259.c
@@ -94,7 +94,7 @@ static void kvm_pic_set_irq(void *opaque, int irq, int level)
 {
     int delivered;
 
-    delivered = kvm_irqchip_set_irq(kvm_state, irq, level);
+    delivered = kvm_set_irq(kvm_state, irq, level);
     apic_report_irq_delivered(delivered);
 }
 
diff --git a/hw/kvm/ioapic.c b/hw/kvm/ioapic.c
index 3ae3175..6c3b8fe 100644
--- a/hw/kvm/ioapic.c
+++ b/hw/kvm/ioapic.c
@@ -82,7 +82,7 @@ static void kvm_ioapic_set_irq(void *opaque, int irq, int level)
     KVMIOAPICState *s = opaque;
     int delivered;
 
-    delivered = kvm_irqchip_set_irq(kvm_state, s->kvm_gsi_base + irq, level);
+    delivered = kvm_set_irq(kvm_state, s->kvm_gsi_base + irq, level);
     apic_report_irq_delivered(delivered);
 }
 
diff --git a/kvm-all.c b/kvm-all.c
index 0a38ba1..7c635be 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -853,7 +853,7 @@ static void kvm_handle_interrupt(CPUArchState *env, int mask)
     }
 }
 
-int kvm_irqchip_set_irq(KVMState *s, int irq, int level)
+int kvm_set_irq(KVMState *s, int irq, int level)
 {
     struct kvm_irq_level event;
     int ret;
@@ -864,7 +864,7 @@ int kvm_irqchip_set_irq(KVMState *s, int irq, int level)
     event.irq = irq;
     ret = kvm_vm_ioctl(s, s->irqchip_inject_ioctl, &event);
     if (ret < 0) {
-        perror("kvm_set_irqchip_line");
+        perror("kvm_set_irq");
         abort();
     }
 
@@ -1089,7 +1089,7 @@ int kvm_irqchip_send_msi(KVMState *s, MSIMessage msg)
 
     assert(route->kroute.type == KVM_IRQ_ROUTING_MSI);
 
-    return kvm_irqchip_set_irq(s, route->kroute.gsi, 1);
+    return kvm_set_irq(s, route->kroute.gsi, 1);
 }
 
 int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg)
diff --git a/kvm.h b/kvm.h
index 09818f3..744209d 100644
--- a/kvm.h
+++ b/kvm.h
@@ -146,7 +146,7 @@ int kvm_arch_on_sigbus(int code, void *addr);
 
 void kvm_arch_init_irq_routing(KVMState *s);
 
-int kvm_irqchip_set_irq(KVMState *s, int irq, int level);
+int kvm_set_irq(KVMState *s, int irq, int level);
 int kvm_irqchip_send_msi(KVMState *s, MSIMessage msg);
 
 void kvm_irqchip_add_irq_route(KVMState *s, int gsi, int irqchip, int pin);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH v2 3/7] kvm: Move kvm_allows_irq0_override() to target-i386, fix return type
  2012-07-26 14:35 [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel() Peter Maydell
  2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 1/7] kvm: Decouple 'async interrupt delivery' from 'kernel irqchip' Peter Maydell
  2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 2/7] kvm: Rename kvm_irqchip_set_irq() to kvm_set_irq() Peter Maydell
@ 2012-07-26 14:35 ` Peter Maydell
  2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 4/7] kvm: Decouple 'irqfds usable' from 'kernel irqchip' Peter Maydell
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Peter Maydell @ 2012-07-26 14:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alexander Graf, Marcelo Tosatti, Jan Kiszka, Avi Kivity, patches

kvm_allows_irq0_override() is a totally x86 specific concept:
move it to the target-specific source file where it belongs.
This means we need a new header file for the prototype:
kvm_i386.h, in line with the existing kvm_ppc.h.

While we are moving it, fix the return type to be 'bool' rather
than 'int'.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/pc.c                   |    1 +
 kvm-all.c                 |    5 -----
 kvm-stub.c                |    5 -----
 kvm.h                     |    2 --
 target-i386/Makefile.objs |    1 +
 target-i386/kvm-stub.c    |   18 ++++++++++++++++++
 target-i386/kvm.c         |    6 ++++++
 target-i386/kvm_i386.h    |   16 ++++++++++++++++
 8 files changed, 42 insertions(+), 12 deletions(-)
 create mode 100644 target-i386/kvm-stub.c
 create mode 100644 target-i386/kvm_i386.h

diff --git a/hw/pc.c b/hw/pc.c
index 598267a..4953376 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -42,6 +42,7 @@
 #include "sysbus.h"
 #include "sysemu.h"
 #include "kvm.h"
+#include "kvm_i386.h"
 #include "xen.h"
 #include "blockdev.h"
 #include "hw/block-common.h"
diff --git a/kvm-all.c b/kvm-all.c
index 7c635be..9a34090 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1672,11 +1672,6 @@ int kvm_has_gsi_routing(void)
 #endif
 }
 
-int kvm_allows_irq0_override(void)
-{
-    return !kvm_irqchip_in_kernel() || kvm_has_gsi_routing();
-}
-
 void *kvm_vmalloc(ram_addr_t size)
 {
 #ifdef TARGET_S390X
diff --git a/kvm-stub.c b/kvm-stub.c
index a7a03e1..f2b0c61 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -72,11 +72,6 @@ int kvm_has_many_ioeventfds(void)
     return 0;
 }
 
-int kvm_allows_irq0_override(void)
-{
-    return 1;
-}
-
 int kvm_has_pit_state2(void)
 {
     return 0;
diff --git a/kvm.h b/kvm.h
index 744209d..47bf5ba 100644
--- a/kvm.h
+++ b/kvm.h
@@ -75,8 +75,6 @@ int kvm_has_pit_state2(void);
 int kvm_has_many_ioeventfds(void);
 int kvm_has_gsi_routing(void);
 
-int kvm_allows_irq0_override(void);
-
 #ifdef NEED_CPU_H
 int kvm_init_vcpu(CPUArchState *env);
 
diff --git a/target-i386/Makefile.objs b/target-i386/Makefile.objs
index 683fd59..0715f58 100644
--- a/target-i386/Makefile.objs
+++ b/target-i386/Makefile.objs
@@ -3,6 +3,7 @@ obj-y += excp_helper.o fpu_helper.o cc_helper.o int_helper.o svm_helper.o
 obj-y += smm_helper.o misc_helper.o mem_helper.o seg_helper.o
 obj-$(CONFIG_SOFTMMU) += machine.o arch_memory_mapping.o arch_dump.o
 obj-$(CONFIG_KVM) += kvm.o hyperv.o
+obj-$(CONFIG_NO_KVM) += kvm-stub.o
 obj-$(CONFIG_LINUX_USER) += ioport-user.o
 obj-$(CONFIG_BSD_USER) += ioport-user.o
 
diff --git a/target-i386/kvm-stub.c b/target-i386/kvm-stub.c
new file mode 100644
index 0000000..11429c4
--- /dev/null
+++ b/target-i386/kvm-stub.c
@@ -0,0 +1,18 @@
+/*
+ * QEMU KVM x86 specific function stubs
+ *
+ * Copyright Linaro Limited 2012
+ *
+ * Author: Peter Maydell <peter.maydell@linaro.org>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+#include "qemu-common.h"
+#include "kvm_i386.h"
+
+bool kvm_allows_irq0_override(void)
+{
+    return 1;
+}
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index e53c2f6..7e5f51e 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -23,6 +23,7 @@
 #include "qemu-common.h"
 #include "sysemu.h"
 #include "kvm.h"
+#include "kvm_i386.h"
 #include "cpu.h"
 #include "gdbstub.h"
 #include "host-utils.h"
@@ -65,6 +66,11 @@ static bool has_msr_async_pf_en;
 static bool has_msr_misc_enable;
 static int lm_capable_kernel;
 
+bool kvm_allows_irq0_override(void)
+{
+    return !kvm_irqchip_in_kernel() || kvm_has_gsi_routing();
+}
+
 static struct kvm_cpuid2 *try_get_cpuid(KVMState *s, int max)
 {
     struct kvm_cpuid2 *cpuid;
diff --git a/target-i386/kvm_i386.h b/target-i386/kvm_i386.h
new file mode 100644
index 0000000..b82bbf4
--- /dev/null
+++ b/target-i386/kvm_i386.h
@@ -0,0 +1,16 @@
+/*
+ * QEMU KVM support -- x86 specific functions.
+ *
+ * Copyright (c) 2012 Linaro Limited
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#ifndef QEMU_KVM_I386_H
+#define QEMU_KVM_I386_H
+
+bool kvm_allows_irq0_override(void);
+
+#endif
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH v2 4/7] kvm: Decouple 'irqfds usable' from 'kernel irqchip'
  2012-07-26 14:35 [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel() Peter Maydell
                   ` (2 preceding siblings ...)
  2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 3/7] kvm: Move kvm_allows_irq0_override() to target-i386, fix return type Peter Maydell
@ 2012-07-26 14:35 ` Peter Maydell
  2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 5/7] kvm: Decouple 'MSI routing via irqfds' " Peter Maydell
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Peter Maydell @ 2012-07-26 14:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alexander Graf, Marcelo Tosatti, Jan Kiszka, Avi Kivity, patches

Instead of assuming that we can use irqfds if and only if
kvm_irqchip_in_kernel(), add a bool to the KVMState which
indicates this, and is set only on x86 and only if the
irqchip is in the kernel.

The kernel documentation implies that the only thing
you need to use KVM_IRQFD is that KVM_CAP_IRQFD is
advertised, but this seems to be untrue. In particular
the kernel does not (alas) return a sensible error if you
try to set up an irqfd when you haven't created an irqchip.
If it did we could remove all this nonsense and let the
kernel return the error code.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 kvm-all.c         |    3 ++-
 kvm-stub.c        |    1 +
 kvm.h             |   11 +++++++++++
 target-i386/kvm.c |    4 ++++
 4 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index 9a34090..3a69e53 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -101,6 +101,7 @@ struct KVMState
 KVMState *kvm_state;
 bool kvm_kernel_irqchip;
 bool kvm_async_interrupts_allowed;
+bool kvm_irqfds_allowed;
 
 static const KVMCapabilityInfo kvm_required_capabilites[] = {
     KVM_CAP_INFO(USER_MEMORY),
@@ -1126,7 +1127,7 @@ static int kvm_irqchip_assign_irqfd(KVMState *s, int fd, int virq, bool assign)
         .flags = assign ? 0 : KVM_IRQFD_FLAG_DEASSIGN,
     };
 
-    if (!kvm_irqchip_in_kernel()) {
+    if (!kvm_irqfds_enabled()) {
         return -ENOSYS;
     }
 
diff --git a/kvm-stub.c b/kvm-stub.c
index f2b0c61..02e7fe0 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -20,6 +20,7 @@
 KVMState *kvm_state;
 bool kvm_kernel_irqchip;
 bool kvm_async_interrupts_allowed;
+bool kvm_irqfds_allowed;
 
 int kvm_init_vcpu(CPUArchState *env)
 {
diff --git a/kvm.h b/kvm.h
index 47bf5ba..21436ef 100644
--- a/kvm.h
+++ b/kvm.h
@@ -25,6 +25,7 @@
 extern int kvm_allowed;
 extern bool kvm_kernel_irqchip;
 extern bool kvm_async_interrupts_allowed;
+extern bool kvm_irqfds_allowed;
 
 #if defined CONFIG_KVM || !defined NEED_CPU_H
 #define kvm_enabled()           (kvm_allowed)
@@ -40,10 +41,20 @@ extern bool kvm_async_interrupts_allowed;
  */
 #define kvm_async_interrupts_enabled() (kvm_async_interrupts_allowed)
 
+/**
+ * kvm_irqfds_enabled:
+ *
+ * Returns: true if we can use irqfds to inject interrupts into
+ * a KVM CPU (ie the kernel supports irqfds and we are running
+ * with a configuration where it is meaningful to use them).
+ */
+#define kvm_irqfds_enabled() (kvm_irqfds_allowed)
+
 #else
 #define kvm_enabled()           (0)
 #define kvm_irqchip_in_kernel() (false)
 #define kvm_async_interrupts_enabled() (false)
+#define kvm_irqfds_enabled() (false)
 #endif
 
 struct kvm_run;
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 7e5f51e..5cb33a2 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -2045,4 +2045,8 @@ void kvm_arch_init_irq_routing(KVMState *s)
          */
         no_hpet = 1;
     }
+    /* We know at this point that we're using the in-kernel
+     * irqchip, so we can use irqfds.
+     */
+    kvm_irqfds_allowed = true;
 }
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH v2 5/7] kvm: Decouple 'MSI routing via irqfds' from 'kernel irqchip'
  2012-07-26 14:35 [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel() Peter Maydell
                   ` (3 preceding siblings ...)
  2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 4/7] kvm: Decouple 'irqfds usable' from 'kernel irqchip' Peter Maydell
@ 2012-07-26 14:35 ` Peter Maydell
  2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 6/7] kvm: Decouple 'GSI routing' " Peter Maydell
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Peter Maydell @ 2012-07-26 14:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alexander Graf, Marcelo Tosatti, Jan Kiszka, Avi Kivity, patches

Decouple another x86-specific assumption about what irqchips imply.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/virtio-pci.c   |    4 ++--
 kvm-all.c         |    1 +
 kvm-stub.c        |    1 +
 kvm.h             |   11 +++++++++++
 target-i386/kvm.c |    4 +++-
 5 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 4e03f0b..98e02ef 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -627,7 +627,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign)
     int r, n;
 
     /* Must unset vector notifier while guest notifier is still assigned */
-    if (kvm_irqchip_in_kernel() && !assign) {
+    if (kvm_msi_via_irqfd_enabled() && !assign) {
         msix_unset_vector_notifiers(&proxy->pci_dev);
         g_free(proxy->vector_irqfd);
         proxy->vector_irqfd = NULL;
@@ -645,7 +645,7 @@ static int virtio_pci_set_guest_notifiers(void *opaque, bool assign)
     }
 
     /* Must set vector notifier after guest notifier has been assigned */
-    if (kvm_irqchip_in_kernel() && assign) {
+    if (kvm_msi_via_irqfd_enabled() && assign) {
         proxy->vector_irqfd =
             g_malloc0(sizeof(*proxy->vector_irqfd) *
                       msix_nr_vectors_allocated(&proxy->pci_dev));
diff --git a/kvm-all.c b/kvm-all.c
index 3a69e53..cdacd74 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -102,6 +102,7 @@ KVMState *kvm_state;
 bool kvm_kernel_irqchip;
 bool kvm_async_interrupts_allowed;
 bool kvm_irqfds_allowed;
+bool kvm_msi_via_irqfd_allowed;
 
 static const KVMCapabilityInfo kvm_required_capabilites[] = {
     KVM_CAP_INFO(USER_MEMORY),
diff --git a/kvm-stub.c b/kvm-stub.c
index 02e7fe0..158bb7b 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -21,6 +21,7 @@ KVMState *kvm_state;
 bool kvm_kernel_irqchip;
 bool kvm_async_interrupts_allowed;
 bool kvm_irqfds_allowed;
+bool kvm_msi_via_irqfd_allowed;
 
 int kvm_init_vcpu(CPUArchState *env)
 {
diff --git a/kvm.h b/kvm.h
index 21436ef..34d32c7 100644
--- a/kvm.h
+++ b/kvm.h
@@ -26,6 +26,7 @@ extern int kvm_allowed;
 extern bool kvm_kernel_irqchip;
 extern bool kvm_async_interrupts_allowed;
 extern bool kvm_irqfds_allowed;
+extern bool kvm_msi_via_irqfd_allowed;
 
 #if defined CONFIG_KVM || !defined NEED_CPU_H
 #define kvm_enabled()           (kvm_allowed)
@@ -50,11 +51,21 @@ extern bool kvm_irqfds_allowed;
  */
 #define kvm_irqfds_enabled() (kvm_irqfds_allowed)
 
+/**
+ * kvm_msi_via_irqfd_enabled:
+ *
+ * Returns: true if we can route a PCI MSI (Message Signaled Interrupt)
+ * to a KVM CPU via an irqfd. This requires that the kernel supports
+ * this and that we're running in a configuration that permits it.
+ */
+#define kvm_msi_via_irqfd_enabled() (kvm_msi_via_irqfd_allowed)
+
 #else
 #define kvm_enabled()           (0)
 #define kvm_irqchip_in_kernel() (false)
 #define kvm_async_interrupts_enabled() (false)
 #define kvm_irqfds_enabled() (false)
+#define kvm_msi_via_irqfd_enabled() (false)
 #endif
 
 struct kvm_run;
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 5cb33a2..46ee906 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -2046,7 +2046,9 @@ void kvm_arch_init_irq_routing(KVMState *s)
         no_hpet = 1;
     }
     /* We know at this point that we're using the in-kernel
-     * irqchip, so we can use irqfds.
+     * irqchip, so we can use irqfds, and on x86 we know
+     * we can use msi via irqfd.
      */
     kvm_irqfds_allowed = true;
+    kvm_msi_via_irqfd_allowed = true;
 }
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH v2 6/7] kvm: Decouple 'GSI routing' from 'kernel irqchip'
  2012-07-26 14:35 [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel() Peter Maydell
                   ` (4 preceding siblings ...)
  2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 5/7] kvm: Decouple 'MSI routing via irqfds' " Peter Maydell
@ 2012-07-26 14:35 ` Peter Maydell
  2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 7/7] kvm: Add documentation comment for kvm_irqchip_in_kernel() Peter Maydell
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Peter Maydell @ 2012-07-26 14:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alexander Graf, Marcelo Tosatti, Jan Kiszka, Avi Kivity, patches

Don't assume having an in-kernel irqchip means that GSI
routing is enabled.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 kvm-all.c         |    3 ++-
 kvm-stub.c        |    1 +
 kvm.h             |   10 ++++++++++
 target-i386/kvm.c |    3 ++-
 4 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index cdacd74..6def6c9 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -103,6 +103,7 @@ bool kvm_kernel_irqchip;
 bool kvm_async_interrupts_allowed;
 bool kvm_irqfds_allowed;
 bool kvm_msi_via_irqfd_allowed;
+bool kvm_gsi_routing_allowed;
 
 static const KVMCapabilityInfo kvm_required_capabilites[] = {
     KVM_CAP_INFO(USER_MEMORY),
@@ -1099,7 +1100,7 @@ int kvm_irqchip_add_msi_route(KVMState *s, MSIMessage msg)
     struct kvm_irq_routing_entry kroute;
     int virq;
 
-    if (!kvm_irqchip_in_kernel()) {
+    if (!kvm_gsi_routing_enabled()) {
         return -ENOSYS;
     }
 
diff --git a/kvm-stub.c b/kvm-stub.c
index 158bb7b..94c9ea1 100644
--- a/kvm-stub.c
+++ b/kvm-stub.c
@@ -22,6 +22,7 @@ bool kvm_kernel_irqchip;
 bool kvm_async_interrupts_allowed;
 bool kvm_irqfds_allowed;
 bool kvm_msi_via_irqfd_allowed;
+bool kvm_gsi_routing_allowed;
 
 int kvm_init_vcpu(CPUArchState *env)
 {
diff --git a/kvm.h b/kvm.h
index 34d32c7..444ed2e 100644
--- a/kvm.h
+++ b/kvm.h
@@ -27,6 +27,7 @@ extern bool kvm_kernel_irqchip;
 extern bool kvm_async_interrupts_allowed;
 extern bool kvm_irqfds_allowed;
 extern bool kvm_msi_via_irqfd_allowed;
+extern bool kvm_gsi_routing_allowed;
 
 #if defined CONFIG_KVM || !defined NEED_CPU_H
 #define kvm_enabled()           (kvm_allowed)
@@ -60,12 +61,21 @@ extern bool kvm_msi_via_irqfd_allowed;
  */
 #define kvm_msi_via_irqfd_enabled() (kvm_msi_via_irqfd_allowed)
 
+/**
+ * kvm_gsi_routing_enabled:
+ *
+ * Returns: true if GSI routing is enabled (ie the kernel supports
+ * it and we're running in a configuration that permits it).
+ */
+#define kvm_gsi_routing_enabled() (kvm_gsi_routing_allowed)
+
 #else
 #define kvm_enabled()           (0)
 #define kvm_irqchip_in_kernel() (false)
 #define kvm_async_interrupts_enabled() (false)
 #define kvm_irqfds_enabled() (false)
 #define kvm_msi_via_irqfd_enabled() (false)
+#define kvm_gsi_routing_allowed() (false)
 #endif
 
 struct kvm_run;
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 46ee906..e58460f 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -2047,8 +2047,9 @@ void kvm_arch_init_irq_routing(KVMState *s)
     }
     /* We know at this point that we're using the in-kernel
      * irqchip, so we can use irqfds, and on x86 we know
-     * we can use msi via irqfd.
+     * we can use msi via irqfd and GSI routing.
      */
     kvm_irqfds_allowed = true;
     kvm_msi_via_irqfd_allowed = true;
+    kvm_gsi_routing_allowed = true;
 }
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Qemu-devel] [PATCH v2 7/7] kvm: Add documentation comment for kvm_irqchip_in_kernel()
  2012-07-26 14:35 [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel() Peter Maydell
                   ` (5 preceding siblings ...)
  2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 6/7] kvm: Decouple 'GSI routing' " Peter Maydell
@ 2012-07-26 14:35 ` Peter Maydell
  2012-08-01 14:39 ` [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel() Peter Maydell
  2012-08-02  9:14 ` Jan Kiszka
  8 siblings, 0 replies; 15+ messages in thread
From: Peter Maydell @ 2012-07-26 14:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alexander Graf, Marcelo Tosatti, Jan Kiszka, Avi Kivity, patches

Now we've cleared out the architecture-independent uses of
kvm_irqchip_in_kernel(), we can add a doc comment describing
what it means.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 kvm.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/kvm.h b/kvm.h
index 444ed2e..5b8f588 100644
--- a/kvm.h
+++ b/kvm.h
@@ -31,6 +31,17 @@ extern bool kvm_gsi_routing_allowed;
 
 #if defined CONFIG_KVM || !defined NEED_CPU_H
 #define kvm_enabled()           (kvm_allowed)
+/**
+ * kvm_irqchip_in_kernel:
+ *
+ * Returns: true if the user asked us to create an in-kernel
+ * irqchip via the "kernel_irqchip=on" machine option.
+ * What this actually means is architecture and machine model
+ * specific: on PC, for instance, it means that the LAPIC,
+ * IOAPIC and PIT are all in kernel. This function should never
+ * be used from generic target-independent code: use one of the
+ * following functions or some other specific check instead.
+ */
 #define kvm_irqchip_in_kernel() (kvm_kernel_irqchip)
 
 /**
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel()
  2012-07-26 14:35 [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel() Peter Maydell
                   ` (6 preceding siblings ...)
  2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 7/7] kvm: Add documentation comment for kvm_irqchip_in_kernel() Peter Maydell
@ 2012-08-01 14:39 ` Peter Maydell
  2012-08-02  9:00   ` Jan Kiszka
  2012-08-02  9:14 ` Jan Kiszka
  8 siblings, 1 reply; 15+ messages in thread
From: Peter Maydell @ 2012-08-01 14:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marcelo Tosatti, Jan Kiszka, Alexander Graf, patches, Avi Kivity

ping?

thanks
-- PMM

On 26 July 2012 15:35, Peter Maydell <peter.maydell@linaro.org> wrote:
> This patch series removes all uses of kvm_irqchip_in_kernel()
> from architecture-independent code, by creating a set of more
> specific functions instead to test for the particular aspects
> of behaviour that the calling code is actually interested in.
>
> The uses in x86-specific code could in theory be further broken
> down into kvm_ioapic(), kvm_pit(), etc, but I leave that for
> one of the x86 maintainers if they think it's worthwhile.
>
> Changes v1->v2:
>  * more blank lines round kvm.h doc comments / macros
>  * 1: fn name changed to: kvm_async_interrupts_enabled()
>       (and corresponding bool is now kvm_async_interrupts_allowed,
>       so we are consistent about the enabled/allowed convention)
>  * 2: fn name changed to: kvm_set_irq()
>  * 3: fix return type of kvm_allows_irq0_override() to bool
>  * 5 (and new patch 6): split out separate kvm_gsi_routing_enabled()
>       check for use in kvm_irqchip_add_msi_route()
>
> Peter Maydell (7):
>   kvm: Decouple 'async interrupt delivery' from 'kernel irqchip'
>   kvm: Rename kvm_irqchip_set_irq() to kvm_set_irq()
>   kvm: Move kvm_allows_irq0_override() to target-i386, fix return type
>   kvm: Decouple 'irqfds usable' from 'kernel irqchip'
>   kvm: Decouple 'MSI routing via irqfds' from 'kernel irqchip'
>   kvm: Decouple 'GSI routing' from 'kernel irqchip'
>   kvm: Add documentation comment for kvm_irqchip_in_kernel()
>
>  cpus.c                    |    3 +-
>  hw/kvm/i8259.c            |    2 +-
>  hw/kvm/ioapic.c           |    2 +-
>  hw/pc.c                   |    1 +
>  hw/virtio-pci.c           |    4 +-
>  kvm-all.c                 |   25 ++++++++++--------
>  kvm-stub.c                |    9 +++---
>  kvm.h                     |   60 ++++++++++++++++++++++++++++++++++++++++++--
>  target-i386/Makefile.objs |    1 +
>  target-i386/kvm-stub.c    |   18 +++++++++++++
>  target-i386/kvm.c         |   13 +++++++++
>  target-i386/kvm_i386.h    |   16 ++++++++++++
>  12 files changed, 130 insertions(+), 24 deletions(-)
>  create mode 100644 target-i386/kvm-stub.c
>  create mode 100644 target-i386/kvm_i386.h
>
> --
> 1.7.5.4
>
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel()
  2012-08-01 14:39 ` [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel() Peter Maydell
@ 2012-08-02  9:00   ` Jan Kiszka
  0 siblings, 0 replies; 15+ messages in thread
From: Jan Kiszka @ 2012-08-02  9:00 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Avi Kivity, Marcelo Tosatti, qemu-devel, patches, Alexander Graf

[-- Attachment #1: Type: text/plain, Size: 2470 bytes --]

On 2012-08-01 16:39, Peter Maydell wrote:
> ping?

Sorry, head is full with other stuff. Will try to have a final look today.

Jan

> 
> thanks
> -- PMM
> 
> On 26 July 2012 15:35, Peter Maydell <peter.maydell@linaro.org> wrote:
>> This patch series removes all uses of kvm_irqchip_in_kernel()
>> from architecture-independent code, by creating a set of more
>> specific functions instead to test for the particular aspects
>> of behaviour that the calling code is actually interested in.
>>
>> The uses in x86-specific code could in theory be further broken
>> down into kvm_ioapic(), kvm_pit(), etc, but I leave that for
>> one of the x86 maintainers if they think it's worthwhile.
>>
>> Changes v1->v2:
>>  * more blank lines round kvm.h doc comments / macros
>>  * 1: fn name changed to: kvm_async_interrupts_enabled()
>>       (and corresponding bool is now kvm_async_interrupts_allowed,
>>       so we are consistent about the enabled/allowed convention)
>>  * 2: fn name changed to: kvm_set_irq()
>>  * 3: fix return type of kvm_allows_irq0_override() to bool
>>  * 5 (and new patch 6): split out separate kvm_gsi_routing_enabled()
>>       check for use in kvm_irqchip_add_msi_route()
>>
>> Peter Maydell (7):
>>   kvm: Decouple 'async interrupt delivery' from 'kernel irqchip'
>>   kvm: Rename kvm_irqchip_set_irq() to kvm_set_irq()
>>   kvm: Move kvm_allows_irq0_override() to target-i386, fix return type
>>   kvm: Decouple 'irqfds usable' from 'kernel irqchip'
>>   kvm: Decouple 'MSI routing via irqfds' from 'kernel irqchip'
>>   kvm: Decouple 'GSI routing' from 'kernel irqchip'
>>   kvm: Add documentation comment for kvm_irqchip_in_kernel()
>>
>>  cpus.c                    |    3 +-
>>  hw/kvm/i8259.c            |    2 +-
>>  hw/kvm/ioapic.c           |    2 +-
>>  hw/pc.c                   |    1 +
>>  hw/virtio-pci.c           |    4 +-
>>  kvm-all.c                 |   25 ++++++++++--------
>>  kvm-stub.c                |    9 +++---
>>  kvm.h                     |   60 ++++++++++++++++++++++++++++++++++++++++++--
>>  target-i386/Makefile.objs |    1 +
>>  target-i386/kvm-stub.c    |   18 +++++++++++++
>>  target-i386/kvm.c         |   13 +++++++++
>>  target-i386/kvm_i386.h    |   16 ++++++++++++
>>  12 files changed, 130 insertions(+), 24 deletions(-)
>>  create mode 100644 target-i386/kvm-stub.c
>>  create mode 100644 target-i386/kvm_i386.h
>>
>> --
>> 1.7.5.4
>>
>>




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel()
  2012-07-26 14:35 [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel() Peter Maydell
                   ` (7 preceding siblings ...)
  2012-08-01 14:39 ` [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel() Peter Maydell
@ 2012-08-02  9:14 ` Jan Kiszka
  2012-08-07 15:11     ` [Qemu-devel] " Peter Maydell
  8 siblings, 1 reply; 15+ messages in thread
From: Jan Kiszka @ 2012-08-02  9:14 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Alexander Graf, Avi Kivity, Marcelo Tosatti, qemu-devel, patches

[-- Attachment #1: Type: text/plain, Size: 2368 bytes --]

On 2012-07-26 16:35, Peter Maydell wrote:
> This patch series removes all uses of kvm_irqchip_in_kernel()
> from architecture-independent code, by creating a set of more
> specific functions instead to test for the particular aspects
> of behaviour that the calling code is actually interested in.
> 
> The uses in x86-specific code could in theory be further broken
> down into kvm_ioapic(), kvm_pit(), etc, but I leave that for
> one of the x86 maintainers if they think it's worthwhile.

With the existing KVM irqchip support for x86, you can't break things
down like this.

> 
> Changes v1->v2:
>  * more blank lines round kvm.h doc comments / macros
>  * 1: fn name changed to: kvm_async_interrupts_enabled()
>       (and corresponding bool is now kvm_async_interrupts_allowed,
>       so we are consistent about the enabled/allowed convention)
>  * 2: fn name changed to: kvm_set_irq()
>  * 3: fix return type of kvm_allows_irq0_override() to bool
>  * 5 (and new patch 6): split out separate kvm_gsi_routing_enabled()
>       check for use in kvm_irqchip_add_msi_route()
> 
> Peter Maydell (7):
>   kvm: Decouple 'async interrupt delivery' from 'kernel irqchip'
>   kvm: Rename kvm_irqchip_set_irq() to kvm_set_irq()
>   kvm: Move kvm_allows_irq0_override() to target-i386, fix return type
>   kvm: Decouple 'irqfds usable' from 'kernel irqchip'
>   kvm: Decouple 'MSI routing via irqfds' from 'kernel irqchip'
>   kvm: Decouple 'GSI routing' from 'kernel irqchip'
>   kvm: Add documentation comment for kvm_irqchip_in_kernel()
> 
>  cpus.c                    |    3 +-
>  hw/kvm/i8259.c            |    2 +-
>  hw/kvm/ioapic.c           |    2 +-
>  hw/pc.c                   |    1 +
>  hw/virtio-pci.c           |    4 +-
>  kvm-all.c                 |   25 ++++++++++--------
>  kvm-stub.c                |    9 +++---
>  kvm.h                     |   60 ++++++++++++++++++++++++++++++++++++++++++--
>  target-i386/Makefile.objs |    1 +
>  target-i386/kvm-stub.c    |   18 +++++++++++++
>  target-i386/kvm.c         |   13 +++++++++
>  target-i386/kvm_i386.h    |   16 ++++++++++++
>  12 files changed, 130 insertions(+), 24 deletions(-)
>  create mode 100644 target-i386/kvm-stub.c
>  create mode 100644 target-i386/kvm_i386.h
> 

For the whole series:

Acked-by: Jan Kiszka <jan.kiszka@siemens.com>


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel()
  2012-08-02  9:14 ` Jan Kiszka
@ 2012-08-07 15:11     ` Peter Maydell
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Maydell @ 2012-08-07 15:11 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti
  Cc: qemu-devel, patches, Alexander Graf, kvm-devel, Jan Kiszka

On 2 August 2012 10:14, Jan Kiszka <jan.kiszka@web.de> wrote:
> On 2012-07-26 16:35, Peter Maydell wrote:
>> This patch series removes all uses of kvm_irqchip_in_kernel()
>> from architecture-independent code, by creating a set of more
>> specific functions instead to test for the particular aspects
>> of behaviour that the calling code is actually interested in.
>>
>> The uses in x86-specific code could in theory be further broken
>> down into kvm_ioapic(), kvm_pit(), etc, but I leave that for
>> one of the x86 maintainers if they think it's worthwhile.
>
> For the whole series:
>
> Acked-by: Jan Kiszka <jan.kiszka@siemens.com>

Just a ping to check this will get into qemu before the
hardfreeze next week...

-- PMM

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel()
@ 2012-08-07 15:11     ` Peter Maydell
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Maydell @ 2012-08-07 15:11 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti
  Cc: Alexander Graf, Jan Kiszka, qemu-devel, kvm-devel, patches

On 2 August 2012 10:14, Jan Kiszka <jan.kiszka@web.de> wrote:
> On 2012-07-26 16:35, Peter Maydell wrote:
>> This patch series removes all uses of kvm_irqchip_in_kernel()
>> from architecture-independent code, by creating a set of more
>> specific functions instead to test for the particular aspects
>> of behaviour that the calling code is actually interested in.
>>
>> The uses in x86-specific code could in theory be further broken
>> down into kvm_ioapic(), kvm_pit(), etc, but I leave that for
>> one of the x86 maintainers if they think it's worthwhile.
>
> For the whole series:
>
> Acked-by: Jan Kiszka <jan.kiszka@siemens.com>

Just a ping to check this will get into qemu before the
hardfreeze next week...

-- PMM

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel()
  2012-08-07 15:11     ` [Qemu-devel] " Peter Maydell
@ 2012-08-09 13:17       ` Avi Kivity
  -1 siblings, 0 replies; 15+ messages in thread
From: Avi Kivity @ 2012-08-09 13:17 UTC (permalink / raw)
  To: Peter Maydell
  Cc: kvm-devel, patches, Marcelo Tosatti, Alexander Graf, qemu-devel,
	Jan Kiszka

On 08/07/2012 06:11 PM, Peter Maydell wrote:
> On 2 August 2012 10:14, Jan Kiszka <jan.kiszka@web.de> wrote:
>> On 2012-07-26 16:35, Peter Maydell wrote:
>>> This patch series removes all uses of kvm_irqchip_in_kernel()
>>> from architecture-independent code, by creating a set of more
>>> specific functions instead to test for the particular aspects
>>> of behaviour that the calling code is actually interested in.
>>>
>>> The uses in x86-specific code could in theory be further broken
>>> down into kvm_ioapic(), kvm_pit(), etc, but I leave that for
>>> one of the x86 maintainers if they think it's worthwhile.
>>
>> For the whole series:
>>
>> Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Just a ping to check this will get into qemu before the
> hardfreeze next week...

Thanks for the ping; all applied.  Will push after autotesting.


-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel()
@ 2012-08-09 13:17       ` Avi Kivity
  0 siblings, 0 replies; 15+ messages in thread
From: Avi Kivity @ 2012-08-09 13:17 UTC (permalink / raw)
  To: Peter Maydell
  Cc: kvm-devel, patches, Marcelo Tosatti, Alexander Graf, qemu-devel,
	Jan Kiszka

On 08/07/2012 06:11 PM, Peter Maydell wrote:
> On 2 August 2012 10:14, Jan Kiszka <jan.kiszka@web.de> wrote:
>> On 2012-07-26 16:35, Peter Maydell wrote:
>>> This patch series removes all uses of kvm_irqchip_in_kernel()
>>> from architecture-independent code, by creating a set of more
>>> specific functions instead to test for the particular aspects
>>> of behaviour that the calling code is actually interested in.
>>>
>>> The uses in x86-specific code could in theory be further broken
>>> down into kvm_ioapic(), kvm_pit(), etc, but I leave that for
>>> one of the x86 maintainers if they think it's worthwhile.
>>
>> For the whole series:
>>
>> Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Just a ping to check this will get into qemu before the
> hardfreeze next week...

Thanks for the ping; all applied.  Will push after autotesting.


-- 
error compiling committee.c: too many arguments to function

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2012-08-09 13:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-26 14:35 [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel() Peter Maydell
2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 1/7] kvm: Decouple 'async interrupt delivery' from 'kernel irqchip' Peter Maydell
2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 2/7] kvm: Rename kvm_irqchip_set_irq() to kvm_set_irq() Peter Maydell
2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 3/7] kvm: Move kvm_allows_irq0_override() to target-i386, fix return type Peter Maydell
2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 4/7] kvm: Decouple 'irqfds usable' from 'kernel irqchip' Peter Maydell
2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 5/7] kvm: Decouple 'MSI routing via irqfds' " Peter Maydell
2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 6/7] kvm: Decouple 'GSI routing' " Peter Maydell
2012-07-26 14:35 ` [Qemu-devel] [PATCH v2 7/7] kvm: Add documentation comment for kvm_irqchip_in_kernel() Peter Maydell
2012-08-01 14:39 ` [Qemu-devel] [PATCH v2 0/7] split out uses of kvm_irqchip_in_kernel() Peter Maydell
2012-08-02  9:00   ` Jan Kiszka
2012-08-02  9:14 ` Jan Kiszka
2012-08-07 15:11   ` Peter Maydell
2012-08-07 15:11     ` [Qemu-devel] " Peter Maydell
2012-08-09 13:17     ` Avi Kivity
2012-08-09 13:17       ` [Qemu-devel] " Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.