[PATCH] scripts: Fix the parameter of warning function
by luzhipeng
---
scripts/apibuild.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/apibuild.py b/scripts/apibuild.py
index bdd3077c48..99b16f47fa 100755
--- a/scripts/apibuild.py
+++ b/scripts/apibuild.py
@@ -317,7 +317,7 @@ class index:
if type in type_map:
type_map[type][name] = d
else:
- self.warning("Unable to register type ", type)
+ self.warning("Unable to register type %s" % type)
if name == debugsym and not quiet:
print("New symbol: %s" % (d))
--
2.34.0.windows.1
2 years, 8 months
[PATCH 0/3] qemu: Introduce 'manual' snapshot mode for storage providers not managed by libvirt
by Peter Krempa
Peter Krempa (3):
conf: snapshot: Introduce 'manual' mode for snapshot of a disk
qemuSnapshotCreateActiveExternal: Implement manual snapshot mode
kbase: Introduce 'snapshots' page and describe the new 'manual'
snapshot
docs/formatdomain.rst | 15 +++++-----
docs/formatsnapshot.rst | 9 ++++++
docs/kbase/index.rst | 3 ++
docs/kbase/meson.build | 1 +
docs/kbase/snapshots.rst | 53 +++++++++++++++++++++++++++++++++
docs/schemas/domainsnapshot.rng | 3 ++
src/conf/domain_conf.c | 1 +
src/conf/domain_conf.h | 1 +
src/conf/snapshot_conf.c | 6 ++++
src/qemu/qemu_snapshot.c | 24 +++++++++++----
src/test/test_driver.c | 17 +++++++++++
11 files changed, 121 insertions(+), 12 deletions(-)
create mode 100644 docs/kbase/snapshots.rst
--
2.35.1
2 years, 8 months
[libvirt PATCH] docs: downloads: fix link to libvirt GitLab group
by Ján Tomko
s/libvirt.org/libvirt/
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
docs/downloads.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Pushed as trivial.
diff --git a/docs/downloads.rst b/docs/downloads.rst
index d438166b78..e32fd1ba99 100644
--- a/docs/downloads.rst
+++ b/docs/downloads.rst
@@ -314,7 +314,7 @@ GIT source repository
---------------------
All modules maintained by the libvirt project have their primary source
-available in the `libvirt group on GitLab <https://gitlab.com/libvirt.org/>`__.
+available in the `libvirt group on GitLab <https://gitlab.com/libvirt/>`__.
Each module can be cloned anonymously using:
::
--
2.35.1
2 years, 8 months
[RFC patch 0/2] nwfilter: don't query netfilter inside transactions
by Nikolay Shirokovskiy
Hi, all.
In the process of fixing a corner case in nwfilter in case of libvirtd
crash I noticed the peculiar way it works for recursive removes/renames
of chains. So I proposing a change which is described in the second patch.
This is an RFC and as such is incomplete:
- only recursive removing is patched and renaming is not
- tests are not fixed
Nikolay Shirokovskiy (2):
utils: make virFirewallAddRuleFullV public
nwfilter: don't query netfilter inside transactions
src/libvirt_private.syms | 1 +
src/nwfilter/nwfilter_ebiptables_driver.c | 154 +++++++++++-----------
src/util/virfirewall.c | 2 +-
src/util/virfirewall.h | 7 +
4 files changed, 84 insertions(+), 80 deletions(-)
--
2.31.1
2 years, 8 months
[PATCH RESEND] virsh: Provide completer for vol-wipe algorithms
by Haonan Wang
Related issue: https://gitlab.com/libvirt/libvirt/-/issues/9
Signed-off-by: Haonan Wang <hnwanga1(a)gmail.com>
---
tools/virsh-completer-volume.c | 19 +++++++++++++++++++
tools/virsh-completer-volume.h | 6 ++++++
tools/virsh-volume.c | 3 +--
tools/virsh-volume.h | 3 +++
4 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/tools/virsh-completer-volume.c b/tools/virsh-completer-volume.c
index ac3c472177..bed45fa1ca 100644
--- a/tools/virsh-completer-volume.c
+++ b/tools/virsh-completer-volume.c
@@ -26,6 +26,7 @@
#include "virsh-pool.h"
#include "virsh.h"
#include "virstring.h"
+#include "virsh-volume.h"
char **
virshStorageVolNameCompleter(vshControl *ctl,
@@ -116,3 +117,21 @@ virshStorageVolKeyCompleter(vshControl *ctl,
virshStoragePoolListFree(list);
return ret;
}
+
+char **
+virshStorageVolWipeAlgorithmCompleter(vshControl *ctl G_GNUC_UNUSED,
+ const vshCmd *cmd G_GNUC_UNUSED,
+ unsigned int flags)
+{
+ char **ret = NULL;
+ size_t i;
+
+ virCheckFlags(0, NULL);
+
+ ret = g_new0(char *, VIR_STORAGE_VOL_WIPE_ALG_LAST + 1);
+
+ for (i = 0; i < VIR_STORAGE_VOL_WIPE_ALG_LAST; i++)
+ ret[i] = g_strdup(virshStorageVolWipeAlgorithmTypeToString(i));
+
+ return ret;
+}
diff --git a/tools/virsh-completer-volume.h b/tools/virsh-completer-volume.h
index dc6eeb4b3c..17e50f450d 100644
--- a/tools/virsh-completer-volume.h
+++ b/tools/virsh-completer-volume.h
@@ -33,3 +33,9 @@ char **
virshStorageVolKeyCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
+
+
+char **
+virshStorageVolWipeAlgorithmCompleter(vshControl *ctl,
+ const vshCmd *cmd,
+ unsigned int flags);
diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c
index d005602fe8..b6fa9555ad 100644
--- a/tools/virsh-volume.c
+++ b/tools/virsh-volume.c
@@ -902,12 +902,12 @@ static const vshCmdOptDef opts_vol_wipe[] = {
VIRSH_COMMON_OPT_POOL_OPTIONAL,
{.name = "algorithm",
.type = VSH_OT_STRING,
+ .completer = virshStorageVolWipeAlgorithmCompleter,
.help = N_("perform selected wiping algorithm")
},
{.name = NULL}
};
-VIR_ENUM_DECL(virshStorageVolWipeAlgorithm);
VIR_ENUM_IMPL(virshStorageVolWipeAlgorithm,
VIR_STORAGE_VOL_WIPE_ALG_LAST,
"zero", "nnsa", "dod", "bsi", "gutmann", "schneier",
@@ -950,7 +950,6 @@ cmdVolWipe(vshControl *ctl, const vshCmd *cmd)
}
-VIR_ENUM_DECL(virshStorageVol);
VIR_ENUM_IMPL(virshStorageVol,
VIR_STORAGE_VOL_LAST,
N_("file"),
diff --git a/tools/virsh-volume.h b/tools/virsh-volume.h
index 15cab0fd8c..32e5394f5c 100644
--- a/tools/virsh-volume.h
+++ b/tools/virsh-volume.h
@@ -33,3 +33,6 @@ virStorageVolPtr virshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd,
VIRSH_BYUUID | VIRSH_BYNAME)
extern const vshCmdDef storageVolCmds[];
+
+VIR_ENUM_DECL(virshStorageVolWipeAlgorithm);
+VIR_ENUM_DECL(virshStorageVol);
--
2.25.1
2 years, 8 months
[libvirt PATCH 0/3] docs: downloads: mark GitLab as the primary source
by Ján Tomko
Also remove links to gitweb interface on libvirt.org which
is no longer available.
Ján Tomko (3):
docs: downloads: remove links to libvirt.org mirrors
docs: downloads: remove reference to git://
docs: downloads: mark GitLab as the primary source
docs/downloads.rst | 106 +++++++++++++++++----------------------------
1 file changed, 40 insertions(+), 66 deletions(-)
--
2.35.1
2 years, 8 months
[libvirt] [PATCH RESEND v2 0/4] re-introduce <acpi-hotplug-bridge>
by Ani Sinha
Changelog:
v2 - rebased the patch series to latest master.
I am re-introducing the patchset for <acpi-hotplug-bridge> which got
reverted here few months back:
https://www.spinics.net/linux/fedora/libvir/msg224089.html
The reason for the reversal was that there seemed to be some
instability/issues around the use of the qemu commandline which this
patchset tries to support. In particular, some guest operating systems
did not like the way QEMU was trying to disable native hotplug on pcie
root ports. Subsequently, in QEMU 6.2, we have changed our mechanism
using which we disable native hotplug. As I understand, we do not have
any reported issues so far in 6.2 around this area. QEMU will enter a
soft feature freeze in the first week of march in prep for 7.0 release.
Libvirt is also entering a new release cycle phaze. Hence, I am
introducing this patchset early enough in the release cycles so that if
we do see any issues on the qemu side during the rc0, rc1 cycles and if
reversal of this patchset is again required, it can be done in time
before the next libvirt release end of March.
All the patches in this series had been previously reviewed. Some
subsequent fixes were made after my initial patches were pushed. I have
squashed all those fixes and consolidated them into four patches. I have
also updated the documentation to reflect the new changes from the QEMU
side and rebased my changes fixing the tests in the process.
What changed in QEMU post version 6.1 ?
=========================================
We have made basically two major changes in QEMU. First is this change:
(1) commit 211afe5c69b597acf85fdd577eb497f5be1ffbd8
Author: Julia Suvorova <jusual(a)redhat.com>
Date: Fri Nov 12 06:08:56 2021 -0500
hw/i386/acpi-build: Deny control on PCIe Native Hot-plug in _OSC
There are two ways to enable ACPI PCI Hot-plug:
* Disable the Hot-plug Capable bit on PCIe slots.
This was the first approach which led to regression [1-2], as
I/O space for a port is allocated only when it is hot-pluggable,
which is determined by HPC bit.
* Leave the HPC bit on and disable PCIe Native Hot-plug in _OSC
method.
This removes the (future) ability of hot-plugging switches with PCIe
Native hotplug since ACPI PCI Hot-plug only works with cold-plugged
bridges. If the user wants to explicitely use this feature, they can
disable ACPI PCI Hot-plug with:
--global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off
Change the bit in _OSC method so that the OS selects ACPI PCI Hot-plug
instead of PCIe Native.
[1] https://gitlab.com/qemu-project/qemu/-/issues/641
[2] https://bugzilla.redhat.com/show_bug.cgi?id=2006409
Signed-off-by: Julia Suvorova <jusual(a)redhat.com>
Signed-off-by: Igor Mammedov <imammedo(a)redhat.com>
Message-Id: <20211112110857.3116853-5-imammedo(a)redhat.com>
Reviewed-by: Ani Sinha <ani(a)anisinha.ca>
Reviewed-by: Michael S. Tsirkin <mst(a)redhat.com>
Signed-off-by: Michael S. Tsirkin <mst(a)redhat.com>
The patch description says it all. Instead of masking out the HPC bit in
pcie slots, we keep them turned on. Instead, we do not advertize native
hotplug capability for PCIE using _OSC control method. See section
6.2.11 in ACPI spec 6.2. At the same time, we turn on ACPI hotplug for
these slots so now the guest OS can select ACPI hotplug instead.
The second change is introduction of a property with which we keep the
existing behavior for pc-q35-6.1 machines. This means HPC bit is masked
and ACPI hotplug is enabled by default for pcie root ports.
The QEMU commit is:
(2) commit c318bef76206c2ecb6016e8e68c4ac6ff9a4c8cb
Author: Julia Suvorova <jusual(a)redhat.com>
Date: Fri Nov 12 06:08:54 2021 -0500
hw/acpi/ich9: Add compat prop to keep HPC bit set for 6.1 machine type
To solve issues [1-2] the Hot Plug Capable bit in PCIe Slots will be
turned on, while the switch to ACPI Hot-plug will be done in the
DSDT table.
Introducing 'x-keep-native-hpc' property disables the HPC bit only
in 6.1 and as a result keeps the forced 'reserve-io' on
pcie-root-ports in 6.1 too.
[1] https://gitlab.com/qemu-project/qemu/-/issues/641
[2] https://bugzilla.redhat.com/show_bug.cgi?id=2006409
Signed-off-by: Julia Suvorova <jusual(a)redhat.com>
Signed-off-by: Igor Mammedov <imammedo(a)redhat.com>
Message-Id: <20211112110857.3116853-3-imammedo(a)redhat.com>
Reviewed-by: Michael S. Tsirkin <mst(a)redhat.com>
Signed-off-by: Michael S. Tsirkin <mst(a)redhat.com>
Lastly, as a related side note, because from QEMU 6.2 onwards, we do not
mask out HPC bit in PCIE, the work done by this patch is no longer
needed:
(3) commit e2a6290aab578b2170c1f5909fa556385dc0d820
Author: Marcel Apfelbaum <marcel.apfelbaum(a)gmail.com>
Date: Mon Aug 2 12:00:57 2021 +0300
hw/pcie-root-port: Fix hotplug for PCI devices requiring IO
Q35 has now ACPI hotplug enabled by default for PCI(e) devices.
As opposed to native PCIe hotplug, guests like Fedora 34
will not assign IO range to pcie-root-ports not supporting
native hotplug, resulting into a regression.
Reproduce by:
qemu-bin -M q35 -device pcie-root-port,id=p1 -monitor stdio
device_add e1000,bus=p1
In the Guest OS the respective pcie-root-port will have the IO range
disabled.
Fix it by setting the "reserve-io" hint capability of the
pcie-root-ports so the firmware will allocate the IO range instead.
Acked-by: Igor Mammedov <imammedo(a)redhat.com>
Signed-off-by: Marcel Apfelbaum <marcel(a)redhat.com>
Message-Id: <20210802090057.1709775-1-marcel(a)redhat.com>
Reviewed-by: Michael S. Tsirkin <mst(a)redhat.com>
Signed-off-by: Michael S. Tsirkin <mst(a)redhat.com>
This is what commit (2) alludes to. In pc-q35-6.1 machines we do need
patch (3) since we mask out HPC bit from pcie ports.
I know this is convoluted mess. In fairness I am trying all I can in my
spare time to help from the QEMU side. I am determined to see this
patchset through into libvirt.
Thanks
Ani Sinha (4):
qemu: capablities: detect acpi-pci-hotplug-with-bridge-support
conf: introduce support for acpi-bridge-hotplug feature
qemu: command: add support for acpi-bridge-hotplug feature
NEWS: document new acpi pci hotplug config option
NEWS.rst | 8 ++
docs/formatdomain.rst | 32 +++++++
docs/schemas/domaincommon.rng | 15 ++++
src/conf/domain_conf.c | 89 ++++++++++++++++++-
src/conf/domain_conf.h | 9 ++
src/qemu/qemu_capabilities.c | 4 +
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_command.c | 19 ++++
src/qemu/qemu_validate.c | 42 +++++++++
.../caps_6.1.0.x86_64.xml | 1 +
.../caps_6.2.0.x86_64.xml | 1 +
.../caps_7.0.0.x86_64.xml | 1 +
...-hotplug-bridge-disable.aarch64-latest.err | 1 +
.../aarch64-acpi-hotplug-bridge-disable.xml | 13 +++
...-hotplug-bridge-disable.x86_64-latest.args | 35 ++++++++
.../pc-i440fx-acpi-hotplug-bridge-disable.xml | 36 ++++++++
.../pc-i440fx-acpi-hotplug-bridge-enable.xml | 36 ++++++++
...pi-hotplug-bridge-disable.x86_64-6.0.0.err | 1 +
...-hotplug-bridge-disable.x86_64-latest.args | 38 ++++++++
.../q35-acpi-hotplug-bridge-disable.xml | 53 +++++++++++
.../q35-acpi-hotplug-bridge-enable.xml | 53 +++++++++++
tests/qemuxml2argvtest.c | 7 ++
...i-hotplug-bridge-disable.x86_64-latest.xml | 1 +
...pi-hotplug-bridge-enable.x86_64-latest.xml | 1 +
...i-hotplug-bridge-disable.x86_64-latest.xml | 1 +
...pi-hotplug-bridge-enable.x86_64-latest.xml | 1 +
tests/qemuxml2xmltest.c | 4 +
27 files changed, 504 insertions(+), 1 deletion(-)
create mode 100644 tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.aarch64-latest.err
create mode 100644 tests/qemuxml2argvdata/aarch64-acpi-hotplug-bridge-disable.xml
create mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-disable.xml
create mode 100644 tests/qemuxml2argvdata/pc-i440fx-acpi-hotplug-bridge-enable.xml
create mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-6.0.0.err
create mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-disable.xml
create mode 100644 tests/qemuxml2argvdata/q35-acpi-hotplug-bridge-enable.xml
create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-disable.x86_64-latest.xml
create mode 120000 tests/qemuxml2xmloutdata/pc-i440fx-acpi-hotplug-bridge-enable.x86_64-latest.xml
create mode 120000 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-disable.x86_64-latest.xml
create mode 120000 tests/qemuxml2xmloutdata/q35-acpi-hotplug-bridge-enable.x86_64-latest.xml
--
2.25.1
2 years, 8 months
[PATCH] virsh: Provide completer for vol-wipe algorithms
by Haonan Wang
Related issue: https://gitlab.com/libvirt/libvirt/-/issues/9
Signed-off-by: Haonan Wang <hnwanga1(a)gmail.com>
---
tools/virsh-completer-volume.c | 20 ++++++++++++++++++++
tools/virsh-completer-volume.h | 6 ++++++
tools/virsh-volume.c | 3 +--
tools/virsh-volume.h | 3 +++
4 files changed, 30 insertions(+), 2 deletions(-)
diff --git a/tools/virsh-completer-volume.c b/tools/virsh-completer-volume.c
index ac3c472177..66b8828702 100644
--- a/tools/virsh-completer-volume.c
+++ b/tools/virsh-completer-volume.c
@@ -26,6 +26,7 @@
#include "virsh-pool.h"
#include "virsh.h"
#include "virstring.h"
+#include "virsh-volume.h"
char **
virshStorageVolNameCompleter(vshControl *ctl,
@@ -116,3 +117,22 @@ virshStorageVolKeyCompleter(vshControl *ctl,
virshStoragePoolListFree(list);
return ret;
}
+
+char**
+virshStorageVolWipeAlgorithmCompleter(vshControl *ctl G_GNUC_UNUSED,
+ const vshCmd *cmd G_GNUC_UNUSED,
+ unsigned int completerflags G_GNUC_UNUSED)
+{
+ size_t nalgorithms = VIR_STORAGE_VOL_WIPE_ALG_LAST;
+ size_t i = 0;
+ char **ret = NULL;
+ g_auto(GStrv) tmp = g_new0(char *, nalgorithms);
+
+ for (i = 0; i < nalgorithms; i++) {
+ const char *str = virshStorageVolWipeAlgorithmTypeToString(i);
+ tmp[i] = g_strdup(str);
+ }
+
+ ret = g_steal_pointer(&tmp);
+ return ret;
+}
diff --git a/tools/virsh-completer-volume.h b/tools/virsh-completer-volume.h
index dc6eeb4b3c..17e50f450d 100644
--- a/tools/virsh-completer-volume.h
+++ b/tools/virsh-completer-volume.h
@@ -33,3 +33,9 @@ char **
virshStorageVolKeyCompleter(vshControl *ctl,
const vshCmd *cmd,
unsigned int flags);
+
+
+char **
+virshStorageVolWipeAlgorithmCompleter(vshControl *ctl,
+ const vshCmd *cmd,
+ unsigned int flags);
diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c
index d005602fe8..b6fa9555ad 100644
--- a/tools/virsh-volume.c
+++ b/tools/virsh-volume.c
@@ -902,12 +902,12 @@ static const vshCmdOptDef opts_vol_wipe[] = {
VIRSH_COMMON_OPT_POOL_OPTIONAL,
{.name = "algorithm",
.type = VSH_OT_STRING,
+ .completer = virshStorageVolWipeAlgorithmCompleter,
.help = N_("perform selected wiping algorithm")
},
{.name = NULL}
};
-VIR_ENUM_DECL(virshStorageVolWipeAlgorithm);
VIR_ENUM_IMPL(virshStorageVolWipeAlgorithm,
VIR_STORAGE_VOL_WIPE_ALG_LAST,
"zero", "nnsa", "dod", "bsi", "gutmann", "schneier",
@@ -950,7 +950,6 @@ cmdVolWipe(vshControl *ctl, const vshCmd *cmd)
}
-VIR_ENUM_DECL(virshStorageVol);
VIR_ENUM_IMPL(virshStorageVol,
VIR_STORAGE_VOL_LAST,
N_("file"),
diff --git a/tools/virsh-volume.h b/tools/virsh-volume.h
index 15cab0fd8c..32e5394f5c 100644
--- a/tools/virsh-volume.h
+++ b/tools/virsh-volume.h
@@ -33,3 +33,6 @@ virStorageVolPtr virshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd,
VIRSH_BYUUID | VIRSH_BYNAME)
extern const vshCmdDef storageVolCmds[];
+
+VIR_ENUM_DECL(virshStorageVolWipeAlgorithm);
+VIR_ENUM_DECL(virshStorageVol);
--
2.25.1
2 years, 8 months