Re: [PATCH RFC] KVM: x86: nested: support for MSR loading/storing

2014-12-08 Thread Eugene Korenevsky
> Thus it would be good to > have kvm-unit-tests for all what is checked here. I'll try to implement unit tests a bit later. The fixed patch based on comments and critics from this thread is following. > Indeed. Better have function than accepts the field index and that has > some translation tab

Re: [PATCH RFC] KVM: x86: nested: support for MSR loading/storing

2014-12-07 Thread Jan Kiszka
On 2014-12-08 04:49, Wincy Van wrote: +static bool vmx_msr_switch_area_verify(u32 count, u64 addr, int maxphyaddr) +{ +if (count == 0) +return true; +if ((addr & 0xf) != 0) >> >> Bits 11:0 have to be zero, in fact (page alignment required). > > >

Re: [PATCH RFC] KVM: x86: nested: support for MSR loading/storing

2014-12-07 Thread Wincy Van
Sorry, please ignore the previous mail, It was rejected due to HTML format. 2014-12-07 18:21 GMT+08:00 Jan Kiszka : > > On 2014-12-07 10:46, Bandan Das wrote: > > [Ccing a few others who might be interested] > > > > Hi Eugene, > > > > Did you look at the other patch that was posted for this functi

Re: [PATCH RFC] KVM: x86: nested: support for MSR loading/storing

2014-12-07 Thread Jan Kiszka
On 2014-12-07 10:46, Bandan Das wrote: > [Ccing a few others who might be interested] > > Hi Eugene, > > Did you look at the other patch that was posted for this functionality > by Wincy Van ? > > https://lkml.org/lkml/2014/11/21/749 It's good to see more momentum here, but, yes, we should defi

Re: [PATCH RFC] KVM: x86: nested: support for MSR loading/storing

2014-12-07 Thread Bandan Das
[Ccing a few others who might be interested] Hi Eugene, Did you look at the other patch that was posted for this functionality by Wincy Van ? https://lkml.org/lkml/2014/11/21/749 Eugene Korenevsky writes: > BitVisor hypervisor fails to start a nested guest due to lack of MSR > load/store supp

[PATCH RFC] KVM: x86: nested: support for MSR loading/storing

2014-12-05 Thread Eugene Korenevsky
BitVisor hypervisor fails to start a nested guest due to lack of MSR load/store support in KVM. This patch fixes this problem according to Intel SDM. Signed-off-by: Eugene Korenevsky --- arch/x86/include/asm/vmx.h| 6 ++ arch/x86/include/uapi/asm/msr-index.h | 3 + arch/x86/inc