diff options
author | Matt Gingell <gingell@google.com> | 2015-11-16 10:03:06 -0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-12-17 17:15:40 +0100 |
commit | 32c18a2dbaf79c241eddabd19a3b410bab5bf0cc (patch) | |
tree | 6b3fd1e6c987d5e812dbcc279ad087789dbf9f74 /include | |
parent | ff99aa64b13ea85ee35ec09c3fe720ad8bc83154 (diff) |
kvm: add support for -machine kernel_irqchip=split
This patch adds the initial plumbing for split IRQ chip mode via
KVM_CAP_SPLIT_IRQCHIP. In addition to option processing, a number of
kvm_*_in_kernel macros are defined to help clarify which component is
where.
Signed-off-by: Matt Gingell <gingell@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/boards.h | 2 | ||||
-rw-r--r-- | include/sysemu/kvm.h | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h index 5da4fb00ee..f19df9769c 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -35,6 +35,7 @@ extern MachineState *current_machine; bool machine_usb(MachineState *machine); bool machine_kernel_irqchip_allowed(MachineState *machine); bool machine_kernel_irqchip_required(MachineState *machine); +bool machine_kernel_irqchip_split(MachineState *machine); int machine_kvm_shadow_mem(MachineState *machine); int machine_phandle_start(MachineState *machine); bool machine_dump_guest_core(MachineState *machine); @@ -111,6 +112,7 @@ struct MachineState { char *accel; bool kernel_irqchip_allowed; bool kernel_irqchip_required; + bool kernel_irqchip_split; int kvm_shadow_mem; char *dtb; char *dumpdtb; diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 9a569f1f46..c8f43dc82d 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -43,6 +43,7 @@ extern bool kvm_allowed; extern bool kvm_kernel_irqchip; +extern bool kvm_split_irqchip; extern bool kvm_async_interrupts_allowed; extern bool kvm_halt_in_kernel_allowed; extern bool kvm_eventfds_allowed; @@ -71,6 +72,16 @@ extern bool kvm_ioeventfd_any_length_allowed; #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. + */ +#define kvm_irqchip_is_split() (kvm_split_irqchip) + +/** * kvm_async_interrupts_enabled: * * Returns: true if we can deliver interrupts to KVM |