• Pavel Fedin's avatar
    arm/arm64: KVM: Detect vGIC presence at runtime · c7da6fa4
    Pavel Fedin authored
    Before commit 662d9715
    ("arm/arm64: KVM: Kill CONFIG_KVM_ARM_{VGIC,TIMER}") is was possible to
    compile the kernel without vGIC and vTimer support. Commit message says
    about possibility to detect vGIC support in runtime, but this has never
    been implemented.
    
    This patch introduces runtime check, restoring the lost functionality.
    It again allows to use KVM on hardware without vGIC. Interrupt
    controller has to be emulated in userspace in this case.
    
    -ENODEV return code from probe function means there's no GIC at all.
    -ENXIO happens when, for example, there is GIC node in the device tree,
    but it does not specify vGIC resources. Any other error code is still
    treated as full stop because it might mean some really serious problems.
    Signed-off-by: default avatarPavel Fedin <p.fedin@samsung.com>
    Reviewed-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
    Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
    c7da6fa4
arm.c 27.9 KB