Re: [PATCH RFC 2/5] KVM: use a rapper function to calculate the sizes of dirty bitmaps

2010-04-11 Thread Avi Kivity
On 04/09/2010 12:32 PM, Takuya Yoshikawa wrote: We will use this later in other parts. s/rapper/wrapper/... +static inline int kvm_dirty_bitmap_bytes(struct kvm_memory_slot *memslot) +{ + return ALIGN(memslot-npages, BITS_PER_LONG) / 8; +} + 'int' may overflow. struct

Re: [PATCH RFC 2/5] KVM: use a rapper function to calculate the sizes of dirty bitmaps

2010-04-11 Thread Takuya Yoshikawa
(2010/04/12 2:12), Avi Kivity wrote: On 04/09/2010 12:32 PM, Takuya Yoshikawa wrote: We will use this later in other parts. s/rapper/wrapper/... Oh, my poor English, sorry. +static inline int kvm_dirty_bitmap_bytes(struct kvm_memory_slot *memslot) +{ + return ALIGN(memslot-npages,

[PATCH RFC 2/5] KVM: use a rapper function to calculate the sizes of dirty bitmaps

2010-04-09 Thread Takuya Yoshikawa
We will use this later in other parts. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp Signed-off-by: Fernando Luis Vazquez Cao ferna...@oss.ntt.co.jp --- arch/powerpc/kvm/book3s.c |2 +- arch/x86/kvm/x86.c|2 +- include/linux/kvm_host.h |5 +