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

2017-10-10 Thread David Gibson
On Tue, Oct 10, 2017 at 05:21:53PM +0200, Laurent Vivier wrote: > On 10/10/2017 16:44, Greg Kurz wrote: > > On Wed, 11 Oct 2017 00:21:59 +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

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

2017-10-10 Thread Laurent Vivier
On 10/10/2017 16:44, Greg Kurz wrote: > On Wed, 11 Oct 2017 00:21:59 +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

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

2017-10-10 Thread Greg Kurz
On Wed, 11 Oct 2017 00:21:59 +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.

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

2017-10-10 Thread Laurent Vivier
On 10/10/2017 15:21, 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

[Qemu-devel] [PATCH] 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