Re: [PATCH v2 6/6] KVM: introduce a table to map slot id to index in memslots arry

2011-11-18 Thread Xiao Guangrong
On 11/18/2011 05:45 PM, Sasha Levin wrote: >> struct kvm { >> @@ -340,14 +342,13 @@ static inline struct kvm_memslots *kvm_memslots(struct >> kvm *kvm) >> static inline struct kvm_memory_slot * >> id_to_memslot(struct kvm_memslots *slots, int id) >> { >> -int i; >> +int index = slots

Re: [PATCH v2 6/6] KVM: introduce a table to map slot id to index in memslots arry

2011-11-18 Thread Sasha Levin
On Fri, 2011-11-18 at 17:20 +0800, Xiao Guangrong wrote: > The operation of getting dirty log is frequency When framebuffer-based > displays are used(for example, Xwindow), so, we introduce a mapping table > to speed up id_to_memslot() > > Signed-off-by: Xiao Guangrong > --- > include/linux/kvm_

[PATCH v2 6/6] KVM: introduce a table to map slot id to index in memslots arry

2011-11-18 Thread Xiao Guangrong
The operation of getting dirty log is frequency When framebuffer-based displays are used(for example, Xwindow), so, we introduce a mapping table to speed up id_to_memslot() Signed-off-by: Xiao Guangrong --- include/linux/kvm_host.h | 13 +++-- virt/kvm/kvm_main.c |7 ++- 2