aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2022-04-02 09:36:07 +0100
committerPeter Maydell <peter.maydell@linaro.org>2022-04-02 09:36:07 +0100
commitbc6ec396d471d9e4aae7e2ff8b72e11da9a97665 (patch)
treed504611b32e6052e385a97e96e115d6e2dba2f7b
parentea72ac9bc8fcb90405768412ebb9ff01d3b1a2bb (diff)
parente32aaa5a19e24233180042f84a0235a209de71cc (diff)
Merge tag 'pull-request-2022-04-01' of https://gitlab.com/thuth/qemu into staging
* Fix some compilation issues * Fix overflow calculation in s390x emulation * Update location of lockdown.yml in MAINTAINERS file # gpg: Signature made Fri 01 Apr 2022 12:27:38 BST # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * tag 'pull-request-2022-04-01' of https://gitlab.com/thuth/qemu: trace: fix compilation with lttng-ust >= 2.13 9p: move P9_XATTR_SIZE_MAX from 9p.h to 9p.c meson.build: Fix dependency of page-vary-common.c to config-poison.h target/s390x: Fix determination of overflow condition code after subtraction target/s390x: Fix determination of overflow condition code after addition misc: Fixes MAINTAINERS's path .github/workflows/lockdown.yml Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--MAINTAINERS2
-rw-r--r--hw/9pfs/9p.c28
-rw-r--r--hw/9pfs/9p.h18
-rw-r--r--meson.build6
-rw-r--r--scripts/tracetool/format/ust_events_h.py4
-rw-r--r--target/s390x/tcg/cc_helper.c8
6 files changed, 33 insertions, 33 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 68142340bd..4ad2451e03 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3615,7 +3615,7 @@ M: Thomas Huth <thuth@redhat.com>
R: Wainer dos Santos Moschetta <wainersm@redhat.com>
R: Beraldo Leal <bleal@redhat.com>
S: Maintained
-F: .github/lockdown.yml
+F: .github/workflows/lockdown.yml
F: .gitlab-ci.yml
F: .gitlab-ci.d/
F: .travis.yml
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index dcaa602d4c..225f31fc31 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -17,6 +17,11 @@
*/
#include "qemu/osdep.h"
+#ifdef CONFIG_LINUX
+#include <linux/limits.h>
+#else
+#include <limits.h>
+#endif
#include <glib/gprintf.h>
#include "hw/virtio/virtio.h"
#include "qapi/error.h"
@@ -33,11 +38,6 @@
#include "migration/blocker.h"
#include "qemu/xxhash.h"
#include <math.h>
-#ifdef CONFIG_LINUX
-#include <linux/limits.h>
-#else
-#include <limits.h>
-#endif
int open_fd_hw;
int total_open_fd;
@@ -3925,6 +3925,24 @@ out_nofid:
v9fs_string_free(&name);
}
+#if defined(CONFIG_LINUX)
+/* Currently, only Linux has XATTR_SIZE_MAX */
+#define P9_XATTR_SIZE_MAX XATTR_SIZE_MAX
+#elif defined(CONFIG_DARWIN)
+/*
+ * Darwin doesn't seem to define a maximum xattr size in its user
+ * space header, so manually configure it across platforms as 64k.
+ *
+ * Having no limit at all can lead to QEMU crashing during large g_malloc()
+ * calls. Because QEMU does not currently support macOS guests, the below
+ * preliminary solution only works due to its being a reflection of the limit of
+ * Linux guests.
+ */
+#define P9_XATTR_SIZE_MAX 65536
+#else
+#error Missing definition for P9_XATTR_SIZE_MAX for this host system
+#endif
+
static void coroutine_fn v9fs_xattrcreate(void *opaque)
{
int flags, rflags = 0;
diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h
index af2635fae9..994f952600 100644
--- a/hw/9pfs/9p.h
+++ b/hw/9pfs/9p.h
@@ -479,22 +479,4 @@ struct V9fsTransport {
void (*push_and_notify)(V9fsPDU *pdu);
};
-#if defined(XATTR_SIZE_MAX)
-/* Linux */
-#define P9_XATTR_SIZE_MAX XATTR_SIZE_MAX
-#elif defined(CONFIG_DARWIN)
-/*
- * Darwin doesn't seem to define a maximum xattr size in its user
- * space header, so manually configure it across platforms as 64k.
- *
- * Having no limit at all can lead to QEMU crashing during large g_malloc()
- * calls. Because QEMU does not currently support macOS guests, the below
- * preliminary solution only works due to its being a reflection of the limit of
- * Linux guests.
- */
-#define P9_XATTR_SIZE_MAX 65536
-#else
-#error Missing definition for P9_XATTR_SIZE_MAX for this host system
-#endif
-
#endif
diff --git a/meson.build b/meson.build
index aef724ad3c..861de93c4f 100644
--- a/meson.build
+++ b/meson.build
@@ -455,8 +455,8 @@ if 'CONFIG_GIO' in config_host
endif
lttng = not_found
if 'ust' in get_option('trace_backends')
- lttng = dependency('lttng-ust', required: true, method: 'pkg-config',
- kwargs: static_kwargs)
+ lttng = dependency('lttng-ust', required: true, version: '>= 2.1',
+ method: 'pkg-config', kwargs: static_kwargs)
endif
pixman = not_found
if have_system or have_tools
@@ -2881,7 +2881,7 @@ if get_option('b_lto')
if get_option('cfi')
pagevary_flags += '-fno-sanitize=cfi-icall'
endif
- pagevary = static_library('page-vary-common', sources: pagevary,
+ pagevary = static_library('page-vary-common', sources: pagevary + genh,
c_args: pagevary_flags)
pagevary = declare_dependency(link_with: pagevary)
endif
diff --git a/scripts/tracetool/format/ust_events_h.py b/scripts/tracetool/format/ust_events_h.py
index 6ce559f6cc..b99fe6896b 100644
--- a/scripts/tracetool/format/ust_events_h.py
+++ b/scripts/tracetool/format/ust_events_h.py
@@ -29,8 +29,8 @@ def generate(events, backend, group):
'#undef TRACEPOINT_PROVIDER',
'#define TRACEPOINT_PROVIDER qemu',
'',
- '#undef TRACEPOINT_INCLUDE_FILE',
- '#define TRACEPOINT_INCLUDE_FILE ./%s' % include,
+ '#undef TRACEPOINT_INCLUDE',
+ '#define TRACEPOINT_INCLUDE "./%s"' % include,
'',
'#if !defined (TRACE_%s_GENERATED_UST_H) || \\' % group.upper(),
' defined(TRACEPOINT_HEADER_MULTI_READ)',
diff --git a/target/s390x/tcg/cc_helper.c b/target/s390x/tcg/cc_helper.c
index 8d04097f78..b2e8d3d9f5 100644
--- a/target/s390x/tcg/cc_helper.c
+++ b/target/s390x/tcg/cc_helper.c
@@ -136,7 +136,7 @@ static uint32_t cc_calc_subu(uint64_t borrow_out, uint64_t result)
static uint32_t cc_calc_add_64(int64_t a1, int64_t a2, int64_t ar)
{
- if ((a1 > 0 && a2 > 0 && ar < 0) || (a1 < 0 && a2 < 0 && ar > 0)) {
+ if ((a1 > 0 && a2 > 0 && ar < 0) || (a1 < 0 && a2 < 0 && ar >= 0)) {
return 3; /* overflow */
} else {
if (ar < 0) {
@@ -151,7 +151,7 @@ static uint32_t cc_calc_add_64(int64_t a1, int64_t a2, int64_t ar)
static uint32_t cc_calc_sub_64(int64_t a1, int64_t a2, int64_t ar)
{
- if ((a1 > 0 && a2 < 0 && ar < 0) || (a1 < 0 && a2 > 0 && ar > 0)) {
+ if ((a1 >= 0 && a2 < 0 && ar < 0) || (a1 < 0 && a2 > 0 && ar > 0)) {
return 3; /* overflow */
} else {
if (ar < 0) {
@@ -196,7 +196,7 @@ static uint32_t cc_calc_comp_64(int64_t dst)
static uint32_t cc_calc_add_32(int32_t a1, int32_t a2, int32_t ar)
{
- if ((a1 > 0 && a2 > 0 && ar < 0) || (a1 < 0 && a2 < 0 && ar > 0)) {
+ if ((a1 > 0 && a2 > 0 && ar < 0) || (a1 < 0 && a2 < 0 && ar >= 0)) {
return 3; /* overflow */
} else {
if (ar < 0) {
@@ -211,7 +211,7 @@ static uint32_t cc_calc_add_32(int32_t a1, int32_t a2, int32_t ar)
static uint32_t cc_calc_sub_32(int32_t a1, int32_t a2, int32_t ar)
{
- if ((a1 > 0 && a2 < 0 && ar < 0) || (a1 < 0 && a2 > 0 && ar > 0)) {
+ if ((a1 >= 0 && a2 < 0 && ar < 0) || (a1 < 0 && a2 > 0 && ar > 0)) {
return 3; /* overflow */
} else {
if (ar < 0) {