[PATCH for-9.0] docs/about: Mark the iaspc machine type as deprecated
by Igor Mammedov
ISAPC machine was introduced 25 years ago and it's a lot of time since
such machine was around with real ISA only PC hardware practically defunct.
Also it's slowly bit-rots (for example: I was able to boot RHEL6 on RHEL9 host
in only TCG mode, while in KVM mode it hung in the middle of boot)
Rather than spending time on fixing 'the oldest' no longer tested machine type,
deprecate it so we can clean up QEMU code from legacy fixups and hopefully
make it easier to follow.
Folks who have to use ancient guest that requires ISAPC can still
use older QEMU to play with it.
Signed-off-by: Igor Mammedov <imammedo(a)redhat.com>
---
docs/about/deprecated.rst | 7 +++++++
hw/i386/pc_piix.c | 1 +
2 files changed, 8 insertions(+)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 7b548519b5..5708296991 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -226,6 +226,13 @@ These old machine types are quite neglected nowadays and thus might have
various pitfalls with regards to live migration. Use a newer machine type
instead.
+``isapc`` (since 9.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+These old machine type are quite neglected nowadays and thus might have
+various pitfalls with regards to live migration. Use a newer machine type
+instead.
+
Nios II ``10m50-ghrd`` and ``nios2-generic-nommu`` machines (since 8.2)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 18ba076609..96f72384dd 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -921,6 +921,7 @@ static void isapc_machine_options(MachineClass *m)
m->default_nic = "ne2k_isa";
m->default_cpu_type = X86_CPU_TYPE_NAME("486");
m->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL);
+ m->deprecation_reason = "old and unattended - use a newer version instead";
}
DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa,
--
2.43.0
1 month, 2 weeks
[PATCH v2 1/1] remote: properly initialize objects in ACL helpers
by Denis V. Lunev
Commit 2ecdf259299813c2c674377e22a0acbce5ccbbb2 was intended to
implement two things: reduce stack usage inside ACL helpers and
minimally initialize virDomainDef object to avoid passing garbage
inside validation framework. Though original commit has not
touched other ACL helpers.
This patch adds proper clauses to
remoteRelayNetworkEventCheckACL
remoteRelayStoragePoolEventCheckACL
remoteRelayNodeDeviceEventCheckACL
remoteRelaySecretEventCheckACL
Signed-off-by: Denis V. Lunev <den(a)openvz.org>
CC: Peter Krempa <pkrempa(a)redhat.com>
CC: Roman Grigoriev <rgrigoriev(a)astralinux.ru>
---
src/remote/remote_daemon_dispatch.c | 32 ++++++++++++++---------------
1 file changed, 16 insertions(+), 16 deletions(-)
Changes from v1:
* g_autoptr is replaced with g_autofree upon reached consensus
* patch 1 in series has been dropped
diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c
index aaabd1e56c..b566a510b8 100644
--- a/src/remote/remote_daemon_dispatch.c
+++ b/src/remote/remote_daemon_dispatch.c
@@ -180,21 +180,21 @@ static bool
remoteRelayNetworkEventCheckACL(virNetServerClient *client,
virConnectPtr conn, virNetworkPtr net)
{
- virNetworkDef def;
+ g_autofree virNetworkDef *def = g_new0(virNetworkDef, 1);
g_autoptr(virIdentity) identity = NULL;
bool ret = false;
/* For now, we just create a virNetworkDef with enough contents to
* satisfy what viraccessdriverpolkit.c references. This is a bit
* fragile, but I don't know of anything better. */
- def.name = net->name;
- memcpy(def.uuid, net->uuid, VIR_UUID_BUFLEN);
+ def->name = net->name;
+ memcpy(def->uuid, net->uuid, VIR_UUID_BUFLEN);
if (!(identity = virNetServerClientGetIdentity(client)))
goto cleanup;
if (virIdentitySetCurrent(identity) < 0)
goto cleanup;
- ret = virConnectNetworkEventRegisterAnyCheckACL(conn, &def);
+ ret = virConnectNetworkEventRegisterAnyCheckACL(conn, def);
cleanup:
ignore_value(virIdentitySetCurrent(NULL));
@@ -206,21 +206,21 @@ remoteRelayStoragePoolEventCheckACL(virNetServerClient *client,
virConnectPtr conn,
virStoragePoolPtr pool)
{
- virStoragePoolDef def;
+ g_autofree virStoragePoolDef *def = g_new0(virStoragePoolDef, 1);
g_autoptr(virIdentity) identity = NULL;
bool ret = false;
/* For now, we just create a virStoragePoolDef with enough contents to
* satisfy what viraccessdriverpolkit.c references. This is a bit
* fragile, but I don't know of anything better. */
- def.name = pool->name;
- memcpy(def.uuid, pool->uuid, VIR_UUID_BUFLEN);
+ def->name = pool->name;
+ memcpy(def->uuid, pool->uuid, VIR_UUID_BUFLEN);
if (!(identity = virNetServerClientGetIdentity(client)))
goto cleanup;
if (virIdentitySetCurrent(identity) < 0)
goto cleanup;
- ret = virConnectStoragePoolEventRegisterAnyCheckACL(conn, &def);
+ ret = virConnectStoragePoolEventRegisterAnyCheckACL(conn, def);
cleanup:
ignore_value(virIdentitySetCurrent(NULL));
@@ -232,20 +232,20 @@ remoteRelayNodeDeviceEventCheckACL(virNetServerClient *client,
virConnectPtr conn,
virNodeDevicePtr dev)
{
- virNodeDeviceDef def;
+ g_autofree virNodeDeviceDef *def = g_new0(virNodeDeviceDef, 1);
g_autoptr(virIdentity) identity = NULL;
bool ret = false;
/* For now, we just create a virNodeDeviceDef with enough contents to
* satisfy what viraccessdriverpolkit.c references. This is a bit
* fragile, but I don't know of anything better. */
- def.name = dev->name;
+ def->name = dev->name;
if (!(identity = virNetServerClientGetIdentity(client)))
goto cleanup;
if (virIdentitySetCurrent(identity) < 0)
goto cleanup;
- ret = virConnectNodeDeviceEventRegisterAnyCheckACL(conn, &def);
+ ret = virConnectNodeDeviceEventRegisterAnyCheckACL(conn, def);
cleanup:
ignore_value(virIdentitySetCurrent(NULL));
@@ -257,22 +257,22 @@ remoteRelaySecretEventCheckACL(virNetServerClient *client,
virConnectPtr conn,
virSecretPtr secret)
{
- virSecretDef def;
+ g_autofree virSecretDef *def = g_new0(virSecretDef, 1);
g_autoptr(virIdentity) identity = NULL;
bool ret = false;
/* For now, we just create a virSecretDef with enough contents to
* satisfy what viraccessdriverpolkit.c references. This is a bit
* fragile, but I don't know of anything better. */
- memcpy(def.uuid, secret->uuid, VIR_UUID_BUFLEN);
- def.usage_type = secret->usageType;
- def.usage_id = secret->usageID;
+ memcpy(def->uuid, secret->uuid, VIR_UUID_BUFLEN);
+ def->usage_type = secret->usageType;
+ def->usage_id = secret->usageID;
if (!(identity = virNetServerClientGetIdentity(client)))
goto cleanup;
if (virIdentitySetCurrent(identity) < 0)
goto cleanup;
- ret = virConnectSecretEventRegisterAnyCheckACL(conn, &def);
+ ret = virConnectSecretEventRegisterAnyCheckACL(conn, def);
cleanup:
ignore_value(virIdentitySetCurrent(NULL));
--
2.40.1
1 month, 2 weeks
[PATCH 0/3] qemu: Improve support for usb-net devices
by Rayhan Faizel
Though usb-net is not explicitly supported, it is already possible to use
usb-net devices directly with libvirt (Simply by setting model type as
'usb-net' and manually providing a USB address)
This patch series intends to fill in some remaining gaps.
1. Re-add usb-net capability
2. Automatic USB address assignment
3. New testcase
Fixes: https://gitlab.com/libvirt/libvirt/-/issues/14
Rayhan Faizel (3):
qemu_capabilities: Re-add QEMU_CAPS_DEVICE_USB_NET capability
conf: Improve parsing of usb-net devices
tests: Add testcase for usb-net
docs/formatdomain.rst | 2 +-
src/conf/domain_conf.c | 9 ++++-
src/qemu/qemu_capabilities.c | 3 +-
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_domain_address.c | 5 +++
.../caps_4.2.0_aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.2.0_ppc64.xml | 1 +
.../caps_4.2.0_x86_64.xml | 1 +
.../caps_5.0.0_aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_5.0.0_ppc64.xml | 1 +
.../caps_5.0.0_riscv64.xml | 1 +
.../caps_5.0.0_x86_64.xml | 1 +
.../caps_5.1.0_x86_64.xml | 1 +
.../caps_5.2.0_aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_5.2.0_ppc64.xml | 1 +
.../caps_5.2.0_riscv64.xml | 1 +
.../caps_5.2.0_x86_64.xml | 1 +
.../caps_6.0.0_aarch64.xml | 1 +
.../caps_6.0.0_x86_64.xml | 1 +
.../caps_6.1.0_x86_64.xml | 1 +
.../caps_6.2.0_aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_6.2.0_ppc64.xml | 1 +
.../caps_6.2.0_x86_64.xml | 1 +
.../caps_7.0.0_aarch64+hvf.xml | 1 +
.../caps_7.0.0_aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_7.0.0_ppc64.xml | 1 +
.../caps_7.0.0_x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_7.1.0_ppc64.xml | 1 +
.../caps_7.1.0_x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_7.2.0_ppc.xml | 1 +
.../caps_7.2.0_x86_64+hvf.xml | 1 +
.../caps_7.2.0_x86_64.xml | 1 +
.../caps_8.0.0_riscv64.xml | 1 +
.../caps_8.0.0_x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_8.1.0_s390x.xml | 1 +
.../caps_8.1.0_x86_64.xml | 1 +
.../caps_8.2.0_aarch64.xml | 1 +
.../caps_8.2.0_armv7l.xml | 1 +
.../caps_8.2.0_loongarch64.xml | 1 +
.../qemucapabilitiesdata/caps_8.2.0_s390x.xml | 1 +
.../caps_8.2.0_x86_64.xml | 1 +
.../caps_9.0.0_x86_64.xml | 1 +
.../net-usb.x86_64-latest.args | 35 +++++++++++++++++++
.../qemuxmlconfdata/net-usb.x86_64-latest.xml | 35 +++++++++++++++++++
tests/qemuxmlconfdata/net-usb.xml | 20 +++++++++++
tests/qemuxmlconftest.c | 1 +
46 files changed, 145 insertions(+), 4 deletions(-)
create mode 100644 tests/qemuxmlconfdata/net-usb.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/net-usb.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/net-usb.xml
--
2.34.1
1 month, 2 weeks
[PATCH 0/2] virsh: Improve console functionality
by Andrea Bolognani
*** APRIL BLURBS ***
Andrea Bolognani (2):
virsh: Show 'connected to console' message later
virsh: Display more empathy towards inconsolable VMs :(
tools/virsh-console.c | 24 +++++++++++++++++-------
tools/virsh-domain.c | 7 -------
2 files changed, 17 insertions(+), 14 deletions(-)
--
2.44.0
1 month, 2 weeks
[PATCH] security: Ensure kernel/initrd exist before restoring label
by Jim Fehlig
When performing an install, it's common for tooling such as virt-install
to remove the install kernel/initrd once they are successfully booted and
the domain has been redefined to boot without them. After the installation
is complete and the domain is rebooted/shutdown, the DAC and selinux
security drivers attempt to restore labels on the now deleted files. It's
harmles wrt functionality, but results in error messages such as
Mar 08 12:40:37 virtqemud[5639]: internal error: child reported (status=125): unable to stat: /var/lib/libvirt/boot/vir>
Mar 08 12:40:37 virtqemud[5639]: unable to stat: /var/lib/libvirt/boot/virtinst-yvp19moo-linux: No such file or directo>
Mar 08 12:40:37 virtqemud[5639]: Unable to run security manager transaction
Avoid the messages by checking if the kernel and initrd still exist before
including them in the restore label transaction.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/security/security_dac.c | 4 ++--
src/security/security_selinux.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/security/security_dac.c b/src/security/security_dac.c
index 4b8130630f..be606c6f33 100644
--- a/src/security/security_dac.c
+++ b/src/security/security_dac.c
@@ -1993,11 +1993,11 @@ virSecurityDACRestoreAllLabel(virSecurityManager *mgr,
rc = -1;
}
- if (def->os.kernel &&
+ if (def->os.kernel && virFileExists(def->os.kernel) &&
virSecurityDACRestoreFileLabel(mgr, def->os.kernel) < 0)
rc = -1;
- if (def->os.initrd &&
+ if (def->os.initrd && virFileExists(def->os.initrd) &&
virSecurityDACRestoreFileLabel(mgr, def->os.initrd) < 0)
rc = -1;
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index ffad058d9a..b21986cb7e 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -2915,11 +2915,11 @@ virSecuritySELinuxRestoreAllLabel(virSecurityManager *mgr,
rc = -1;
}
- if (def->os.kernel &&
+ if (def->os.kernel && virFileExists(def->os.kernel) &&
virSecuritySELinuxRestoreFileLabel(mgr, def->os.kernel, true) < 0)
rc = -1;
- if (def->os.initrd &&
+ if (def->os.initrd && virFileExists(def->os.initrd) &&
virSecuritySELinuxRestoreFileLabel(mgr, def->os.initrd, true) < 0)
rc = -1;
--
2.44.0
1 month, 2 weeks