Subject: bug#27636: /dev/kvm went missing on i686, Linux 4.12

From: Mark H Weaver <[email-masked]>
Date: Tue, 18 Jul 2017 16:02:06 -0400

Ricardo Wurmus <[email-masked]> writes:

> Mark H Weaver <[email-masked]> writes:
>
>> Ricardo Wurmus <[email-masked]> writes:
>>
>>> Since the update to Linux 4.12 my i686 machine no longer has /dev/kvm.
>>> I ran “modprobe kvm” successfully, and “lsmod” shows “kvm”, but the
>>> device node does not exist.
>>>
>>> Running “modprobe kvm-intel” prints:
>>>
>>>     modprobe: ERROR: could not insert 'kvm_intel': Input/output error
>>
>> Does the kernel message buffer mention anything about "kvm" or "KVM"?
>>
>>   dmesg | grep -i kvm
>
> No, there is no mention of “kvm” or “KVM” in the kernel messages.

When you looked for "kvm" or "KVM", did your kernel message buffer still
include the initial boot messages?  The kernel message buffer is of a
fixed size, so eventually the early messages are lost.

The reason I ask is because I did some web searches looking for other
people with the same problem, and what I found was that there was
typically a kernel message at boot time explaining why KVM was disabled.

In my case, on my Thinkpad X200 (which I'm sorry to say is running a
proprietary BIOS for now, because I had to replace the motherboard
recently and haven't yet gotten around to buying the needed clip to
reflash) I see the message "kvm: disabled by bios".

I'm fairly sure that I've seen /dev/kvm on this machine in the past.  It
might be that in earlier versions of Linux, /dev/kvm was created even
when it couldn't be used, and now it's created only conditionally, but
that's only a guess.

I haven't made any changes to the kernel configuration except to add
support for new modules and features as they become available, and as
far as I can see, the relevant KVM options are enabled just as they have
been in the past.

If all else fails, you could try using the 4.9 or 4.4 kernel and see if
that makes any difference.

       Mark