[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH] spapr: Correct RAM size calculation for HPT resiz
Re: [Qemu-ppc] [PATCH] spapr: Correct RAM size calculation for HPT resizing
Wed, 11 Oct 2017 10:20:36 +1100
On Tue, Oct 10, 2017 at 05:10:27PM +0200, Andrea Bolognani wrote:
> On Wed, 2017-10-11 at 00:21 +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.
> > However, the current calculation is not correct: it only adds up the size
> > of plugged memory, ignoring the base memory size. This patch corrects it.
> > While we're there, use get_plugged_memory_size() instead of directly
> > calling pc_existing_dimms_capacity(). The only difference is that it
> > will abort on failure, which is right: a failure here indicates something
> > wrong within qemu.
> Does this change invalidate in any way the calculation performed
> by libvirt to figure out the memory locking limit for guests?
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
Description: PGP signature