* [Qemu-devel] [PULL 0/2] SCSI/vl.c patches for 2019-06-05
@ 2019-06-05 14:40 Paolo Bonzini
2019-06-05 14:40 ` [Qemu-devel] [PULL 1/2] vl: Fix -drive / -blockdev persistent reservation management Paolo Bonzini
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Paolo Bonzini @ 2019-06-05 14:40 UTC (permalink / raw)
To: qemu-devel
The following changes since commit c87759ce876a7a0b17c2bf4f0b964bd51f0ee871:
q35: Revert to kernel irqchip (2019-06-03 14:03:03 +0200)
are available in the git repository at:
git://github.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to edfb4389c26cbfd873707306024130bda6049780:
vl: Document why objects are delayed (2019-06-05 16:15:32 +0200)
----------------------------------------------------------------
* Fix pr-manager-helper (Markus)
----------------------------------------------------------------
Markus Armbruster (2):
vl: Fix -drive / -blockdev persistent reservation management
vl: Document why objects are delayed
vl.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 1/2] vl: Fix -drive / -blockdev persistent reservation management
2019-06-05 14:40 [Qemu-devel] [PULL 0/2] SCSI/vl.c patches for 2019-06-05 Paolo Bonzini
@ 2019-06-05 14:40 ` Paolo Bonzini
2019-06-05 14:40 ` [Qemu-devel] [PULL 2/2] vl: Document why objects are delayed Paolo Bonzini
2019-06-06 11:52 ` [Qemu-devel] [PULL 0/2] SCSI/vl.c patches for 2019-06-05 Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2019-06-05 14:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Markus Armbruster, qemu-stable
From: Markus Armbruster <armbru@redhat.com>
qemu-system-FOO's main() acts on command line arguments in its own
idiosyncratic order. There's not much method to its madness.
Whenever we find a case where one kind of command line argument needs
to refer to something created for another kind later, we rejigger the
order.
Recent commit cda4aa9a5a "vl: Create block backends before setting
machine properties" was such a rejigger. Block backends are now
created before "delayed" objects. This broke persistent reservation
management. Reproducer:
$ qemu-system-x86_64 -object pr-manager-helper,id=pr-helper0,path=/tmp/pr-helper0.sock-drive -drive file=/dev/mapper/crypt,file.pr-manager=pr-helper0,format=raw,if=none,id=drive-scsi0-0-0-2
qemu-system-x86_64: -drive file=/dev/mapper/crypt,file.pr-manager=pr-helper0,format=raw,if=none,id=drive-scsi0-0-0-2: No persistent reservation manager with id 'pr-helper0'
The delayed pr-manager-helper object is created too late for use by
-drive or -blockdev. Normal objects are still created in time.
pr-manager-helper has always been a delayed object (commit 7c9e527659
"scsi, file-posix: add support for persistent reservation
management"). Turns out there's no real reason for that. Make it a
normal object.
Fixes: cda4aa9a5a08777cf13e164c0543bd4888b8adce
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190604151251.9903-2-armbru@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
vl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/vl.c b/vl.c
index f023a8c..cc6246d 100644
--- a/vl.c
+++ b/vl.c
@@ -2751,8 +2751,7 @@ static bool object_create_initial(const char *type, QemuOpts *opts)
exit(0);
}
- if (g_str_equal(type, "rng-egd") ||
- g_str_has_prefix(type, "pr-manager-")) {
+ if (g_str_equal(type, "rng-egd")) {
return false;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 2/2] vl: Document why objects are delayed
2019-06-05 14:40 [Qemu-devel] [PULL 0/2] SCSI/vl.c patches for 2019-06-05 Paolo Bonzini
2019-06-05 14:40 ` [Qemu-devel] [PULL 1/2] vl: Fix -drive / -blockdev persistent reservation management Paolo Bonzini
@ 2019-06-05 14:40 ` Paolo Bonzini
2019-06-06 11:52 ` [Qemu-devel] [PULL 0/2] SCSI/vl.c patches for 2019-06-05 Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2019-06-05 14:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Markus Armbruster
From: Markus Armbruster <armbru@redhat.com>
Objects should not be "delayed" without a reason, as the previous
commit demonstrates. The remaining ones have reasons. State them.
and demand future ones come with such a statement.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190604151251.9903-3-armbru@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
vl.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/vl.c b/vl.c
index cc6246d..cd1fbc4 100644
--- a/vl.c
+++ b/vl.c
@@ -2751,19 +2751,25 @@ static bool object_create_initial(const char *type, QemuOpts *opts)
exit(0);
}
+ /*
+ * Objects should not be made "delayed" without a reason. If you
+ * add one, state the reason in a comment!
+ */
+
+ /* Reason: rng-egd property "chardev" */
if (g_str_equal(type, "rng-egd")) {
return false;
}
#if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
+ /* Reason: cryptodev-vhost-user property "chardev" */
if (g_str_equal(type, "cryptodev-vhost-user")) {
return false;
}
#endif
/*
- * return false for concrete netfilters since
- * they depend on netdevs already existing
+ * Reason: filter-* property "netdev" etc.
*/
if (g_str_equal(type, "filter-buffer") ||
g_str_equal(type, "filter-dump") ||
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] SCSI/vl.c patches for 2019-06-05
2019-06-05 14:40 [Qemu-devel] [PULL 0/2] SCSI/vl.c patches for 2019-06-05 Paolo Bonzini
2019-06-05 14:40 ` [Qemu-devel] [PULL 1/2] vl: Fix -drive / -blockdev persistent reservation management Paolo Bonzini
2019-06-05 14:40 ` [Qemu-devel] [PULL 2/2] vl: Document why objects are delayed Paolo Bonzini
@ 2019-06-06 11:52 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2019-06-06 11:52 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: QEMU Developers
On Wed, 5 Jun 2019 at 15:45, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> The following changes since commit c87759ce876a7a0b17c2bf4f0b964bd51f0ee871:
>
> q35: Revert to kernel irqchip (2019-06-03 14:03:03 +0200)
>
> are available in the git repository at:
>
> git://github.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to edfb4389c26cbfd873707306024130bda6049780:
>
> vl: Document why objects are delayed (2019-06-05 16:15:32 +0200)
>
> ----------------------------------------------------------------
> * Fix pr-manager-helper (Markus)
>
> ----------------------------------------------------------------
> Markus Armbruster (2):
> vl: Fix -drive / -blockdev persistent reservation management
> vl: Document why objects are delayed
>
> vl.c | 13 +++++++++----
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.1
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-06 11:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-05 14:40 [Qemu-devel] [PULL 0/2] SCSI/vl.c patches for 2019-06-05 Paolo Bonzini
2019-06-05 14:40 ` [Qemu-devel] [PULL 1/2] vl: Fix -drive / -blockdev persistent reservation management Paolo Bonzini
2019-06-05 14:40 ` [Qemu-devel] [PULL 2/2] vl: Document why objects are delayed Paolo Bonzini
2019-06-06 11:52 ` [Qemu-devel] [PULL 0/2] SCSI/vl.c patches for 2019-06-05 Peter Maydell
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).