-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip * add julia compat * debug failing make * patch makefile to not fail on cleanup * try to fix musl build * fix bash syntax * fix makefile failure * add complete list of products, remove i686 musl * expand cxxstring ABIs * Update Q/Qemu/build_tarballs.jl Co-authored-by: Mosè Giordano <[email protected]> * Apply suggestions from code review Co-authored-by: Mosè Giordano <[email protected]> * disable tests * link to rt * fix patch * actually declare rt as dependency of libqemuutil Co-authored-by: Mosè Giordano <[email protected]>
- Loading branch information
1 parent
fe599ff
commit 79ff6a0
Showing
6 changed files
with
189 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- a/meson.build | ||
+++ b/meson.build | ||
@@ -2620,8 +2620,8 @@ | ||
specific_ss.add_all(when: 'CONFIG_LINUX_USER', if_true: linux_user_ss) | ||
|
||
# needed for fuzzing binaries | ||
-subdir('tests/qtest/libqos') | ||
-subdir('tests/qtest/fuzz') | ||
+#subdir('tests/qtest/libqos') | ||
+#subdir('tests/qtest/fuzz') | ||
|
||
# accel modules | ||
tcg_real_module_ss = ss.source_set() | ||
@@ -3107,7 +3107,7 @@ | ||
subdir('tools') | ||
subdir('pc-bios') | ||
subdir('docs') | ||
-subdir('tests') | ||
+#subdir('tests') | ||
if gtk.found() | ||
subdir('po') | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- a/linux-user/strace.c | ||
+++ b/linux-user/strace.c | ||
@@ -18,6 +18,10 @@ | ||
#include "user-internals.h" | ||
#include "strace.h" | ||
|
||
+#if defined(CONFIG_FALLOCATE_PUNCH_HOLE) || defined(CONFIG_FALLOCATE_ZERO_RANGE) | ||
+#include <linux/falloc.h> | ||
+#endif | ||
+ | ||
struct syscallname { | ||
int nr; | ||
const char *name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/meson.build b/meson.build | ||
index 96de1a6ef9..36b315971e 100644 | ||
--- a/meson.build | ||
+++ b/meson.build | ||
@@ -2527,7 +2527,7 @@ util_ss.add_all(trace_ss) | ||
util_ss = util_ss.apply(config_all, strict: false) | ||
libqemuutil = static_library('qemuutil', | ||
sources: util_ss.sources() + stub_ss.sources() + genh, | ||
- dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc, pixman]) | ||
+ dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc, pixman, rt]) | ||
qemuutil = declare_dependency(link_with: libqemuutil, | ||
sources: genh + version_res) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c | ||
index 8af8c84dec..d86395f31a 100644 | ||
--- a/contrib/libvhost-user/libvhost-user.c | ||
+++ b/contrib/libvhost-user/libvhost-user.c | ||
@@ -646,7 +646,7 @@ vu_set_mem_table_exec_postcopy(VuDev *dev, VhostUserMsg *vmsg) | ||
--- a/subprojects/libvhost-user/libvhost-user.c | ||
+++ b/subprojects/libvhost-user/libvhost-user.c | ||
@@ -80,6 +80,14 @@ | ||
} \ | ||
} while (0) | ||
|
||
+/* copied from include/qemu/osdep.h */ | ||
+#define QEMU_MADV_INVALID -1 | ||
+#ifdef MADV_NOHUGEPAGE | ||
+#define QEMU_MADV_NOHUGEPAGE MADV_NOHUGEPAGE | ||
+#else | ||
+#define QEMU_MADV_NOHUGEPAGE QEMU_MADV_INVALID | ||
+#endif | ||
+ | ||
static inline | ||
bool has_feature(uint64_t features, unsigned int fbit) | ||
{ | ||
@@ -634,7 +642,7 @@ | ||
*/ | ||
ret = madvise((void *)dev_region->mmap_addr, | ||
ret = madvise((void *)(uintptr_t)dev_region->mmap_addr, | ||
dev_region->size + dev_region->mmap_offset, | ||
- MADV_NOHUGEPAGE); | ||
+ QEMU_MADV_NOHUGEPAGE); | ||
if (ret) { | ||
/* Note: This can happen legally on kernels that are configured | ||
* without madvise'able hugepages | ||
/* | ||
* Note: This can happen legally on kernels that are configured |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
diff --git a/linux-user/syscall.c b/linux-user/syscall.c | ||
index f1cfcc810..52cfe29d6 100644 | ||
--- a/linux-user/syscall.c | ||
+++ b/linux-user/syscall.c | ||
@@ -49,6 +49,7 @@ | ||
#include <sys/statfs.h> | ||
#include <utime.h> | ||
#include <sys/sysinfo.h> | ||
+#define _LINUX_SYSINFO_H | ||
#include <sys/signalfd.h> | ||
//#include <sys/user.h> | ||
#include <netinet/in.h> | ||
@@ -7281,12 +7282,47 @@ static inline abi_long host_to_target_timex64(abi_long target_addr, | ||
#endif | ||
|
||
#ifndef HAVE_SIGEV_NOTIFY_THREAD_ID | ||
+typedef union _sigval { | ||
+ int sival_int; | ||
+ void *sival_ptr; | ||
+} sigval_t; | ||
+ | ||
+/* | ||
+ * This works because the alignment is ok on all current architectures | ||
+ * but we leave open this being overridden in the future | ||
+ */ | ||
+#ifndef __ARCH_SIGEV_PREAMBLE_SIZE | ||
+#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t)) | ||
+#endif | ||
+ | ||
+#define SIGEV_MAX_SIZE 64 | ||
+#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) \ | ||
+ / sizeof(int)) | ||
+ | ||
+typedef struct _sigevent { | ||
+ sigval_t sigev_value; | ||
+ int sigev_signo; | ||
+ int sigev_notify; | ||
+ union { | ||
+ int _pad[SIGEV_PAD_SIZE]; | ||
+ int _tid; | ||
+ | ||
+ struct { | ||
+ void (*_function)(sigval_t); | ||
+ void *_attribute; /* really pthread_attr_t */ | ||
+ } _sigev_thread; | ||
+ } _sigev_un; | ||
+} sigevent_t; | ||
+ | ||
#define sigev_notify_thread_id _sigev_un._tid | ||
+#else | ||
+#define _sigevent sigevent | ||
#endif | ||
|
||
-static inline abi_long target_to_host_sigevent(struct sigevent *host_sevp, | ||
+static inline abi_long target_to_host_sigevent(struct sigevent *_host_sevp, | ||
abi_ulong target_addr) | ||
{ | ||
+ struct _sigevent *host_sevp = (struct _sigevent*)_host_sevp; | ||
struct target_sigevent *target_sevp; | ||
|
||
if (!lock_user_struct(VERIFY_READ, target_sevp, target_addr, 1)) { |