Bug 54521 - nVMX: accurately emulate VMXON region
Summary: nVMX: accurately emulate VMXON region
Status: RESOLVED CODE_FIX
Alias: None
Product: Virtualization
Classification: Unclassified
Component: kvm (show other bugs)
Hardware: All Linux
: P1 enhancement
Assignee: virtualization_kvm
URL:
Keywords:
Depends on:
Blocks: 94971 53601
  Show dependency tree
 
Reported: 2013-02-26 15:07 UTC by Nadav Har'El
Modified: 2015-03-17 03:53 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.16
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Nadav Har'El 2013-02-26 15:07:20 UTC
According to the VMX spec, the VMXON instruction takes a "VMXON region", a 4096 byte memory region which the VMX implementation (in this case, our emulation in nested VMX) may use for its needs.

We currently have no need to for this memory area, because when our implementation needs to store extra data, it stores it in the vmx_vcpu structure (in L0 memory). However, we may want to store data in guest memory in the future - e.g. for making it easier to do live migration (see bug 53851).

In any case, according to the VMX spec, the VMXON instruction is supposed to verify that the memory pointed by the VMXON operand is 4K aligned and has the right physical address width, and its content has the right VMCS revision field (copied from VMX_BASIC). We don't do this currently.

Moreover, according to the spec, VMXON needs to save this pointer, and on VMPTRLD/VMCLEAR we need to verify that the given VMCS pointer is not the VMXON region.
Comment 1 Bandan Das 2014-06-12 16:52:31 UTC
Patches posted -
https://lkml.org/lkml/2014/5/6/29

Note You need to log in before you can comment on or make changes to this bug.