lkml.org 
[lkml]   [2017]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/4] KVM: nVMX: initialize more non-shadowed fields in prepare_vmcs02_full
From
Date
On 25/12/2017 04:09, Wanpeng Li wrote:
> 2017-12-21 20:43 GMT+08:00 Paolo Bonzini <pbonzini@redhat.com>:
>> 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.
>
> Why we don't need to copy them always before the patchset?

Before these patches, we only copy them if the corresponding processor
control is enabled. For example, we only copy the EOI exit bitmap if
APICv is enabled by L1. Here we could have

write to EOI exit bitmap
vmlaunch (calls prepare_vmcs02_full)
enable APICv (but EOI exit bitmap fields are clean)
vmresume (doesn't call prepare_vmcs02_full)

The vmresume doesn't call prepare_vmcs02_full, so the EOI exit bitmap
must be copied every time prepare_vmcs02_full runs.

Paolo

\
 
 \ /
  Last update: 2017-12-27 10:55    [W:0.066 / U:0.948 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site