Re: [Qemu-devel] [PATCHv2] spapr: Correct RAM size calculation for HPT resizing

2017-10-11 Thread Laurent Vivier
On 11/10/2017 02:06, David Gibson wrote: > In order to prevent the guest from forcing the allocation of large amounts > of qemu memory (or host kernel memory, in the case of KVM HV), we limit > the size of Hashed Page Table (HPT) it is allowed to allocated, based on > its RAM size. > > However, th

Re: [Qemu-devel] [PATCHv2] spapr: Correct RAM size calculation for HPT resizing

2017-10-10 Thread Greg Kurz
On Wed, 11 Oct 2017 11:06:49 +1100 David Gibson wrote: > In order to prevent the guest from forcing the allocation of large amounts > of qemu memory (or host kernel memory, in the case of KVM HV), we limit > the size of Hashed Page Table (HPT) it is allowed to allocated, based on > its RAM size.

[Qemu-devel] [PATCHv2] spapr: Correct RAM size calculation for HPT resizing

2017-10-10 Thread David Gibson
In order to prevent the guest from forcing the allocation of large amounts of qemu memory (or host kernel memory, in the case of KVM HV), we limit the size of Hashed Page Table (HPT) it is allowed to allocated, based on its RAM size. However, the current calculation is not correct: it only adds up