[PATCH] hw/arm/raspi: Remove deprecated raspi2/raspi3 aliases
by Philippe Mathieu-Daudé
Remove the raspi2/raspi3 machine aliases,
deprecated since commit 155e1c82ed0.
Signed-off-by: Philippe Mathieu-Daudé <f4bug(a)amsat.org>
---
docs/system/deprecated.rst | 7 -------
docs/system/removed-features.rst | 7 +++++++
hw/arm/raspi.c | 2 --
3 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index 80cae862528..7895bd4d849 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -238,13 +238,6 @@ this CPU is also deprecated.
System emulator machines
------------------------
-Raspberry Pi ``raspi2`` and ``raspi3`` machines (since 5.2)
-'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-The Raspberry Pi machines come in various models (A, A+, B, B+). To be able
-to distinguish which model QEMU is implementing, the ``raspi2`` and ``raspi3``
-machines have been renamed ``raspi2b`` and ``raspi3b``.
-
Device options
--------------
diff --git a/docs/system/removed-features.rst b/docs/system/removed-features.rst
index 29e90601a51..8a8b8ca627b 100644
--- a/docs/system/removed-features.rst
+++ b/docs/system/removed-features.rst
@@ -312,6 +312,13 @@ This machine has been renamed ``fuloong2e``.
These machine types were very old and likely could not be used for live
migration from old QEMU versions anymore. Use a newer machine type instead.
+Raspberry Pi ``raspi2`` and ``raspi3`` machines (removed in 6.1)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+The Raspberry Pi machines come in various models (A, A+, B, B+). To be able
+to distinguish which model QEMU is implementing, the ``raspi2`` and ``raspi3``
+machines have been renamed ``raspi2b`` and ``raspi3b``.
+
linux-user mode CPUs
--------------------
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index 990509d3852..20bba0316f1 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -342,7 +342,6 @@ static void raspi2b_machine_class_init(ObjectClass *oc, void *data)
MachineClass *mc = MACHINE_CLASS(oc);
RaspiMachineClass *rmc = RASPI_MACHINE_CLASS(oc);
- mc->alias = "raspi2";
rmc->board_rev = 0xa21041;
raspi_machine_class_common_init(mc, rmc->board_rev);
};
@@ -362,7 +361,6 @@ static void raspi3b_machine_class_init(ObjectClass *oc, void *data)
MachineClass *mc = MACHINE_CLASS(oc);
RaspiMachineClass *rmc = RASPI_MACHINE_CLASS(oc);
- mc->alias = "raspi3";
rmc->board_rev = 0xa02082;
raspi_machine_class_common_init(mc, rmc->board_rev);
};
--
2.26.3
3 years, 6 months
[PATCH 0/4] conf: Deduplicate NUMA distance code
by Michal Privoznik
While the number of saved lines is not that great, it prepares the code
for what I'm working on - exposing HMAT in capabilities XML. My idea is
to reuse XML formatters there too so that mgmt app can just take
whatever we produce in capabilities XML and paste it into domain XML.
Michal Prívozník (4):
capabilities: Rename siblings to distances
numa_conf: Rename virDomainNumaDistance to virNumaDistance
numa_conf: Expose virNumaDistance formatter
conf: Deduplicate NUMA distance code
src/conf/capabilities.c | 60 ++++++++++++++------------------
src/conf/capabilities.h | 13 +++----
src/conf/numa_conf.c | 63 ++++++++++++++++++----------------
src/conf/numa_conf.h | 10 ++++++
src/conf/virconftypes.h | 2 --
src/libvirt_private.syms | 1 +
src/libxl/libxl_capabilities.c | 20 +++++------
7 files changed, 83 insertions(+), 86 deletions(-)
--
2.26.3
3 years, 6 months
[PATCH 00/35] qemu: Implement support for transient disk hotplug and backing store sharing
by Peter Krempa
This series refactors the qemu disk hotplug code so that it can be
easily extended for hotplug of transient disks and then also used at
startup to plug in disks where the users want to share the backing
image.
Masayoshi Mizuma (1):
qemu_snapshot: Add the guest name to the transient disk path
Peter Krempa (34):
qemu: snapshot: Extract setup of snapshot disk definition for
transient disks
qemu: process: Setup transient disks only when starting a fresh VM
qemuSnapshotDiskPrepareOne: Pass in qemuSnapshotDiskContext
qemuSnapshotDiskContext: Store virQEMUDriverConfig in the struct
qemuSnapshotDiskPrepareOne: Use data from qemuSnapshotDiskContext
qemuSnapshotDiskCreate: Use 'cfg' from the qemuSnapshotDiskContext
qemu: snapshot: move transient snapshot code to qemu_process
qemu: Move 'bootindex' handling for disks out of command line
formatter
qemu: Move bootindex usage logic into qemuBuildDiskDeviceStr
qemuxml2argvtest: Remove pointless tests for keywrapping on s390
qemu: Move iothread and s390 address validation for disk devices into
the validator
Replace virDomainDiskInsertPreAlloced by virDomainDiskInsert
conf: remove virDomainDiskInsertPreAlloced
qemuBlockStorageSourceChainData: Add handling of 'copy-on-read' filter
layer
qemuDomainAttachDiskGeneric: Move 'copy-on-read' handling to
qemuBlockStorageSourceChainData
qemuDomainRemoveDiskDevice: Move 'copy-on-read' handling to
qemuBlockStorageSourceChainData
qemuDomainAttachDeviceDiskLiveInternal: Absorb
qemuDomainAttachUSBMassStorageDevice
qemuDomainAttachDeviceDiskLiveInternal: Absorb
qemuDomainAttachVirtioDiskDevice
qemuDomainAttachDeviceDiskLiveInternal: Absorb
qemuDomainAttachSCSIDisk
qemuDomainAttachDeviceDiskLiveInternal: Simplify call to
qemuDomainAttachDiskGeneric
qemuDomainAttachDiskGeneric: Move setup of disk into
qemuDomainAttachDeviceDiskLiveInternal
qemu: hotplug: Move post-insertion steps of disk hotplug to
qemuDomainAttachDeviceDiskLiveInternal
qemuDomainAttachDiskGeneric: Fix whitespace
qemuDomainAttachDiskGeneric: Refactor cleanup
qemuDomainAttachDiskGeneric: Move PR helper attach into
qemuDomainAttachDeviceDiskLiveInternal
qemuDomainAttachDiskGeneric: Refactor rollback handling
qemuDomainAttachDiskGeneric: Split up frontend and backend attachment
qemu: Track creation of <transient> disk overlay individually
qemuDomainAttachDiskGeneric: Implement hotplug of <transient> disk
qemuDomainAttachDiskGeneric: Pass the qemu async job type
qemuDomainAttachDiskGeneric: Export
conf: Introduce 'shareBacking' for <transient> disks
qemu: Allow <transient> disks with images shared accross VMs
tests: Add qemuxml2argv and qemuxml2xml test for <transient
shareBacking='yes'>
docs/formatdomain.rst | 6 +
docs/schemas/domaincommon.rng | 5 +
src/conf/domain_conf.c | 33 +-
src/conf/domain_conf.h | 3 +-
src/libvirt_private.syms | 1 -
src/libxl/libxl_driver.c | 4 +-
src/lxc/lxc_driver.c | 6 +-
src/qemu/qemu_block.c | 12 +
src/qemu/qemu_block.h | 4 +
src/qemu/qemu_command.c | 134 ++-----
src/qemu/qemu_command.h | 1 -
src/qemu/qemu_domain.c | 2 -
src/qemu/qemu_domain.h | 11 +-
src/qemu/qemu_hotplug.c | 335 +++++++++---------
src/qemu/qemu_hotplug.h | 6 +
src/qemu/qemu_process.c | 203 ++++++++++-
src/qemu/qemu_snapshot.c | 160 +++------
src/qemu/qemu_snapshot.h | 27 +-
src/qemu/qemu_validate.c | 73 ++++
.../disk-transient.x86_64-4.1.0.err | 2 +-
.../disk-transient.x86_64-latest.args | 4 +-
tests/qemuxml2argvdata/disk-transient.xml | 6 +
tests/qemuxml2argvtest.c | 8 -
.../disk-transient.x86_64-latest.xml | 48 +++
tests/qemuxml2xmltest.c | 3 +-
25 files changed, 644 insertions(+), 453 deletions(-)
create mode 100644 tests/qemuxml2xmloutdata/disk-transient.x86_64-latest.xml
--
2.31.1
3 years, 6 months
[PATCH] kbase: Fix broken link of migration doc
by Han Han
Signed-off-by: Han Han <hhan(a)redhat.com>
---
docs/kbase/index.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/kbase/index.rst b/docs/kbase/index.rst
index d483ca94de..91083ee49d 100644
--- a/docs/kbase/index.rst
+++ b/docs/kbase/index.rst
@@ -66,4 +66,4 @@ Internals / Debugging
`VM migration internals <migrationinternals.html>`__
VM migration implementation details, complementing the info in
- `migration <migration.html>`__
+ `migration <../migration.html>`__
--
2.31.1
3 years, 6 months
[libvirt PATCH v2 0/2] storage_driver: add support for cluster_size QCOW2 option
by Pavel Hrdina
Pavel Hrdina (2):
storage: add support for QCOW2 cluster_size option
storage_file: add support to probe cluster_size from QCOW2 images
docs/formatstorage.html.in | 6 ++
docs/schemas/storagecommon.rng | 7 ++
docs/schemas/storagevol.rng | 3 +
src/conf/storage_conf.c | 12 ++++
src/storage/storage_util.c | 8 +++
src/storage_file/storage_file_probe.c | 70 ++++++++++++++-----
.../qcow2-clusterSize.argv | 6 ++
tests/storagevolxml2argvtest.c | 4 ++
.../vol-qcow2-clusterSize.xml | 17 +++++
.../vol-qcow2-clusterSize.xml | 17 +++++
tests/storagevolxml2xmltest.c | 1 +
11 files changed, 134 insertions(+), 17 deletions(-)
create mode 100644 tests/storagevolxml2argvdata/qcow2-clusterSize.argv
create mode 100644 tests/storagevolxml2xmlin/vol-qcow2-clusterSize.xml
create mode 100644 tests/storagevolxml2xmlout/vol-qcow2-clusterSize.xml
--
2.31.1
3 years, 6 months
Qemu block filter insertion/removal API
by Vladimir Sementsov-Ogievskiy
Hi all!
I'd like to be sure that we know where we are going to.
In blockdev-era where qemu user is aware about block nodes, all nodes have good names and controlled by user we can efficiently use block filters.
We already have some useful filters: copy-on-read, throttling, compress. In my parallel series I make backup-top filter public and useful without backup block jobs. But now filters could be inserted only together with opening their child. We can specify filters in qemu cmdline, or filter can take place in the block node chain created by blockdev-add.
Still, it would be good to insert/remove filters on demand.
Currently we are going to use x-blockdev-reopen for this. Still it can't be used to insert a filter above root node (as x-blockdev-reopen can change only block node options and their children). In my series "[PATCH 00/21] block: publish backup-top filter" I propose (as Kevin suggested) to modify qom-set, so that it can set drive option of running device. That's not difficult, but it means that we have different scenario of inserting/removing filters:
1. filter above root node X:
inserting:
- do blockdev-add to add a filter (and specify X as its child)
- do qom-set to set new filter as a rood node instead of X
removing
- do qom-set to make X a root node again
- do blockdev-del to drop a filter
2. filter between two block nodes P and X. (For example, X is a backing child of P)
inserting
- do blockdev-add to add a filter (and specify X as its child)
- do blockdev-reopen to set P.backing = filter
remvoing
- do blockdev-reopen to set P.backing = X
- do blockdev-del to drop a filter
And, probably we'll want transaction support for all these things.
Is it OK? Or do we need some kind of additional blockdev-replace command, that can replace one node by another, so in both cases we will do
inserting:
- blockdev-add filter
- blockdev-replace (make all parents of X to point to the new filter instead (except for the filter itself of course)
removing
- blockdev-replace (make all parante of filter to be parents of X instead)
- blockdev-del filter
It's simple to implement, and it seems for me that it is simpler to use. Any thoughts?
--
Best regards,
Vladimir
3 years, 6 months
[PATCH v1] libxl: remove libxl_domain_build_info_init from libxlMakeDomBuildInfo
by Olaf Hering
The used libxl_domain_build_info, which is contained in
libxl_domain_config, is owned and already initialized by the caller.
Signed-off-by: Olaf Hering <olaf(a)aepfle.de>
---
src/libxl/libxl_conf.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 1fd0322b6a..3598ca395d 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -346,8 +346,6 @@ libxlMakeDomBuildInfo(virDomainDef *def,
size_t i;
size_t nusbdevice = 0;
- libxl_domain_build_info_init(b_info);
-
if (hvm) {
libxl_domain_build_info_init_type(b_info, LIBXL_DOMAIN_TYPE_HVM);
} else if (pvh) {
3 years, 6 months
[PATCH v1] libxl: remove libxl_domain_create_info_init from libxlMakeDomCreateInfo
by Olaf Hering
The passed libxl_domain_create_info is owned, and already initialized,
by the caller.
Signed-off-by: Olaf Hering <olaf(a)aepfle.de>
---
src/libxl/libxl_conf.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 8dc7e26cea..1fd0322b6a 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -129,8 +129,6 @@ libxlMakeDomCreateInfo(libxl_ctx *ctx,
{
char uuidstr[VIR_UUID_STRING_BUFLEN];
- libxl_domain_create_info_init(c_info);
-
if (def->os.type == VIR_DOMAIN_OSTYPE_HVM ||
def->os.type == VIR_DOMAIN_OSTYPE_XENPVH) {
#ifdef WITH_XEN_PVH
3 years, 6 months
[PATCH v2] libxl: adjust handling of libxl_device_disk objects
by Olaf Hering
libxl objects are supposed to be initialized and disposed.
Correct the usage of libxl_device_disk objects which are allocated on
the stack. Initialize each one prior usage, and dispose them once done.
Adjust libxlMakeDisk to use an already initialized object, it is owned
by the caller.
Adjust libxlMakeDiskList to initialize the list of objects, before they
are filled by libxlMakeDisk. In case of error, the objects are disposed
by libxl_domain_config_dispose.
Signed-off-by: Olaf Hering <olaf(a)aepfle.de>
---
src/libxl/libxl_conf.c | 20 +++++---------------
src/libxl/libxl_driver.c | 6 ++++++
2 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 3149ee3b4a..f29a28a841 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -1114,8 +1114,6 @@ libxlMakeDisk(virDomainDiskDef *l_disk, libxl_device_disk *x_disk)
int format = virDomainDiskGetFormat(l_disk);
int actual_type = virStorageSourceGetActualType(l_disk->src);
- libxl_device_disk_init(x_disk);
-
if (actual_type == VIR_STORAGE_TYPE_NETWORK) {
if (STRNEQ_NULLABLE(driver, "qemu")) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
@@ -1265,26 +1263,18 @@ libxlMakeDiskList(virDomainDef *def, libxl_domain_config *d_config)
{
virDomainDiskDef **l_disks = def->disks;
int ndisks = def->ndisks;
- libxl_device_disk *x_disks;
size_t i;
- x_disks = g_new0(libxl_device_disk, ndisks);
+ d_config->disks = g_new0(libxl_device_disk, ndisks);
+ d_config->num_disks = ndisks;
for (i = 0; i < ndisks; i++) {
- if (libxlMakeDisk(l_disks[i], &x_disks[i]) < 0)
- goto error;
+ libxl_device_disk_init(&d_config->disks[i]);
+ if (libxlMakeDisk(l_disks[i], &d_config->disks[i]) < 0)
+ return -1;
}
- d_config->disks = x_disks;
- d_config->num_disks = ndisks;
-
return 0;
-
- error:
- for (i = 0; i < ndisks; i++)
- libxl_device_disk_dispose(&x_disks[i]);
- VIR_FREE(x_disks);
- return -1;
}
/*
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index d54cd41785..2b844bb3b5 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -2978,6 +2978,7 @@ libxlDomainChangeEjectableMedia(virDomainObj *vm, virDomainDiskDef *disk)
size_t i;
int ret = -1;
+ libxl_device_disk_init(&x_disk);
for (i = 0; i < vm->def->ndisks; i++) {
if (vm->def->disks[i]->bus == disk->bus &&
STREQ(vm->def->disks[i]->dst, disk->dst)) {
@@ -3018,6 +3019,7 @@ libxlDomainChangeEjectableMedia(virDomainObj *vm, virDomainDiskDef *disk)
ret = 0;
cleanup:
+ libxl_device_disk_dispose(&x_disk);
virObjectUnref(cfg);
return ret;
}
@@ -3030,6 +3032,7 @@ libxlDomainAttachDeviceDiskLive(virDomainObj *vm, virDomainDeviceDef *dev)
libxl_device_disk x_disk;
int ret = -1;
+ libxl_device_disk_init(&x_disk);
switch (l_disk->device) {
case VIR_DOMAIN_DISK_DEVICE_CDROM:
ret = libxlDomainChangeEjectableMedia(vm, l_disk);
@@ -3091,6 +3094,7 @@ libxlDomainAttachDeviceDiskLive(virDomainObj *vm, virDomainDeviceDef *dev)
}
cleanup:
+ libxl_device_disk_dispose(&x_disk);
virObjectUnref(cfg);
return ret;
}
@@ -3329,6 +3333,7 @@ libxlDomainDetachDeviceDiskLive(virDomainObj *vm, virDomainDeviceDef *dev)
int idx;
int ret = -1;
+ libxl_device_disk_init(&x_disk);
switch (dev->data.disk->device) {
case VIR_DOMAIN_DISK_DEVICE_DISK:
if (dev->data.disk->bus == VIR_DOMAIN_DISK_BUS_XEN) {
@@ -3380,6 +3385,7 @@ libxlDomainDetachDeviceDiskLive(virDomainObj *vm, virDomainDeviceDef *dev)
}
cleanup:
+ libxl_device_disk_dispose(&x_disk);
virObjectUnref(cfg);
return ret;
}
3 years, 6 months
[PATCH v2] conf: Report alias name of the detached device in error
by Kristina Hanicova
This is v2 from:
https://listman.redhat.com/archives/libvir-list/2021-May/msg00481.html
I have reworked the code a bit to have only one error report
instead of multiple ones with different combinations of possible
matching items. Suggested by Laine.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1942367
Signed-off-by: Kristina Hanicova <khanicov(a)redhat.com>
---
src/conf/domain_conf.c | 67 ++++++++++++++++--------------------------
1 file changed, 25 insertions(+), 42 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b3ed3a9c5a..9631e40815 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -15645,6 +15645,12 @@ virDomainNetFindIdx(virDomainDef *def, virDomainNetDef *net)
VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI);
bool CCWAddrSpecified = virDomainDeviceAddressIsValid(&net->info,
VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW);
+ g_autofree char *addr = NULL;
+ const char *macAddr = _("(<null>)");
+ const char *alias = _("(<null>)");
+
+ if (MACAddrSpecified)
+ macAddr = virMacAddrFormat(&net->mac, mac);
for (i = 0; i < def->nnets; i++) {
if (MACAddrSpecified &&
@@ -15676,7 +15682,7 @@ virDomainNetFindIdx(virDomainDef *def, virDomainNetDef *net)
if (MACAddrSpecified) {
virReportError(VIR_ERR_OPERATION_FAILED,
_("multiple devices matching MAC address %s found"),
- virMacAddrFormat(&net->mac, mac));
+ macAddr);
} else {
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("multiple matching devices found"));
@@ -15688,47 +15694,24 @@ virDomainNetFindIdx(virDomainDef *def, virDomainNetDef *net)
matchidx = i;
}
- if (matchidx < 0) {
- if (MACAddrSpecified && PCIAddrSpecified) {
- virReportError(VIR_ERR_DEVICE_MISSING,
- _("no device matching MAC address %s found on "
- VIR_PCI_DEVICE_ADDRESS_FMT),
- virMacAddrFormat(&net->mac, mac),
- net->info.addr.pci.domain,
- net->info.addr.pci.bus,
- net->info.addr.pci.slot,
- net->info.addr.pci.function);
- } else if (MACAddrSpecified && CCWAddrSpecified) {
- virReportError(VIR_ERR_DEVICE_MISSING,
- _("no device matching MAC address %s found on "
- VIR_CCW_DEVICE_ADDRESS_FMT),
- virMacAddrFormat(&net->mac, mac),
- net->info.addr.ccw.cssid,
- net->info.addr.ccw.ssid,
- net->info.addr.ccw.devno);
- } else if (PCIAddrSpecified) {
- virReportError(VIR_ERR_DEVICE_MISSING,
- _("no device found on " VIR_PCI_DEVICE_ADDRESS_FMT),
- net->info.addr.pci.domain,
- net->info.addr.pci.bus,
- net->info.addr.pci.slot,
- net->info.addr.pci.function);
- } else if (CCWAddrSpecified) {
- virReportError(VIR_ERR_DEVICE_MISSING,
- _("no device found on " VIR_CCW_DEVICE_ADDRESS_FMT),
- net->info.addr.ccw.cssid,
- net->info.addr.ccw.ssid,
- net->info.addr.ccw.devno);
- } else if (MACAddrSpecified) {
- virReportError(VIR_ERR_DEVICE_MISSING,
- _("no device matching MAC address %s found"),
- virMacAddrFormat(&net->mac, mac));
- } else {
- virReportError(VIR_ERR_DEVICE_MISSING, "%s",
- _("no matching device found"));
- }
- }
- return matchidx;
+ if (matchidx >= 0)
+ return matchidx;
+
+ if (net->info.alias)
+ alias = net->info.alias;
+
+ if (CCWAddrSpecified)
+ addr = virDomainCCWAddressAsString(&net->info.addr.ccw);
+ else if (PCIAddrSpecified)
+ addr = virPCIDeviceAddressAsString(&net->info.addr.pci);
+ else
+ addr = g_strdup(_("(<null>)"));
+
+ virReportError(VIR_ERR_DEVICE_MISSING,
+ _("no device found at address '%s' matching MAC address"
+ " '%s' and alias '%s'"),
+ addr, macAddr, alias);
+ return -1;
}
bool
--
2.31.1
3 years, 6 months