Re: [PATCH 1/5] virpci: Switch to an implementation using libpciaccess

2025-04-02 Thread Alexander Shursha
lmost ready > to get it. If you don't redo virpci, then the bhyve part won't even work. If you divide the series into two parts, you first need to take virpci, and then bhyve. -- Alexander Shursha

[PATCH 3/5] bhyve: Advertise hostdev support.

2025-03-11 Thread Alexander Shursha
bhyve itself had this feature long ago, but enabling it was blocked by Linux-specific code in virpci Signed-off-by: Alexander Shursha --- src/bhyve/bhyve_capabilities.c | 2 +- tests/domaincapsdata/bhyve_basic.x86_64.xml | 3 ++- tests/domaincapsdata/bhyve_fbuf.x86_64.xml | 3

[PATCH 4/5] bhyve: Support passing the 'passthru' command line option

2025-03-11 Thread Alexander Shursha
It is used to pass a PCI device from the host to a bhyve guest Signed-off-by: Alexander Shursha --- src/bhyve/bhyve_command.c | 24 .../bhyvexml2argv-passthru.args | 9 ++ .../bhyvexml2argv-passthru.ldargs | 4

[PATCH 2/5] node_device: Enable previously disabled code paths for FreeBSD

2025-03-10 Thread Alexander Shursha
The code was under #ifdef __linux__ because of sysfs usage. It is now using libpciaccess, which makes it available for, at least, FreeBSD. Signed-off-by: Alexander Shursha --- src/conf/node_device_conf.c | 2 +- src/node_device/node_device_driver.c | 2 +- src/node_device

[PATCH 5/5] bhyve: Tie the 'passthru' option to the 'hostdev' XML config

2025-03-10 Thread Alexander Shursha
Signed-off-by: Alexander Shursha --- src/bhyve/bhyve_parse_command.c | 60 +++ .../bhyveargv2xml-passthru.args | 7 +++ .../bhyveargv2xml-passthru.xml| 22 +++ tests/bhyveargv2xmltest.c | 1 + 4 files changed

[PATCH 1/5] virpci: Switch to an implementation using libpciaccess

2025-03-10 Thread Alexander Shursha
libvirt. Signed-off-by: Alexander Shursha --- meson.build| 11 +- meson_options.txt | 4 +- src/meson.build| 1 + src/util/virpci.c | 465 +++-- tests/virpcimock.c | 22 ++- 5 files changed, 139 insertions(+), 364 deletions(-) diff

Re: [PATCH 1/4] virpci: changed the work with PCI via libpciaccess

2025-03-06 Thread Alexander Shursha
lanation and reasoning would be very > beneficial. libpciaccess is already used in libvirt https://gitlab.com/libvirt/libvirt/-/blob/master/src/node_device/node_device_udev.c?ref_type=heads#L2194 -- Alexander Shursha

Re: [PATCH 3/4] bhyve: add command line argument "passthru"

2025-02-13 Thread Alexander Shursha
nsupported hostdev")); >> +return -1; >> + } > > We should probably be diagnosing this in bhyveDomainDeviceDefValidate > so it gets reported to the user much earlier. Done. -- Alexander Shursha

Re: [PATCH 4/4] bhyve: parse passthru argument from XML-config

2025-02-13 Thread Alexander Shursha
ly free data > when it goes out of scope, not when the pointer is > overwritten directly. Done >> +virReportError(VIR_ERR_OPERATION_FAILED, _("Failed to parse PCI >> address %1$s"), addr); >> +goto error; >> +} > > Add {} on the outer if too for clarity. Done. -- Alexander Shursha

Re: [PATCH 1/4] virpci: changed the work with PCI via libpciaccess

2025-02-13 Thread Alexander Shursha
While it is nice that they're sponsoring you to work on this, > IMHO, we don't need to be advertizing commercial relationships > in the commit log. > > It suffices to put such a note in the cover letter when sending a > patch series. -- Alexander Shursha

[PATCH 3/4] bhyve: add command line argument "passthru"

2025-02-13 Thread Alexander Shursha
Signed-off-by: Alexander Shursha --- src/bhyve/bhyve_command.c | 24 .../bhyvexml2argv-passthru.args | 9 ++ .../bhyvexml2argv-passthru.ldargs | 4 +++ .../bhyvexml2argv-passthru.xml| 28

[PATCH 4/4] bhyve: parse "passthru" commandline argument

2025-02-13 Thread Alexander Shursha
Signed-off-by: Alexander Shursha --- src/bhyve/bhyve_parse_command.c | 60 +++ .../bhyveargv2xml-passthru.args | 7 +++ .../bhyveargv2xml-passthru.xml| 22 +++ tests/bhyveargv2xmltest.c | 1 + 4 files changed

[PATCH 1/4] virpci: changed the work with PCI via libpciaccess

2025-02-13 Thread Alexander Shursha
sysfs is used to get a list of PCI devices. It doesn't work under FreeBSD. The libpciaccess library provides cross-platform functions for accessing the PCI bus. Signed-off-by: Alexander Shursha --- src/meson.build | 1 + src/util/virpci.c

[PATCH 2/4] bhyve: list pci devices on host

2025-02-13 Thread Alexander Shursha
Signed-off-by: Alexander Shursha --- src/bhyve/bhyve_capabilities.c | 2 +- src/conf/node_device_conf.c | 2 +- src/node_device/node_device_driver.c| 2 +- src/node_device/node_device_udev.c | 2 ++ src/util/virmdev.c | 2

Re: [PATCH 1/4] virpci: changed the work with PCI via libpciaccess

2025-02-12 Thread Alexander Shursha
t; Sponsored by: Future Crew, LLC > > While it is nice that they're sponsoring you to work on this, > IMHO, we don't need to be advertizing commercial relationships > in the commit log. > > It suffices to put such a note in the cover letter when sending a > patch series. -- Alexander Shursha

Re: [PATCH 1/3] [bhyve] list pci devices on host

2025-02-11 Thread Alexander Shursha
I replaced working with PCI via libpciaccess -- Alexander Shursha

[PATCH 3/4] bhyve: add command line argument "passthru"

2025-02-11 Thread Alexander Shursha
Sponsored by: Future Crew, LLC Signed-off-by: Alexander Shursha --- src/bhyve/bhyve_command.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index bc287307c8..5da88ec9bd 100644 --- a/src/bhyve/bhyve_command.c

[PATCH 2/4] bhyve: list pci devices on host

2025-02-11 Thread Alexander Shursha
Sponsored by: Future Crew, LLC Signed-off-by: Alexander Shursha --- src/bhyve/bhyve_capabilities.c | 2 +- src/conf/node_device_conf.c | 2 +- src/node_device/node_device_driver.c| 2 +- src/node_device/node_device_udev.c | 2 ++ src/util/virmdev.c

[PATCH 4/4] bhyve: parse passthru argument from XML-config

2025-02-11 Thread Alexander Shursha
Sponsored by: Future Crew, LLC Signed-off-by: Alexander Shursha --- src/bhyve/bhyve_parse_command.c | 59 + 1 file changed, 59 insertions(+) diff --git a/src/bhyve/bhyve_parse_command.c b/src/bhyve/bhyve_parse_command.c index 29d3a678bf..14916c401d 100644 --- a

[PATCH 1/4] virpci: changed the work with PCI via libpciaccess

2025-02-11 Thread Alexander Shursha
Sponsored by: Future Crew, LLC Signed-off-by: Alexander Shursha --- src/meson.build | 1 + src/util/virpci.c | 464 ++-- tests/qemuhotplugtest.c | 11 +- tests/qemumemlocktest.c | 9 + tests/qemuxmlconftest.c | 9 + tests/virpcimock.c

[PATCH 4/4] bhyve: parse passthru argument from XML-config

2025-02-11 Thread Alexander Shursha
Sponsored by: Future Crew, LLC Signed-off-by: Alexander Shursha --- src/bhyve/bhyve_parse_command.c | 59 + 1 file changed, 59 insertions(+) diff --git a/src/bhyve/bhyve_parse_command.c b/src/bhyve/bhyve_parse_command.c index 29d3a678bf..14916c401d 100644 --- a

[PATCH 3/4] bhyve: add command line argument "passthru"

2025-02-11 Thread Alexander Shursha
Sponsored by: Future Crew, LLC Signed-off-by: Alexander Shursha --- src/bhyve/bhyve_command.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index bc287307c8..5da88ec9bd 100644 --- a/src/bhyve/bhyve_command.c

[PATCH 2/4] bhyve: list pci devices on host

2025-02-11 Thread Alexander Shursha
Sponsored by: Future Crew, LLC Signed-off-by: Alexander Shursha --- src/bhyve/bhyve_capabilities.c | 2 +- src/conf/node_device_conf.c | 2 +- src/node_device/node_device_driver.c| 2 +- src/node_device/node_device_udev.c | 2 ++ src/util/virmdev.c

[PATCH 1/3] [bhyve] list pci devices on host

2025-01-29 Thread Alexander Shursha
Linux gets the list via sysfs. FreeBSD can get the list through ioctl Sponsored by: Future Crew, LLC Signed-off-by: Alexander Shursha --- src/bhyve/bhyve_capabilities.c | 2 +- src/conf/node_device_conf.c | 2 +- src/node_device/node_device_driver.c | 2 +- src/util

[PATCH 3/3] [bhyve] parse passthru argument from XML-config

2025-01-29 Thread Alexander Shursha
Sponsored by: Future Crew, LLC Signed-off-by: Alexander Shursha --- src/bhyve/bhyve_parse_command.c | 59 + 1 file changed, 59 insertions(+) diff --git a/src/bhyve/bhyve_parse_command.c b/src/bhyve/bhyve_parse_command.c index 29d3a678bf..14916c401d 100644 --- a

[PATCH 2/3] [bhyve] add command line argument "passthru"

2025-01-29 Thread Alexander Shursha
Sponsored by: Future Crew, LLC Signed-off-by: Alexander Shursha --- src/bhyve/bhyve_command.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index bc287307c8..16986c9d53 100644 --- a/src/bhyve/bhyve_command.c