aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm/kvm_main.c
diff options
context:
space:
mode:
authorChristoffer Dall <christoffer.dall@linaro.org>2013-10-25 12:29:18 -0400
committerChristoffer Dall <christoffer.dall@linaro.org>2013-12-21 13:01:16 -0500
commit7330672befe6269e575f79b924a7068b26c144b4 (patch)
tree1eb2d427d0be36103633b623182b65e8a3dfbf42 /virt/kvm/kvm_main.c
parente1ba0207a1b3714bb3f000e506285ae5123cdfa7 (diff)
KVM: arm-vgic: Support KVM_CREATE_DEVICE for VGIC
Support creating the ARM VGIC device through the KVM_CREATE_DEVICE ioctl, which can then later be leveraged to use the KVM_{GET/SET}_DEVICE_ATTR, which is useful both for setting addresses in a more generic API than the ARM-specific one and is useful for save/restore of VGIC state. Adds KVM_CAP_DEVICE_CTRL to ARM capabilities. Note that we change the check for creating a VGIC from bailing out if any VCPUs were created, to bailing out if any VCPUs were ever run. This is an important distinction that shouldn't break anything, but allows creating the VGIC after the VCPUs have been created. Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r--virt/kvm/kvm_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 03c97e7ae4ca..3efba97bdce2 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2273,6 +2273,11 @@ static int kvm_ioctl_create_device(struct kvm *kvm,
2273 ops = &kvm_vfio_ops; 2273 ops = &kvm_vfio_ops;
2274 break; 2274 break;
2275#endif 2275#endif
2276#ifdef CONFIG_KVM_ARM_VGIC
2277 case KVM_DEV_TYPE_ARM_VGIC_V2:
2278 ops = &kvm_arm_vgic_v2_ops;
2279 break;
2280#endif
2276 default: 2281 default:
2277 return -ENODEV; 2282 return -ENODEV;
2278 } 2283 }