Re: [PATCH v2] kvm: mmu: don't do memslot overflow check

2015-04-15 Thread Paolo Bonzini
On 15/04/2015 04:24, Wanpeng Li wrote: > As Andres pointed out: > > | I don't understand the value of this check here. Are we looking for a > | broken memslot? Shouldn't this be a BUG_ON? Is this the place to care > | about these things? npages is capped to KVM_MEM_MAX_NR_PAGES, i.e. > | 2^31. A

[PATCH v2] kvm: mmu: don't do memslot overflow check

2015-04-14 Thread Wanpeng Li
As Andres pointed out: | I don't understand the value of this check here. Are we looking for a | broken memslot? Shouldn't this be a BUG_ON? Is this the place to care | about these things? npages is capped to KVM_MEM_MAX_NR_PAGES, i.e. | 2^31. A 64 bit overflow would be caused by a gigantic gfn_st