[PATCH] qemu: agent: remove all code around disabled DEBUG_IO/DEBUG_RAW_IO definitions
by Ani Sinha
DEBUG_IO and DEBUG_RAW_IO are disabled and hence the code #defined under them
are useless. Remove them. Also remove similar useless code from
qemu_monitor_json.
See also 4aae00bf1287f ("qemu: monitor: Remove disabled debug infrastructure")
Signed-off-by: Ani Sinha <ani(a)anisinha.ca>
---
src/qemu/qemu_agent.c | 51 ------------------------------------
src/qemu/qemu_monitor_json.c | 4 ---
2 files changed, 55 deletions(-)
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index cb3bf97415..f33cd47078 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -48,9 +48,6 @@ VIR_LOG_INIT("qemu.qemu_agent");
#define LINE_ENDING "\n"
-#define DEBUG_IO 0
-#define DEBUG_RAW_IO 0
-
/* We read from QEMU until seeing a \r\n pair to indicate a
* completed reply or event. To avoid memory denial-of-service
* though, we must have a size limit on amount of data we
@@ -137,25 +134,6 @@ static int qemuAgentOnceInit(void)
VIR_ONCE_GLOBAL_INIT(qemuAgent);
-#if DEBUG_RAW_IO
-static char *
-qemuAgentEscapeNonPrintable(const char *text)
-{
- size_t i;
- g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
- for (i = 0; text[i] != '\0'; i++) {
- if (text[i] == '\\')
- virBufferAddLit(&buf, "\\\\");
- else if (g_ascii_isprint(text[i]) || text[i] == '\n' ||
- (text[i] == '\r' && text[i+1] == '\n'))
- virBufferAddChar(&buf, text[i]);
- else
- virBufferAsprintf(&buf, "\\x%02x", text[i]);
- }
- return virBufferContentAndReset(&buf);
-}
-#endif
-
static void qemuAgentDispose(void *obj)
{
@@ -300,14 +278,6 @@ static int qemuAgentIOProcessData(qemuAgent *agent,
{
int used = 0;
size_t i = 0;
-#if DEBUG_IO
-# if DEBUG_RAW_IO
- g_autofree char *str1 = qemuAgentEscapeNonPrintable(data);
- VIR_ERROR(_("[%s]"), str1);
-# else
- VIR_DEBUG("Data %zu bytes [%s]", len, data);
-# endif
-#endif
while (used < len) {
char *nl = strstr(data + used, LINE_ENDING);
@@ -344,17 +314,6 @@ qemuAgentIOProcess(qemuAgent *agent)
if (agent->msg && agent->msg->txOffset == agent->msg->txLength)
msg = agent->msg;
-#if DEBUG_IO
-# if DEBUG_RAW_IO
- g_autofree char *str1 = qemuAgentEscapeNonPrintable(msg ? msg->txBuffer : "");
- g_autofree char *str2 = qemuAgentEscapeNonPrintable(agent->buffer);
- VIR_ERROR(_("Process %zu %p %p [[[%s]]][[[%s]]]"),
- agent->bufferOffset, agent->msg, msg, str1, str2);
-# else
- VIR_DEBUG("Process %zu", agent->bufferOffset);
-# endif
-#endif
-
len = qemuAgentIOProcessData(agent,
agent->buffer, agent->bufferOffset,
msg);
@@ -369,9 +328,6 @@ qemuAgentIOProcess(qemuAgent *agent)
VIR_FREE(agent->buffer);
agent->bufferOffset = agent->bufferLength = 0;
}
-#if DEBUG_IO
- VIR_DEBUG("Process done %zu used %d", agent->bufferOffset, len);
-#endif
if (msg && msg->finished)
virCondBroadcast(&agent->notify);
return len;
@@ -455,10 +411,6 @@ qemuAgentIORead(qemuAgent *agent)
agent->buffer[agent->bufferOffset] = '\0';
}
-#if DEBUG_IO
- VIR_DEBUG("Now read %zu bytes of data", agent->bufferOffset);
-#endif
-
return ret;
}
@@ -527,9 +479,6 @@ qemuAgentIO(GSocket *socket G_GNUC_UNUSED,
virObjectRef(agent);
/* lock access to the agent and protect fd */
virObjectLock(agent);
-#if DEBUG_IO
- VIR_DEBUG("Agent %p I/O on watch %d socket %p cond %d", agent, agent->socket, cond);
-#endif
if (agent->fd == -1 || !agent->watch) {
virObjectUnlock(agent);
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index e45b43eb5a..0f1999f413 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -280,10 +280,6 @@ int qemuMonitorJSONIOProcess(qemuMonitor *mon,
}
}
-#if DEBUG_IO
- VIR_DEBUG("Total used %d bytes out of %zd available in buffer", used, len);
-#endif
-
return used;
}
--
2.25.1
2 years, 9 months
[PATCH v3] Add VM info to improve error log message for qemu monitor
by Rohit Kumar
This change adds the domain name in the error and debug logs during
monitor IO processing so that we may infer which VM experienced
errors such as IO or socket hangup. This may help in debugging
monitor IO errors.
Signed-off-by: Rohit Kumar <rohit.kumar3(a)nutanix.com>
---
src/qemu/qemu_monitor.c | 36 +++++++++++++++++++++---------------
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index dda6ae9796..2b4582578a 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -80,6 +80,7 @@ struct _qemuMonitor {
GSource *watch;
virDomainObj *vm;
+ char *domainName;
qemuMonitorCallbacks *cb;
void *callbackOpaque;
@@ -243,6 +244,7 @@ qemuMonitorDispose(void *obj)
virCondDestroy(&mon->notify);
g_free(mon->buffer);
g_free(mon->balloonpath);
+ g_free(mon->domainName);
}
@@ -583,8 +585,8 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
if (!error && !mon->goteof &&
cond & G_IO_ERR) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("Invalid file descriptor while waiting for monitor"));
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Invalid file descriptor while waiting for monitor (vm='%s')"), mon->domainName);
mon->goteof = true;
}
}
@@ -609,13 +611,14 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
virResetLastError();
} else {
if (virGetLastErrorCode() == VIR_ERR_OK && !mon->goteof)
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("Error while processing monitor IO"));
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Error while processing monitor IO (vm='%s')"), mon->domainName);
virCopyLastError(&mon->lastError);
virResetLastError();
}
- VIR_DEBUG("Error on monitor %s", NULLSTR(mon->lastError.message));
+ VIR_DEBUG("Error on monitor %s mon=%p vm=%p name=%s",
+ NULLSTR(mon->lastError.message), mon, mon->vm, mon->domainName);
/* If IO process resulted in an error & we have a message,
* then wakeup that waiter */
if (mon->msg && !mon->msg->finished) {
@@ -636,7 +639,8 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
/* Make sure anyone waiting wakes up now */
virCondSignal(&mon->notify);
virObjectUnlock(mon);
- VIR_DEBUG("Triggering EOF callback");
+ VIR_DEBUG("Triggering EOF callback mon=%p vm=%p name=%s",
+ mon, mon->vm, mon->domainName);
(eofNotify)(mon, vm, mon->callbackOpaque);
virObjectUnref(mon);
} else if (error) {
@@ -646,7 +650,8 @@ qemuMonitorIO(GSocket *socket G_GNUC_UNUSED,
/* Make sure anyone waiting wakes up now */
virCondSignal(&mon->notify);
virObjectUnlock(mon);
- VIR_DEBUG("Triggering error callback");
+ VIR_DEBUG("Triggering error callback mon=%p vm=%p name=%s",
+ mon, mon->vm, mon->domainName);
(errorNotify)(mon, vm, mon->callbackOpaque);
virObjectUnref(mon);
} else {
@@ -694,6 +699,7 @@ qemuMonitorOpenInternal(virDomainObj *vm,
mon->fd = fd;
mon->context = g_main_context_ref(context);
mon->vm = virObjectRef(vm);
+ mon->domainName = g_strdup(NULLSTR(vm->def->name));
mon->waitGreeting = true;
mon->cb = cb;
mon->callbackOpaque = opaque;
@@ -935,14 +941,14 @@ qemuMonitorSend(qemuMonitor *mon,
/* Check whether qemu quit unexpectedly */
if (mon->lastError.code != VIR_ERR_OK) {
- VIR_DEBUG("Attempt to send command while error is set %s",
- NULLSTR(mon->lastError.message));
+ VIR_DEBUG("Attempt to send command while error is set %s mon=%p vm=%p name=%s",
+ NULLSTR(mon->lastError.message), mon, mon->vm, mon->domainName);
virSetError(&mon->lastError);
return -1;
}
if (mon->goteof) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("End of file from qemu monitor"));
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("End of file from qemu monitor (vm='%s')"), mon->domainName);
return -1;
}
@@ -955,15 +961,15 @@ qemuMonitorSend(qemuMonitor *mon,
while (!mon->msg->finished) {
if (virCondWait(&mon->notify, &mon->parent.lock) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("Unable to wait on monitor condition"));
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Unable to wait on monitor condition (vm='%s')"), mon->domainName);
goto cleanup;
}
}
if (mon->lastError.code != VIR_ERR_OK) {
- VIR_DEBUG("Send command resulted in error %s",
- NULLSTR(mon->lastError.message));
+ VIR_DEBUG("Send command resulted in error %s mon=%p vm=%p name=%s",
+ NULLSTR(mon->lastError.message), mon, mon->vm, mon->domainName);
virSetError(&mon->lastError);
goto cleanup;
}
--
2.25.1
2 years, 9 months
[libvirt PATCH] util: fix prototype of virDaemonSetupLogging
by Ján Tomko
The commit that added error checking to this function
forgot to adjust the WIN32 stub.
Fixes: a873924e36b28c5b125621e35b32beb6b077bcc8
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
Pushed as a build fix.
src/util/virdaemon.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/util/virdaemon.c b/src/util/virdaemon.c
index 5c0ca534cf..00bd7095f6 100644
--- a/src/util/virdaemon.c
+++ b/src/util/virdaemon.c
@@ -275,17 +275,17 @@ int virDaemonForkIntoBackground(const char *argv0 G_GNUC_UNUSED)
return -1;
}
-void virDaemonSetupLogging(const char *daemon_name G_GNUC_UNUSED,
- unsigned int log_level G_GNUC_UNUSED,
- char *log_filters G_GNUC_UNUSED,
- char *log_outputs G_GNUC_UNUSED,
- bool privileged G_GNUC_UNUSED,
- bool verbose G_GNUC_UNUSED,
- bool godaemon G_GNUC_UNUSED)
+int virDaemonSetupLogging(const char *daemon_name G_GNUC_UNUSED,
+ unsigned int log_level G_GNUC_UNUSED,
+ char *log_filters G_GNUC_UNUSED,
+ char *log_outputs G_GNUC_UNUSED,
+ bool privileged G_GNUC_UNUSED,
+ bool verbose G_GNUC_UNUSED,
+ bool godaemon G_GNUC_UNUSED)
{
/* NOOP */
errno = ENOTSUP;
- return;
+ return -1;
}
int virDaemonUnixSocketPaths(const char *sock_prefix G_GNUC_UNUSED,
--
2.31.1
2 years, 9 months
[PATCH] Account for fact that virDomainDeviceDefCopy() does an inactive copy
by Michal Privoznik
In a few places (e.g. device attach/detach/update) we are given a
device XML, parse it but then need a copy of parsed data so that
the original can be passed to function handling the request over
inactive XML and the copy is then passed to function handling the
operation over live XML. Note, both functions consume passed
device on success, hence the need for copy.
The problem is in combination of how the copy is obtained and
where is passed. The copy is done by calling
virDomainDeviceDefCopy() which does only inactive copy, i.e. no
live information is copied over (e.g. no aliases).
Then, this copy (inactive XML effectively) is passed to function
handling live part of the operation (e.g.
qemuDomainUpdateDeviceLive()) and the definition containing all
the juicy, live bits is passed to function handling inactive part
of the operation (e.g. qemuDomainUpdateDeviceConfig()).
This is rather suboptimal, and XML copies should be passed to
their respective functions.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2036895
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/lxc/lxc_driver.c | 10 +++++-----
src/qemu/qemu_driver.c | 8 ++++----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index fe583ccb76..7bc39120ee 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -4308,17 +4308,17 @@ static int lxcDomainAttachDeviceFlags(virDomainPtr dom,
false) < 0)
goto endjob;
- if ((ret = lxcDomainAttachDeviceConfig(vmdef, dev)) < 0)
+ if ((ret = lxcDomainAttachDeviceConfig(vmdef, dev_copy)) < 0)
goto endjob;
}
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
- if (virDomainDefCompatibleDevice(vm->def, dev_copy, NULL,
+ if (virDomainDefCompatibleDevice(vm->def, dev, NULL,
VIR_DOMAIN_DEVICE_ACTION_ATTACH,
true) < 0)
goto endjob;
- if ((ret = lxcDomainAttachDeviceLive(driver, vm, dev_copy)) < 0)
+ if ((ret = lxcDomainAttachDeviceLive(driver, vm, dev)) < 0)
goto endjob;
/*
* update domain status forcibly because the domain status may be
@@ -4475,12 +4475,12 @@ static int lxcDomainDetachDeviceFlags(virDomainPtr dom,
if (!vmdef)
goto endjob;
- if ((ret = lxcDomainDetachDeviceConfig(vmdef, dev)) < 0)
+ if ((ret = lxcDomainDetachDeviceConfig(vmdef, dev_copy)) < 0)
goto endjob;
}
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
- if ((ret = lxcDomainDetachDeviceLive(driver, vm, dev_copy)) < 0)
+ if ((ret = lxcDomainDetachDeviceLive(driver, vm, dev)) < 0)
goto endjob;
/*
* update domain status forcibly because the domain status may be
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index b8537a4260..b1255da9f2 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8020,7 +8020,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
/* virDomainDefCompatibleDevice call is delayed until we know the
* device we're going to update. */
- if ((ret = qemuDomainUpdateDeviceConfig(vmdef, dev, priv->qemuCaps,
+ if ((ret = qemuDomainUpdateDeviceConfig(vmdef, dev_copy, priv->qemuCaps,
parse_flags,
driver->xmlopt)) < 0)
goto endjob;
@@ -8029,7 +8029,7 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
/* virDomainDefCompatibleDevice call is delayed until we know the
* device we're going to update. */
- if ((ret = qemuDomainUpdateDeviceLive(vm, dev_copy, dom, force)) < 0)
+ if ((ret = qemuDomainUpdateDeviceLive(vm, dev, dom, force)) < 0)
goto endjob;
qemuDomainSaveStatus(vm);
@@ -8100,7 +8100,7 @@ qemuDomainDetachDeviceLiveAndConfig(virQEMUDriver *driver,
if (!vmdef)
goto cleanup;
- if (qemuDomainDetachDeviceConfig(vmdef, dev, priv->qemuCaps,
+ if (qemuDomainDetachDeviceConfig(vmdef, dev_copy, priv->qemuCaps,
parse_flags,
driver->xmlopt) < 0)
goto cleanup;
@@ -8109,7 +8109,7 @@ qemuDomainDetachDeviceLiveAndConfig(virQEMUDriver *driver,
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
int rc;
- if ((rc = qemuDomainDetachDeviceLive(vm, dev_copy, driver, false)) < 0)
+ if ((rc = qemuDomainDetachDeviceLive(vm, dev, driver, false)) < 0)
goto cleanup;
if (rc == 0 && qemuDomainUpdateDeviceList(driver, vm, QEMU_ASYNC_JOB_NONE) < 0)
--
2.34.1
2 years, 9 months
[PATCH v1 34/34] linux-user: Remove the deprecated ppc64abi32 target
by Alex Bennée
From: Thomas Huth <thuth(a)redhat.com>
It's likely broken, and nobody cared for picking it up again
during the deprecation phase, so let's remove this now.
Since this is the last entry in deprecated_targets_list, remove
the related code in the configure script, too.
Signed-off-by: Thomas Huth <thuth(a)redhat.com>
Reviewed-by: Richard Henderson <richard.henderson(a)linaro.org>
Acked-by: Cédric Le Goater <clg(a)kaod.org>
Acked-by: Alex Bennée <alex.bennee(a)linaro.org>
Message-Id: <20211215084958.185214-1-thuth(a)redhat.com>
Signed-off-by: Alex Bennée <alex.bennee(a)linaro.org>
---
docs/about/deprecated.rst | 7 -----
docs/about/removed-features.rst | 8 +++++
docs/user/main.rst | 1 -
configure | 29 +------------------
configs/targets/ppc64abi32-linux-user.mak | 8 -----
linux-user/ppc/target_syscall.h | 4 +--
linux-user/syscall_defs.h | 6 ++--
linux-user/elfload.c | 4 +--
linux-user/ppc/signal.c | 11 ++-----
.gitlab-ci.d/buildtest.yml | 27 -----------------
.../dockerfiles/debian-ppc64el-cross.docker | 2 +-
tests/tcg/configure.sh | 2 +-
12 files changed, 21 insertions(+), 88 deletions(-)
delete mode 100644 configs/targets/ppc64abi32-linux-user.mak
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 5693abb663..7f12f53713 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -396,13 +396,6 @@ The above, converted to the current supported format::
linux-user mode CPUs
--------------------
-``ppc64abi32`` CPUs (since 5.2)
-'''''''''''''''''''''''''''''''
-
-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.
-
MIPS ``I7200`` CPU (since 5.2)
''''''''''''''''''''''''''''''
diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst
index d42c3341de..f92b8bd738 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -594,6 +594,14 @@ the upstream Linux kernel in 2018, and it has also been dropped from glibc, so
there is no new Linux development taking place with this architecture. For
running the old binaries, you can use older versions of QEMU.
+``ppc64abi32`` CPUs (removed in 7.0)
+''''''''''''''''''''''''''''''''''''
+
+The ``ppc64abi32`` architecture has a number of issues which regularly
+tripped up the CI testing and was suspected to be quite broken. For that
+reason the maintainers strongly suspected no one actually used it.
+
+
System emulator devices
-----------------------
diff --git a/docs/user/main.rst b/docs/user/main.rst
index e08d4be63b..6f2ffa080f 100644
--- a/docs/user/main.rst
+++ b/docs/user/main.rst
@@ -166,7 +166,6 @@ Other binaries
- user mode (PowerPC)
- * ``qemu-ppc64abi32`` TODO.
* ``qemu-ppc64`` TODO.
* ``qemu-ppc`` TODO.
diff --git a/configure b/configure
index 030728d11e..0c57a063c6 100755
--- a/configure
+++ b/configure
@@ -1273,8 +1273,6 @@ if [ "$ARCH" = "unknown" ]; then
fi
default_target_list=""
-deprecated_targets_list=ppc64abi32-linux-user
-deprecated_features=""
mak_wilds=""
if [ "$softmmu" = "yes" ]; then
@@ -1287,16 +1285,6 @@ if [ "$bsd_user" = "yes" ]; then
mak_wilds="${mak_wilds} $source_path/configs/targets/*-bsd-user.mak"
fi
-# If the user doesn't explicitly specify a deprecated target we will
-# skip it.
-if test -z "$target_list"; then
- if test -z "$target_list_exclude"; then
- target_list_exclude="$deprecated_targets_list"
- else
- target_list_exclude="$target_list_exclude,$deprecated_targets_list"
- fi
-fi
-
for config in $mak_wilds; do
target="$(basename "$config" .mak)"
if echo "$target_list_exclude" | grep -vq "$target"; then
@@ -1315,11 +1303,9 @@ Standard options:
--prefix=PREFIX install in PREFIX [$prefix]
--interp-prefix=PREFIX where to find shared libraries, etc.
use %M for cpu name [$interp_prefix]
- --target-list=LIST set target list (default: build all non-deprecated)
+ --target-list=LIST set target list (default: build all)
$(echo Available targets: $default_target_list | \
fold -s -w 53 | sed -e 's/^/ /')
-$(echo Deprecated targets: $deprecated_targets_list | \
- fold -s -w 53 | sed -e 's/^/ /')
--target-list-exclude=LIST exclude a set of targets from the default target-list
Advanced options (experts only):
@@ -1804,13 +1790,6 @@ else
done
fi
-for target in $target_list; do
- # if a deprecated target is enabled we note it here
- if echo "$deprecated_targets_list" | grep -q "$target"; then
- add_to deprecated_features $target
- fi
-done
-
# see if system emulation was really requested
case " $target_list " in
*"-softmmu "*) softmmu=yes
@@ -3950,12 +3929,6 @@ else
fi
fi
-if test -n "${deprecated_features}"; then
- echo "Warning, deprecated features enabled."
- echo "Please see docs/about/deprecated.rst"
- echo " features: ${deprecated_features}"
-fi
-
# Create list of config switches that should be poisoned in common code...
# but filter out CONFIG_TCG and CONFIG_USER_ONLY which are special.
target_configs_h=$(ls *-config-devices.h *-config-target.h 2>/dev/null)
diff --git a/configs/targets/ppc64abi32-linux-user.mak b/configs/targets/ppc64abi32-linux-user.mak
deleted file mode 100644
index 0945451081..0000000000
--- a/configs/targets/ppc64abi32-linux-user.mak
+++ /dev/null
@@ -1,8 +0,0 @@
-TARGET_ARCH=ppc64
-TARGET_ABI32=y
-TARGET_BASE_ARCH=ppc
-TARGET_ABI_DIR=ppc
-TARGET_SYSTBL_ABI=common,nospu,32
-TARGET_SYSTBL=syscall.tbl
-TARGET_WORDS_BIGENDIAN=y
-TARGET_XML_FILES= gdb-xml/power64-core.xml gdb-xml/power-fpu.xml gdb-xml/power-altivec.xml gdb-xml/power-spe.xml gdb-xml/power-vsx.xml
diff --git a/linux-user/ppc/target_syscall.h b/linux-user/ppc/target_syscall.h
index b9c4b813d3..30591806f0 100644
--- a/linux-user/ppc/target_syscall.h
+++ b/linux-user/ppc/target_syscall.h
@@ -36,7 +36,7 @@ struct target_pt_regs {
abi_ulong link;
abi_ulong xer;
abi_ulong ccr;
-#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
+#if defined(TARGET_PPC64)
abi_ulong softe;
#else
abi_ulong mq; /* 601 only (not used at present) */
@@ -58,7 +58,7 @@ struct target_revectored_struct {
* flags masks
*/
-#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
+#if defined(TARGET_PPC64)
#ifdef TARGET_WORDS_BIGENDIAN
#define UNAME_MACHINE "ppc64"
#else
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 0b13975937..7a8f24967d 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -1607,7 +1607,7 @@ struct target_stat64 {
struct target_stat {
abi_ulong st_dev;
abi_ulong st_ino;
-#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
+#if defined(TARGET_PPC64)
abi_ulong st_nlink;
unsigned int st_mode;
#else
@@ -1628,12 +1628,12 @@ struct target_stat {
abi_ulong target_st_ctime_nsec;
abi_ulong __unused4;
abi_ulong __unused5;
-#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
+#if defined(TARGET_PPC64)
abi_ulong __unused6;
#endif
};
-#if !defined(TARGET_PPC64) || defined(TARGET_ABI32)
+#if !defined(TARGET_PPC64)
#define TARGET_HAS_STRUCT_STAT64
struct QEMU_PACKED target_stat64 {
unsigned long long st_dev;
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index fa9dae5f3f..130dcb0e14 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -718,7 +718,7 @@ static inline void init_thread(struct target_pt_regs *regs,
#define ELF_MACHINE PPC_ELF_MACHINE
#define ELF_START_MMAP 0x80000000
-#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
+#if defined(TARGET_PPC64)
#define elf_check_arch(x) ( (x) == EM_PPC64 )
@@ -870,7 +870,7 @@ static uint32_t get_elf_hwcap2(void)
static inline void init_thread(struct target_pt_regs *_regs, struct image_info *infop)
{
_regs->gpr[1] = infop->start_stack;
-#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
+#if defined(TARGET_PPC64)
if (get_ppc64_abi(infop) < 2) {
uint64_t val;
get_user_u64(val, infop->entry + 8);
diff --git a/linux-user/ppc/signal.c b/linux-user/ppc/signal.c
index 176c9d8503..ec0b9c0df3 100644
--- a/linux-user/ppc/signal.c
+++ b/linux-user/ppc/signal.c
@@ -477,9 +477,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
int i, err = 0;
#if defined(TARGET_PPC64)
struct target_sigcontext *sc = 0;
-#if !defined(TARGET_ABI32)
struct image_info *image = ((TaskState *)thread_cpu->opaque)->info;
-#endif
#endif
rt_sf_addr = get_sigframe(ka, env, sizeof(*rt_sf));
@@ -530,7 +528,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
env->gpr[5] = (target_ulong) h2g(&rt_sf->uc);
env->gpr[6] = (target_ulong) h2g(rt_sf);
-#if defined(TARGET_PPC64) && !defined(TARGET_ABI32)
+#if defined(TARGET_PPC64)
if (get_ppc64_abi(image) < 2) {
/* ELFv1 PPC64 function pointers are pointers to OPD entries. */
struct target_func_ptr *handler =
@@ -562,7 +560,7 @@ sigsegv:
}
-#if !defined(TARGET_PPC64) || defined(TARGET_ABI32)
+#if !defined(TARGET_PPC64)
long do_sigreturn(CPUPPCState *env)
{
struct target_sigcontext *sc = NULL;
@@ -575,12 +573,9 @@ long do_sigreturn(CPUPPCState *env)
if (!lock_user_struct(VERIFY_READ, sc, sc_addr, 1))
goto sigsegv;
-#if defined(TARGET_PPC64)
- set.sig[0] = sc->oldmask + ((uint64_t)(sc->_unused[3]) << 32);
-#else
__get_user(set.sig[0], &sc->oldmask);
__get_user(set.sig[1], &sc->_unused[3]);
-#endif
+
target_to_host_sigset_internal(&blocked, &set);
set_sigmask(&blocked);
diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index 8f2a3c8f5b..0aa70213fb 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -473,33 +473,6 @@ tsan-build:
TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
MAKE_CHECK_ARGS: bench V=1
-# These targets are on the way out
-build-deprecated:
- extends: .native_build_job_template
- needs:
- job: amd64-debian-user-cross-container
- variables:
- IMAGE: debian-all-test-cross
- CONFIGURE_ARGS: --disable-tools
- MAKE_CHECK_ARGS: build-tcg
- TARGETS: ppc64abi32-linux-user
- artifacts:
- expire_in: 2 days
- paths:
- - build
-
-# We split the check-tcg step as test failures are expected but we still
-# want to catch the build breaking.
-check-deprecated:
- extends: .native_test_job_template
- needs:
- - job: build-deprecated
- artifacts: true
- variables:
- IMAGE: debian-all-test-cross
- MAKE_CHECK_ARGS: check-tcg
- allow_failure: true
-
# gprof/gcov are GCC features
build-gprof-gcov:
extends: .native_build_job_template
diff --git a/tests/docker/dockerfiles/debian-ppc64el-cross.docker b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
index 1146a06be6..5de12b01cd 100644
--- a/tests/docker/dockerfiles/debian-ppc64el-cross.docker
+++ b/tests/docker/dockerfiles/debian-ppc64el-cross.docker
@@ -16,7 +16,7 @@ RUN apt update && \
# Specify the cross prefix for this image (see tests/docker/common.rc)
ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc64le-linux-gnu-
-ENV DEF_TARGET_LIST ppc64-softmmu,ppc64-linux-user,ppc64abi32-linux-user
+ENV DEF_TARGET_LIST ppc64-softmmu,ppc64-linux-user
# Install extra libraries to increase code coverage
RUN apt update && \
diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh
index 309335a2bd..763e9b6ad8 100755
--- a/tests/tcg/configure.sh
+++ b/tests/tcg/configure.sh
@@ -167,7 +167,7 @@ for target in $target_list; do
container_image=debian-nios2-cross
container_cross_cc=nios2-linux-gnu-gcc
;;
- ppc-*|ppc64abi32-*)
+ ppc-*)
container_hosts=x86_64
container_image=debian-powerpc-test-cross
container_cross_cc=powerpc-linux-gnu-gcc-10
--
2.30.2
2 years, 9 months
[PATCH 0/8] Fix an unfortunate deadlock
by Martin Kletzander
Before this series:
# LIBVIRT_LOG_OUTPUTS=1:asdf:fdsa:meh libvirtd
<possible_deadlock>
After this series:
# LIBVIRT_LOG_OUTPUTS=1:asdf:fdsa:meh libvirtd
libvirt: error : invalid argument: Invalid destination 'asdf' for output '1:asdf:fdsa:meh'
Martin Kletzander (8):
util: Report error in virLogParseDefaultPriority
util: Do not hide errors in virLogSetDefaultOutput
util: Report error in virLogSetDefaultOutputToFile
util: Initialize virLogMutex statically
Exit on errors from virDaemonSetupLogging
util: Check for errors in virLogSetFromEnv
Dispatch error in virInitialize
Do not print error in remote_daemon.c:main
src/admin/libvirt-admin.c | 3 ++-
src/libvirt.c | 35 ++++++++++-----------------
src/locking/lock_daemon.c | 15 ++++++------
src/logging/log_daemon.c | 15 ++++++------
src/lxc/lxc_controller.c | 3 ++-
src/remote/remote_daemon.c | 19 +++++++--------
src/remote/remote_ssh_helper.c | 3 ++-
src/security/virt-aa-helper.c | 3 ++-
src/util/vircommand.c | 3 ++-
src/util/virdaemon.c | 34 ++++++++++++++++----------
src/util/virdaemon.h | 14 +++++------
src/util/virlog.c | 44 ++++++++++++++++++++++------------
src/util/virlog.h | 4 ++--
tests/testutils.c | 4 +++-
14 files changed, 111 insertions(+), 88 deletions(-)
--
2.34.1
2 years, 9 months
[libvirt PATCH 00/17] qemu: Introduce hvf domain type for Hypervisor.framework
by Andrea Bolognani
In order to hopefully address [libvirt#147] at long last, I've picked
up Roman's patches from 2018 and attempted to forward-port them.
More specifically, I've used the [roolebo/hvf-domain] branch as a
starting point, since it seems to contain a few improvements over
[v2] and was just easier to pick up.
The code is mostly his own, so I've retained the existing authorship
information, but I've dropped Reviewed-by tags for commits that have
been modified in non-trivial ways. I've applied very minimal style
tweaks along the way, but overall I've tried to modify the existing
patches as little as possible.
I've added a few changes of my own, which I've marked as "fixup!"
when I felt that they should be squashed into the previous patch
rather than existing as separate commits.
The new test cases, such as they are, pass, and no regressions to KVM
support appear to have been introduced in the process. I don't
currently have access to a machine running macOS, so I can't verify
that it's actually possible to start a hardware-accelerated VM.
Changes from [v2]:
* rebased on top of master;
* added a couple of simple test cases.
Notes / to do items:
* I've skipped [kvmonly] because it was not obvious how to
forward-port it, and things generally seemed to work fine even
without it. I have some ideas on how to integrate the logic in
the current version of the code if it turns out to be necessary
after all;
* I've also skipped most of the changes to docs/formatdomain.rst,
namely the ones that replaced "QEMU" or "QEMU/KVM" in :since:
blocks. I'm not yet sure how to best deal with the situation, but
adding "and HVF" everywhere is almost certainly not it;
* docs/macos.html.in needs to be converted to ReStructuredText
before merging.
Useful links:
* GitLab: [abologna/hvf]
* CI: [pipeline]
[libvirt#147] https://gitlab.com/libvirt/libvirt/-/issues/147
[roolebo/hvf-domain] https://github.com/roolebo/libvirt/tree/hvf-domain
[abologna/hvf] https://gitlab.com/abologna/libvirt/-/commits/hvf
[pipeline] https://gitlab.com/abologna/libvirt/-/pipelines/441350810
[kvmonly] https://github.com/roolebo/libvirt/commit/1752ccbfe53bf4f89f3f45e4ef96b7d...
[v2] https://listman.redhat.com/archives/libvir-list/2018-November/msg00802.html
Andrea Bolognani (4):
fixup! qemu: Fix HVF architecture check
tests: Add HVF support to testutilsqemu
tests: Add HVF test cases
fixup! NEWS: Mention Apple Silicon support for HVF
Roman Bolshakov (13):
conf: Add hvf domain type
qemu: Define hvf capability
qemu: Query hvf capability on macOS
qemu: Expose hvf domain type if hvf is supported
qemu: Introduce virQEMUCapsTypeIsAccelerated
qemu: Introduce virQEMUCapsHaveAccel
qemu: Introduce virQEMUCapsAccelStr
qemu: Make error message accel-agnostic
qemu: Correct CPU capabilities probing for hvf
docs: Add hvf on QEMU driver page
docs: Note hvf support for domain elements
docs: Add support page for libvirt on macOS
news: Mention hvf domain type
NEWS.rst | 9 +
docs/docs.html.in | 3 +
docs/drvqemu.rst | 48 +++-
docs/formatdomain.rst | 22 +-
docs/index.html.in | 4 +-
docs/macos.html.in | 229 ++++++++++++++++++
docs/schemas/domaincommon.rng | 1 +
src/conf/domain_conf.c | 1 +
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 107 +++++++-
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 4 +
src/qemu/qemu_process.c | 2 +-
.../hvf-aarch64-virt-headless.args | 48 ++++
.../hvf-aarch64-virt-headless.xml | 45 ++++
.../hvf-x86_64-q35-headless.args | 47 ++++
.../hvf-x86_64-q35-headless.xml | 44 ++++
tests/qemuxml2argvtest.c | 18 ++
.../hvf-aarch64-virt-headless.xml | 94 +++++++
.../hvf-x86_64-q35-headless.xml | 97 ++++++++
tests/qemuxml2xmltest.c | 18 ++
tests/testutilsqemu.c | 40 +++
22 files changed, 857 insertions(+), 26 deletions(-)
create mode 100644 docs/macos.html.in
create mode 100644 tests/qemuxml2argvdata/hvf-aarch64-virt-headless.args
create mode 100644 tests/qemuxml2argvdata/hvf-aarch64-virt-headless.xml
create mode 100644 tests/qemuxml2argvdata/hvf-x86_64-q35-headless.args
create mode 100644 tests/qemuxml2argvdata/hvf-x86_64-q35-headless.xml
create mode 100644 tests/qemuxml2xmloutdata/hvf-aarch64-virt-headless.xml
create mode 100644 tests/qemuxml2xmloutdata/hvf-x86_64-q35-headless.xml
--
2.31.1
2 years, 9 months
Plans for the next release
by Jiri Denemark
We are getting close to the next release of libvirt. To aim for the
release on Jan 14 I suggest entering the freeze on Monday Jan 10 and
tagging RC2 on Wednesday Jan 12.
I hope this works for everyone.
Jirka
2 years, 9 months
[PATCH] ci: Refresh configuration
by Andrea Bolognani
Notable changes:
* drop parted and XFS headers.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed under the CI refresh rule.
Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/441266800
Full patch: https://gitlab.com/libvirt/libvirt/-/commit/4c7316b2f00c847bc5dc9c8218c25...
ci/containers/centos-8.Dockerfile | 2 --
ci/containers/centos-stream-8.Dockerfile | 2 --
ci/containers/debian-10-cross-aarch64.Dockerfile | 4 +---
ci/containers/debian-10-cross-armv6l.Dockerfile | 4 +---
ci/containers/debian-10-cross-armv7l.Dockerfile | 4 +---
ci/containers/debian-10-cross-i686.Dockerfile | 4 +---
ci/containers/debian-10-cross-mips.Dockerfile | 4 +---
ci/containers/debian-10-cross-mips64el.Dockerfile | 4 +---
ci/containers/debian-10-cross-mipsel.Dockerfile | 4 +---
ci/containers/debian-10-cross-ppc64le.Dockerfile | 4 +---
ci/containers/debian-10-cross-s390x.Dockerfile | 4 +---
ci/containers/debian-10.Dockerfile | 2 --
ci/containers/debian-11-cross-aarch64.Dockerfile | 4 +---
ci/containers/debian-11-cross-armv6l.Dockerfile | 4 +---
ci/containers/debian-11-cross-armv7l.Dockerfile | 4 +---
ci/containers/debian-11-cross-i686.Dockerfile | 4 +---
ci/containers/debian-11-cross-mips64el.Dockerfile | 4 +---
ci/containers/debian-11-cross-mipsel.Dockerfile | 4 +---
ci/containers/debian-11-cross-ppc64le.Dockerfile | 4 +---
ci/containers/debian-11-cross-s390x.Dockerfile | 4 +---
ci/containers/debian-11.Dockerfile | 2 --
ci/containers/debian-sid-cross-aarch64.Dockerfile | 4 +---
ci/containers/debian-sid-cross-armv6l.Dockerfile | 4 +---
ci/containers/debian-sid-cross-armv7l.Dockerfile | 4 +---
ci/containers/debian-sid-cross-i686.Dockerfile | 4 +---
ci/containers/debian-sid-cross-mips64el.Dockerfile | 4 +---
ci/containers/debian-sid-cross-mipsel.Dockerfile | 4 +---
ci/containers/debian-sid-cross-ppc64le.Dockerfile | 4 +---
ci/containers/debian-sid-cross-s390x.Dockerfile | 4 +---
ci/containers/debian-sid.Dockerfile | 2 --
ci/containers/fedora-34.Dockerfile | 2 --
ci/containers/fedora-35-cross-mingw32.Dockerfile | 1 -
ci/containers/fedora-35-cross-mingw64.Dockerfile | 1 -
ci/containers/fedora-35.Dockerfile | 2 --
ci/containers/fedora-rawhide-cross-mingw32.Dockerfile | 1 -
ci/containers/fedora-rawhide-cross-mingw64.Dockerfile | 1 -
ci/containers/fedora-rawhide.Dockerfile | 2 --
ci/containers/opensuse-leap-152.Dockerfile | 4 +---
ci/containers/opensuse-tumbleweed.Dockerfile | 4 +---
ci/containers/ubuntu-1804.Dockerfile | 2 --
ci/containers/ubuntu-2004.Dockerfile | 2 --
41 files changed, 27 insertions(+), 105 deletions(-)
diff --git a/ci/containers/centos-8.Dockerfile b/ci/containers/centos-8.Dockerfile
index 358069ad88..f01ca6a0d9 100644
--- a/ci/containers/centos-8.Dockerfile
+++ b/ci/containers/centos-8.Dockerfile
@@ -67,7 +67,6 @@ RUN dnf update -y && \
ninja-build \
numactl-devel \
numad \
- parted \
parted-devel \
perl \
pkgconfig \
@@ -85,7 +84,6 @@ RUN dnf update -y && \
systemd-devel \
systemtap-sdt-devel \
wireshark-devel \
- xfsprogs-devel \
yajl-devel && \
dnf autoremove -y && \
dnf clean all -y && \
[... a lot more like this ...]
--
2.31.1
2 years, 10 months
[PATCH] NEWS: Add entries for libxl changes during 8.0.0 development
by Jim Fehlig
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
NEWS.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index e7d5316721..d819b6c226 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -13,6 +13,11 @@ v8.0.0 (unreleased)
* **Security**
+ * libxl: Fix potential deadlock and crash (CVE-2021-4147)
+
+ A rouge guest could continuously reboot itself and cause libvirtd on the
+ host to deadlock or crash, resulting in a denial of service condition.
+
* **Removed features**
* qemu: Explicitly forbid live changing nodeset for strict numatune
@@ -44,6 +49,8 @@ v8.0.0 (unreleased)
* **Improvements**
+ * libxl: Implement the virDomainGetMessages API
+
* **Bug fixes**
--
2.34.1
2 years, 10 months