Re: [PATCH v7 0/4] Add support to enable/disable hotplug on pci-root controller

2021-10-01 Thread Ani Sinha
On Fri, 1 Oct 2021, Laine Stump wrote: > On 10/1/21 5:29 AM, Ani Sinha wrote: > > changelog: > > > > v7: rebased the patches post libvirt release 7.8. Adjusted NEWS.rst to > > reflect 7.9 (unreleased) > > version. Changed version info for new config option in formatdomain.rst > > as well.

[PATCH v5 2/4] conf: introduce support for acpi-bridge-hotplug feature

2021-10-01 Thread Ani Sinha
This change introduces a new libvirt sub-element under that can be used to configure all pci related features. Currently the only sub-sub element supported by this sub-element is 'acpi-bridge-hotplug' as shown below: The above option is only available for qemu driver and that too

[PATCH v5 4/4] NEWS: add new acpi pci hotplug config option in the release note for next release

2021-10-01 Thread Ani Sinha
Added the following new libvirt conf option to the release note to indicate their availability with the next release: Signed-off-by: Ani Sinha --- NEWS.rst | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 76d2375e97..c8c7d86ac8 100644 ---

[PATCH v5 1/4] qemu: capablities: detect presence of acpi-pci-hotplug-with-bridge-support

2021-10-01 Thread Ani Sinha
qemu added support for i440fx specific global boolean flag PIIX4_PM.acpi-pci-hotplug-with-bridge-support around version 2.1. This flag is enabled by default. When disabled, it turns off acpi pci hotplug for cold plugged pci bridges in i440fx machine types. Very recently, in qemu version 6.1,

[PATCH v5 3/4] qemu: command: add support for acpi-bridge-hotplug feature

2021-10-01 Thread Ani Sinha
This change adds backend qemu command line support for new libvirt global feature 'acpi-bridge-hotplug'. This option can be used as following: The '' sub-element under '' is also newly introduced. 'acpi-bridge-hotplug' turns on the following command line option to qemu for x86

[PATCH v5 0/4] introduce support for acpi-bridge-hotplug feature

2021-10-01 Thread Ani Sinha
changelog: v5: rebased the patchset with the latest master. v4: split the original series into two - pci-root controller specific one (https://www.mail-archive.com/libvir-list@redhat.com/msg221645.html) and this one specific to pci bridges. The conf xml has been introduced as per

Re: [PATCH v7 0/4] Add support to enable/disable hotplug on pci-root controller

2021-10-01 Thread Laine Stump
On 10/1/21 5:29 AM, Ani Sinha wrote: changelog: v7: rebased the patches post libvirt release 7.8. Adjusted NEWS.rst to reflect 7.9 (unreleased) version. Changed version info for new config option in formatdomain.rst as well. Added reviewed-by tags. Also in formatdomain.rst added

Re: [libvirt PATCH v5 1/7] Add a PCI/PCIe device VPD Parser

2021-10-01 Thread Dmitrii Shcherbakov
On Fri, Oct 1, 2021 at 8:28 PM Daniel P. Berrangé wrote: > > On Fri, Oct 01, 2021 at 01:13:00PM -0400, Laine Stump wrote: > > On 10/1/21 5:57 AM, Daniel P. Berrangé wrote: > > > On Mon, Sep 27, 2021 at 10:30:47PM +0300, Dmitrii Shcherbakov wrote: > > > > [...] > > > > > +GType > > > >

Re: [libvirt PATCH v5 1/7] Add a PCI/PCIe device VPD Parser

2021-10-01 Thread Dmitrii Shcherbakov
On Fri, Oct 1, 2021 at 7:49 PM Daniel P. Berrangé wrote: > > A GTree is used as a data structure in order to maintain key ordering > > which will be important in XML to XML tests later. > > Now, I've learnt a bit more about VPD and considering my comments on > the XML format in the last patch, I

Re: [libvirt PATCH v5 5/7] Add PCI VPD Capability Support

2021-10-01 Thread Dmitrii Shcherbakov
> > It's probably irrelevant since this will be mostly rewritten based on > Dan's suggestions, but the resFormatFunc() pointer seems like an > unnecessary complication - you could just move the if/else construct > down to here and call the appropriate function directly. > Ack, I was trying to

Re: [libvirt PATCH v5 5/7] Add PCI VPD Capability Support

2021-10-01 Thread Dmitrii Shcherbakov
> > > > I've got a general comment about what do any of these 2-letter > > keywords actually mean. I presume they are explaned in the > > PCI spec, but AFAICT the spec is not publically available for > > free. > > So at the very least we need to document each one's meaning > > in libvirt docs

[PATCH 1/5] ch_monitor: Stop leaking json value objects

2021-10-01 Thread William Douglas
In virCHMonitorBuildKernelRelatedJson there are two cases of json value objects being lost after the pointer being redefined. This change removes the needless redefinition. Signed-off-by: William Douglas --- src/ch/ch_monitor.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH 2/5] ch_monitor: Correctly close and ref the virCHMonitor

2021-10-01 Thread William Douglas
In virCHMontiorNew the monitor object is referenced an additional time incorrectly preventing it from being disposed of. Because the disposal wasn't being used, a bug in virCHMonitorClose that would incorrectly unref the domain object wasn't being seen. This change fixes both. Signed-off-by:

[PATCH 0/5] ch: Fixup object leaks and extend g_auto usage

2021-10-01 Thread William Douglas
Based off of feedback from Laine to Ján's series of patches increasing g_auto usage for the ch_driver. This fixes leaks in virCHMonitorBuildKernelRelatedJson and virCHMonitorNew while tidying up and increasing the automatic cleanup for those functions and virCHMonitorBuildMemoryJson. William

[PATCH 5/5] ch: use g_auto in virCHMonitorNew

2021-10-01 Thread William Douglas
Also introduces a G_DEFINE_AUTOPTR_CLEANUP_FUNC for virCHMonitor. Signed-off-by: William Douglas --- src/ch/ch_monitor.c | 22 +++--- src/ch/ch_monitor.h | 1 + 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c index

[PATCH 3/5] ch: use g_auto in virCHMonitorBuildMemoryJson

2021-10-01 Thread William Douglas
Signed-off-by: William Douglas --- src/ch/ch_monitor.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c index 800457af41..7326ac645b 100644 --- a/src/ch/ch_monitor.c +++ b/src/ch/ch_monitor.c @@ -154,22 +154,17 @@

[PATCH 4/5] ch: use g_auto in virCHMonitorBuildKernelRelatedJson

2021-10-01 Thread William Douglas
Signed-off-by: William Douglas --- src/ch/ch_monitor.c | 27 ++- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/src/ch/ch_monitor.c b/src/ch/ch_monitor.c index 7326ac645b..bb49c70069 100644 --- a/src/ch/ch_monitor.c +++ b/src/ch/ch_monitor.c @@ -112,43

Re: [libvirt PATCH v5 1/7] Add a PCI/PCIe device VPD Parser

2021-10-01 Thread Dmitrii Shcherbakov
> > +if (VIR_CLOSE(vpdFileFd) < 0) { > > +virReportSystemError(errno, _("Unable to close the VPD file, fd: > > %d"), vpdFileFd); > > +return NULL; > > +} > > This is closing an FD that is owned & passed in by the caller. I'd > consider that an undesirable pattern. Whomever

Re: [libvirt PATCH v5 1/7] Add a PCI/PCIe device VPD Parser

2021-10-01 Thread Daniel P . Berrangé
On Fri, Oct 01, 2021 at 01:13:00PM -0400, Laine Stump wrote: > On 10/1/21 5:57 AM, Daniel P. Berrangé wrote: > > On Mon, Sep 27, 2021 at 10:30:47PM +0300, Dmitrii Shcherbakov wrote: > > [...] > > > +GType > > > +vir_pci_vpd_resource_type_get_type(void) > > I know you had asked about using

Re: [libvirt PATCH v5 1/7] Add a PCI/PCIe device VPD Parser

2021-10-01 Thread Dmitrii Shcherbakov
Thanks a lot for the review! Responses inline - ACKs to address in v6. On Fri, Oct 1, 2021 at 12:58 PM Daniel P. Berrangé wrote: > I don't know what the thread concurrency rules are of the callers of > this code, but regardless we generally aim to make any one-time > initializers thread safe

Re: [libvirt PATCH v5 5/7] Add PCI VPD Capability Support

2021-10-01 Thread Laine Stump
On 9/27/21 3:30 PM, Dmitrii Shcherbakov wrote: [...] diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c [...] + +static void +virNodeDeviceCapVPDResourceFormat(virBuffer *buf, virPCIVPDResource *res) +{ +GEnumValue *resRype = NULL; +void (*resFormatFunc)(virBuffer

Re: [libvirt PATCH v5 1/7] Add a PCI/PCIe device VPD Parser

2021-10-01 Thread Laine Stump
On 10/1/21 5:57 AM, Daniel P. Berrangé wrote: On Mon, Sep 27, 2021 at 10:30:47PM +0300, Dmitrii Shcherbakov wrote: [...] +GType +vir_pci_vpd_resource_type_get_type(void) I know you had asked about using under_scored_naming in a reply to Peter pointing out "non-standard" names in V3 of

Re: [libvirt PATCH v5 1/7] Add a PCI/PCIe device VPD Parser

2021-10-01 Thread Daniel P . Berrangé
On Mon, Sep 27, 2021 at 10:30:47PM +0300, Dmitrii Shcherbakov wrote: > Add support for deserializing the binary PCI/PCIe VPD format and storing > results in memory. > > The VPD format is specified in "I.3. VPD Definitions" in PCI specs > (2.2+) and "6.28.1 VPD Format" PCIe 4.0. As section 6.28 in

Re: [libvirt PATCH v5 5/7] Add PCI VPD Capability Support

2021-10-01 Thread Daniel P . Berrangé
On Fri, Oct 01, 2021 at 01:11:19PM +0100, Daniel P. Berrangé wrote: > On Mon, Sep 27, 2021 at 10:30:51PM +0300, Dmitrii Shcherbakov wrote: > > * XML serialization and deserialization of PCI VPD resources; > > * PCI VPD capability flags added and used in relevant places; > > * XML to XML tests for

Re: [PATCH 09/11] qdev: Avoid QemuOpts in QMP device_add

2021-10-01 Thread Peter Krempa
On Fri, Sep 24, 2021 at 11:04:25 +0200, Kevin Wolf wrote: > Directly call qdev_device_add_from_qdict() for QMP device_add instead of > first going through QemuOpts and converting back to QDict. > > Note that this changes the behaviour of device_add, though in ways that > should be considered bug

[libvirt PATCH] [RFC] scripts: Check spelling

2021-10-01 Thread Tim Wiederhake
This is a wrapper for codespell [1], a spell checker for source code. Codespell does not compare words to a dictionary, but rather works by checking words against a list of common typos, making it produce fewer false positives than other solutions. The script in this patch works around the lack

Re: [libvirt PATCH v5 5/7] Add PCI VPD Capability Support

2021-10-01 Thread Daniel P . Berrangé
On Mon, Sep 27, 2021 at 10:30:51PM +0300, Dmitrii Shcherbakov wrote: > * XML serialization and deserialization of PCI VPD resources; > * PCI VPD capability flags added and used in relevant places; > * XML to XML tests for the added capability. > > Signed-off-by: Dmitrii Shcherbakov > diff

Re: [libvirt PATCH v5 1/7] Add a PCI/PCIe device VPD Parser

2021-10-01 Thread Daniel P . Berrangé
On Mon, Sep 27, 2021 at 10:30:47PM +0300, Dmitrii Shcherbakov wrote: > Add support for deserializing the binary PCI/PCIe VPD format and storing > results in memory. > > The VPD format is specified in "I.3. VPD Definitions" in PCI specs > (2.2+) and "6.28.1 VPD Format" PCIe 4.0. As section 6.28 in

Re: [libvirt PATCH v5 3/7] Add PCI VPD-related helper functions to virpci

2021-10-01 Thread Daniel P . Berrangé
On Mon, Sep 27, 2021 at 10:30:49PM +0300, Dmitrii Shcherbakov wrote: > Add helper functions to virpci to provide means of checking for a VPD > file presence and for VPD resource retrieval using the PCI VPD parser. > > The added test assesses the basic functionality of VPD retrieval while > the

Re: [libvirt PATCH v5 2/7] News: Add a PCI VPD parser

2021-10-01 Thread Daniel P . Berrangé
On Mon, Sep 27, 2021 at 10:30:48PM +0300, Dmitrii Shcherbakov wrote: > Signed-off-by: Dmitrii Shcherbakov > --- > NEWS.rst | 8 > 1 file changed, 8 insertions(+) > > diff --git a/NEWS.rst b/NEWS.rst > index fd20e50d18..a4178e505c 100644 > --- a/NEWS.rst > +++ b/NEWS.rst > @@ -29,6

Re: [libvirt PATCH v5 1/7] Add a PCI/PCIe device VPD Parser

2021-10-01 Thread Daniel P . Berrangé
On Mon, Sep 27, 2021 at 10:30:47PM +0300, Dmitrii Shcherbakov wrote: > Add support for deserializing the binary PCI/PCIe VPD format and storing > results in memory. > > The VPD format is specified in "I.3. VPD Definitions" in PCI specs > (2.2+) and "6.28.1 VPD Format" PCIe 4.0. As section 6.28 in

[PATCH v7 2/4] conf: introduce option to enable/disable pci hotplug on pci-root controller

2021-10-01 Thread Ani Sinha
This change introduces libvirt xml support to enable/disable hotplug on the pci-root controller. It adds a 'target' subelement for the pci-root controller with a 'hotplug' property. This property can be used to enable or disable hotplug for the pci-root controller. For example, in order to disable

[PATCH v7 3/4] qemu: command: add support to enable/disable hotplug on pci-root controller

2021-10-01 Thread Ani Sinha
This change adds qemu backend command line support for enabling or disabling hotplug on the pci-root controller using the 'target' sub-element of the pci-root controller as shown below: '' is only valid for pc (x86) machines and turns on the following command line option that is passed to

[PATCH v7 4/4] NEWS: release note the new hotplug enable/disable option on pci-root controller

2021-10-01 Thread Ani Sinha
A new 'target' subelement of the pci-root controller has been introduced having a 'hotplug' property. This proprty can be used to turn off or turn on hotplug capability of the devices plugged into the pci-root ports. This change release notes this feature for the next release. The new element can

[PATCH v7 1/4] qemu: capablities: detect presence of acpi-root-pci-hotplug for i440fx machines

2021-10-01 Thread Ani Sinha
The following change in qemu added support for a global boolean flag specific to i440fx machines that would turn off or on acpi based hotplug for pci root bus: 3d7e78aaf ("Introduce a new flag for i440fx to disable PCI hotplug on the root bus") The option is passed as "-global

[PATCH v7 0/4] Add support to enable/disable hotplug on pci-root controller

2021-10-01 Thread Ani Sinha
changelog: v7: rebased the patches post libvirt release 7.8. Adjusted NEWS.rst to reflect 7.9 (unreleased) version. Changed version info for new config option in formatdomain.rst as well. Added reviewed-by tags. Also in formatdomain.rst added information on what type of hotplug

Re: [PATCH] failover: allow to pause the VM during the migration

2021-10-01 Thread Daniel P . Berrangé
On Thu, Sep 30, 2021 at 04:17:44PM -0400, Laine Stump wrote: > On 9/30/21 1:09 PM, Laurent Vivier wrote: > > If we want to save a snapshot of a VM to a file, we used to follow the > > following steps: > > > > 1- stop the VM: > > (qemu) stop > > > > 2- migrate the VM to a file: > > (qemu)

Release of libvirt-7.8.0

2021-10-01 Thread Jiri Denemark
The 7.8.0 release of both libvirt and libvirt-python is tagged and signed tarballs and source RPMs are available at https://libvirt.org/sources/ https://libvirt.org/sources/python/ Thanks everybody who helped with this release by sending patches, reviewing, testing, or providing

Re: [PATCH] conf: fix block type CDROM cannot support startupPolicy

2021-10-01 Thread Peter Krempa
On Thu, Sep 30, 2021 at 09:58:46 +0800, Han Han wrote: > On Tue, Sep 28, 2021 at 10:43 AM Jie Wang wrote: > > > block type CDROM also support startupPolicy in the past, so > > > s/block/Block/ > > "in the past" could be more detailed. It's better if you tell from which > version to which

Re: [PATCH] failover: allow to pause the VM during the migration

2021-10-01 Thread Peter Krempa
On Thu, Sep 30, 2021 at 16:17:44 -0400, Laine Stump wrote: > On 9/30/21 1:09 PM, Laurent Vivier wrote: > > If we want to save a snapshot of a VM to a file, we used to follow the > > following steps: > > > > 1- stop the VM: > > (qemu) stop > > > > 2- migrate the VM to a file: > > (qemu)

[PATCH] virsh: Fix --nvram and --keep-nvram help strings

2021-10-01 Thread Michal Privoznik
The --nvram and --keep-nvram options of the undefine command can be used regardless of the domain status (the only consumer so far - qemuDomainUndefineFlags() doesn't care about the domain status). Yet, their corresponding help strings say something about inactive domains while manpage says