* [PATCH] kvm: Correct documentation of kvm_irqchip_*()
@ 2020-09-22 20:36 Eduardo Habkost
2020-09-23 12:44 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Eduardo Habkost @ 2020-09-22 20:36 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Vitaly Kuznetsov, kvm, Michael S. Tsirkin
When split irqchip support was introduced, the meaning of
kvm_irqchip_in_kernel() changed: now it only means the LAPIC is
in kernel. The PIC, IOAPIC, and PIT might be in userspace if
irqchip=split was set. Update the doc comment to reflect that.
While at it, remove the "the user asked us" part in
kvm_irqchip_is_split() doc comment. That macro has nothing to do
with existence of explicit user-provided options.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
include/sysemu/kvm.h | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index 5bbea538830..23fce48b0be 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -51,23 +51,22 @@ extern bool kvm_msi_use_devid;
/**
* kvm_irqchip_in_kernel:
*
- * Returns: true if the user asked us to create an in-kernel
- * irqchip via the "kernel_irqchip=on" machine option.
+ * Returns: true if an in-kernel irqchip was created.
* 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.
+ * specific: on PC, for instance, it means that the LAPIC
+ * is 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)
/**
* kvm_irqchip_is_split:
*
- * Returns: true if the user asked us to split the irqchip
- * implementation between user and kernel space. The details are
- * architecture and machine specific. On PC, it means that the PIC,
- * IOAPIC, and PIT are in user space while the LAPIC is in the kernel.
+ * Returns: true if the irqchip implementation is split between
+ * user and kernel space. The details are architecture and
+ * machine specific. On PC, it means that the PIC, IOAPIC, and
+ * PIT are in user space while the LAPIC is in the kernel.
*/
#define kvm_irqchip_is_split() (kvm_split_irqchip)
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kvm: Correct documentation of kvm_irqchip_*()
2020-09-22 20:36 [PATCH] kvm: Correct documentation of kvm_irqchip_*() Eduardo Habkost
@ 2020-09-23 12:44 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2020-09-23 12:44 UTC (permalink / raw)
To: Eduardo Habkost, qemu-devel; +Cc: Vitaly Kuznetsov, kvm, Michael S. Tsirkin
On 22/09/20 22:36, Eduardo Habkost wrote:
> When split irqchip support was introduced, the meaning of
> kvm_irqchip_in_kernel() changed: now it only means the LAPIC is
> in kernel. The PIC, IOAPIC, and PIT might be in userspace if
> irqchip=split was set. Update the doc comment to reflect that.
>
> While at it, remove the "the user asked us" part in
> kvm_irqchip_is_split() doc comment. That macro has nothing to do
> with existence of explicit user-provided options.
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> include/sysemu/kvm.h | 19 +++++++++----------
> 1 file changed, 9 insertions(+), 10 deletions(-)
>
> diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
> index 5bbea538830..23fce48b0be 100644
> --- a/include/sysemu/kvm.h
> +++ b/include/sysemu/kvm.h
> @@ -51,23 +51,22 @@ extern bool kvm_msi_use_devid;
> /**
> * kvm_irqchip_in_kernel:
> *
> - * Returns: true if the user asked us to create an in-kernel
> - * irqchip via the "kernel_irqchip=on" machine option.
> + * Returns: true if an in-kernel irqchip was created.
> * 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.
> + * specific: on PC, for instance, it means that the LAPIC
> + * is 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)
>
> /**
> * kvm_irqchip_is_split:
> *
> - * Returns: true if the user asked us to split the irqchip
> - * implementation between user and kernel space. The details are
> - * architecture and machine specific. On PC, it means that the PIC,
> - * IOAPIC, and PIT are in user space while the LAPIC is in the kernel.
> + * Returns: true if the irqchip implementation is split between
> + * user and kernel space. The details are architecture and
> + * machine specific. On PC, it means that the PIC, IOAPIC, and
> + * PIT are in user space while the LAPIC is in the kernel.
> */
> #define kvm_irqchip_is_split() (kvm_split_irqchip)
>
>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-23 12:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-22 20:36 [PATCH] kvm: Correct documentation of kvm_irqchip_*() Eduardo Habkost
2020-09-23 12:44 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).