kvm: Add documentation comment for kvm_irqchip_in_kernel()
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 26 Jul 2012 14:35:17 +0000 (15:35 +0100)
committerAvi Kivity <avi@redhat.com>
Thu, 9 Aug 2012 13:16:58 +0000 (16:16 +0300)
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>
Signed-off-by: Avi Kivity <avi@redhat.com>
kvm.h

diff --git a/kvm.h b/kvm.h
index 444ed2e704810bf7c285ee0b0b6f3c1f6fcc32a5..5b8f588813ae774a1a736c8a92d674ffdd033c61 100644 (file)
--- 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)
 
 /**