qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: "Wolf, Kevin" <kwolf@redhat.com>,
	Laurent Vivier <lvivier@redhat.com>,
	Thomas Huth <thuth@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 1/3] tests/qtest/vhost-user-test: use share=on with memfd
Date: Wed, 24 Feb 2021 14:22:31 +0400	[thread overview]
Message-ID: <CAMxuvazaCQ+WN6-rkhydEHmV7o4MrUzU7YBV4i1ZYodedV4aLw@mail.gmail.com> (raw)
In-Reply-To: <20210222161017.570837-2-stefanha@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1481 bytes --]

Hi

On Mon, Feb 22, 2021 at 8:11 PM Stefan Hajnoczi <stefanha@redhat.com> wrote:

> For some reason memfd never used share=on. vhost-user relies on
> mmap(MAP_SHARED) so this seems like a problem, but the tests still run
> without it.
>
>
Simply because it's on by default with memory-backend-memfd (it wouldn't
make much sense to use memfd in the first place without share)

Add share=on for consistency and to prevent future bugs in the test.
>

But it doesn't hurt to be explicit though.


> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

---
>  tests/qtest/vhost-user-test.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c
> index 1a5f5313ff..2db98c4920 100644
> --- a/tests/qtest/vhost-user-test.c
> +++ b/tests/qtest/vhost-user-test.c
> @@ -40,7 +40,7 @@
>  #define QEMU_CMD_MEM    " -m %d -object
> memory-backend-file,id=mem,size=%dM," \
>                          "mem-path=%s,share=on -numa node,memdev=mem"
>  #define QEMU_CMD_MEMFD  " -m %d -object
> memory-backend-memfd,id=mem,size=%dM," \
> -                        " -numa node,memdev=mem"
> +                        "share=on -numa node,memdev=mem"
>  #define QEMU_CMD_CHR    " -chardev socket,id=%s,path=%s%s"
>  #define QEMU_CMD_NETDEV " -netdev vhost-user,id=hs0,chardev=%s,vhostforce"
>
> --
> 2.29.2
>
>

[-- Attachment #2: Type: text/html, Size: 2598 bytes --]

  reply	other threads:[~2021-02-24 10:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22 16:10 [PATCH 0/3] vhost-user: warn when guest RAM is not shared Stefan Hajnoczi
2021-02-22 16:10 ` [PATCH 1/3] tests/qtest/vhost-user-test: use share=on with memfd Stefan Hajnoczi
2021-02-24 10:22   ` Marc-André Lureau [this message]
2021-02-24 15:31     ` Stefan Hajnoczi
2021-03-08  6:31   ` Thomas Huth
2021-03-15 15:34     ` Stefan Hajnoczi
2021-02-22 16:10 ` [PATCH 2/3] memory: add memory_region_is_mapped_shared() Stefan Hajnoczi
2021-02-24 10:33   ` Marc-André Lureau
2021-02-24 15:40     ` Stefan Hajnoczi
2021-02-22 16:10 ` [PATCH 3/3] vhost-user: warn when guest RAM is not shared Stefan Hajnoczi
2021-02-24 10:38   ` Marc-André Lureau
2021-05-11  8:21 ` [PATCH 0/3] " Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMxuvazaCQ+WN6-rkhydEHmV7o4MrUzU7YBV4i1ZYodedV4aLw@mail.gmail.com \
    --to=marcandre.lureau@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).