qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>, qemu-devel@nongnu.org
Cc: "Michael S . Tsirkin" <mst@redhat.com>,
	Mao Zhongyi <maozy.fnst@cn.fujitsu.com>
Subject: Re: [Qemu-devel] [PATCH] xio3130_downstream: Report error if pcie_chassis_add_slot() failed
Date: Sun, 27 Aug 2017 10:44:26 +0300	[thread overview]
Message-ID: <7dbaeffc-44f2-06a3-0d0c-0470958dd60c@redhat.com> (raw)
In-Reply-To: <20170825195406.19624-1-ehabkost@redhat.com>

Hi Eduardo,

On 25/08/2017 22:54, Eduardo Habkost wrote:
> On commit f8cd1b02 ("pci: Convert to realize"), no error_set*()
> call was added for the pcie_chassis_add_slot() error case.
> pcie_chassis_add_slot() errors get ignored, making QEMU crash
> later.  e.g.:
> 
>    $ qemu-system-x86_64 -device ioh3420 -device xio3130-downstream
>    qemu-system-x86_64: memory.c:2166: memory_region_del_subregion: Assertion `subregion->container == mr' failed.
>    Aborted (core dumped)
> 
> Fix it by reporting the error using error_setg().
> 
> Fixes: f8cd1b0201c41d88bb97dcafb80348a0e88d8805
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>   hw/pci-bridge/xio3130_downstream.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/hw/pci-bridge/xio3130_downstream.c b/hw/pci-bridge/xio3130_downstream.c
> index e706f36..5a882b0 100644
> --- a/hw/pci-bridge/xio3130_downstream.c
> +++ b/hw/pci-bridge/xio3130_downstream.c
> @@ -94,6 +94,7 @@ static void xio3130_downstream_realize(PCIDevice *d, Error **errp)
>       pcie_chassis_create(s->chassis);
>       rc = pcie_chassis_add_slot(s);
>       if (rc < 0) {
> +        error_setg(errp, "Can't add chassis slot, error %d", rc);
>           goto err_pcie_cap;
>       }
>   
> 


Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>

Thanks,
Marcel

  reply	other threads:[~2017-08-27  7:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 19:54 [Qemu-devel] [PATCH] xio3130_downstream: Report error if pcie_chassis_add_slot() failed Eduardo Habkost
2017-08-27  7:44 ` Marcel Apfelbaum [this message]
2017-09-19 20:08   ` Eduardo Habkost

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=7dbaeffc-44f2-06a3-0d0c-0470958dd60c@redhat.com \
    --to=marcel@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=maozy.fnst@cn.fujitsu.com \
    --cc=mst@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).