On 09/04/19 16:20, Sean Christopherson wrote: > It probably makes sense to change 'indirect_shadow_pages' as well. I > haven't done the math to know whether or not it can actually overflow, > but 4 bytes per VM seems cheap compared to a bug that causes KVM to think > it doesn't have any shadow pages. Note, there's also a local variable > in reexecute_instruction() that snapshots 'indirect_shadow_pages'. > > Another case that should be changed to an unsigned long is 'lpages' in > kvm_arch_create_memslot(). Overflow there seems inevitable, and it's a > local so there's no memory overhead. For both of these, one of them addresses 2^21 bytes. So overflow can only occur with over 8 PiB of guest memory. Worth fixing, but it can be done separately. Paolo