]> git.baikalelectronics.ru Git - kernel.git/commit
arm/arm64: KVM: Detect vGIC presence at runtime
authorPavel Fedin <p.fedin@samsung.com>
Fri, 18 Dec 2015 11:38:43 +0000 (14:38 +0300)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 18 Dec 2015 12:01:58 +0000 (12:01 +0000)
commit09318300028b191891ec7071fe4625d2f859b851
treee3c01e8cba0407717be707a71f7e952454cba706
parent629759588500c7d4abd315b4282cb1334f2e3e7a
arm/arm64: KVM: Detect vGIC presence at runtime

Before commit 4e34fcaff59df0785955852ba1ae9c9012d4ff49
("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: Pavel Fedin <p.fedin@samsung.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/kvm/arm.c