aboutsummaryrefslogtreecommitdiff
path: root/accel/kvm/kvm-all.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel/kvm/kvm-all.c')
-rw-r--r--accel/kvm/kvm-all.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index 4770dd8..34e8f26 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -1774,7 +1774,7 @@ void kvm_irqchip_set_qemuirq_gsi(KVMState *s, qemu_irq irq, int gsi)
g_hash_table_insert(s->gsimap, irq, GINT_TO_POINTER(gsi));
}
-static void kvm_irqchip_create(MachineState *machine, KVMState *s)
+static void kvm_irqchip_create(KVMState *s)
{
int ret;
@@ -1792,9 +1792,9 @@ static void kvm_irqchip_create(MachineState *machine, KVMState *s)
/* First probe and see if there's a arch-specific hook to create the
* in-kernel irqchip for us */
- ret = kvm_arch_irqchip_create(machine, s);
+ ret = kvm_arch_irqchip_create(s);
if (ret == 0) {
- if (machine_kernel_irqchip_split(machine)) {
+ if (kvm_kernel_irqchip_split()) {
perror("Split IRQ chip mode not supported.");
exit(1);
} else {
@@ -2066,7 +2066,7 @@ static int kvm_init(MachineState *ms)
}
if (machine_kernel_irqchip_allowed(ms)) {
- kvm_irqchip_create(ms, s);
+ kvm_irqchip_create(s);
}
if (kvm_eventfds_allowed) {
@@ -2983,6 +2983,21 @@ static void kvm_set_kvm_shadow_mem(Object *obj, Visitor *v,
s->kvm_shadow_mem = value;
}
+bool kvm_kernel_irqchip_allowed(void)
+{
+ return machine_kernel_irqchip_allowed(current_machine);
+}
+
+bool kvm_kernel_irqchip_required(void)
+{
+ return machine_kernel_irqchip_required(current_machine);
+}
+
+bool kvm_kernel_irqchip_split(void)
+{
+ return machine_kernel_irqchip_split(current_machine);
+}
+
static void kvm_accel_instance_init(Object *obj)
{
KVMState *s = KVM_STATE(obj);