Re: [kvm-devel] [PATCH] Add cpu consistence check in vmx.

2007-07-31 Thread Avi Kivity
Yang, Sheng wrote: > I modified the patch as you suggest. > For any failure in this due to hardware error, I replace all the error > return code with -EIO. > > Thanks. > --- > From: Sheng Yang <[EMAIL PROTECTED]> > Date: Tue, 31 Jul 2007 17:23:20 +0800 > Subject: [PATCH] Add cpu consistence check i

Re: [kvm-devel] [PATCH] Add cpu consistence check in vmx.

2007-07-31 Thread Yang, Sheng
I modified the patch as you suggest. For any failure in this due to hardware error, I replace all the error return code with -EIO. Thanks. --- From: Sheng Yang <[EMAIL PROTECTED]> Date: Tue, 31 Jul 2007 17:23:20 +0800 Subject: [PATCH] Add cpu consistence check in vmx. All the physical CPUs on the

Re: [kvm-devel] [PATCH] Add cpu consistence check in vmx.

2007-07-31 Thread Avi Kivity
Yang, Sheng wrote: >>> + 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... > > EINVAL usually means a user-supplied argument is

Re: [kvm-devel] [PATCH] Add cpu consistence check in vmx.

2007-07-31 Thread Yang, Sheng
>> +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

Re: [kvm-devel] [PATCH] Add cpu consistence check in vmx.

2007-07-31 Thread Li, Xin B
>-Original Message- >From: Avi Kivity [mailto:[EMAIL PROTECTED] >Sent: Tuesday, July 31, 2007 4:10 PM >To: Li, Xin B >Cc: Yang, Sheng; kvm-devel@lists.sourceforge.net >Subject: Re: [kvm-devel] [PATCH] Add cpu consistence check in vmx. > >Li, Xin B wrote: >>

Re: [kvm-devel] [PATCH] Add cpu consistence check in vmx.

2007-07-31 Thread Avi Kivity
Li, Xin B wrote: >> btw, what about cpu hotplug? we need to deal with that too. Do we >> error out and refuse to enable the cpu if it isn't compatible enough? >> > > I think we shouldn't enable it, or the code becomes to complex. > -xin > > What do you mean exactly? Don't enable cp

Re: [kvm-devel] [PATCH] Add cpu consistence check in vmx.

2007-07-31 Thread Li, Xin B
> >btw, what about cpu hotplug? we need to deal with that too. Do we >error out and refuse to enable the cpu if it isn't compatible enough? I think we shouldn't enable it, or the code becomes to complex. -xin > >-- >error compiling committee.c: too many arguments to function > > >---

Re: [kvm-devel] [PATCH] Add cpu consistence check in vmx.

2007-07-31 Thread Avi Kivity
Yang, Sheng wrote: > Thank you for point out my fault. > > Here is a modified version which is clearer. And I have tested it with > version d9feefe(for the latest git repository broken). > I recommend building kvm.git, not the external module. kvm.git is not broken at the moment. > All the p

Re: [kvm-devel] [PATCH] Add cpu consistence check in vmx.

2007-07-31 Thread Yang, Sheng
Thank you for point out my fault. Here is a modified version which is clearer. And I have tested it with version d9feefe(for the latest git repository broken). Thanks Yang, Sheng -- From: Sheng Yang <[EMAIL PROTECTED]> Date: Tue, 31 Jul 2007 10:21:32 +0800 Subject: [PATCH] Add cpu consistence che

Re: [kvm-devel] [PATCH] Add cpu consistence check in vmx.

2007-07-30 Thread Avi Kivity
Yang, Sheng wrote: > All the physical CPUs on the board should support the same VMX feature > set. > The hardware_enable() do the per-cpu check now. > In case of vmx/svm enabling failure, transfer a variable in > hardware_enable() > for error report. > > > static void hardware_disable(void *junk

[kvm-devel] [PATCH] Add cpu consistence check in vmx.

2007-07-29 Thread Yang, Sheng
All the physical CPUs on the board should support the same VMX feature set. The hardware_enable() do the per-cpu check now. In case of vmx/svm enabling failure, transfer a variable in hardware_enable() for error report. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c |