[PATCH v2 0/5] Export offsets of VMCS fields as note information for kdump

Eric Northup digitaleric at google.com
Tue May 22 16:53:47 EDT 2012

On Mon, May 21, 2012 at 8:53 PM, Yanfei Zhang
<zhangyanfei at cn.fujitsu.com> wrote:
> 于 2012年05月22日 02:58, Eric Northup 写道:
>> So you can have the VMCS offset dumping be a manually-loaded module.
>> Build a database mapping from (CPUID, microcode revision) -> (VMCSINFO).
>> There's no need for anything beyond the (CPUID, microcode revision) to
>> be put in the kdump, since your offline processing of a kdump can then
>> look up the rest.
> We have considered this way, but there are two issues:
> 1) vmx resource is unique for a single cpu, and it's risky to grab it forcibly
> on the environment where kvm module is used, in particular on customer's environment.
> To do this safely, kvm support is needed.

It's not risky: you just have to make sure that no one else is going
to use the VMCS on your CPU while you're running.  You can disable
preemption and then save the old VMCS pointer from the CPU (see the
VMPTRST instructions).  Load your temporary VMCS pointer, discover
the fields, then restore the original VMCS pointer.  Then re-enable
preemption and you're done.

More information about the kexec mailing list