mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
hw/kvm/arm_gic: Implement support for KVM in-kernel ARM GIC
Implement support for using the KVM in-kernel GIC for ARM. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
eb035b48d5
commit
ed46676160
3 changed files with 175 additions and 1 deletions
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
|
||||
#include "sysbus.h"
|
||||
#include "sysemu/kvm.h"
|
||||
|
||||
/* A15MP private memory region. */
|
||||
|
||||
|
@ -40,8 +41,13 @@ static int a15mp_priv_init(SysBusDevice *dev)
|
|||
{
|
||||
A15MPPrivState *s = FROM_SYSBUS(A15MPPrivState, dev);
|
||||
SysBusDevice *busdev;
|
||||
const char *gictype = "arm_gic";
|
||||
|
||||
s->gic = qdev_create(NULL, "arm_gic");
|
||||
if (kvm_irqchip_in_kernel()) {
|
||||
gictype = "kvm-arm-gic";
|
||||
}
|
||||
|
||||
s->gic = qdev_create(NULL, gictype);
|
||||
qdev_prop_set_uint32(s->gic, "num-cpu", s->num_cpu);
|
||||
qdev_prop_set_uint32(s->gic, "num-irq", s->num_irq);
|
||||
qdev_prop_set_uint32(s->gic, "revision", 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue