[PATCH 1/1] Optional free-page-reporting can be enabled/disabled for memballon device of model 'virtio'.

Pavel Hrdina phrdina at redhat.com
Mon Oct 5 09:13:35 UTC 2020


On Mon, Oct 05, 2020 at 10:06:20AM +0200, Peter Krempa wrote:
> On Fri, Oct 02, 2020 at 11:59:43 -0400, Nico Pache wrote:

[...]

> > diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
> > index a212605579..cfeb1e67c4 100644
> > --- a/src/qemu/qemu_validate.c
> > +++ b/src/qemu/qemu_validate.c
> > @@ -3926,6 +3926,13 @@ qemuValidateDomainDeviceDefMemballoon(const virDomainMemballoonDef *memballoon,
> >          return -1;
> >      }
> >  
> > +    if (memballoon->free_page_reporting != VIR_TRISTATE_SWITCH_ABSENT &&
> > +         !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_BALLOON_FREE_PAGE_REPORTING)) {
> > +         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> > +                        _("free-page-reporting is not supported by this QEMU binary"));
> > +         return -1;
> > +     }
> 
> Is it worth forbidding disabling the feature if it isn't supported?

I would say that explicit usage of a feature that is not available in
QEMU should result in error.

Pavel
-------------- 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/20201005/e9cd9c8d/attachment-0001.sig>


More information about the libvir-list mailing list