qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/3] exec: silence hugetlbfs warning under qtest


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH 3/3] exec: silence hugetlbfs warning under qtest
Date: Tue, 17 Nov 2015 22:32:32 +0100

nack, this isn't enough to silence the warning, as vhost-user-test
uses  -machine accel=tcg

On Mon, Nov 16, 2015 at 6:23 PM,  <address@hidden> wrote:
> From: Marc-André Lureau <address@hidden>
>
> vhost-user-test prints a warning. A test should not need to run on
> hugetlbfs, let's silence the warning under qtest. Unfortunately, the
> condition can't check on qtest_enabled() or qtest_driver() since they
> are initialized later. Moving configure_accelerator() earlier is
> problematic, as the memory regions aren't yet fully set up and
> vhost-user-test fails.
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
>  exec.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/exec.c b/exec.c
> index b09f18b..3edc582 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1184,6 +1184,7 @@ void qemu_mutex_unlock_ramlist(void)
>  static long gethugepagesize(const char *path, Error **errp)
>  {
>      struct statfs fs;
> +    const char *p;
>      int ret;
>
>      do {
> @@ -1196,8 +1197,11 @@ static long gethugepagesize(const char *path, Error 
> **errp)
>          return 0;
>      }
>
> -    if (fs.f_type != HUGETLBFS_MAGIC)
> +    p = qemu_opt_get(qemu_get_machine_opts(), "accel");
> +    if (g_strcmp0(p, "qtest") &&
> +        fs.f_type != HUGETLBFS_MAGIC) {
>          fprintf(stderr, "Warning: path not on HugeTLBFS: %s\n", path);
> +    }
>
>      return fs.f_bsize;
>  }
> --
> 2.5.0
>
>



-- 
Marc-André Lureau



reply via email to

[Prev in Thread] Current Thread [Next in Thread]