[PATCH] qemu_namespace: Fix detection of nested mount points
by Michal Privoznik
When deciding whether to bind mount a path in domain's namespace,
we look at the QEMU mount table (/proc/$pid/mounts) and try to
match prefix of given path with one of mount points. Well, we
do that in a bit clumsy way. For instance, if there's
"/dev/hugepages" already mounted inside the namespace and we are
deciding whether to bind mount "/dev/hugepages1G/..." we decide
to skip over the path and NOT bind mount it. This is because
plain STRPREFIX() is used and yes, the former is prefix of the
latter. What we need to check also is whether the next character
after the prefix is slash.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_namespace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c
index fb79460109..fc348c043e 100644
--- a/src/qemu/qemu_namespace.c
+++ b/src/qemu/qemu_namespace.c
@@ -1264,9 +1264,11 @@ qemuNamespacePrepareOneItem(qemuNamespaceMknodData *data,
bool found = false;
for (n = devMountsPath; n && *n; n++) {
+ const char *p;
+
if (STREQ(*n, "/dev"))
continue;
- if (STRPREFIX(item.file, *n)) {
+ if ((p = STRSKIP(item.file, *n)) && *p == '/') {
found = true;
break;
}
--
2.38.2
1 year, 10 months
[PATCH v1 0/7] qemu_capabilities: Report Hyper-V Enlightenments in domcapabilities
by Michal Privoznik
Michal Prívozník (7):
domain_capabilities:
s/qemuDomainCapsFeatureFormatSimple/virDomainCapsFeatureFormatSimple/
qemu_capabilities: Decrease scope of @hash in
virQEMUCapsProbeQMPHostCPU()
qemuMonitorJSONMakeCPUModel: Introduce @hv_passthrough argument
qemuMonitorJSONGetCPUModelExpansion: Introduce @hv_passthrough
argument
qemu_capabilities: Query for Hyper-V Enlightenments
domain_capabilities: Expose Hyper-V Enlightenments
qemu_capabilities: Report Hyper-V Enlightenments in domcapabilities
docs/formatdomaincaps.rst | 15 +
src/conf/domain_capabilities.c | 28 +-
src/conf/domain_capabilities.h | 8 +
src/conf/schemas/domaincaps.rng | 10 +
src/qemu/qemu_capabilities.c | 86 ++++-
src/qemu/qemu_driver.c | 3 +-
src/qemu/qemu_monitor.c | 5 +-
src/qemu/qemu_monitor.h | 1 +
src/qemu/qemu_monitor_json.c | 21 +-
src/qemu/qemu_monitor_json.h | 1 +
tests/cputest.c | 2 +-
.../domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 1 +
.../qemu_4.2.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 1 +
.../qemu_5.0.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_5.0.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_5.0.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.1.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_5.1.0.sparc.xml | 1 +
tests/domaincapsdata/qemu_5.1.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.2.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml | 1 +
.../qemu_5.2.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_5.2.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_5.2.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_5.2.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_5.2.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_6.0.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml | 1 +
.../qemu_6.0.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_6.0.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_6.0.0.s390x.xml | 1 +
tests/domaincapsdata/qemu_6.0.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_6.1.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_6.1.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_6.2.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml | 1 +
.../qemu_6.2.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_6.2.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_6.2.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_6.2.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_7.0.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml | 1 +
.../qemu_7.0.0-virt.aarch64.xml | 1 +
tests/domaincapsdata/qemu_7.0.0.aarch64.xml | 1 +
tests/domaincapsdata/qemu_7.0.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_7.0.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_7.1.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_7.1.0.ppc64.xml | 1 +
tests/domaincapsdata/qemu_7.1.0.x86_64.xml | 1 +
.../domaincapsdata/qemu_7.2.0-q35.x86_64.xml | 1 +
.../domaincapsdata/qemu_7.2.0-tcg.x86_64.xml | 1 +
tests/domaincapsdata/qemu_7.2.0.x86_64.xml | 1 +
.../caps_4.2.0.aarch64.replies | 45 +++
.../caps_4.2.0.x86_64.replies | 317 ++++++++++++++++
.../caps_5.0.0.aarch64.replies | 46 +++
.../caps_5.0.0.x86_64.replies | 318 ++++++++++++++++
.../caps_5.1.0.x86_64.replies | 323 ++++++++++++++++
.../caps_5.2.0.aarch64.replies | 47 +++
.../caps_5.2.0.x86_64.replies | 324 ++++++++++++++++
.../caps_6.0.0.aarch64.replies | 47 +++
.../caps_6.0.0.x86_64.replies | 336 +++++++++++++++++
.../caps_6.1.0.x86_64.replies | 338 +++++++++++++++++
.../caps_6.2.0.aarch64.replies | 47 +++
.../caps_6.2.0.x86_64.replies | 348 +++++++++++++++++
.../caps_7.0.0.aarch64.replies | 48 +++
.../caps_7.0.0.x86_64.replies | 352 +++++++++++++++++
.../caps_7.1.0.x86_64.replies | 353 ++++++++++++++++++
.../caps_7.2.0.x86_64.replies | 353 ++++++++++++++++++
79 files changed, 3850 insertions(+), 24 deletions(-)
--
2.38.2
1 year, 10 months
[PATCH 0/7] qemu: Cleanup code around TPM seclabels
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (7):
qemu_security: Rework qemuSecurityCleanupTPMEmulator()
qemu_security: Rename qemuSecurityCleanupTPMEmulator()
qemu_security: Introduce qemuSecuritySetTPMLabels()
qemu_tpm: Restore TPM labels on failed start
qemu_tpm: Open code qemuSecurityStartTPMEmulator()
qemu_security: Drop qemuSecurityStartTPMEmulator()
docs: Recommend static seclabels for migration on shared storage
docs/drvqemu.rst | 7 ++++
src/qemu/qemu_security.c | 90 ++++++++++------------------------------
src/qemu/qemu_security.h | 17 +++-----
src/qemu/qemu_tpm.c | 15 ++++---
4 files changed, 43 insertions(+), 86 deletions(-)
--
2.38.2
1 year, 10 months
[PATCH v2] i386: Deprecate the -no-hpet QEMU command line option
by Thomas Huth
The HPET setting has been turned into a machine property a while ago
already, so we should finally do the next step and deprecate the
legacy CLI option, too.
Signed-off-by: Thomas Huth <thuth(a)redhat.com>
---
v2:
- Rebased to current version from master branch / adjusted version info
- Dropped the descrpition in hw/i386/pc.c (already done via another patch)
Note: The "hpet" property should now show up in the output of the
"query-command-line-options" QMP command since commit 2f129fc107b4a, so
it should be feasible for libvirt now to properly probe for the property .
docs/about/deprecated.rst | 6 ++++++
softmmu/vl.c | 1 +
qemu-options.hx | 2 +-
3 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 93affe3669..2ae6a79b21 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -114,6 +114,12 @@ form is preferred.
Using ``-drive if=none`` to configure the OTP device of the sifive_u
RISC-V machine is deprecated. Use ``-drive if=pflash`` instead.
+``-no-hpet`` (since 8.0)
+''''''''''''''''''''''''
+
+The HPET setting has been turned into a machine property.
+Use ``-machine hpet=off`` instead.
+
QEMU Machine Protocol (QMP) commands
------------------------------------
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 798e1dc933..9bd0e52d01 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3259,6 +3259,7 @@ void qemu_init(int argc, char **argv)
qdict_put_str(machine_opts_dict, "acpi", "off");
break;
case QEMU_OPTION_no_hpet:
+ warn_report("-no-hpet is deprecated, use '-machine hpet=off' instead");
qdict_put_str(machine_opts_dict, "hpet", "off");
break;
case QEMU_OPTION_no_reboot:
diff --git a/qemu-options.hx b/qemu-options.hx
index 7f99d15b23..a3adb4163e 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2542,7 +2542,7 @@ DEF("no-hpet", 0, QEMU_OPTION_no_hpet,
"-no-hpet disable HPET\n", QEMU_ARCH_I386)
SRST
``-no-hpet``
- Disable HPET support.
+ Disable HPET support. Deprecated, use '-machine hpet=off' instead.
ERST
DEF("acpitable", HAS_ARG, QEMU_OPTION_acpitable,
--
2.31.1
1 year, 10 months
[PATCH 0/3] qemu: Add caps test data for qemu-8.0 cycle and prepare for deprecation of -no-hpet
by Peter Krempa
Peter Krempa (3):
tests: qemucapabilitiesdata: Add test data for the qemu-8.0 dev cycle
qemu: capabilities: Introduce QEMU_CAPS_MACHINE_HPET capability
qemu: Use '-machine hpet=off' instead of '-no-hpet'
src/qemu/qemu_capabilities.c | 9 +
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_command.c | 29 +-
.../domaincapsdata/qemu_8.0.0-q35.x86_64.xml | 253 +
.../domaincapsdata/qemu_8.0.0-tcg.x86_64.xml | 252 +
tests/domaincapsdata/qemu_8.0.0.x86_64.xml | 253 +
.../caps_8.0.0.x86_64.replies | 39227 ++++++++++++++++
.../caps_8.0.0.x86_64.xml | 3253 ++
.../q35-virt-manager-basic.x86_64-latest.args | 3 +-
.../x86_64-pc-graphics.x86_64-latest.args | 3 +-
.../x86_64-pc-headless.x86_64-latest.args | 3 +-
.../x86_64-q35-graphics.x86_64-latest.args | 3 +-
.../x86_64-q35-headless.x86_64-latest.args | 3 +-
13 files changed, 43283 insertions(+), 11 deletions(-)
create mode 100644 tests/domaincapsdata/qemu_8.0.0-q35.x86_64.xml
create mode 100644 tests/domaincapsdata/qemu_8.0.0-tcg.x86_64.xml
create mode 100644 tests/domaincapsdata/qemu_8.0.0.x86_64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_8.0.0.x86_64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml
--
2.38.1
1 year, 10 months
[PATCH 0/4] Check that max_clients is not less than max_anonymous_clients
by Martin Kletzander
One check is there, but there ought to be more.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2033879
Martin Kletzander (4):
Fix test case to actually test something
tests: Check error message in virnetdaemontest
rpc: Fix error message in virNetServerSetClientLimits
rpc: Check client limits in more places
src/rpc/virnetserver.c | 19 ++++++++++--
...nput-data-client-auth-pending-failure.json | 4 +--
...nput-data-invalid-max-clients-failure.json | 31 +++++++++++++++++++
.../output-data-anon-clients.err | 1 +
...utput-data-client-auth-pending-failure.err | 1 +
...utput-data-invalid-max-clients-failure.err | 1 +
tests/virnetdaemontest.c | 20 +++++++-----
7 files changed, 64 insertions(+), 13 deletions(-)
create mode 100644 tests/virnetdaemondata/input-data-invalid-max-clients-failure.json
create mode 100644 tests/virnetdaemondata/output-data-anon-clients.err
create mode 100644 tests/virnetdaemondata/output-data-client-auth-pending-failure.err
create mode 100644 tests/virnetdaemondata/output-data-invalid-max-clients-failure.err
--
2.39.0
1 year, 10 months