[PATCH v3 08/22] hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine
by Philippe Mathieu-Daudé
The pc-i440fx-2.1 machine was deprecated for the 8.2
release (see commit c7437f0ddb "docs/about: Mark the
old pc-i440fx-2.0 - 2.3 machine types as deprecated"),
time to remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd(a)linaro.org>
Reviewed-by: Thomas Huth <thuth(a)redhat.com>
Message-Id: <20240305134221.30924-7-philmd(a)linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu(a)intel.com>
---
docs/about/deprecated.rst | 4 ++--
docs/about/removed-features.rst | 2 +-
include/hw/i386/pc.h | 3 ---
hw/i386/pc.c | 7 -------
hw/i386/pc_piix.c | 23 -----------------------
5 files changed, 3 insertions(+), 36 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index ef4ad16d41..689cf3cead 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -219,8 +219,8 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name
better reflects the way this property affects all random data within
the device tree blob, not just the ``kaslr-seed`` node.
-``pc-i440fx-2.1`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.7`` (since 9.1)
-'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+``pc-i440fx-2.2`` and ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.7`` (since 9.1)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
These old machine types are quite neglected nowadays and thus might have
various pitfalls with regards to live migration. Use a newer machine type
diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst
index 51119e623f..01c55103d3 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -816,7 +816,7 @@ mips ``fulong2e`` machine alias (removed in 6.0)
This machine has been renamed ``fuloong2e``.
-``pc-0.10`` up to ``pc-i440fx-2.0`` (removed in 4.0 up to 9.0)
+``pc-0.10`` up to ``pc-i440fx-2.1`` (removed in 4.0 up to 9.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
These machine types were very old and likely could not be used for live
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 4ad724601a..b528f17904 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -281,9 +281,6 @@ extern const size_t pc_compat_2_3_len;
extern GlobalProperty pc_compat_2_2[];
extern const size_t pc_compat_2_2_len;
-extern GlobalProperty pc_compat_2_1[];
-extern const size_t pc_compat_2_1_len;
-
#define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \
{ \
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 172814f604..cd6335d6b4 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -304,13 +304,6 @@ GlobalProperty pc_compat_2_2[] = {
};
const size_t pc_compat_2_2_len = G_N_ELEMENTS(pc_compat_2_2);
-GlobalProperty pc_compat_2_1[] = {
- PC_CPU_MODEL_IDS("2.1.0")
- { "coreduo" "-" TYPE_X86_CPU, "vmx", "on" },
- { "core2duo" "-" TYPE_X86_CPU, "vmx", "on" },
-};
-const size_t pc_compat_2_1_len = G_N_ELEMENTS(pc_compat_2_1);
-
GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled)
{
GSIState *s;
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 80488a4756..2f28b4e329 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -66,7 +66,6 @@
#include "hw/hyperv/vmbus-bridge.h"
#include "hw/mem/nvdimm.h"
#include "hw/i386/acpi-build.h"
-#include "kvm/kvm-cpu.h"
#include "target/i386/cpu.h"
#define XEN_IOAPIC_NUM_PIRQS 128ULL
@@ -435,12 +434,6 @@ static void pc_compat_2_2_fn(MachineState *machine)
pc_compat_2_3_fn(machine);
}
-static void pc_compat_2_1_fn(MachineState *machine)
-{
- pc_compat_2_2_fn(machine);
- x86_cpu_change_kvm_default("svm", NULL);
-}
-
#ifdef CONFIG_ISAPC
static void pc_init_isa(MachineState *machine)
{
@@ -851,22 +844,6 @@ static void pc_i440fx_2_2_machine_options(MachineClass *m)
DEFINE_I440FX_MACHINE(v2_2, "pc-i440fx-2.2", pc_compat_2_2_fn,
pc_i440fx_2_2_machine_options);
-static void pc_i440fx_2_1_machine_options(MachineClass *m)
-{
- PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
-
- pc_i440fx_2_2_machine_options(m);
- m->hw_version = "2.1.0";
- m->default_display = NULL;
- compat_props_add(m->compat_props, hw_compat_2_1, hw_compat_2_1_len);
- compat_props_add(m->compat_props, pc_compat_2_1, pc_compat_2_1_len);
- pcmc->smbios_uuid_encoded = false;
- pcmc->enforce_aligned_dimm = false;
-}
-
-DEFINE_I440FX_MACHINE(v2_1, "pc-i440fx-2.1", pc_compat_2_1_fn,
- pc_i440fx_2_1_machine_options);
-
#ifdef CONFIG_ISAPC
static void isapc_machine_options(MachineClass *m)
{
--
2.41.0
1 year
[PATCH v3 02/22] hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine
by Philippe Mathieu-Daudé
The pc-i440fx-2.0 machine was deprecated for the 8.2
release (see commit c7437f0ddb "docs/about: Mark the
old pc-i440fx-2.0 - 2.3 machine types as deprecated"),
time to remove it.
Signed-off-by: Philippe Mathieu-Daudé <philmd(a)linaro.org>
Reviewed-by: Thomas Huth <thuth(a)redhat.com>
Message-Id: <20240305134221.30924-2-philmd(a)linaro.org>
Reviewed-by: Zhao Liu <zhao1.liu(a)intel.com>
---
docs/about/deprecated.rst | 2 +-
docs/about/removed-features.rst | 2 +-
include/hw/i386/pc.h | 3 ---
hw/i386/pc.c | 15 -------------
hw/i386/pc_piix.c | 37 ---------------------------------
5 files changed, 2 insertions(+), 57 deletions(-)
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 967ee34267..ef4ad16d41 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -219,7 +219,7 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name
better reflects the way this property affects all random data within
the device tree blob, not just the ``kaslr-seed`` node.
-``pc-i440fx-2.0`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.7`` (since 9.1)
+``pc-i440fx-2.1`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.7`` (since 9.1)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
These old machine types are quite neglected nowadays and thus might have
diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst
index f9cf874f7b..51119e623f 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -816,7 +816,7 @@ mips ``fulong2e`` machine alias (removed in 6.0)
This machine has been renamed ``fuloong2e``.
-``pc-0.10`` up to ``pc-i440fx-1.7`` (removed in 4.0 up to 8.2)
+``pc-0.10`` up to ``pc-i440fx-2.0`` (removed in 4.0 up to 9.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
These machine types were very old and likely could not be used for live
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 27a68071d7..67856f54c3 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -285,9 +285,6 @@ extern const size_t pc_compat_2_2_len;
extern GlobalProperty pc_compat_2_1[];
extern const size_t pc_compat_2_1_len;
-extern GlobalProperty pc_compat_2_0[];
-extern const size_t pc_compat_2_0_len;
-
#define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \
{ \
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 5c21b0c4db..172814f604 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -311,21 +311,6 @@ GlobalProperty pc_compat_2_1[] = {
};
const size_t pc_compat_2_1_len = G_N_ELEMENTS(pc_compat_2_1);
-GlobalProperty pc_compat_2_0[] = {
- PC_CPU_MODEL_IDS("2.0.0")
- { "virtio-scsi-pci", "any_layout", "off" },
- { "PIIX4_PM", "memory-hotplug-support", "off" },
- { "apic", "version", "0x11" },
- { "nec-usb-xhci", "superspeed-ports-first", "off" },
- { "nec-usb-xhci", "force-pcie-endcap", "on" },
- { "pci-serial", "prog_if", "0" },
- { "pci-serial-2x", "prog_if", "0" },
- { "pci-serial-4x", "prog_if", "0" },
- { "virtio-net-pci", "guest_announce", "off" },
- { "ICH9-LPC", "memory-hotplug-support", "off" },
-};
-const size_t pc_compat_2_0_len = G_N_ELEMENTS(pc_compat_2_0);
-
GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled)
{
GSIState *s;
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index ec9c299b06..80488a4756 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -441,11 +441,6 @@ static void pc_compat_2_1_fn(MachineState *machine)
x86_cpu_change_kvm_default("svm", NULL);
}
-static void pc_compat_2_0_fn(MachineState *machine)
-{
- pc_compat_2_1_fn(machine);
-}
-
#ifdef CONFIG_ISAPC
static void pc_init_isa(MachineState *machine)
{
@@ -872,38 +867,6 @@ static void pc_i440fx_2_1_machine_options(MachineClass *m)
DEFINE_I440FX_MACHINE(v2_1, "pc-i440fx-2.1", pc_compat_2_1_fn,
pc_i440fx_2_1_machine_options);
-static void pc_i440fx_2_0_machine_options(MachineClass *m)
-{
- PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
-
- pc_i440fx_2_1_machine_options(m);
- m->hw_version = "2.0.0";
- compat_props_add(m->compat_props, pc_compat_2_0, pc_compat_2_0_len);
- pcmc->smbios_legacy_mode = true;
- pcmc->has_reserved_memory = false;
- /* This value depends on the actual DSDT and SSDT compiled into
- * the source QEMU; unfortunately it depends on the binary and
- * not on the machine type, so we cannot make pc-i440fx-1.7 work on
- * both QEMU 1.7 and QEMU 2.0.
- *
- * Large variations cause migration to fail for more than one
- * consecutive value of the "-smp" maxcpus option.
- *
- * For small variations of the kind caused by different iasl versions,
- * the 4k rounding usually leaves slack. However, there could be still
- * one or two values that break. For QEMU 1.7 and QEMU 2.0 the
- * slack is only ~10 bytes before one "-smp maxcpus" value breaks!
- *
- * 6652 is valid for QEMU 2.0, the right value for pc-i440fx-1.7 on
- * QEMU 1.7 it is 6414. For RHEL/CentOS 7.0 it is 6418.
- */
- pcmc->legacy_acpi_table_size = 6652;
- pcmc->acpi_data_size = 0x10000;
-}
-
-DEFINE_I440FX_MACHINE(v2_0, "pc-i440fx-2.0", pc_compat_2_0_fn,
- pc_i440fx_2_0_machine_options);
-
#ifdef CONFIG_ISAPC
static void isapc_machine_options(MachineClass *m)
{
--
2.41.0
1 year
[PATCH-for-9.1 v2 00/21] hw/i386: Remove deprecated pc-i440fx-2.0 -> 2.3 machines
by Philippe Mathieu-Daudé
Missing review: 4-6, 10-12, 16, 19-20
Since v1:
- Addressed Zhao and Thomas review comments
- Removal around ICH9 acpi_memory_hotplug (Thomas)
Kill legacy code, because we need to evolve.
I ended there via dynamic machine -> ICH9 -> legacy ACPI...
This should also help Igor cleanups:
http://lore.kernel.org/qemu-devel/20240326171632.3cc7533d@imammedo.users....
Philippe Mathieu-Daudé (21):
hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine
hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag
hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag
hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size
hw/acpi/ich9: Remove 'memory-hotplug-support' property
hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug'
hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine
target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h'
hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded
hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults()
hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid()
hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm
hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug()
hw/mem/memory-device: Remove legacy_align from
memory_device_pre_plug()
hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine
hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob
hw/i386/pc: Remove PCMachineClass::rsdp_in_ram
hw/i386/acpi: Remove AcpiBuildState::rsdp field
hw/i386/pc: Remove 2.3 and deprecate 2.4 to 2.7 pc-i440fx machines
target/i386: Remove X86CPU::kvm_no_smi_migration field
hw/i386/pc: Replace PCMachineClass::acpi_data_size by
PC_ACPI_DATA_SIZE
docs/about/deprecated.rst | 2 +-
docs/about/removed-features.rst | 2 +-
hw/usb/hcd-xhci.h | 4 +-
include/hw/firmware/smbios.h | 3 +-
include/hw/i386/pc.h | 22 ------
include/hw/mem/memory-device.h | 2 +-
include/hw/mem/pc-dimm.h | 3 +-
target/i386/cpu.h | 3 -
target/i386/kvm/kvm-cpu.h | 41 ----------
hw/acpi/ich9.c | 46 ++---------
hw/arm/virt.c | 5 +-
hw/i386/acpi-build.c | 95 ++---------------------
hw/i386/fw_cfg.c | 3 +-
hw/i386/pc.c | 107 ++++----------------------
hw/i386/pc_piix.c | 101 ------------------------
hw/loongarch/virt.c | 4 +-
hw/mem/memory-device.c | 12 +--
hw/mem/pc-dimm.c | 6 +-
hw/ppc/spapr.c | 2 +-
hw/riscv/virt.c | 2 +-
hw/smbios/smbios.c | 13 +---
hw/usb/hcd-xhci-nec.c | 4 -
hw/usb/hcd-xhci-pci.c | 4 +-
hw/usb/hcd-xhci.c | 42 ++--------
hw/virtio/virtio-md-pci.c | 2 +-
target/i386/cpu.c | 2 -
target/i386/kvm/kvm-cpu.c | 3 +-
target/i386/kvm/kvm.c | 7 +-
tests/avocado/mem-addr-space-check.py | 3 +-
29 files changed, 64 insertions(+), 481 deletions(-)
delete mode 100644 target/i386/kvm/kvm-cpu.h
--
2.41.0
1 year
[PATCH 0/3] Allow reserving more memory for PCI controllers
by Michal Privoznik
This is a rebased version I've posted a while ago:
https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/DF...
Michal Prívozník (3):
conf: Introduce @memReserve to <controller/>
qemu_validate: Restrict setting @memReserve only to some controllers
qemu_command: Generate mem-reserve for controllers
docs/formatdomain.rst | 6 +++++
src/conf/domain_conf.c | 9 +++++++
src/conf/domain_conf.h | 3 +++
src/conf/schemas/domaincommon.rng | 5 ++++
src/qemu/qemu_command.c | 3 +++
src/qemu/qemu_validate.c | 25 +++++++++++++++++++
.../q35-usb2.x86_64-latest.args | 2 +-
.../q35-usb2.x86_64-latest.xml | 2 +-
tests/qemuxmlconfdata/q35-usb2.xml | 2 +-
9 files changed, 54 insertions(+), 3 deletions(-)
--
2.43.2
1 year
[PATCH] domain_interface: Fix build on FreeBSD
by Michal Privoznik
In one of my recent commits I've chopped just too much and moved
a variable declaration into a function not realizing it's still
used on FreeBSD. Bring it back but only for the FreeBSD case.
Fixes: f8b5bd855f8312457fd9ad8a68fb044982bd3cc6
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed as build breaker fix.
src/hypervisor/domain_interface.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/hypervisor/domain_interface.c b/src/hypervisor/domain_interface.c
index cc6aa8551a..756abb08e9 100644
--- a/src/hypervisor/domain_interface.c
+++ b/src/hypervisor/domain_interface.c
@@ -434,11 +434,14 @@ virDomainInterfaceDeleteDevice(virDomainDef *def,
}
break;
case VIR_DOMAIN_NET_TYPE_BRIDGE:
- case VIR_DOMAIN_NET_TYPE_NETWORK:
+ case VIR_DOMAIN_NET_TYPE_NETWORK: {
#ifdef VIR_NETDEV_TAP_REQUIRE_MANUAL_CLEANUP
+ const virNetDevVPortProfile *vport = virDomainNetGetActualVirtPortProfile(net);
+
if (!(vport && vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH))
ignore_value(virNetDevTapDelete(net->ifname, net->backend.tap));
#endif
+ }
break;
case VIR_DOMAIN_NET_TYPE_USER:
case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
--
2.43.2
1 year
[PATCH 0/2] A couple of fixes for non-standard builddir
by Michal Privoznik
The other day somebody on #virt complained about test suite failing on a
fresh checkout. Turned out, our mocking and some bash scripts are not
prepared for a case when there's a space in builddir path.
After these, there are still some tests failing, but my brain is too
small to fix them:
1) Somehow, $builddir/docs/html/libvirt-libvirt-common.html (and friends) are
generated into $builddir/html/libvirt-libvirt-common.html and I can't
figure out why. This means, check-html and check-html-references tests
are failing.
2) There's some problem with po_check as it fails to find generated
sources (like src/remote/remote_client_bodies.h). I've taken look
into our syntax-check.mk but I have no idea what's wrong nor how to
properly escape paths in Makefile.
Michal Prívozník (2):
tests: mock: Accept spaces in build path
tests: Allow spaces in path to virt-aa-helper
tests/securityselinuxlabeltest.c | 2 +-
tests/securityselinuxtest.c | 2 +-
tests/testutils.c | 6 ++++--
tests/testutils.h | 12 +++++++++++-
tests/viridentitytest.c | 2 +-
tests/virt-aa-helper-test | 4 ++--
6 files changed, 20 insertions(+), 8 deletions(-)
--
2.43.2
1 year
VHPC'24 - 19th Virtualization in High-Performance Cloud Computing
Workshop - Call for Papers
by Remo Andreoli
VHPC'24<https://vhpc.org/>: August 26th-27th, Madrid, Spain, co-located with Euro-Par 2024. Papers due: May 6th.
The Workshop on Virtualization in High-Performance Cloud Computing (VHPC<https://vhpc.org>) aims to bring together researchers and industrial practitioners facing the challenges posed by virtualization in HPC/Cloud scenarios in order to foster discussion, collaboration, mutual exchange of knowledge and experience, enabling research to ultimately provide novel solutions for virtualized computing systems. The workshop features paper presentations, discussion sessions, and lightning talks. Accepted papers will be published in a Springer LNCS volume.
Focus Topics
This year, we are calling the timely topic of virtualization in support of high-memory LLM training workloads including, but not limited to:
* GPU hypervisor memory virtualization
* Flat CPU/GPU memory page tables/TLB
* Storage/filesystem to virtual memory mapped approaches
* Distributed memory virtualization
* Memory compression and reduction techniques
* Out-of-core training algorithms
* Memory-efficient allocation and data formats
* Benchmarking and profiling tools
* Real-world examples and applications of virtualization techniques in LLM training scenarios
In addition to the regular topic areas of HPC virtualization: design/architecture, management, performance management, modeling and configuration/tooling:
* Container Platforms (Kubernetes, Docker, Nitro/Firecracker, …) and Unikernel Frameworks
* Composable Lightweight Application Components and Lambda / Function-as-a-Service Paradigms
* Latency Control, Warm/Cold-start issues and Data/Container Placement in Heterogeneous Environments
* Energy-efficiency and Service Orchestration in Virtualized Cloud & HPC Infrastructures
The workshop will be composed of 20 min paper presentations, each followed by 10 min discussion sessions, plus lightning talks that are limited to 5 minutes. Presentations may be accompanied by interactive demonstrations. For more information and detailed paper submission instructions, refer to the VHPC'24 webpage<https://vhpc.org/>.
Important Dates (AoE)
* May 6th, 2024: Paper submission deadline (Springer LNCS)
* Jun 20th, 2024: Acceptance notification
* Jul 1st, 2024: Camera-ready version due
* Aug 26th-27th, 2024: Workshop Day
Workshop Chair
* Michael Alexander (chair), University of Vienna, Austria
* Anastassios Nanos (co-chair), Nubificus Ltd., UK
* Tommaso Cucinotta (co-chair), Scuola Superiore Sant'Anna, Italy
Publicity Chair
* Remo Andreoli, Scuola Superiore Sant'Anna, Italy
General Information
The workshop will be held in conjunction with the International European Conference on Parallel and Distributed Computing (Euro-Par 2024)<https://2024.euro-par.org>, on Aug 26th-27th, 2024, in Madrid, Spain.
The VHPC co-chairs
1 year
[PATCH] vbox: Drop needless g_new0(..., 0) in vbox_snapshot_conf.c
by Michal Privoznik
clang on Fedora started to complain about some calls to g_new0()
we're making in vbox_snapshot_conf.c. Specifically, we're passing
zero as number of elements to allocate. And while usually SA
tools are not clever, in this specific case clang is right.
There are three cases where such call is made, but all of them
later use VIR_EXPAND_N() to allocate more memory (if needed). But
VIR_EXPAND_N() accepts a variable set to NULL happily.
Therefore, just drop those three calls to g_new0(..., 0) and let
VIR_EXPAND_N() allocate memory.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/vbox/vbox_snapshot_conf.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/vbox/vbox_snapshot_conf.c b/src/vbox/vbox_snapshot_conf.c
index 89cd685954..b424648368 100644
--- a/src/vbox/vbox_snapshot_conf.c
+++ b/src/vbox/vbox_snapshot_conf.c
@@ -460,8 +460,6 @@ virVBoxSnapshotConfAllChildren(virVBoxSnapshotConfHardDisk *disk,
size_t i = 0;
size_t j = 0;
- ret = g_new0(virVBoxSnapshotConfHardDisk *, 0);
-
for (i = 0; i < disk->nchildren; i++) {
size_t tempSize = virVBoxSnapshotConfAllChildren(disk->children[i], &tempList);
VIR_EXPAND_N(ret, returnSize, tempSize);
@@ -1314,8 +1312,6 @@ virVBoxSnapshotConfRemoveFakeDisks(virVBoxSnapshotConfMachine *machine)
virVBoxSnapshotConfHardDisk **tempList = NULL;
virVBoxSnapshotConfHardDisk **diskList = NULL;
- diskList = g_new0(virVBoxSnapshotConfHardDisk *, 0);
-
for (i = 0; i < machine->mediaRegistry->ndisks; i++) {
tempSize = virVBoxSnapshotConfAllChildren(machine->mediaRegistry->disks[i], &tempList);
VIR_EXPAND_N(diskList, diskSize, tempSize);
@@ -1364,8 +1360,6 @@ virVBoxSnapshotConfDiskIsInMediaRegistry(virVBoxSnapshotConfMachine *machine,
virVBoxSnapshotConfHardDisk **tempList = NULL;
virVBoxSnapshotConfHardDisk **diskList = NULL;
- diskList = g_new0(virVBoxSnapshotConfHardDisk *, 0);
-
for (i = 0; i < machine->mediaRegistry->ndisks; i++) {
tempSize = virVBoxSnapshotConfAllChildren(machine->mediaRegistry->disks[i], &tempList);
VIR_EXPAND_N(diskList, diskSize, tempSize);
--
2.43.2
1 year
[PATCH 0/5] Clear QoS for OVS more frequently
by Michal Privoznik
*** BLURB HERE ***
Michal Prívozník (5):
virnetdevopenvswitch: Fix comment to
virNetDevOpenvswitchInterfaceGetMaster()
hypervisor: Introduce and use virDomainInterfaceVportRemove()
virnetdevopenvswitch: Drop @brname arg from
virNetDevOpenvswitchRemovePort()
conf: Move virDomainClearNetBandwidth() to src/hypervisor/
domain_interface: Introduce and use virDomainInterfaceClearQoS()
src/conf/netdev_bandwidth_conf.c | 14 ------
src/conf/netdev_bandwidth_conf.h | 3 --
src/hypervisor/domain_interface.c | 78 ++++++++++++++++++++++++++-----
src/hypervisor/domain_interface.h | 5 ++
src/libvirt_private.syms | 4 +-
src/lxc/lxc_driver.c | 14 ++----
src/lxc/lxc_process.c | 18 +++----
src/qemu/qemu_hotplug.c | 40 ++--------------
src/util/virnetdevopenvswitch.c | 4 +-
src/util/virnetdevopenvswitch.h | 4 +-
src/util/virnetdevtap.c | 2 +-
11 files changed, 95 insertions(+), 91 deletions(-)
--
2.43.2
1 year
[PATCH] vsh: Drop fwd declaration of a nonexistent function
by Michal Privoznik
The vshFindTypedParamByName() function no longer exists (as of
v1.0.2-rc1~82), but its header file declaration was still kept
around. Drop it.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tools/vsh.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/tools/vsh.h b/tools/vsh.h
index f06d65407d..eeba1d4b3c 100644
--- a/tools/vsh.h
+++ b/tools/vsh.h
@@ -314,9 +314,6 @@ void vshDebug(vshControl *ctl, int level, const char *format, ...)
#define vshStrcasecmp(S1, S2) strcasecmp(S1, S2)
int vshNameSorter(const void *a, const void *b);
-virTypedParameterPtr vshFindTypedParamByName(const char *name,
- virTypedParameterPtr list,
- int count);
char *vshGetTypedParamValue(vshControl *ctl, virTypedParameterPtr item)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
--
2.43.2
1 year