All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Cornelia Huck <cornelia.huck@de.ibm.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Halil Pasic <pasic@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] segfault use VRingMemoryRegionCaches for avail and used ring vs num-queues
Date: Mon, 27 Feb 2017 16:41:09 +0100	[thread overview]
Message-ID: <a5ada7c2-4166-1cdf-a4e0-7c49a68374f9@redhat.com> (raw)
In-Reply-To: <20170227163708.796ab27f.cornelia.huck@de.ibm.com>



On 27/02/2017 16:37, Cornelia Huck wrote:
> With the following applied (probably whitespace damaged), my guest
> starts:
> 
> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
> index e487e36..28906e5 100644
> --- a/hw/virtio/virtio.c
> +++ b/hw/virtio/virtio.c
> @@ -287,6 +287,9 @@ static inline void vring_set_avail_event(VirtQueue *vq, uint16_t val)
>  void virtio_queue_set_notification(VirtQueue *vq, int enable)
>  {
>      vq->notification = enable;
> +    if (!vq->vring.desc) {
> +        return;
> +    }
>  
>      rcu_read_lock();
>      if (virtio_vdev_has_feature(vq->vdev, VIRTIO_RING_F_EVENT_IDX)) {
> 
> Maybe introduction of caches just exposed bugs that were already there
> (trying to muck with vring state for queues that have not been setup?)

Yes, it did.  I had caught a few while writing the patches, but it does
feel like whack-a-mole...

Paolo

> Should we stick some asserts into the respective functions to help
> flush out the remaining bugs?

  reply	other threads:[~2017-02-27 15:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 14:09 [Qemu-devel] segfault use VRingMemoryRegionCaches for avail and used ring vs num-queues Christian Borntraeger
2017-02-27 15:06 ` Cornelia Huck
2017-02-27 15:37   ` Cornelia Huck
2017-02-27 15:41     ` Paolo Bonzini [this message]
2017-02-28 12:48       ` Cornelia Huck
2017-02-28 13:46         ` Paolo Bonzini
2017-02-28 14:15           ` Cornelia Huck
2017-02-27 15:28 ` Paolo Bonzini

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=a5ada7c2-4166-1cdf-a4e0-7c49a68374f9@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=mst@redhat.com \
    --cc=pasic@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.