[PATCH 0/2] kvm: disable virtualization on kdump

Eric W. Biederman ebiederm at xmission.com
Wed Oct 29 21:33:39 EDT 2008

Avi Kivity <avi at redhat.com> writes:

> Eric W. Biederman wrote:
>> Most of the reason I was wondering is that the cpu hardware probing
>> largely seems to be a duplicate of what we have in the core for
>> probing cpu capabilities already, and could likely be made smaller
>> by building upon the existing codebase.
> We use the core cpuid functions, or are you referring to something else?

I was referring to the arch/x86/kernel/cpu/*
and arch/x86/include/asm/cpufeature.h

The core functions that are responsible for detecting all of the cpu features,
and disabling them if there are cpu errata.

The usual pattern is that code does all of the magic detection logic and
then the code that would use it would just need to test: cpu_has_vmx or cpu_has_svm.

At least in part that allows us to show the working cpu features in /proc/cpuinfo.

>>> svm can writeback into memory at odd times if we don't do this, and the cost
> is
>>> small - clear a bit in EFER.  There's no reason to be lazy.
>> Especially if we can clear that bit unconditionally (when
>> EFER is present) I'm all for it.
> That is the case.

Cool.  I forget if we have to test for EFER on 32bit, or if we can just wrmsr
and be done with it.  Regardless that sounds easy to do on the kexec path.


More information about the kexec mailing list