]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Move CPU validation out of PostParse
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 1 Aug 2022 14:56:25 +0000 (16:56 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 3 Aug 2022 13:44:42 +0000 (15:44 +0200)
commit49065e6a934bee0fe4c669384ca4e285bd98ff16
tree6d1bb7ad0382189299a5f94fbf2cb6d95ae0bb00
parent469f2ab31c28e04a3a1d06c2f9545307f1dd1a9c
qemu: Move CPU validation out of PostParse

The qemuDomainDefCPUPostParse() does a bit more than filling in
missing info. It also validates CPU cache configuration. Move
that code into qemuValidateDomainDefCpu() where the code fits
better.

And since I need to fix indentation of existing code in
qemuValidateDomainDefCpu(), I'm taking this opportunity and move
error messages onto single line. Interestingly, this uncovers a
bug we have in sc_prohibit_diagnostic_without_format syntax-check
rule, because previously a virReportError() with a message
spawned over three lines was not caught but not it is. But
trying to understand that regex is a job for another time.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/qemu/qemu_domain.c
src/qemu/qemu_validate.c