Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Andrea Bolognani
such as virXMLPropUInt(), that don't unconditionally set the flag. For all those, the behavior is up to the caller, and having the flag makes sense. -- Andrea Bolognani / Red Hat / Virtualization

Re: [RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-24 Thread Andrea Bolognani
On Thu, Mar 24, 2022 at 10:14:18AM +0100, Michal Prívozník wrote: > On 3/24/22 10:00, Peter Krempa wrote: > > On Wed, Mar 23, 2022 at 19:04:20 +0100, Andrea Bolognani wrote: > >> Fixes: 8861d96c880d25c940456c5997a2ac93fc073c78 > >> Fixes: c8726ede83ac117cb18c0b0a1fbfeeac

[RFC 0/1] virxml: Accept 'default' for virTristate* properties

2022-03-23 Thread Andrea Bolognani
' to be an error, and the change I'm proposing would relax such a check. So we need to go through the callers one by one, adapting them as necessary (in this case, we would pass VIR_XML_PROP_NONZERO in addition to existing flags) to ensure that the original semantic is preserved. Any better ideas? Andrea

[RFC 1/1] virxml: Accept 'default' for virTristate* properties

2022-03-23 Thread Andrea Bolognani
: 8861d96c880d25c940456c5997a2ac93fc073c78 Fixes: c8726ede83ac117cb18c0b0a1fbfeeac8b80384b Signed-off-by: Andrea Bolognani --- src/util/virxml.c | 4 1 file changed, 4 deletions(-) diff --git a/src/util/virxml.c b/src/util/virxml.c index 8ff59e7cda..db5212de20 100644 --- a/src/util/virxml.c +++ b

Re: [libvirt PATCH] ci: integration: Rename all Avocado standard stream log files to *.log

2022-03-22 Thread Andrea Bolognani
On Tue, Mar 22, 2022 at 06:23:47PM +0100, Erik Skultety wrote: > On Tue, Mar 22, 2022 at 05:17:28PM +0000, Andrea Bolognani wrote: > > On Tue, Mar 22, 2022 at 01:11:22PM +0100, Erik Skultety wrote: > > > Since GitLab sets a proper MIME for .txt and .log file extensions, > &

Re: [libvirt PATCH] ci: integration: Rename all Avocado standard stream log files to *.log

2022-03-22 Thread Andrea Bolognani
txt' because of this. Just a nit that you should feel free to ignore, especially seeing how you've already pushed this patch, but isn't what you've written above an argument for either using .txt here or using .log for the coredumpctl case too? -- Andrea Bolognani / Red Hat / Virtualization

[libvirt PATCH] keycodemapdb: Update git submodule

2022-03-22 Thread Andrea Bolognani
This brings in all the fixes made since April 2020. Signed-off-by: Andrea Bolognani --- src/keycodemapdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keycodemapdb b/src/keycodemapdb index 27acf0ef82..57ba70da53 16 --- a/src/keycodemapdb +++ b/src/keycodemapdb

Re: [PATCH] gitpublish: Drop "libvirt" from prefix

2022-03-22 Thread Andrea Bolognani
On Tue, Mar 22, 2022 at 10:35:41AM +, Daniel P. Berrangé wrote: > On Tue, Mar 22, 2022 at 11:11:42AM +0100, Andrea Bolognani wrote: > > We're now using GitLab MRs for all subprojects, which makes > > having "libvirt" in the prefix no longer necessary and a > &g

[PATCH] gitpublish: Drop "libvirt" from prefix

2022-03-22 Thread Andrea Bolognani
We're now using GitLab MRs for all subprojects, which makes having "libvirt" in the prefix no longer necessary and a pointless deviation from git-format-patch's default, which some people still use. Signed-off-by: Andrea Bolognani --- .gitpublish | 2 +- 1 file changed, 1 inser

[PATCH] docs: Update obsolete reference to formatdomain.html.in

2022-03-22 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- Pushed as trivial. docs/api_extension.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api_extension.rst b/docs/api_extension.rst index d70c244fd4..152e64487e 100644 --- a/docs/api_extension.rst +++ b/docs/api_extension.rst

Re: [libvirt PATCH v2] schemas: move out of docs, fix no-docs build

2022-03-22 Thread Andrea Bolognani
u_conf.c: adapt (Andrea) > * docs/api_extension.rst: adapt one additional reference Reviewed-by: Andrea Bolognani and pushed. Thanks! -- Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH] schemas: move out of docs, fix no-docs build

2022-03-21 Thread Andrea Bolognani
orkport.rng", schemaNetworkport); +DO_TEST("schemas/nodedev.rng", schemaNodedev); +DO_TEST("schemas/nwfilter.rng", schemaNwfilter); +DO_TEST("schemas/nwfilterbinding.rng", schemaNwfilterbinding); +DO_TEST("schemas/secret.rng", schemaSecret); +DO_TEST("schemas/storagepoolcaps.rng", schemaStoragepoolcaps); +DO_TEST("schemas/storagepool.rng", schemaStoragePool); +DO_TEST("schemas/storagevol.rng", schemaStorageVol); +DO_TEST("schemas/cpu.rng", schemaCpu); return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } -- Andrea Bolognani / Red Hat / Virtualization

[libvirt PATCH v2 17/17] news: Document virtio-iommu

2022-03-18 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- NEWS.rst | 4 1 file changed, 4 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index b9b9807625..9ee3a77427 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -17,6 +17,10 @@ v8.2.0 (unreleased) * **New features** + * qemu: Introduce

[libvirt PATCH v2 10/17] qemu: Validate use of ACPI with virtio-iommu

2022-03-18 Thread Andrea Bolognani
virtio-iommu doesn't work without ACPI, so we need to make sure the latter is enabled. Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- src/qemu/qemu_validate.c | 6 ++ .../virtio-iommu-no-acpi.x86_64-latest.err| 1 + tests/qemuxml2argvdata

[libvirt PATCH v2 04/17] qemu: Introduce QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI

2022-03-18 Thread Andrea Bolognani
This capability detects the availability of the virtio-iommu-pci device. Note that, while this device is present even in somewhat old versions of QEMU, it's only some recent changes that made it actually usable for our purposes. Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- src

[libvirt PATCH v2 16/17] docs: Document virtio-iommu

2022-03-18 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- docs/formatdomain.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index 9b1b69bb4d..4e5008f8b7 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst

[libvirt PATCH v2 14/17] tests: Add test for virtio-iommu address

2022-03-18 Thread Andrea Bolognani
virtio-iommu needs to be an integrated device, and our address assignment code will make sure that is the case. If the user has provided an explicit address, however, we should make sure any addresses pointing to a different bus are rejected. Signed-off-by: Andrea Bolognani Reviewed-by: Ján

[libvirt PATCH v2 15/17] qemu: Generate command line for virtio-iommu

2022-03-18 Thread Andrea Bolognani
https://bugzilla.redhat.com/show_bug.cgi?id=1653327 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_command.c | 12 .../virtio-iommu-aarch64.aarch64-latest.args | 1 + .../virtio-iommu-x86_64.x86_64-latest.args | 1 + 3 files

[libvirt PATCH v2 09/17] qemu: Validate capabilities for virtio-iommu

2022-03-18 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- src/qemu/qemu_validate.c | 8 .../qemuxml2argvdata/virtio-iommu-x86_64.x86_64-6.1.0.err | 1 + tests/qemuxml2argvtest.c | 1 + 3 files changed, 10 insertions

[libvirt PATCH v2 11/17] conf: Add virDomainDeviceInfo to virDomainIOMMUDef

2022-03-18 Thread Andrea Bolognani
This is needed so that IOMMU devices can have addresses. Existing IOMMU devices (intel-iommu and SMMUv3) are system devices and as such don't have an address associated to them, but virtio-iommu is a PCI device and needs one. Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- docs

[libvirt PATCH v2 12/17] qemu: Assign PCI address to virtio-iommu

2022-03-18 Thread Andrea Bolognani
The device is configured to be an integrated endpoint, as is necessary for it to function correctly. Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- src/qemu/qemu_domain_address.c | 6 +- .../virtio-iommu-aarch64.aarch64-latest.xml

[libvirt PATCH v2 07/17] tests: Add test cases for virtio-iommu

2022-03-18 Thread Andrea Bolognani
These represent valid uses of the device. Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- .../virtio-iommu-aarch64.aarch64-latest.args | 35 +++ .../qemuxml2argvdata/virtio-iommu-aarch64.xml | 20 +++ .../virtio-iommu-x86_64.x86_64-latest.args| 31

[libvirt PATCH v2 13/17] qemu: Validate address type for virtio-iommu

2022-03-18 Thread Andrea Bolognani
virtio-iommu is a PCI device and attempts to use a different address type should be rejected. Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- src/qemu/qemu_validate.c | 7 +++ ...mmu-invalid-address-type.x86_64-latest.err | 1 + .../virtio-iommu-invalid

[libvirt PATCH v2 06/17] conf: Introduce virtio model for

2022-03-18 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c | 1 + src/conf/domain_conf.h | 1 + src/qemu/qemu_command.c| 4 src/qemu/qemu_domain_address.c | 6 ++ src/qemu/qemu_validate.c | 3

[libvirt PATCH v2 08/17] qemu: Validate machine type used with virtio-iommu

2022-03-18 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- src/qemu/qemu_validate.c | 8 ...irtio-iommu-wrong-machine.x86_64-latest.err | 1 + .../virtio-iommu-wrong-machine.xml | 18 ++ tests/qemuxml2argvtest.c

[libvirt PATCH v2 01/17] tests: Add capabilities for QEMU 7.0.0 on aarch64

2022-03-18 Thread Andrea Bolognani
The QEMU binary is built from the v7.0.0-rc0 tag. This causes the argument to -device to be generated in JSON format, same as what 1a691fe1c840 has done for x86_64. Signed-off-by: Andrea Bolognani --- .../qemu_7.0.0-virt.aarch64.xml | 193 + tests/domaincapsdata/qemu_7.0.0

[libvirt PATCH v2 05/17] qemu: Introduce QEMU_CAPS_VIRTIO_IOMMU_BOOT_BYPASS

2022-03-18 Thread Andrea Bolognani
to the 10+ binaries necessary to regenerate the replies, I just put some fake data in there. Signed-off-by: Andrea Bolognani --- Note that, since I'm currently affected by [1], I was unable to refresh the replies for QEMU 7.0.0 on x86_64 to bring them on par with the aarch64 replies, so

[libvirt PATCH v2 03/17] qemu: Tweak some code

2022-03-18 Thread Andrea Bolognani
The altered code is functionally equivalent to the previous one, but it's already laid down in a way that will make further changes easier and less messy. Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko --- src/qemu/qemu_command.c| 14 ++ src/qemu

[libvirt PATCH v2 02/17] conf: Introduce VIR_PCI_CONNECT_INTEGRATED

2022-03-18 Thread Andrea Bolognani
This new flag can be used to convince the PCI address assignment algorithm to place a device directly on the root bus. It will be used to implement support for virtio-iommu, which needs to be an integrated device in order to work correctly. Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko

[libvirt PATCH v2 00/17] qemu: Implement virtio-iommu support

2022-03-18 Thread Andrea Bolognani
-October/223977.html Andrea Bolognani (17): tests: Add capabilities for QEMU 7.0.0 on aarch64 conf: Introduce VIR_PCI_CONNECT_INTEGRATED qemu: Tweak some code qemu: Introduce QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI qemu: Introduce QEMU_CAPS_VIRTIO_IOMMU_BOOT_BYPASS conf: Introduce virtio model

Re: [libvirt PATCH] spec: Move virkey* manual pages from -daemon to -client

2022-03-07 Thread Andrea Bolognani
On Thu, Jan 27, 2022 at 03:47:56PM +0100, Andrea Bolognani wrote: > The documentation included in these manual pages is mostly useful > to users of the 'send-key' virsh command, and the virsh manual > page refers to them, so it makes more sense to install them along > with v

Re: [libvirt PATCH v2 1/1] meson: Check for os-release's ID_LIKE in addition to ID

2022-03-07 Thread Andrea Bolognani
On Tue, Feb 15, 2022 at 01:38:47PM -0500, Andrea Bolognani wrote: > On Thu, Jan 27, 2022 at 12:00:18PM +0100, Andrea Bolognani wrote: > > This makes it possible to reduce the number of cases we have to > > consider, because 'sles' declares itself to be like 'suse' and > > bo

[libvirt PATCH] Drop YouCompleteMe and color_coded integration

2022-03-07 Thread Andrea Bolognani
I introduced support for these vim plugins several years ago but have since moved away from them. These days developers are likely better served by lsp-based tooling, which doesn't require additional per-project configuration. Signed-off-by: Andrea Bolognani --- .color_coded.in| 38

Re: [libvirt PATCH] Add .gitattributes file

2022-03-07 Thread Andrea Bolognani
On Mon, Mar 07, 2022 at 09:56:36AM +, Daniel P. Berrangé wrote: > On Mon, Mar 07, 2022 at 10:20:36AM +0100, Andrea Bolognani wrote: > > +# CI stuff > > +/.gitlab-ci.yml export-ignore > > +/ci export-ignore > > +/ci/** export-ignore > > I d

[libvirt PATCH] Add .gitattributes file

2022-03-07 Thread Andrea Bolognani
ing that doesn't make sense in a release tarball. Signed-off-by: Andrea Bolognani --- .gitattributes | 22 ++ 1 file changed, 22 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00..6f0a34d2a0 --- /

Re: Release of libvirt-8.1.0

2022-03-07 Thread Andrea Bolognani
On Mon, Mar 07, 2022 at 12:18:04AM -0800, Andrea Bolognani wrote: > On Tue, Mar 01, 2022 at 10:18:25AM +0100, Jiri Denemark wrote: > > The 8.1.0 release of both libvirt and libvirt-python is tagged and > > signed tarballs and source RPMs are available at > > > >

Re: Release of libvirt-8.1.0

2022-03-07 Thread Andrea Bolognani
/ .gitpublish and possibly all of the ci/ directory, but we start getting into less clear-cut territory there :) -- Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH 4/4] gitlab-ci: Introduce a new test 'integration' pipeline stage

2022-03-02 Thread Andrea Bolognani
throw an error, possibly an ugly exception (I hope not) when this > happens. Perhaps all we really need to do is to make sure that a nice, explanatory error message is produced in this scenario then :) -- Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH 4/4] gitlab-ci: Introduce a new test 'integration' pipeline stage

2022-03-02 Thread Andrea Bolognani
On Wed, Mar 02, 2022 at 03:52:49PM +0100, Erik Skultety wrote: > On Wed, Mar 02, 2022 at 06:27:04AM -0800, Andrea Bolognani wrote: > > I don't think we can expect integration tests to be merged at the > > same time as a feature when new APIs are involved. If tests are > &

Re: [libvirt PATCH 4/4] gitlab-ci: Introduce a new test 'integration' pipeline stage

2022-03-02 Thread Andrea Bolognani
provides hardware access to the project there will be some strings attached. This is already the case for GitLab and Cirrus CI, for example. I could easily see the instance of libvirt-gitlab-executor running on hardware owned and operated by Red Hat returning a failure if a job submitted to it comes with DISTRO=debian-11. For the time being, I think it'd be okay to use a tag like redhat-vm-host or something like that for these jobs. Once we have had jobs running for a bit, we can figure out whether there is spare capacity available and try to convince Red Hat to let more jobs run on the machines. -- Andrea Bolognani / Red Hat / Virtualization

Re: GSoC 2022 CI project idea proposal

2022-02-25 Thread Andrea Bolognani
On Fri, Feb 25, 2022 at 05:14:41PM +, Daniel P. Berrangé wrote: > On Fri, Feb 25, 2022 at 08:36:10AM -0800, Andrea Bolognani wrote: > > If you're trying to reproduce a CI failure locally so that you can > > debug it, or performing validation before posting patches, you don't &g

Re: GSoC 2022 CI project idea proposal

2022-02-25 Thread Andrea Bolognani
e container's state around so that you can return to it at a later time would be desirable, but that's more of an optimization than something that's really necessary for regular usage. -- Andrea Bolognani / Red Hat / Virtualization

Re: GSoC 2022 CI project idea proposal

2022-02-25 Thread Andrea Bolognani
On Fri, Feb 25, 2022 at 12:30:08PM +0100, Erik Skultety wrote: > On Fri, Feb 25, 2022 at 03:02:49AM -0800, Andrea Bolognani wrote: > > Do you have any high-level concerns about the ci/build approach I > > vaguely described? The finer details are of course far from being set >

Re: GSoC 2022 CI project idea proposal

2022-02-25 Thread Andrea Bolognani
On Fri, Feb 25, 2022 at 11:31:39AM +0100, Erik Skultety wrote: > On Thu, Feb 24, 2022 at 06:49:29AM -0800, Andrea Bolognani wrote: > > I'm not entirely convinced that requiring the use of lcitool for this > > task is necessarily the best idea though. Ideally, it should

Re: GSoC 2022 CI project idea proposal

2022-02-24 Thread Andrea Bolognani
we can maintain that script as part of libvirt-ci.git, and generate a local copy to be stored in each project's repository at the same time as other CI-related files such as Dockerfiles are generated? That sounds like it could work, but admittedly this is the fuzziest part of the entire plan :) -- Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH 4/4] gitlab-ci: Introduce a new test 'integration' pipeline stage

2022-02-22 Thread Andrea Bolognani
issed it, but unless the tags are exposed as env variables, the > provisioner script wouldn't know which template to provision. Also, the tag > is > supposed to annotate the baremetal host in this case, so in that context > having > '-vm' in the tag name makes sense, but doesn't for the provisioner script > which > relies on/tries to be compatible with lcitool as much as possible. Okay, my misunderstanding was caused by not figuring out the purpose of DISTRO. I agree that more specific tags are not necessary. Should we make them *less* specific instead? As in, is there any reason for having different tags for Fedora and CentOS jobs as opposed to using a generic "this needs to run in a VM" tag for both? -- Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH] qemu: Move some enums impl to qemu_monitor.c

2022-02-22 Thread Andrea Bolognani
On Tue, Feb 22, 2022 at 08:38:10AM +0100, Michal Prívozník wrote: > On 2/21/22 17:17, Andrea Bolognani wrote: > > On Mon, Feb 21, 2022 at 04:10:25PM +0100, Michal Privoznik wrote: > >> +VIR_ENUM_IMPL(qemuMonitorDirtyRateCalcMode, > >> + QEMU_MONIT

Re: [PATCH] qemu: Move some enums impl to qemu_monitor.c

2022-02-21 Thread Andrea Bolognani
MODE_LAST, > + "page-sampling", > + "dirty-bitmap", > + "dirty-ring", > +); > + > + Kinda weird that this one ends up in the middle of the file instead of being grouped with the rest. I'd keep them together, unles

Re: Libvirt Rust bindings could use some work

2022-02-21 Thread Andrea Bolognani
On Mon, Feb 21, 2022 at 04:30:28PM +0100, Ján Tomko wrote: > On a Monday in 2022, Andrea Bolognani wrote: > > On Fri, Feb 18, 2022 at 10:28:29AM +0100, Wim de With wrote: > > Licensing is a pretty fun minefield :) > > > > For example, even though libvirt-rs itself

Re: Libvirt Rust bindings could use some work

2022-02-21 Thread Andrea Bolognani
apper around the C library you'd still end up dynamically linking against that. I tend to agree that language bindings should follow the rest of the language ecosystem in terms of licensing, and for libvirt-rs specifically that would probably mean MIT. Perhaps we should consider looking into relicensing the project? -- Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH 4/4] gitlab-ci: Introduce a new test 'integration' pipeline stage

2022-02-17 Thread Andrea Bolognani
ich template to use for the VM. So shouldn't this be more specific? I would expect something like tags: - centos-stream-8-vm or tags: - centos-stream-8 - vm > +++ b/.gitlab-ci.yml > @@ -4,6 +4,7 @@ variables: > stages: >- containers >- builds > + - test >- sanity_checks Unlike Dan, I actually think it makes sense to have these as a separate stage. I'd call it integration_tests and list it last though. But admittedly this is entirely in bikeshedding territory and I'm fine with the current solution or the one Dan proposed too :) -- Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH 3/4] ci: manifest: Publish RPMs as artifacts on CentOS Stream and Fedoras

2022-02-17 Thread Andrea Bolognani
paths: > + - libvirt-rpms > + > > x86_64-centos-stream-9: >extends: .native_build_job This looks like it's adding additional empty lines, and if you regenerate the file using 'lcitool manifest' you'll find that they get removed. But they are actually supposed to be there,

Re: [libvirt PATCH] drivers: Group global feature together

2022-02-17 Thread Andrea Bolognani
semantics, I'm leaning towards not using that helper. Would something like virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Global feature %d should have already been handled"), feature); work for you? I'd drop the comment of course. -- Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH 0/8] driver: Fix handling of driver feature flags

2022-02-16 Thread Andrea Bolognani
G > virDriverFeatureIsGlobal: Handle > VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER > virDriverFeatureIsGlobal: Handle VIR_DRV_FEATURE_FD_PASSING > virDomainCreate(XML)WithFiles: Add check for > VIR_DRV_FEATURE_FD_PASSING Reviewed-by: Andrea Bolognani I've

[libvirt PATCH] drivers: Group global feature together

2022-02-16 Thread Andrea Bolognani
and we should error out. Signed-off-by: Andrea Bolognani --- Applies on top of [PATCH 0/8] driver: Fix handling of driver feature flags https://listman.redhat.com/archives/libvir-list/2022-February/msg00644.html src/ch/ch_driver.c | 13 +++-- src/esx/esx_driver.c| 21

Re: [libvirt PATCH v2 1/1] meson: Check for os-release's ID_LIKE in addition to ID

2022-02-15 Thread Andrea Bolognani
On Thu, Jan 27, 2022 at 12:00:18PM +0100, Andrea Bolognani wrote: > This makes it possible to reduce the number of cases we have to > consider, because 'sles' declares itself to be like 'suse' and > both 'rhel' and 'centos' declare themselves to be like 'fedora'. > > We have to

Re: [PATCH] openrc: Make init scripts executable on install

2022-02-15 Thread Andrea Bolognani
t; Resolves: https://gitlab.com/libvirt/libvirt/-/issues/250 > Signed-off-by: Michal Privoznik > --- > src/meson.build | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Andrea Bolognani -- Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH 07/11] virnetclient: Use 'if' consistently

2022-02-14 Thread Andrea Bolognani
On Mon, Feb 14, 2022 at 04:56:37PM +, Daniel P. Berrangé wrote: > On Mon, Feb 14, 2022 at 08:09:57AM -0800, Andrea Bolognani wrote: > > > > Can you please provide pointers to the OpenStack implementation of > > > > this and the issue that resulted from

Re: [libvirt PATCH 07/11] virnetclient: Use 'if' consistently

2022-02-14 Thread Andrea Bolognani
s series which cleans up things further and actually addresses the original GitLab issue https://listman.redhat.com/archives/libvir-list/2022-February/msg00544.html but I will of course not push it until the nova-migration-wrapper changes mentioned above have been proposed and accepted, which I intend to try next. -- Andrea Bolognani / Red Hat / Virtualization

[libvirt PATCH v2 6/6] virnetclient: Escape socket path

2022-02-14 Thread Andrea Bolognani
Just like the name of the netcat command and the connection URI, the socket path is a user-provided piece of information that might contain characters that have special meaning for the shell, and as such should be escaped. Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 10

[libvirt PATCH v2 4/6] virnetclient: Don't unnecessarily quote user-provided values

2022-02-14 Thread Andrea Bolognani
: https://gitlab.com/libvirt/libvirt/-/issues/273 Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 36 +++- tests/virnetsockettest.c | 28 ++-- 2 files changed, 41 insertions(+), 23 deletions(-) diff --git a/src/rpc

[libvirt PATCH v2 5/6] virnetsockettest: Test more socket paths

2022-02-14 Thread Andrea Bolognani
. Signed-off-by: Andrea Bolognani --- tests/virnetsockettest.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c index 09c3ba13ad..ef7b5c6f59 100644 --- a/tests/virnetsockettest.c +++ b/tests/virnetsockettest.c

[libvirt PATCH v2 2/6] virnetclient: Use 'if' consistently

2022-02-14 Thread Andrea Bolognani
This makes the generated script a bit shorter and removes an unnecessary call to test. Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 3 +-- tests/virnetsockettest.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/rpc/virnetclient.c b/src/rpc

[libvirt PATCH v2 3/6] virnetclient: Handle netcatPath presence all at once

2022-02-14 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index 7e7e9d52a6..9c7047c7f8 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c

[libvirt PATCH v2 1/6] virnetclient: Improve spacing of ssh script

2022-02-14 Thread Andrea Bolognani
This results in the generated script having consistent spacing throughout, instead of having repeated whitespace in some parts and commands that are separated by a semicolon and no spacing at all in others. Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 12 tests

[libvirt PATCH v2 0/6] virnetclient: Cleanups and improvements

2022-02-14 Thread Andrea Bolognani
Changes from [v1]: * most patches have been pushed; * reduce quoting for most users by only using it when it's actually necessary to do so. [v1] https://listman.redhat.com/archives/libvir-list/2022-February/msg00477.html Andrea Bolognani (6): virnetclient: Improve spacing of ssh

Re: [libvirt PATCH] util: Fix getting CPU frequency on Apple Silicon

2022-02-14 Thread Andrea Bolognani
On Mon, Feb 14, 2022 at 04:59:11AM +0800, Menci wrote: > I tested the patch (applying to v7.10.0) and it works on my M1 MacBook Air. Thanks a lot for confirming! I've pushed the patch now :) -- Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH 00/11] virnetclient: Cleanups and improvement

2022-02-14 Thread Andrea Bolognani
On Mon, Feb 14, 2022 at 10:21:57AM +0100, Michal Prívozník wrote: > On 2/11/22 18:39, Andrea Bolognani wrote: > > Andrea Bolognani (11): > > virbuftest: Increase coverage > > virbuffer: Simplify virBufferEscapeShell() > > virnetsockettest: Drop unnecessary backs

Re: [libvirt PATCH 07/11] virnetclient: Use 'if' consistently

2022-02-14 Thread Andrea Bolognani
ck implementation of this and the issue that resulted from introducing virt-ssh-helper? AFAICT the only way to restrict what commands a user can run after successfully authenticating is to specify command=... before the corresponding key in authorized_keys and I don't see how this change, or indeed the one that happened when virt-ssh-helper was added, could interfere with that. -- Andrea Bolognani / Red Hat / Virtualization

[libvirt PATCH 09/11] virnetsockettest: Allow changing the proxy parameter

2022-02-11 Thread Andrea Bolognani
Currently the test cases all follow the proxy=auto behavior, but we want to add coverage for other proxy modes as well. Signed-off-by: Andrea Bolognani --- tests/virnetsockettest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/virnetsockettest.c b/tests

[libvirt PATCH 06/11] virnetclient: Improve spacing of ssh script

2022-02-11 Thread Andrea Bolognani
This results in the generated script having consistent spacing throughout, instead of having repeated whitespace in some parts and commands that are separated by a semicolon and no spacing at all in others. Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 12 ++-- tests

[libvirt PATCH 02/11] virbuffer: Simplify virBufferEscapeShell()

2022-02-11 Thread Andrea Bolognani
We can exit early when the input is an empty string, and we can avoid storing the string length in a variable since we only use that information once. Signed-off-by: Andrea Bolognani --- src/util/virbuffer.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git

[libvirt PATCH 08/11] virnetsockettest: Tweak input for test 7

2022-02-11 Thread Andrea Bolognani
ing to fix that in an upcoming commit. Signed-off-by: Andrea Bolognani --- tests/virnetsockettest.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c index c1d3e39856..557d781605 100644 --- a/tests/virnetsockettest.c +

[libvirt PATCH 04/11] virnetsockettest: Move opening quote

2022-02-11 Thread Andrea Bolognani
Make this test case consistent with all the other ones. Signed-off-by: Andrea Bolognani --- tests/virnetsockettest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c index 0928f7056a..429c4e5f9d 100644 --- a/tests

[libvirt PATCH 01/11] virbuftest: Increase coverage

2022-02-11 Thread Andrea Bolognani
Test the behavior of virBufferEscapeShell for different types of quotes as well as the empty string. Signed-off-by: Andrea Bolognani --- tests/virbuftest.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/virbuftest.c b/tests/virbuftest.c index 977e0883a6

[libvirt PATCH 11/11] virnetclient: Escape socket path

2022-02-11 Thread Andrea Bolognani
Just like the name of the netcat command and the connection URI, the socket path is a user-provided piece of information that might contain characters that have special meaning for the shell, and as such should be escaped. Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 5

[libvirt PATCH 10/11] virnetsockettest: Increase coverage

2022-02-11 Thread Andrea Bolognani
Add test cases for quotes appearing in the netcat and socket parameters, for the default behavior of proxy=auto where virt-ssh-helper is used if available, and for proxy=native. Signed-off-by: Andrea Bolognani --- tests/virnetsockettest.c | 62 +++- 1 file

[libvirt PATCH 07/11] virnetclient: Use 'if' consistently

2022-02-11 Thread Andrea Bolognani
This makes the generated script a bit shorter and removes an unnecessary call to test. Signed-off-by: Andrea Bolognani --- src/rpc/virnetclient.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index cbefa8f11f..7e7e9d52a6

[libvirt PATCH 05/11] virnetsockettest: Improve indentation

2022-02-11 Thread Andrea Bolognani
Having the actual script indented and the closing quote on a separate line, like sh -c ' if foo; then bar; fi ' makes things more readable and easier to scan visually. Signed-off-by: Andrea Bolognani --- tests/virnetsockettest.c | 78

[libvirt PATCH 03/11] virnetsockettest: Drop unnecessary backslash

2022-02-11 Thread Andrea Bolognani
No need to escape a single quote. Signed-off-by: Andrea Bolognani --- tests/virnetsockettest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c index 447cbee89c..0928f7056a 100644 --- a/tests/virnetsockettest.c +++ b/tests

[libvirt PATCH 00/11] virnetclient: Cleanups and improvement

2022-02-11 Thread Andrea Bolognani
I initially started looking into this because of https://gitlab.com/libvirt/libvirt/-/issues/273 I have now convinced myself that we don't need to change the way we quote things, but in the process I have accumulated several improvements and one bug fix. Andrea Bolognani (11): virbuftest

Re: [libvirt PATCH] util: Fix getting CPU frequency on Apple Silicon

2022-02-11 Thread Andrea Bolognani
On Thu, Feb 10, 2022 at 10:08:42AM +0100, Andrea Bolognani wrote: > +++ b/src/util/virhostcpu.c > @@ -928,8 +928,14 @@ virHostCPUGetInfo(virArch hostarch G_GNUC_UNUSED, > *mhz = cpu_freq; > # else > if (sysctlbyname("hw.cpufrequency", _freq, _

Re: [PATCH] ch: Report VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER as supported

2022-02-11 Thread Andrea Bolognani
tc. Enabling this driver feature stops > clients from swapping the arguments (see comment in the API for > more info). > > Signed-off-by: Michal Privoznik > --- > src/ch/ch_driver.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Andrea Bolognani

[libvirt PATCH] docs: Clarify our stance on backported packages

2022-02-10 Thread Andrea Bolognani
The repositories containing them are usually offered with lower guarantees, so we don't consider them when it comes to figuring out the minimum targeted version of our dependencies. Signed-off-by: Andrea Bolognani --- docs/platforms.rst | 6 -- 1 file changed, 4 insertions(+), 2 deletions

Re: [PATCH RFC 00/19] qemu: Bump minimum supported qemu to qemu-3.1

2022-02-10 Thread Andrea Bolognani
> and backports are provided on an as-is basis, with risk of > incompatibilities with other components in Debian stable. > Use with care!" Agreed. I'll prepare a patch clarifying this in platforms.rst. -- Andrea Bolognani / Red Hat / Virtualization

[libvirt PATCH] util: Fix getting CPU frequency on Apple Silicon

2022-02-10 Thread Andrea Bolognani
as being zero when the information could not be obtained, and we already do that for Linux on aarch64. Extend this behavior to macOS on Apple Silicon. Signed-off-by: Andrea Bolognani --- src/util/virhostcpu.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/util

Re: [PATCH] virhostcpu: fix getting CPU freq for Apple Silicon

2022-02-10 Thread Andrea Bolognani
ad? Thanks. Sure, I'll post them as a proper patch. I'll CC you so you can test it and confirm things work as expected :) -- Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH] virhostcpu: fix getting CPU freq for Apple Silicon

2022-02-09 Thread Andrea Bolognani
s */ ... So if there is no way to accurately detect the CPU frequency on Apple Silicon, it would be perfectly fine to do something like if (sysctlbyname("hw.cpufrequency", _freq, _freq_len, NULL, 0) < 0) { if (errno == ENOENT) { cpu_freq = 0; } else { virReportSystemError(errno, "%s", _("cannot obtain CPU freq")); return -1; } ... and simply report the fact that we couldn't figure out the CPU frequency to the user. -- Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH] docs: remove twitter from the website

2022-02-09 Thread Andrea Bolognani
On Wed, Feb 09, 2022 at 10:32:13AM +, Daniel P. Berrangé wrote: > On Wed, Feb 09, 2022 at 01:46:50AM -0800, Andrea Bolognani wrote: > > On Fri, Feb 04, 2022 at 05:01:54PM +0100, Ján Tomko wrote: > > > Community > > > > > > - https://

Re: [libvirt PATCH] docs: remove twitter from the website

2022-02-09 Thread Andrea Bolognani
se communities and offering support through them, which AFAIK is simply not the case. A link to https://planet.virt-tools.org/ might fit into this section, but that's about it in my opinion. -- Andrea Bolognani / Red Hat / Virtualization

[libvirt PATCH 14/14] qemu: Move high-level actions close together

2022-02-04 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/qemu/qemu_tpm.c | 245 +++- 1 file changed, 128 insertions(+), 117 deletions(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 4c0b42e7ff..50f9caabf3 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu

[libvirt PATCH 13/14] qemu: Move entry points close together

2022-02-04 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/qemu/qemu_tpm.c | 133 +++- 1 file changed, 71 insertions(+), 62 deletions(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 264b9b1d60..4c0b42e7ff 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu

[libvirt PATCH 10/14] qemu: Call virDomainDefGetShortName() less frequently

2022-02-04 Thread Andrea Bolognani
When looping over TPM devices for a domain, we can avoid calling this function for each iteration and call it once per domain instead. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_tpm.c | 41 +++-- 1 file changed, 19 insertions(+), 22 deletions(-) diff

[libvirt PATCH 09/14] qemu: Rename path-building functions

2022-02-04 Thread Andrea Bolognani
Using the word "create" can give users the impression that disk operations will be performed, when in reality all these functions do is string formatting. Follow the naming convention established by virBuildPath(), virFileBuildPath() and virPidFileBuildPath(). Signed-off-by: Andrea

[libvirt PATCH 06/14] qemu: Make qemuTPMEmulatorCreateStorage() take a virDomainTPMDef*

2022-02-04 Thread Andrea Bolognani
This matches how qemuTPMEmulatorDeleteStorage() expects to be called. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_tpm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 127a2c80be..2196b5c567 100644 --- a/src/qemu

[libvirt PATCH 00/14] qemu: Improve swtpm internal API

2022-02-04 Thread Andrea Bolognani
Clean up inconsistencies to make navigating the module easier. Andrea Bolognani (14): qemu: Rename qemuExtTPMStartEmulator() qemu: Fully document qemuTPMEmulatorStart() qemu: Rename qemuTPM{Create,Delete}EmulatorStorage() qemu: Document qemuTPMEmulatorDeleteStorage() qemu: Drop

[libvirt PATCH 08/14] qemu: Introduce qemuTPMEmulatorCleanupHost()

2022-02-04 Thread Andrea Bolognani
This leaves qemuExtTPMCleanupHost() to only deal with looping over TPM devices, same as other qemuExtTPMDoThing() functions. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_tpm.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_tpm.c b/src

[libvirt PATCH 02/14] qemu: Fully document qemuTPMEmulatorStart()

2022-02-04 Thread Andrea Bolognani
The @tpm argument was not mentioned. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_tpm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index c82e5921d7..627c7e631d 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -879,6 +879,7

[libvirt PATCH 07/14] qemu: Introduce qemuExtTPMEmulatorSetupCgroup()

2022-02-04 Thread Andrea Bolognani
This leaves qemuExtTPMSetupCgroup() to only deal with looping over TPM devices, same as other qemuExtTPMDoThing() functions. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_tpm.c | 41 - 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/src

[libvirt PATCH 04/14] qemu: Document qemuTPMEmulatorDeleteStorage()

2022-02-04 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- src/qemu/qemu_tpm.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 8d66a2127e..182209bda6 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -166,6 +166,12 @@ qemuTPMEmulatorCreateStorage

<    5   6   7   8   9   10   11   12   13   14   >