Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-19 Thread Xiao Guangrong
On 03/19/2013 03:36 PM, Gleb Natapov wrote: > On Tue, Mar 19, 2013 at 11:15:36AM +0800, Xiao Guangrong wrote: >> On 03/19/2013 06:16 AM, Eric Northup wrote: >>> On Fri, Mar 15, 2013 at 8:29 AM, Xiao Guangrong >>> wrote: This patch tries to introduce a very simple and scale way to invalid all

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-19 Thread Gleb Natapov
On Tue, Mar 19, 2013 at 11:15:36AM +0800, Xiao Guangrong wrote: > On 03/19/2013 06:16 AM, Eric Northup wrote: > > On Fri, Mar 15, 2013 at 8:29 AM, Xiao Guangrong > > wrote: > >> This patch tries to introduce a very simple and scale way to invalid all > >> mmio sptes - it need not walk any shadow p

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Xiao Guangrong
On 03/19/2013 06:16 AM, Eric Northup wrote: > On Fri, Mar 15, 2013 at 8:29 AM, Xiao Guangrong > wrote: >> This patch tries to introduce a very simple and scale way to invalid all >> mmio sptes - it need not walk any shadow pages and hold mmu-lock >> >> KVM maintains a global mmio invalid generatio

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Eric Northup
On Fri, Mar 15, 2013 at 8:29 AM, Xiao Guangrong wrote: > This patch tries to introduce a very simple and scale way to invalid all > mmio sptes - it need not walk any shadow pages and hold mmu-lock > > KVM maintains a global mmio invalid generation-number which is stored in > kvm->arch.mmio_invalid

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Xiao Guangrong
On 03/18/2013 09:27 PM, Gleb Natapov wrote: > On Mon, Mar 18, 2013 at 09:25:10PM +0800, Xiao Guangrong wrote: >> On 03/18/2013 09:19 PM, Gleb Natapov wrote: >>> On Mon, Mar 18, 2013 at 09:09:43PM +0800, Xiao Guangrong wrote: On 03/18/2013 08:46 PM, Gleb Natapov wrote: > On Mon, Mar 18, 201

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 09:25:10PM +0800, Xiao Guangrong wrote: > On 03/18/2013 09:19 PM, Gleb Natapov wrote: > > On Mon, Mar 18, 2013 at 09:09:43PM +0800, Xiao Guangrong wrote: > >> On 03/18/2013 08:46 PM, Gleb Natapov wrote: > >>> On Mon, Mar 18, 2013 at 08:29:29PM +0800, Xiao Guangrong wrote: >

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Xiao Guangrong
On 03/18/2013 09:19 PM, Gleb Natapov wrote: > On Mon, Mar 18, 2013 at 09:09:43PM +0800, Xiao Guangrong wrote: >> On 03/18/2013 08:46 PM, Gleb Natapov wrote: >>> On Mon, Mar 18, 2013 at 08:29:29PM +0800, Xiao Guangrong wrote: On 03/18/2013 05:13 PM, Gleb Natapov wrote: > On Mon, Mar 18, 201

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 09:09:43PM +0800, Xiao Guangrong wrote: > On 03/18/2013 08:46 PM, Gleb Natapov wrote: > > On Mon, Mar 18, 2013 at 08:29:29PM +0800, Xiao Guangrong wrote: > >> On 03/18/2013 05:13 PM, Gleb Natapov wrote: > >>> On Mon, Mar 18, 2013 at 04:08:50PM +0800, Xiao Guangrong wrote: >

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Xiao Guangrong
On 03/18/2013 08:46 PM, Gleb Natapov wrote: > On Mon, Mar 18, 2013 at 08:29:29PM +0800, Xiao Guangrong wrote: >> On 03/18/2013 05:13 PM, Gleb Natapov wrote: >>> On Mon, Mar 18, 2013 at 04:08:50PM +0800, Xiao Guangrong wrote: On 03/17/2013 11:02 PM, Gleb Natapov wrote: > On Fri, Mar 15, 201

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 08:29:29PM +0800, Xiao Guangrong wrote: > On 03/18/2013 05:13 PM, Gleb Natapov wrote: > > On Mon, Mar 18, 2013 at 04:08:50PM +0800, Xiao Guangrong wrote: > >> On 03/17/2013 11:02 PM, Gleb Natapov wrote: > >>> On Fri, Mar 15, 2013 at 11:29:53PM +0800, Xiao Guangrong wrote: >

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Xiao Guangrong
On 03/18/2013 05:13 PM, Gleb Natapov wrote: > On Mon, Mar 18, 2013 at 04:08:50PM +0800, Xiao Guangrong wrote: >> On 03/17/2013 11:02 PM, Gleb Natapov wrote: >>> On Fri, Mar 15, 2013 at 11:29:53PM +0800, Xiao Guangrong wrote: This patch tries to introduce a very simple and scale way to invalid

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Gleb Natapov
On Mon, Mar 18, 2013 at 04:08:50PM +0800, Xiao Guangrong wrote: > On 03/17/2013 11:02 PM, Gleb Natapov wrote: > > On Fri, Mar 15, 2013 at 11:29:53PM +0800, Xiao Guangrong wrote: > >> This patch tries to introduce a very simple and scale way to invalid all > >> mmio sptes - it need not walk any shad

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Xiao Guangrong
On 03/17/2013 11:02 PM, Gleb Natapov wrote: > On Fri, Mar 15, 2013 at 11:29:53PM +0800, Xiao Guangrong wrote: >> This patch tries to introduce a very simple and scale way to invalid all >> mmio sptes - it need not walk any shadow pages and hold mmu-lock >> >> KVM maintains a global mmio invalid gen

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-18 Thread Xiao Guangrong
On 03/16/2013 10:13 AM, Takuya Yoshikawa wrote: > On Fri, 15 Mar 2013 23:29:53 +0800 > Xiao Guangrong wrote: > >> +/* >> + * The caller should protect concurrent access on >> + * kvm->arch.mmio_invalid_gen. Currently, it is used by >> + * kvm_arch_commit_memory_region and protected by kvm->slots_

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-17 Thread Gleb Natapov
On Fri, Mar 15, 2013 at 11:29:53PM +0800, Xiao Guangrong wrote: > This patch tries to introduce a very simple and scale way to invalid all > mmio sptes - it need not walk any shadow pages and hold mmu-lock > > KVM maintains a global mmio invalid generation-number which is stored in > kvm->arch.mmi

Re: [PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-15 Thread Takuya Yoshikawa
On Fri, 15 Mar 2013 23:29:53 +0800 Xiao Guangrong wrote: > +/* > + * The caller should protect concurrent access on > + * kvm->arch.mmio_invalid_gen. Currently, it is used by > + * kvm_arch_commit_memory_region and protected by kvm->slots_lock. > + */ > +void kvm_mmu_invalid_mmio_spte(struct kvm

[PATCH 5/5] KVM: MMU: fast invalid all mmio sptes

2013-03-15 Thread Xiao Guangrong
This patch tries to introduce a very simple and scale way to invalid all mmio sptes - it need not walk any shadow pages and hold mmu-lock KVM maintains a global mmio invalid generation-number which is stored in kvm->arch.mmio_invalid_gen and every mmio spte stores the current global generation-num