[PATCH 0/5] remove NVDIMM auto-alignment for pSeries guests
by Daniel Henrique Barboza
Hi,
In [1] Andrea proposed that we should *not* auto-align down
the NVDIMM size for pSeries guests. Instead we should error
out and provide users with a suggested aligned value. This
patch implements it.
[1] https://www.redhat.com/archives/libvir-list/2020-July/msg01471.html
Daniel Henrique Barboza (5):
qemu_domain.c: make qemuDomainGetMemorySizeAlignment() public
qemu_validate.c: add pSeries NVDIMM size alignment validation
qemu_domain.c: do not auto-align ppc64 NVDIMMs
qemu_domain.c: change qemuDomainMemoryDeviceAlignSize() return type
Revert "formatdomain.html.in: mention pSeries NVDIMM 'align down'
mechanic"
docs/formatdomain.html.in | 6 +-
src/qemu/qemu_domain.c | 57 ++-----------------
src/qemu/qemu_domain.h | 7 ++-
src/qemu/qemu_hotplug.c | 6 +-
src/qemu/qemu_validate.c | 43 ++++++++++++--
...ory-hotplug-nvdimm-ppc64.ppc64-latest.args | 2 +-
.../memory-hotplug-nvdimm-ppc64.xml | 2 +-
.../memory-hotplug-nvdimm-ppc64.xml | 2 +-
8 files changed, 55 insertions(+), 70 deletions(-)
--
2.26.2
4 years, 2 months
[libvirt PATCH] docs: kbase: Tune how CPU support for SEV should be queried
by Erik Skultety
#useless_use_of_cat
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
Dedicated to everyone who felt deeply offended by the useless use of cat :).
docs/kbase/launch_security_sev.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/kbase/launch_security_sev.rst b/docs/kbase/launch_security_sev.rst
index 4a37c0c379..8f58413261 100644
--- a/docs/kbase/launch_security_sev.rst
+++ b/docs/kbase/launch_security_sev.rst
@@ -38,7 +38,7 @@ You can manually check whether SEV is among the CPU flags with:
::
- $ cat /proc/cpuinfo | grep sev
+ $ grep -w sev /proc/cpuinfo
...
sme ssbd sev ibpb
--
2.26.2
4 years, 2 months
[libvirt PATCH 0/7] Replace VIR_ALLOC and VIR_FREE in src/cpu/*.
by Tim Wiederhake
This series furthers the transition from VIR_ALLOC, VIR_FREE, etc to glib fun=
ctions and
removes the "_QUIET" variants of VIR_{ALLOC,ALLOC_N,REALLOC_N,APPEND_ELEMENT}=
that by
now are aliases to their non-quiet counterparts.
Tim Wiederhake (7):
util: alloc: Remove VIR_ALLOC_QUIET
util: alloc: Remove VIR_ALLOC_N_QUIET
util: alloc: Remove VIR_REALLOC_N_QUIET
util: alloc: Remove VIR_APPEND_ELEMENT_QUIET
cpu: Replace VIR_ALLOC with g_new0
cpu: Replace VIR_ALLOC_N with g_new0
cpu: Replace VIR_FREE with g_free
src/cpu/cpu.c | 6 ++---
src/cpu/cpu_map.c | 6 ++---
src/cpu/cpu_ppc64.c | 59 +++++++++++++++--------------------------
src/cpu/cpu_x86.c | 10 +++----
src/qemu/qemu_domain.c | 4 +--
src/qemu/qemu_process.c | 2 +-
src/rpc/virnetmessage.c | 2 +-
src/util/viralloc.h | 48 ---------------------------------
src/util/virbitmap.c | 4 +--
src/util/virdevmapper.c | 2 +-
src/util/virerror.c | 6 ++---
src/util/virfile.c | 2 +-
src/util/virjson.c | 2 +-
src/util/virlog.c | 4 +--
src/util/virthread.c | 2 +-
tests/virconftest.c | 2 +-
tests/virfilewrapper.c | 4 +--
tests/virpcimock.c | 19 +++++++------
tools/vsh.c | 2 +-
19 files changed, 59 insertions(+), 127 deletions(-)
--=20
2.26.2
4 years, 2 months
[PULL 05/10] docs/system/deprecated: mark ppc64abi32-linux-user for deprecation
by Alex Bennée
It's buggy and we are not sure anyone uses it.
Signed-off-by: Alex Bennée <alex.bennee(a)linaro.org>
Reviewed-by: Richard Henderson <richard.henderson(a)linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug(a)amsat.org>
Acked-by: David Gibson <david(a)gibson.dropbear.id.au>
Message-Id: <20200909112742.25730-6-alex.bennee(a)linaro.org>
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index 851dbdeb8ab..a158e765c33 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -424,6 +424,13 @@ linux-user mode) is deprecated and will be removed in a future version
of QEMU. Support for this CPU was removed from the upstream Linux
kernel in 2018, and has also been dropped from glibc.
+``ppc64abi32`` CPUs (since 5.2.0)
+'''''''''''''''''''''''''''''''''
+
+The ``ppc64abi32`` architecture has a number of issues which regularly
+trip up our CI testing and is suspected to be quite broken. For that
+reason the maintainers strongly suspect no one actually uses it.
+
Related binaries
----------------
--
2.20.1
4 years, 2 months
[PATCH v2] Fix linkage to libutil and libkvm on FreeBSD 11
by Daniel P. Berrangé
We are currently adding -lutil and -lkvm to the linker using the
add_project_link_arguments method. On FreeBSD 11.4, this results in
build errors because the args appear too early in the command line.
We need to pass the libraries as dependencies so that they get placed
at the same point in the linker args as other dependencies.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
meson.build | 17 ++++++++---------
src/bhyve/meson.build | 2 ++
src/util/meson.build | 2 ++
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/meson.build b/meson.build
index 33eaa9ff56..bcb978292b 100644
--- a/meson.build
+++ b/meson.build
@@ -1086,7 +1086,8 @@ endif
# Check for BSD kvm (kernel memory interface)
if host_machine.system() == 'freebsd'
kvm_dep = cc.find_library('kvm')
- add_project_link_arguments('-lkvm', language: 'c')
+else
+ kvm_dep = dependency('', required: false)
endif
libiscsi_version = '1.18.0'
@@ -1203,11 +1204,10 @@ have_gnu_gettext_tools = false
if not get_option('nls').disabled()
have_gettext = cc.has_function('gettext')
if not have_gettext
- intl_lib = cc.find_library('intl', required: false)
- have_gettext = intl_lib.found()
- if have_gettext
- add_project_link_arguments('-lintl', language: 'c')
- endif
+ intl_dep = cc.find_library('intl', required: false)
+ have_gettext = intl_dep.found()
+ else
+ intl_dep = dependency('', required: false)
endif
if not have_gettext and get_option('nls').enabled()
error('gettext() is required to build libvirt')
@@ -1235,6 +1235,8 @@ if not get_option('nls').disabled()
have_gnu_gettext_tools = true
endif
endif
+else
+ intl_dep = dependency('', required: false)
endif
numactl_dep = cc.find_library('numa', required: get_option('numactl'))
@@ -1402,9 +1404,6 @@ if udev_dep.found()
endif
util_dep = cc.find_library('util', required: false)
-if util_dep.found()
- add_project_link_arguments('-lutil', language: 'c')
-endif
if not get_option('virtualport').disabled()
if cc.has_header_symbol('linux/if_link.h', 'IFLA_PORT_MAX')
diff --git a/src/bhyve/meson.build b/src/bhyve/meson.build
index 7d54718820..975f93a9c0 100644
--- a/src/bhyve/meson.build
+++ b/src/bhyve/meson.build
@@ -21,7 +21,9 @@ if conf.has('WITH_BHYVE')
],
dependencies: [
access_dep,
+ kvm_dep,
src_dep,
+ util_dep,
],
include_directories: [
conf_inc_dir,
diff --git a/src/util/meson.build b/src/util/meson.build
index f7092cc3f1..bf556e7ae6 100644
--- a/src/util/meson.build
+++ b/src/util/meson.build
@@ -187,12 +187,14 @@ virt_util_lib = static_library(
dbus_dep,
devmapper_dep,
gnutls_dep,
+ intl_dep,
libnl_dep,
m_dep,
numactl_dep,
secdriver_dep,
src_dep,
thread_dep,
+ util_dep,
win32_dep,
yajl_dep,
],
--
2.26.2
4 years, 2 months
[libvirt PATCH] esx: generator: fix free of elements in lists
by Pino Toscano
When a list is freed, we iterate through all the items, invoking the
free function for each; the actual free function called for each element
is the function of the actual type of each element, and thus the @_next
pointer in the element struct has the same type as the element itself.
Currently, the free function gets the parent of the current element
type, and invoke its free function to continue freeing the list.
However, in case the hierarchy of the classes has more than 1 level
(i.e. Class <- SubClass <- SubSubClass), the invoked free function is
only the parent class' one, and not the actual base class of the
hierarchy.
To fix that, change the generator to get the ancestor of a class, and
invoking that instead. Also, avoid to set the @_next back, as it is not
needed.
Fixes commits 5cff36e39ae691fbd7c40597df1732eecf294150 and
f76c6dde2e33233566e886d96e76b5fe0c102d9a.
Signed-off-by: Pino Toscano <ptoscano(a)redhat.com>
---
scripts/esx_vi_generator.py | 26 +++++++++++++++++++++-----
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/scripts/esx_vi_generator.py b/scripts/esx_vi_generator.py
index 863c8af964..be9b3949e8 100755
--- a/scripts/esx_vi_generator.py
+++ b/scripts/esx_vi_generator.py
@@ -751,13 +751,13 @@ class Object(GenericObject):
source += "{\n"
if self.features & Object.FEATURE__LIST:
- if self.extends is not None:
+ ancestor = get_ancestor(self)
+ if ancestor:
# avoid "dereferencing type-punned pointer will break
# strict-aliasing rules" warnings
- source += " esxVI_%s *next = (esxVI_%s *)item->_next;\n\n" \
- % (self.extends, self.extends)
- source += " esxVI_%s_Free(&next);\n" % self.extends
- source += " item->_next = (esxVI_%s *)next;\n\n" % self.name
+ source += " esxVI_%s *baseNext = (esxVI_%s *)item->_next;\n" \
+ % (ancestor, ancestor)
+ source += " esxVI_%s_Free(&baseNext);\n\n" % ancestor
else:
source += " esxVI_%s_Free(&item->_next);\n\n" % self.name
@@ -1250,6 +1250,21 @@ def is_known_type(type):
type in enums_by_name)
+def get_ancestor(obj):
+ if not obj.extends:
+ return None
+ ancestor = None
+ try:
+ ancestor = ancestor_by_name[obj.extends]
+ except KeyError:
+ parent = objects_by_name[obj.extends]
+ ancestor = get_ancestor(parent)
+ if not ancestor:
+ ancestor = parent.name
+ ancestor_by_name[name] = ancestor
+ return ancestor
+
+
def open_file(filename):
return open(filename, "wt")
@@ -1341,6 +1356,7 @@ managed_objects_by_name = {}
enums_by_name = {}
methods_by_name = {}
block = None
+ancestor_by_name = {}
# parse input file
--
2.26.2
4 years, 2 months
[libvirt PATCH 0/2] meson: Add tests_timeout build option
by Andrea Bolognani
See patch 2/2 for the rationale.
Andrea Bolognani (2):
meson: Rename tests-related build options
meson: Add tests_timeout build option
libvirt.spec.in | 2 +-
meson.build | 8 +++++---
meson_options.txt | 5 +++--
tests/meson.build | 6 +++---
4 files changed, 12 insertions(+), 9 deletions(-)
--
2.26.2
4 years, 2 months
[PATCH] network: allow accept_ra == 0 when enabling ipv6 forwarding
by Ian Wienand
The checks modified here were added with
00d28a78b5d1f6eaf79f06ac59e31c568af9da37 to avoid losing routes on
hosts.
However, tools such as systemd-networking and NetworkManager manage
RA's in userspace and thus IPv6 may be up and working on an interface
even with accept_ra == 0.
This modifies the check to only error if an interface's accept_ra is
already set to "1"; as noted inline this seems to when it is likely
that enabling forwarding may change the RA acceptance behaviour of the
interface.
I have noticed this because I am using the IPv6 NAT features enabled
with 927acaedec7effbe67a154d8bfa0e67f7d08e6c7. I am using this on my
laptop which switches between wired and wireless connections; both of
which are configured in an unremarkable way by Fedora's NetworkManager
and get configured for IPv6 via SLAAC and whatever NetworkManager
magic it does. With this I can define and start a libvirt network
with <nat ipv6="yes"> and <ip family='ipv6'
address='fc00:abcd:ef12:34::' prefix='64'> and it seems to "just work"
for guests.
Signed-off-by: Ian Wienand <iwienand(a)redhat.com>
---
src/util/virnetdevip.c | 41 +++++++++++++++++++++++++++--------------
1 file changed, 27 insertions(+), 14 deletions(-)
diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c
index 409f062c5c..de27cacfc9 100644
--- a/src/util/virnetdevip.c
+++ b/src/util/virnetdevip.c
@@ -496,7 +496,7 @@ virNetDevIPGetAcceptRA(const char *ifname)
}
struct virNetDevIPCheckIPv6ForwardingData {
- bool hasRARoutes;
+ bool hasKernelRARoutes;
/* Devices with conflicting accept_ra */
char **devices;
@@ -552,15 +552,26 @@ virNetDevIPCheckIPv6ForwardingCallback(struct nlmsghdr *resp,
if (!ifname)
return -1;
- accept_ra = virNetDevIPGetAcceptRA(ifname);
-
VIR_DEBUG("Checking route for device %s (%d), accept_ra: %d",
ifname, ifindex, accept_ra);
- if (accept_ra != 2 && virNetDevIPCheckIPv6ForwardingAddIF(data, &ifname) < 0)
+ accept_ra = virNetDevIPGetAcceptRA(ifname);
+ /* 0 = do no accept RA
+ * 1 = accept if forwarding disabled
+ * 2 = ovveride and accept RA when forwarding enabled
+ *
+ * When RA is managed by userspace (systemd-networkd or
+ * NetworkManager) accept_ra is unset and we don't need to
+ * worry about it. If it is 1, enabling forwarding might
+ * change the behaviour so the user needs to be warned.
+ */
+ if (accept_ra == 0)
+ return 0;
+
+ if (accept_ra == 1 && virNetDevIPCheckIPv6ForwardingAddIF(data, &ifname) < 0)
return -1;
- data->hasRARoutes = true;
+ data->hasKernelRARoutes = true;
return 0;
}
@@ -590,11 +601,13 @@ virNetDevIPCheckIPv6ForwardingCallback(struct nlmsghdr *resp,
VIR_DEBUG("Checking multipath route nexthop device %s (%d), accept_ra: %d",
ifname, nh->rtnh_ifindex, accept_ra);
- if (accept_ra != 2 && virNetDevIPCheckIPv6ForwardingAddIF(data, &ifname) < 0)
- return -1;
+ if (accept_ra == 1) {
+ if (virNetDevIPCheckIPv6ForwardingAddIF(data, &ifname) < 0)
+ return -1;
+ data->hasKernelRARoutes = true;
+ }
VIR_FREE(ifname);
- data->hasRARoutes = true;
len -= NLMSG_ALIGN(nh->rtnh_len);
VIR_WARNINGS_NO_CAST_ALIGN
@@ -613,7 +626,7 @@ virNetDevIPCheckIPv6Forwarding(void)
struct rtgenmsg genmsg;
size_t i;
struct virNetDevIPCheckIPv6ForwardingData data = {
- .hasRARoutes = false,
+ .hasKernelRARoutes = false,
.devices = NULL,
.ndevices = 0
};
@@ -644,11 +657,11 @@ virNetDevIPCheckIPv6Forwarding(void)
goto cleanup;
}
- valid = !data.hasRARoutes || data.ndevices == 0;
+ valid = !data.hasKernelRARoutes || data.ndevices == 0;
/* Check the global accept_ra if at least one isn't set on a
per-device basis */
- if (!valid && data.hasRARoutes) {
+ if (!valid && data.hasKernelRARoutes) {
int accept_ra = virNetDevIPGetAcceptRA(NULL);
valid = accept_ra == 2;
VIR_DEBUG("Checked global accept_ra: %d", accept_ra);
@@ -663,9 +676,9 @@ virNetDevIPCheckIPv6Forwarding(void)
}
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Check the host setup: enabling IPv6 forwarding with "
- "RA routes without accept_ra set to 2 is likely to cause "
- "routes loss. Interfaces to look at: %s"),
+ _("Check the host setup: interface has accept_ra set to 1 "
+ "and enabling forwarding without accept_ra set to 2 is "
+ "likely to cause routes loss. Interfaces to look at: %s"),
virBufferCurrentContent(&buf));
}
--
2.26.2
4 years, 2 months
[libvirt] [PATCH-for-4.2] hw/mips: Deprecate the r4k machine
by Philippe Mathieu-Daudé
The r4k machine was introduced in 2005 (6af0bf9c7) and its last
logical change was in 2005 (9542611a6). After we can count 164
maintenance commits (QEMU API changes) with the exception of
1 fix in 2015 (memory leak, commit 3ad9fd5a).
This machine was introduced as a proof of concept to run a MIPS
CPU. 2 years later, the Malta machine was add (commit 5856de80)
modeling a real platform.
Note also this machine has no specification except 5 lines in
the header of this file:
* emulates a simple machine with ISA-like bus.
* ISA IO space mapped to the 0x14000000 (PHYS) and
* ISA memory at the 0x10000000 (PHYS, 16Mb in size).
* All peripherial devices are attached to this "bus" with
* the standard PC ISA addresses.
It is time to deprecate this obsolete machine. Users are
recommended to use the Malta board, which hardware is well
documented.
Signed-off-by: Philippe Mathieu-Daudé <philmd(a)redhat.com>
---
qemu-deprecated.texi | 5 +++++
hw/mips/mips_r4k.c | 1 +
MAINTAINERS | 2 +-
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
index 4b4b7425ac..05265b43c8 100644
--- a/qemu-deprecated.texi
+++ b/qemu-deprecated.texi
@@ -266,6 +266,11 @@ The 'scsi-disk' device is deprecated. Users should use 'scsi-hd' or
@section System emulator machines
+@subsection mips r4k platform (since 4.2)
+
+This machine type is very old and unmaintained. Users should use the 'malta'
+machine type instead.
+
@subsection pc-0.12, pc-0.13, pc-0.14 and pc-0.15 (since 4.0)
These machine types are very old and likely can not be used for live migration
diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
index 70024235ae..0b79ad26cb 100644
--- a/hw/mips/mips_r4k.c
+++ b/hw/mips/mips_r4k.c
@@ -294,6 +294,7 @@ void mips_r4k_init(MachineState *machine)
static void mips_machine_init(MachineClass *mc)
{
+ mc->deprecation_reason = "use malta machine type instead";
mc->desc = "mips r4k platform";
mc->init = mips_r4k_init;
mc->block_default_type = IF_IDE;
diff --git a/MAINTAINERS b/MAINTAINERS
index 5e5e3e52d6..3b3a88e264 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -972,7 +972,7 @@ F: hw/net/mipsnet.c
R4000
M: Aurelien Jarno <aurelien(a)aurel32.net>
R: Aleksandar Rikalo <aleksandar.rikalo(a)rt-rk.com>
-S: Maintained
+S: Obsolete
F: hw/mips/mips_r4k.c
Fulong 2E
--
2.21.0
4 years, 2 months
[PATCH 0/3] Several small documentation fixes
by Matt Coleman
This patchset fixes several spelling and punctuation errors in the
documentation.
Where British vs. American conventions differ, I used Google Trends to
determine which form is most commonly used, globally.
Matt Coleman (3):
Fix a typo in compiling.html.in: that -> from
Fix errors in contribute.html.in
Fix a typo in hacking.rst: "contirbute" -> "contribute"
docs/compiling.html.in | 2 +-
docs/contribute.html.in | 6 +++---
docs/hacking.rst | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
--
2.27.0
4 years, 2 months