[libvirt] [PATCH 5/6] qemu: Format nested-hv feature on the command line

Andrea Bolognani abologna at redhat.com
Tue Nov 27 14:17:11 UTC 2018


On Mon, 2018-11-26 at 16:21 +0100, Michal Privoznik wrote:
> On 11/20/18 6:08 PM, Andrea Bolognani wrote:
[...]
> > +        str = virTristateSwitchTypeToString(def->features[VIR_DOMAIN_FEATURE_NESTED_HV]);
> > +        if (!str) {
> > +            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> > +                           _("Invalid setting for nested HV state"));
> > +            goto cleanup;
> > +        }
> 
> How can this be? The only possibility I see if
> def->features[VIR_DOMAIN_FEATURE_NESTED_HV] wasn't 1 or 2. But then we
> are in much bigger trouble anyway. I suggest removing it. We don't check
> for the retval anywhere else.

We check it at least for FEATURE_HTM and FEATURE_HPT; then again,
it was me who introduced those features, so... O:-)

I've left it as-is for the time being, but I can post a patch that
gets rid of all such checks in one fell swoop if you'd like.

And thanks for the review!

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list