diff mbox series

[RFC,2/2] accel/kvm: Declare kvm_arch_irqchip_create() in 'sysemu/kvm_int.h'

Message ID 20230405163001.98573-3-philmd@linaro.org
State New
Headers show
Series accel/kvm: Extract 'sysemu/kvm_irq.h' from 'sysemu/kvm.h' | expand

Commit Message

Philippe Mathieu-Daudé April 5, 2023, 4:30 p.m. UTC
kvm_arch_irqchip_create() is irrelevant for hardware device
models (files under the hw/ directory), it is meant for the
generic KVM code (files in accel/kvm/) and the target
implementation (files under target/ directory).

"sysemu/kvm.h" header is meant to contain the 'external' KVM
API. Move kvm_arch_irqchip_create() prototype declaration to
"sysemu/kvm_int.h" which should contain the KVM 'internal' API.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/sysemu/kvm.h     | 12 ------------
 include/sysemu/kvm_int.h | 13 +++++++++++++
 2 files changed, 13 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index 32e223a368..540f6f04a8 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -453,18 +453,6 @@  void kvm_cpu_synchronize_state(CPUState *cpu);
 
 void kvm_init_cpu_signals(CPUState *cpu);
 
-/**
- * kvm_arch_irqchip_create:
- * @KVMState: The KVMState pointer
- *
- * Allow architectures to create an in-kernel irq chip themselves.
- *
- * Returns: < 0: error
- *            0: irq chip was not created
- *          > 0: irq chip was created
- */
-int kvm_arch_irqchip_create(KVMState *s);
-
 /**
  * kvm_set_one_reg - set a register value in KVM via KVM_SET_ONE_REG ioctl
  * @id: The register ID
diff --git a/include/sysemu/kvm_int.h b/include/sysemu/kvm_int.h
index a641c974ea..4a46b661e2 100644
--- a/include/sysemu/kvm_int.h
+++ b/include/sysemu/kvm_int.h
@@ -140,4 +140,17 @@  void kvm_set_max_memslot_size(hwaddr max_slot_size);
  * Return: None.
  */
 void kvm_hwpoison_page_add(ram_addr_t ram_addr);
+
+/**
+ * kvm_arch_irqchip_create:
+ * @KVMState: The KVMState pointer
+ *
+ * Allow architectures to create an in-kernel irq chip themselves.
+ *
+ * Returns: < 0: error
+ *            0: irq chip was not created
+ *          > 0: irq chip was created
+ */
+int kvm_arch_irqchip_create(KVMState *s);
+
 #endif