[libvirt] [RFC PATCH 5/6] conf: Parse and format HPT maxpagesize

Peter Krempa pkrempa at redhat.com
Thu May 24 05:29:16 UTC 2018


On Wed, May 23, 2018 at 18:52:57 +0200, Andrea Bolognani wrote:
> On Wed, 2018-05-23 at 18:36 +0200, Peter Krempa wrote:
> > On Wed, May 23, 2018 at 18:18:01 +0200, Andrea Bolognani wrote:
> > > +            def->hpt_maxpagesize = VIR_ROUND_UP(def->hpt_maxpagesize, 1024);
> > 
> > The code in the patch using it with qemu actually expects so this is a
> > power of 2, so you'll need a different rounding function. 
> 
> Good point!
> 
> Looks like VIR_ROUND_UP_POWER_OF_TWO() will do the trick.

Yes. We usually do the rounding in the code which prepares the
definition for the startup of the VM though, so that other hypervisor
drivers don't need to share the limits of qemu.

Given that this is a ppc64 specific option it probably does not matter
much.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180524/b5aa06eb/attachment-0001.sig>


More information about the libvir-list mailing list