Hi,
On 15/12/15 16:42, Peter Maydell wrote:
On 15 December 2015 at 16:35, Andrew Jones <drjones(a)redhat.com>
wrote:
> This is probably good for guests that happy with both. Guests that
> need/want a specific choice will put their integer there, and then
> we need a way to do a capabilities check before launching that guest
> on an arbitrary host.
OK, so how do we typically do that? I notice I have a 'kvm-ok'
script on my machine which helpfully reports things like whether
KVM is enabled, and it seems like it might be helpful to extend
that to know a bit more about ARM hosts. But I'm guessing libvirt
doesn't use that for its capability checking ?
Even that wouldn't help us, I guess, as you cannot easily check for
GICv3/GICv2 compatibility with a _script_. Having access to ioctl's make
this pretty easy though: Just try to call KVM_CREATE_DEVICE with the
proper type and get -ENODEV if this one is not supported. This can be
done without any extra userland tool by just executing some ioctls on
/dev/kvm (from C or using some helper library).
Does adding such a check to libvirt sounds feasible?
Cheers,
Andre.