From: "Daniel P. Berrange" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org,
ademaria@redhat.com, kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH for 2.10?] qxl: call qemu_spice_display_init_common for secondary devices
Date: Tue, 15 Aug 2017 14:39:23 +0100 [thread overview]
Message-ID: <20170815133923.GL9674@redhat.com> (raw)
In-Reply-To: <20170814231552.24593-1-pbonzini@redhat.com>
On Tue, Aug 15, 2017 at 01:15:52AM +0200, Paolo Bonzini wrote:
> Fixes this 2.10 regression:
>
> $ qemu-system-x86_64 -cpu host -m 6144 -vga qxl -device qxl
> qemu-system-x86_64: util/qemu-thread-posix.c:64: qemu_mutex_lock: Assertion `mutex->initialized' failed.
>
> Reported-by: ademaria@redhat.com
> Cc: kraxel@redhat.com
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> hw/display/qxl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/display/qxl.c b/hw/display/qxl.c
> index 7f8c73b56d..ae3677fd1e 100644
> --- a/hw/display/qxl.c
> +++ b/hw/display/qxl.c
> @@ -2054,6 +2054,7 @@ static void qxl_realize_common(PCIQXLDevice *qxl, Error **errp)
> uint32_t pci_device_rev;
> uint32_t io_size;
>
> + qemu_spice_display_init_common(&qxl->ssd);
> qxl->mode = QXL_MODE_UNDEFINED;
> qxl->generation = 1;
> qxl->num_memslots = NUM_MEMSLOTS;
> @@ -2176,7 +2177,6 @@ static void qxl_realize_primary(PCIDevice *dev, Error **errp)
> portio_list_add(&qxl->vga_port_list, pci_address_space_io(dev), 0x3b0);
>
> vga->con = graphic_console_init(DEVICE(dev), 0, &qxl_ops, qxl);
> - qemu_spice_display_init_common(&qxl->ssd);
>
> qxl_realize_common(qxl, &local_err);
> if (local_err) {
IIUC, we hit the abort because we have 2 QXL devices, and only
qxl_realize_primary() is calling qemu_spice_display_init_common().
By moving the qemu_spice_display_init_common() call upto into
the qxl_realize_common() method, it also gets triggered by
qxl_realize_secondary(). It makes that we need to initialize the
'ssd' field for both primary and secondary displays
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2017-08-15 13:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-14 23:15 [Qemu-devel] [PATCH for 2.10?] qxl: call qemu_spice_display_init_common for secondary devices Paolo Bonzini
2017-08-15 0:07 ` Paolo Bonzini
2017-08-15 13:39 ` Daniel P. Berrange [this message]
2017-08-15 13:39 ` Stefan Hajnoczi
2017-08-15 14:39 ` Peter Maydell
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=20170815133923.GL9674@redhat.com \
--to=berrange@redhat.com \
--cc=ademaria@redhat.com \
--cc=kraxel@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--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).