mirror of
https://github.com/qemu/qemu.git
synced 2024-12-25 05:03:41 +08:00
d85937e683
Enables support for the in-kernel MPIC that thas been merged into the KVM next branch. This includes irqfd/KVM_IRQ_LINE support from Alex Graf (along with some other improvements). Note from Alex regarding kvm_irqchip_create(): On x86, one would call kvm_irqchip_create() to initialize an in-kernel interrupt controller. That function then goes ahead and initializes global capability variables as well as the default irq routing table. On ppc, we can't call kvm_irqchip_create() because we can have different types of interrupt controllers. So we want to do all the things that function would do for us in the in-kernel device init handler. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: squash in kvm_irqchip_commit_routes patch, fix non-kvm build, fix ppcemb] Signed-off-by: Alexander Graf <agraf@suse.de>
30 lines
912 B
C
30 lines
912 B
C
#if !defined(__OPENPIC_H__)
|
|
#define __OPENPIC_H__
|
|
|
|
#include "qemu-common.h"
|
|
#include "hw/qdev.h"
|
|
|
|
/* OpenPIC have 5 outputs per CPU connected and one IRQ out single output */
|
|
enum {
|
|
OPENPIC_OUTPUT_INT = 0, /* IRQ */
|
|
OPENPIC_OUTPUT_CINT, /* critical IRQ */
|
|
OPENPIC_OUTPUT_MCK, /* Machine check event */
|
|
OPENPIC_OUTPUT_DEBUG, /* Inconditional debug event */
|
|
OPENPIC_OUTPUT_RESET, /* Core reset event */
|
|
OPENPIC_OUTPUT_NB,
|
|
};
|
|
|
|
#define OPENPIC_MODEL_RAVEN 0
|
|
#define OPENPIC_MODEL_FSL_MPIC_20 1
|
|
#define OPENPIC_MODEL_FSL_MPIC_42 2
|
|
|
|
#define OPENPIC_MAX_SRC 256
|
|
#define OPENPIC_MAX_TMR 4
|
|
#define OPENPIC_MAX_IPI 4
|
|
#define OPENPIC_MAX_IRQ (OPENPIC_MAX_SRC + OPENPIC_MAX_IPI + \
|
|
OPENPIC_MAX_TMR)
|
|
|
|
int kvm_openpic_connect_vcpu(DeviceState *d, CPUState *cs);
|
|
|
|
#endif /* __OPENPIC_H__ */
|