-
Notifications
You must be signed in to change notification settings - Fork 561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QEMU] try updating #4506
Merged
Merged
[QEMU] try updating #4506
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2d0a5e2
wip
simeonschaub 55027c9
add julia compat
simeonschaub 23065e9
debug failing make
simeonschaub bd4f6b6
patch makefile to not fail on cleanup
simeonschaub 0fba2f0
try to fix musl build
simeonschaub 0943d9b
fix bash syntax
simeonschaub 43d5101
fix makefile failure
simeonschaub ed9ad71
add complete list of products, remove i686 musl
simeonschaub 1b11f5c
expand cxxstring ABIs
simeonschaub 93cef64
Update Q/Qemu/build_tarballs.jl
simeonschaub b42beb6
Apply suggestions from code review
simeonschaub e637a1c
disable tests
simeonschaub ca17389
link to rt
simeonschaub 37a801b
fix patch
simeonschaub fa7d22e
actually declare rt as dependency of libqemuutil
simeonschaub File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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; | ||
+ | ||
Comment on lines
+17
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is copied from the |
||
#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)) { |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the build process tries to delete a non-existent file in cleanup, which should be harmless. I tried patching the Makefile, but it didn't work and I thought it probably isn't worth the trouble over just ignoring the return code