]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Xen: Improve parsing of PCI addresses in config converter
authorJim Fehlig <jfehlig@suse.com>
Mon, 10 Aug 2020 22:58:59 +0000 (16:58 -0600)
committerJim Fehlig <jfehlig@suse.com>
Fri, 21 Aug 2020 14:08:28 +0000 (08:08 -0600)
commitd4eecbf662dea6289602f7c802cc7be8c39c3940
treec2a1df378b3285dc99f8dc8165ecc4789f4decf6
parent3a6836fc6d5a5733e9ec84bc12ebe4406495fc7b
Xen: Improve parsing of PCI addresses in config converter

There was a report on libvirt-users [1] about the domxml to/from
native converter in the Xen driver not handling PCI addresses
without a domain specification. This patch improves parsing of PCI
addresses in the converter and allows PCI addresses with only
bb:ss.f. xl.cfg(5) also allows either the dddd:bb:ss.f or bb:ss.f
format. A test has been added to check the conversion from xl.cfg
to domXML.

[1] https://www.redhat.com/archives/libvirt-users/2020-August/msg00040.html

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/libxl/xen_common.c
tests/xmconfigdata/test-pci-dev-syntax.cfg [new file with mode: 0644]
tests/xmconfigdata/test-pci-dev-syntax.xml [new file with mode: 0644]
tests/xmconfigtest.c