qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Liang Li <liang.z.li@intel.com>, qemu-devel@nongnu.org
Cc: peter.crosthwaite@xilinx.com, xen-devel@lists.xensource.com,
	stefano.stabellini@eu.citrix.com, kevin.tian@intel.com,
	yang.z.zhang@intel.com, robert.hu@intel.com
Subject: Re: [Qemu-devel] [PATCH] xen-pt: Fix bug cause PCI devices re-attach failed
Date: Mon, 13 Apr 2015 16:28:03 +0200	[thread overview]
Message-ID: <552BD273.9060105@redhat.com> (raw)
In-Reply-To: <1428934370-29695-1-git-send-email-liang.z.li@intel.com>



On 13/04/2015 16:12, Liang Li wrote:
>     2. Do the attach and detach operation with a time interval. eg. 10s.
> 
>     The error message will not  disappear if retry, in this case, it's
>     a bug.
> 
> In the 'xen_pt_region_add' and 'xen_pt_region_del', we should only care
> about the 'xen-pci-pt-*' memory region, this can avoid the region's
> reference count is not equal with the dereference count when the
> device is detached and prevent the device's related QemuOpts object from
> being released properly, and then trigger the bug when the device is
> re-attached.

This doesn't explain _which_ region is causing the bug and how.

Assuming this is the right fix, should you instead move the
memory_region_ref/unref pair from xen_pt_region_add/del after this
conditional:

    if (bar == -1 && (!s->msix || &s->msix->mmio != mr)) {
        return;
    }

in xen_pt_region_update?

Paolo

  reply	other threads:[~2015-04-13 14:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-13 14:12 [Qemu-devel] [PATCH] xen-pt: Fix bug cause PCI devices re-attach failed Liang Li
2015-04-13 14:28 ` Paolo Bonzini [this message]
2015-04-15 14:14   ` Li, Liang Z
2015-04-15 14:16     ` 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=552BD273.9060105@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=kevin.tian@intel.com \
    --cc=liang.z.li@intel.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    --cc=robert.hu@intel.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=yang.z.zhang@intel.com \
    /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).