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
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
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
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
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
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
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
nsupported hostdev"));
>> +return -1;
>> + }
>
> We should probably be diagnosing this in bhyveDomainDeviceDefValidate
> so it gets reported to the user much earlier.
Done.
--
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
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
Signed-off-by: Alexander Shursha
---
src/bhyve/bhyve_command.c | 24
.../bhyvexml2argv-passthru.args | 9 ++
.../bhyvexml2argv-passthru.ldargs | 4 +++
.../bhyvexml2argv-passthru.xml| 28
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
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
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
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
I replaced working with PCI via libpciaccess
--
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
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
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
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
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
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
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
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
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
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
26 matches
Mail list logo