[PATCH 0/5] Deduplicate some of validation code
Cole Robinson
crobinso at redhat.com
Tue Nov 17 17:54:29 UTC 2020
On 11/17/20 6:28 AM, Michal Privoznik wrote:
> These stemmed from Cole's comment on my patches:
>
> https://www.redhat.com/archives/libvir-list/2020-November/msg00888.html
>
> The approach might not be that obvious at first because domCaps do
> qemuCaps to device model translation and during validation we want
> the exact opposite - we have parsed device model and want to check
> whether qemuCaps has corresponding capability.
>
> But what we can do, is let domCaps code fill a bitmap of supported
> device models and then check if the bit that corresponds to parsed
> device model is set.
>
> In this series I'm fixing RNG and video models, which were checked
> this way until very recently (until I touched the code). And also
> I'm introducing graphics check (which is new) because that one
> looked the most sane from virQEMUCapsFillDomainCaps(). The rest
> there not that much.
>
> Michal Prívozník (5):
> domain_capabilities: Introduce VIR_DOMAIN_CAPS_ENUM_IS_SET
> qemu_validate: Deduplicate code for video model check
> qemu_validate: Deduplicate code for RNG model check
> domcaps: Report egl-headless graphics type
> qemu_validate: Deduplicate code for graphics type check
Reviewed-by: Cole Robinson <crobinso at redhat.com>
Thanks for taking care of this
- Cole
More information about the libvir-list
mailing list