From: Rafael David Tinoco <rafael.tinoco@canonical.com>
To: qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com, 1626972@bugs.launchpad.net,
rafael.tinoco@canonical.com
Subject: [Qemu-devel] [PATCH] vhost: secure vhost shared log files using argv paremeter
Date: Sat, 22 Oct 2016 21:46:35 +0000 [thread overview]
Message-ID: <20161022214635.24353-1-rafael.tinoco@canonical.com> (raw)
Commit 31190ed7 added a migration blocker in vhost_dev_init() to
check if memfd would succeed. It is better if this blocker first
checks if vhost backend requires shared log. This will avoid a
situation where a blocker is added inappropriately (e.g. shared
log allocation fails when vhost backend doesn't support it).
---
hw/virtio/vhost.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index bd051ab..742d0aa 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -1122,7 +1122,7 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque,
if (!(hdev->features & (0x1ULL << VHOST_F_LOG_ALL))) {
error_setg(&hdev->migration_blocker,
"Migration disabled: vhost lacks VHOST_F_LOG_ALL feature.");
- } else if (!qemu_memfd_check()) {
+ } else if (vhost_dev_log_is_shared(hdev) && !qemu_memfd_check()) {
error_setg(&hdev->migration_blocker,
"Migration disabled: failed to allocate shared memory");
}
--
2.9.3
next reply other threads:[~2016-10-22 21:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-22 21:46 Rafael David Tinoco [this message]
2016-10-23 15:19 ` [Qemu-devel] [PATCH] vhost: secure vhost shared log files using argv paremeter Marc-André Lureau
-- strict thread matches above, loose matches on Subject: below --
2016-10-22 7:00 Rafael David Tinoco
2016-10-22 7:18 ` Marc-André Lureau
2016-10-22 21:52 ` Rafael David Tinoco
2016-10-30 19:26 ` Michael S. Tsirkin
2016-10-31 10:35 ` Rafael David Tinoco
2016-10-31 22:30 ` Michael S. Tsirkin
2016-11-08 12:48 ` Rafael David Tinoco
2016-11-08 13:01 ` Marc-André Lureau
2016-11-08 17:42 ` Rafael David Tinoco
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=20161022214635.24353-1-rafael.tinoco@canonical.com \
--to=rafael.tinoco@canonical.com \
--cc=1626972@bugs.launchpad.net \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).