All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Tony Krowiak <akrowiak@linux.ibm.com>
Cc: qemu-devel@nongnu.org, pasic@linux.ibm.com, imammedo@redhat.com,
	pmorel@linux.ibm.com
Subject: Re: [Qemu-devel] [PATCH v3] qdev/core: fix qbus_is_full()
Date: Thu, 28 Feb 2019 14:17:41 -0300	[thread overview]
Message-ID: <20190228171741.GD4925@habkost.net> (raw)
In-Reply-To: <1545062250-7573-1-git-send-email-akrowiak@linux.ibm.com>

On Mon, Dec 17, 2018 at 10:57:30AM -0500, Tony Krowiak wrote:
> The qbus_is_full(BusState *bus) function (qdev_monitor.c) compares the max_index
> value of the BusState structure with the max_dev value of the BusClass structure
> to determine whether the maximum number of children has been reached for the
> bus. The problem is, the max_index field of the BusState structure does not
> necessarily reflect the number of devices that have been plugged into
> the bus.
> 
> Whenever a child device is plugged into the bus, the bus's max_index value is
> assigned to the child device and then incremented. If the child is subsequently
> unplugged, the value of the max_index does not change and no longer reflects the
> number of children.
> 
> When the bus's max_index value reaches the maximum number of devices
> allowed for the bus (i.e., the max_dev field in the BusClass structure),
> attempts to plug another device will be rejected claiming that the bus is
> full -- even if the bus is actually empty.
> 
> To resolve the problem, a new 'num_children' field is being added to the
> BusState structure to keep track of the number of children plugged into the
> bus. It will be incremented when a child is plugged, and decremented when a
> child is unplugged.
> 
> Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com>
> Reviewed-by: Pierre Morel<pmorel@linux.ibm.com>
> Reviewed-by: Halil Pasic <pasic@linux.ibm.com>

Queued on machine-next, thanks!

-- 
Eduardo

  parent reply	other threads:[~2019-02-28 17:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17 15:57 [Qemu-devel] [PATCH v3] qdev/core: fix qbus_is_full() Tony Krowiak
2018-12-18 14:18 ` Igor Mammedov
2019-01-08 16:08 ` Tony Krowiak
2019-01-08 16:31   ` Cornelia Huck
2019-01-08 16:50     ` Halil Pasic
2019-01-08 17:06       ` Cornelia Huck
2019-01-08 20:34         ` Tony Krowiak
2019-01-09 10:14           ` Cornelia Huck
2019-01-09 15:36             ` Tony Krowiak
2019-01-09 17:35               ` Halil Pasic
2019-01-10 15:50                 ` Tony Krowiak
2019-01-10 16:57                   ` Cornelia Huck
2019-01-11 10:31                     ` Halil Pasic
2019-01-11 10:21                   ` Halil Pasic
2019-01-28 20:35 ` Tony Krowiak
2019-02-06  8:34   ` Igor Mammedov
2019-02-18 17:02     ` Tony Krowiak
2019-02-28 17:17 ` Eduardo Habkost [this message]
2019-03-04 17:35 ` Tony Krowiak
2019-03-05  8:01   ` Pierre Morel
2019-03-05  8:28   ` Igor Mammedov

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=20190228171741.GD4925@habkost.net \
    --to=ehabkost@redhat.com \
    --cc=akrowiak@linux.ibm.com \
    --cc=imammedo@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=pmorel@linux.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.