Avi Kivity wrote:
> On 05/07/2010 05:43 AM, Xu, Dongxiao wrote:
>> From: Dongxiao Xu<dongxiao...@intel.com>
>> 
>> SDM suggests VMXON should be called before VMPTRLD, and VMXOFF
>> should be called after doing VMCLEAR.
>> 
>> Therefore in vmm coexistence case, we should firstly call VMXON
>> before any VMCS operation, and then call VMXOFF after the
>> operation is done.
>> 
>> 
>> @@ -4118,7 +4143,10 @@ static void vmx_cpuid_update(struct kvm_vcpu
>>      *vcpu) struct kvm_cpuid_entry2 *best;
>>      struct vcpu_vmx *vmx = to_vmx(vcpu);
>>      u32 exec_control;
>> +    int cpu;
>> 
>> +    cpu = get_cpu();
>> +    vmx_vcpu_load(&vmx->vcpu, cpu);
>>      vmx->rdtscp_enabled = false;
>>      if (vmx_rdtscp_supported()) {
>>              exec_control = vmcs_read32(SECONDARY_VM_EXEC_CONTROL);
>> @@ -4133,6 +4161,9 @@ static void vmx_cpuid_update(struct kvm_vcpu
>>              *vcpu)                          } }
>>      }
>> +    vmx_vcpu_put(&vmx->vcpu);
>> +    put_cpu();
>> +
>>   }
>> 
>>   static void vmx_set_supported_cpuid(u32 func, struct
>> kvm_cpuid_entry2 *entry) 
>> 
> 
> I'm not sure why this is needed.  vmx_cpuid_update() is called from a
> vcpu ioctl which should have called vcpu_load() before.
> 
> Apart from that, everything looks good for merging.

Vcpu_load() and vcpu_put() is not called in that ioctl. I will add that and
send out another version of patchset.

Thanks,
Dongxiao

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to