[libvirt PATCH 2/2] conf: Fix migration in some firmware autoselection scenarios
Ján Tomko
jtomko at redhat.com
Wed Apr 12 10:55:51 UTC 2023
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 at redhat.com>
>---
> 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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20230412/6bd6e7dc/attachment.sig>
More information about the libvir-list
mailing list