Re: [PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-20 Thread Marcelo Tosatti
On Mon, Mar 18, 2013 at 08:42:09PM +0800, Xiao Guangrong wrote: > On 03/18/2013 07:19 PM, Paolo Bonzini wrote: > > Il 15/03/2013 16:29, Xiao Guangrong ha scritto: > >> +/* > >> + * spte bits of bit 3 ~ bit 11 are used as low 9 bits of > >> + * generation, the bits of bits 52 ~ bit 61 are used as >

Re: [PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-20 Thread Marcelo Tosatti
On Mon, Mar 18, 2013 at 08:42:09PM +0800, Xiao Guangrong wrote: On 03/18/2013 07:19 PM, Paolo Bonzini wrote: Il 15/03/2013 16:29, Xiao Guangrong ha scritto: +/* + * spte bits of bit 3 ~ bit 11 are used as low 9 bits of + * generation, the bits of bits 52 ~ bit 61 are used as + * high 12

Re: [PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 08:42:09PM +0800, Xiao Guangrong wrote: > On 03/18/2013 07:19 PM, Paolo Bonzini wrote: > > Il 15/03/2013 16:29, Xiao Guangrong ha scritto: > >> +/* > >> + * spte bits of bit 3 ~ bit 11 are used as low 9 bits of > >> + * generation, the bits of bits 52 ~ bit 61 are used as >

Re: [PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-18 Thread Xiao Guangrong
On 03/18/2013 07:19 PM, Paolo Bonzini wrote: > Il 15/03/2013 16:29, Xiao Guangrong ha scritto: >> +/* >> + * spte bits of bit 3 ~ bit 11 are used as low 9 bits of >> + * generation, the bits of bits 52 ~ bit 61 are used as >> + * high 12 bits of generation. >> + */ > > High 10 bits. Yes, i

Re: [PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-18 Thread Paolo Bonzini
Il 15/03/2013 16:29, Xiao Guangrong ha scritto: > +/* > + * spte bits of bit 3 ~ bit 11 are used as low 9 bits of > + * generation, the bits of bits 52 ~ bit 61 are used as > + * high 12 bits of generation. > + */ High 10 bits. How often does the generation number change? Especially with

Re: [PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-18 Thread Paolo Bonzini
Il 15/03/2013 16:29, Xiao Guangrong ha scritto: +/* + * spte bits of bit 3 ~ bit 11 are used as low 9 bits of + * generation, the bits of bits 52 ~ bit 61 are used as + * high 12 bits of generation. + */ High 10 bits. How often does the generation number change? Especially with Takuya's

Re: [PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-18 Thread Xiao Guangrong
On 03/18/2013 07:19 PM, Paolo Bonzini wrote: Il 15/03/2013 16:29, Xiao Guangrong ha scritto: +/* + * spte bits of bit 3 ~ bit 11 are used as low 9 bits of + * generation, the bits of bits 52 ~ bit 61 are used as + * high 12 bits of generation. + */ High 10 bits. Yes, i forgot to update

Re: [PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 08:42:09PM +0800, Xiao Guangrong wrote: On 03/18/2013 07:19 PM, Paolo Bonzini wrote: Il 15/03/2013 16:29, Xiao Guangrong ha scritto: +/* + * spte bits of bit 3 ~ bit 11 are used as low 9 bits of + * generation, the bits of bits 52 ~ bit 61 are used as + * high 12

[PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-15 Thread Xiao Guangrong
Store the generation-number into bit3 ~ bit11 and bit52 ~ bit61, totally 19 bits can be used, it should be enough for nearly all most common cases In this patch, the generation-number is always 0, it will be changed in the later patch Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c

[PATCH 4/5] KVM: MMU: store generation-number into mmio spte

2013-03-15 Thread Xiao Guangrong
Store the generation-number into bit3 ~ bit11 and bit52 ~ bit61, totally 19 bits can be used, it should be enough for nearly all most common cases In this patch, the generation-number is always 0, it will be changed in the later patch Signed-off-by: Xiao Guangrong