[fedora-virt] how can i see if the running kernel has kvm support?
Glauber Costa
glommer at redhat.com
Wed Apr 8 20:26:16 UTC 2009
On Wed, Apr 08, 2009 at 04:05:41PM -0400, Robert P. J. Day wrote:
>
> i'm curious as to how to examine a running kernel to see what it has
> in the way of kvm support.
>
> i can see that "make menuconfig" gives me the options:
>
> KVM (KVM)
> KVM for Intel (KVM_INTEL)
> KVM for AMD (KVM_AMD)
>
> first question: technically, i can select generic KVM support without
> selecting either INTEL or AMD support. can i assume that that's a
> pointless thing to do? the help text for CONFIG_KVM does seem to
> suggest that you really need to additionally select a processor module
> to make any sense; i was just wondering if there's some obscure
> scenario where having only that generic KVM support had any value.
No. You always need one of the two variants.
>
> next, regardless of whether kvm support is built-in or whether it's
> modular and the modules have been loaded, is there some indication --
> say under /proc or /sys -- that shows the current state of kvm support
> in the kernel?
plenty.
You'll have a /dev/kvm, for instance.
>
> if i had the config file for the running kernel, i could of course
> look at that, but let's assume that i have no such thing, and that kvm
> support is built-in so i can't even check for, say, /sys/module/kvm.
> is there a userspace way to probe and determine kvm support?
check for the existence of /dev/kvm
>
> rday
>
> p.s. just to be clear, kvm support in the kernel doesn't count if
> that kernel is running on a system without HW virt support, for which
> kvm support obviously has no value since it can't be used. in a case
> like that, i'd like to get the answer that there is *no* support.
for that, you'll probably need a mixture of checking processor flags +
the aforementioned method
More information about the Fedora-virt
mailing list