On a Tuesday in 2023, Andrea Bolognani wrote:
Introduce a small kludge in the parser to avoid unnecessarily blocking incoming migration from a range of recent libvirt releases. https://bugzilla.redhat.com/show_bug.cgi?id=2184966 Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> --- src/conf/domain_conf.c | 39 ++++++++++++++++++- ...are-manual-efi-features.x86_64-latest.args | 35 +++++++++++++++++ tests/qemuxml2argvtest.c | 6 ++- ...ware-manual-efi-features.x86_64-latest.xml | 36 +++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 5 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 tests/qemuxml2argvdata/firmware-manual-efi-features.x86_64-latest.args create mode 100644 tests/qemuxml2xmloutdata/firmware-manual-efi-features.x86_64-latest.xml diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 70e4d52ee6..bc20acf103 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -17210,11 +17210,13 @@ virDomainDefParseBootKernelOptions(virDomainDef *def, static int virDomainDefParseBootFirmwareOptions(virDomainDef *def, - xmlXPathContextPtr ctxt) + xmlXPathContextPtr ctxt, + unsigned int flags) { g_autofree char *firmware = virXPathString("string(./os/@firmware)", ctxt); g_autofree xmlNodePtr *nodes = NULL; g_autofree int *features = NULL; + bool abiUpdate = !!(flags & VIR_DOMAIN_DEF_PARSE_ABI_UPDATE);
The flag is documented as: /* allow updates in post parse callback that would break ABI otherwise */ VIR_DOMAIN_DEF_PARSE_ABI_UPDATE = 1 << 7, and I also think that this is something that better belongs in post-parse. Jano
int fw = 0; int n = 0; size_t i;
Attachment:
signature.asc
Description: PGP signature