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: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH 3/3] exec: silence hugetlbfs warning under qtest
Date: Mon, 16 Nov 2015 23:50:54 +0200

On Mon, Nov 16, 2015 at 06:23:38PM +0100, 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>
> ---

Peter, Paolo, any comments on this one?

>  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



reply via email to

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