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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux