Re: [PATCH] KVM : Fix read/write to IA32_FEATURE_CONTROL MSR in nested virt

2013-07-04 Thread Arthur Chunqi Li
On Thu, Jul 4, 2013 at 8:43 PM, Gleb Natapov wrote: > On Thu, Jul 04, 2013 at 02:34:11PM +0200, Paolo Bonzini wrote: >> Il 04/07/2013 13:31, Gleb Natapov ha scritto: >> > On Thu, Jul 04, 2013 at 01:21:51PM +0200, Paolo Bonzini wrote: >> >> Il 04/07/2013 13:12, Gleb Natapov ha scritto: >> I do

Re: [PATCH] KVM : Fix read/write to IA32_FEATURE_CONTROL MSR in nested virt

2013-07-04 Thread Gleb Natapov
On Thu, Jul 04, 2013 at 02:34:11PM +0200, Paolo Bonzini wrote: > Il 04/07/2013 13:31, Gleb Natapov ha scritto: > > On Thu, Jul 04, 2013 at 01:21:51PM +0200, Paolo Bonzini wrote: > >> Il 04/07/2013 13:12, Gleb Natapov ha scritto: > I don't like that it requires a firmware change in order to use

Re: [PATCH] KVM : Fix read/write to IA32_FEATURE_CONTROL MSR in nested virt

2013-07-04 Thread Paolo Bonzini
Il 04/07/2013 13:31, Gleb Natapov ha scritto: > On Thu, Jul 04, 2013 at 01:21:51PM +0200, Paolo Bonzini wrote: >> Il 04/07/2013 13:12, Gleb Natapov ha scritto: I don't like that it requires a firmware change in order to use nested VMX (at least for hypervisors that read the MSR). "Worse

Re: [PATCH] KVM : Fix read/write to IA32_FEATURE_CONTROL MSR in nested virt

2013-07-04 Thread Gleb Natapov
On Thu, Jul 04, 2013 at 01:21:51PM +0200, Paolo Bonzini wrote: > Il 04/07/2013 13:12, Gleb Natapov ha scritto: > > > I don't like that it requires a firmware change in order to use nested > > > VMX (at least for hypervisors that read the MSR). "Worse emulation" and > > > "better emulation + new fi

Re: [PATCH] KVM : Fix read/write to IA32_FEATURE_CONTROL MSR in nested virt

2013-07-04 Thread Paolo Bonzini
Il 04/07/2013 13:12, Gleb Natapov ha scritto: > > I don't like that it requires a firmware change in order to use nested > > VMX (at least for hypervisors that read the MSR). "Worse emulation" and > > "better emulation + new firmware" are indistiguishable from the point of > > view of anyone excep

Re: [PATCH] KVM : Fix read/write to IA32_FEATURE_CONTROL MSR in nested virt

2013-07-04 Thread Gleb Natapov
On Thu, Jul 04, 2013 at 01:01:15PM +0200, Paolo Bonzini wrote: > Il 04/07/2013 09:10, Gleb Natapov ha scritto: > > On Thu, Jul 04, 2013 at 09:00:09AM +0200, Paolo Bonzini wrote: > >> Il 03/07/2013 15:41, Arthur Chunqi Li ha scritto: > >>> Fix read/write to IA32_FEATURE_CONTROL MSR in nested environ

Re: [PATCH] KVM : Fix read/write to IA32_FEATURE_CONTROL MSR in nested virt

2013-07-04 Thread Paolo Bonzini
Il 04/07/2013 09:10, Gleb Natapov ha scritto: > On Thu, Jul 04, 2013 at 09:00:09AM +0200, Paolo Bonzini wrote: >> Il 03/07/2013 15:41, Arthur Chunqi Li ha scritto: >>> Fix read/write to IA32_FEATURE_CONTROL MSR in nested environment. >>> Simply return 0x5 when read and generate #GP(0) when write. >

Re: [PATCH] KVM : Fix read/write to IA32_FEATURE_CONTROL MSR in nested virt

2013-07-04 Thread Gleb Natapov
On Thu, Jul 04, 2013 at 04:16:25PM +0800, Gmail wrote: > 在 2013-7-4,15:24,Gleb Natapov 写道: > > > On Thu, Jul 04, 2013 at 03:21:15PM +0800, Arthur Chunqi Li wrote: > >> On Thu, Jul 4, 2013 at 3:10 PM, Gleb Natapov wrote: > >>> On Thu, Jul 04, 2013 at 09:00:09AM +0200, Paolo Bonzini wrote: >

Re: [PATCH] KVM : Fix read/write to IA32_FEATURE_CONTROL MSR in nested virt

2013-07-04 Thread Gmail
在 2013-7-4,15:24,Gleb Natapov 写道: > On Thu, Jul 04, 2013 at 03:21:15PM +0800, Arthur Chunqi Li wrote: >> On Thu, Jul 4, 2013 at 3:10 PM, Gleb Natapov wrote: >>> On Thu, Jul 04, 2013 at 09:00:09AM +0200, Paolo Bonzini wrote: Il 03/07/2013 15:41, Arthur Chunqi Li ha scritto: > Fix read/wr

Re: [PATCH] KVM : Fix read/write to IA32_FEATURE_CONTROL MSR in nested virt

2013-07-04 Thread Gleb Natapov
On Thu, Jul 04, 2013 at 03:21:15PM +0800, Arthur Chunqi Li wrote: > On Thu, Jul 4, 2013 at 3:10 PM, Gleb Natapov wrote: > > On Thu, Jul 04, 2013 at 09:00:09AM +0200, Paolo Bonzini wrote: > >> Il 03/07/2013 15:41, Arthur Chunqi Li ha scritto: > >> > Fix read/write to IA32_FEATURE_CONTROL MSR in nes

Re: [PATCH] KVM : Fix read/write to IA32_FEATURE_CONTROL MSR in nested virt

2013-07-04 Thread Arthur Chunqi Li
On Thu, Jul 4, 2013 at 3:10 PM, Gleb Natapov wrote: > On Thu, Jul 04, 2013 at 09:00:09AM +0200, Paolo Bonzini wrote: >> Il 03/07/2013 15:41, Arthur Chunqi Li ha scritto: >> > Fix read/write to IA32_FEATURE_CONTROL MSR in nested environment. >> > Simply return 0x5 when read and generate #GP(0) when

Re: [PATCH] KVM : Fix read/write to IA32_FEATURE_CONTROL MSR in nested virt

2013-07-04 Thread Gleb Natapov
On Thu, Jul 04, 2013 at 09:00:09AM +0200, Paolo Bonzini wrote: > Il 03/07/2013 15:41, Arthur Chunqi Li ha scritto: > > Fix read/write to IA32_FEATURE_CONTROL MSR in nested environment. > > Simply return 0x5 when read and generate #GP(0) when write. > > Delete handling codes in vmx_set_vmx_msr() and

Re: [PATCH] KVM : Fix read/write to IA32_FEATURE_CONTROL MSR in nested virt

2013-07-04 Thread Paolo Bonzini
Il 03/07/2013 15:41, Arthur Chunqi Li ha scritto: > Fix read/write to IA32_FEATURE_CONTROL MSR in nested environment. > Simply return 0x5 when read and generate #GP(0) when write. > Delete handling codes in vmx_set_vmx_msr() and generate #GP(0) in > handle_wrmsr(). > > Signed-off-by: Arthur Chunqi

Re: IA32_FEATURE_CONTROL MSR in nested virt

2013-07-03 Thread Gleb Natapov
On Wed, Jul 03, 2013 at 10:48:33AM -0400, Bandan Das wrote: > Gleb Natapov writes: > > > On Wed, Jul 03, 2013 at 04:24:33PM +0800, Arthur Chunqi Li wrote: > >> Hi Gleb and Paolo, > >> When I write test cases for nested virt and found that reading/writing > >> IA32_FEATURE_CONTROL will be simply

Re: IA32_FEATURE_CONTROL MSR in nested virt

2013-07-03 Thread Bandan Das
Gleb Natapov writes: > On Wed, Jul 03, 2013 at 04:24:33PM +0800, Arthur Chunqi Li wrote: >> Hi Gleb and Paolo, >> When I write test cases for nested virt and found that reading/writing >> IA32_FEATURE_CONTROL will be simply ignored or return 0 (in >> arch/x86/kvm/vmx.c) in VM. Checking this MSR

[PATCH] KVM : Fix read/write to IA32_FEATURE_CONTROL MSR in nested virt

2013-07-03 Thread Arthur Chunqi Li
Fix read/write to IA32_FEATURE_CONTROL MSR in nested environment. Simply return 0x5 when read and generate #GP(0) when write. Delete handling codes in vmx_set_vmx_msr() and generate #GP(0) in handle_wrmsr(). Signed-off-by: Arthur Chunqi Li --- arch/x86/kvm/vmx.c |5 + 1 file changed, 1 i

Re: IA32_FEATURE_CONTROL MSR in nested virt

2013-07-03 Thread Gmail
OK, I will write a patch as what Paolo says. Anything else need to be taken into consideration, Paolo? Arthur Chunqi Li Department of Computer Science School of EECS Peking University Beijing, China >From my iPhone 在 2013-7-3,17:14,Gleb Natapov 写道: > On Wed, Jul 03, 2013 at 04:24:33PM +0800,

Re: IA32_FEATURE_CONTROL MSR in nested virt

2013-07-03 Thread Gleb Natapov
On Wed, Jul 03, 2013 at 04:24:33PM +0800, Arthur Chunqi Li wrote: > Hi Gleb and Paolo, > When I write test cases for nested virt and found that reading/writing > IA32_FEATURE_CONTROL will be simply ignored or return 0 (in > arch/x86/kvm/vmx.c) in VM. Checking this MSR will be done by some > hyperv

Re: IA32_FEATURE_CONTROL MSR in nested virt

2013-07-03 Thread Paolo Bonzini
Il 03/07/2013 10:46, Zhang, Yang Z ha scritto: > >> Il 03/07/2013 10:24, Arthur Chunqi Li ha scritto: >>> Hi Gleb and Paolo, >>> When I write test cases for nested virt and found that reading/writing >>> IA32_FEATURE_CONTROL will be simply ignored or return 0 (in >>> arch/x86/kvm/vmx.c) in VM. C

RE: IA32_FEATURE_CONTROL MSR in nested virt

2013-07-03 Thread Zhang, Yang Z
>Il 03/07/2013 10:24, Arthur Chunqi Li ha scritto: >> Hi Gleb and Paolo, >> When I write test cases for nested virt and found that reading/writing >> IA32_FEATURE_CONTROL will be simply ignored or return 0 (in >> arch/x86/kvm/vmx.c) in VM. Checking this MSR will be done by some >> hypervisors (

Re: IA32_FEATURE_CONTROL MSR in nested virt

2013-07-03 Thread Paolo Bonzini
Il 03/07/2013 10:24, Arthur Chunqi Li ha scritto: > Hi Gleb and Paolo, > When I write test cases for nested virt and found that reading/writing > IA32_FEATURE_CONTROL will be simply ignored or return 0 (in > arch/x86/kvm/vmx.c) in VM. Checking this MSR will be done by some > hypervisors (e.g. NOVA

IA32_FEATURE_CONTROL MSR in nested virt

2013-07-03 Thread Arthur Chunqi Li
Hi Gleb and Paolo, When I write test cases for nested virt and found that reading/writing IA32_FEATURE_CONTROL will be simply ignored or return 0 (in arch/x86/kvm/vmx.c) in VM. Checking this MSR will be done by some hypervisors (e.g. NOVA) and may cause error then, so it is necessary to behave rig