summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2015-11-18 10:02:58 +0100
committerMichael S. Tsirkin <mst@redhat.com>2015-11-19 15:26:05 +0200
commit1c7ba94a184df1eddd589d5400d879568d3e5d08 (patch)
tree92520c361efd9dccf57fe9d6b8def625ea0d7a2f /exec.c
parent421f4448cec3e42f8477499c5c584699e2cf656b (diff)
downloadqemu-1c7ba94a184df1eddd589d5400d879568d3e5d08.tar.gz
qemu-1c7ba94a184df1eddd589d5400d879568d3e5d08.tar.bz2
qemu-1c7ba94a184df1eddd589d5400d879568d3e5d08.zip
exec: silence hugetlbfs warning under qtest
vhost-user-test prints a warning. A test should not need to run on hugetlbfs, let's silence the warning under qtest. The condition can't check on qtest_enabled() since vhost-user-test actually doesn't use qtest accel. However, qtest_driver() can be used, if qtest_init() is called early enough. For that reason, move chardev and qtest initialization early. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index b09f18b2a4..acbd4a2cb5 100644
--- a/exec.c
+++ b/exec.c
@@ -51,6 +51,7 @@
#include "qemu/main-loop.h"
#include "translate-all.h"
#include "sysemu/replay.h"
+#include "sysemu/qtest.h"
#include "exec/memory-internal.h"
#include "exec/ram_addr.h"
@@ -1196,8 +1197,10 @@ static long gethugepagesize(const char *path, Error **errp)
return 0;
}
- if (fs.f_type != HUGETLBFS_MAGIC)
+ if (!qtest_driver() &&
+ fs.f_type != HUGETLBFS_MAGIC) {
fprintf(stderr, "Warning: path not on HugeTLBFS: %s\n", path);
+ }
return fs.f_bsize;
}