>> +            return -1;
>>
>
>-1 is -EPERM.  We need a real, more suitable, error code here.

How about using -EINVAL? But the comment of it is "Invalid argument"...
I can't find more one here...

>Also, having a single function either construct vmcs_config or verify,
>depending on whether it is first called or not, it is a bit ugly.  A
>check_... function shouldn't actually set up global variables.  How
>about the following:
>
>- setup_vmcs_config() takes a vmcs_config parameter instead of using a
>global.
>- it is called once by vmx_hardware_setup() with the global config
>- vmx_check_processor_compat() calls setup_vmcs_config() to set up a
>local variable, and then calls vmx_verify_config() to compare the two
>configurations.  Perhaps we can use memcmp() for the comparison.

Good approach. I will do it.

>> +void __init check_processor_compat(void *rtn)
>>
>
>Call this vmx_processor_compat() for consistency?
Ok. 

Thanks.
Yang, Sheng

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to