]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: initialize more non-shadowed fields in prepare_vmcs02_full
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 20 Dec 2017 13:05:21 +0000 (14:05 +0100)
committerRadim Krčmář <rkrcmar@redhat.com>
Tue, 16 Jan 2018 15:50:20 +0000 (16:50 +0100)
commitced40c0e828eec45bedec37fb1ed438332a30149
treec3b2d413b552ae626c9cf609c704bcb5bdfb054a
parentf9fde7f25ff16648628a14f2ebeea39bf6c1fbed
KVM: nVMX: initialize more non-shadowed fields in prepare_vmcs02_full

These fields are also simple copies of the data in the vmcs12 struct.
For some of them, prepare_vmcs02 was skipping the copy when the field
was unused.  In prepare_vmcs02_full, we copy them always as long as the
field exists on the host, because the corresponding execution control
might be one of the shadowed fields.

Optimization opportunities remain for MSRs that, depending on the
entry/exit controls, have to be copied from either the vmcs01 or
the vmcs12: EFER (whose value is partly stored in the entry controls
too), PAT, DEBUGCTL (and also DR7).  Before moving these three and
the entry/exit controls to prepare_vmcs02_full, KVM would have to set
dirty_vmcs12 on writes to the L1 MSRs.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx.c