public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: "Han, Weidong" <weidong.han@intel.com>
Cc: "'avi@redhat.com'" <avi@redhat.com>,
	"'kvm@vger.kernel.org'" <kvm@vger.kernel.org>
Subject: Re: [PATCH RFC] qemu: fix hot remove assigned device
Date: Tue, 9 Jun 2009 15:51:40 +0100	[thread overview]
Message-ID: <200906091551.41674.paul@codesourcery.com> (raw)
In-Reply-To: <715D42877B251141A38726ABF5CABF2C054590C496@pdsmsx503.ccr.corp.intel.com>

On Tuesday 09 June 2009, Han, Weidong wrote:
> Paul Brook wrote:
> > On Monday 08 June 2009, Weidong Han wrote:
> >> When hot remove an assigned device, segmentation fault was triggered
> >> by qemu_free(&pci_dev->qdev) in pci_unregister_device().
> >> pci_register_device() doesn't initialize or set pci_dev->qdev. For an
> >> assigned device, qdev variable isn't touched at all. So segmentation
> >> fault happens when to free a non-initialized qdev.
> >
> > Better would be to just disable hot remove for devices still using
> > the legacy pci_register_device API.
>
> PCI passthrough uses pci_register_device to register assigned device to
> qemu. Is there newer API to do so?

Yes. See e.g. LSI scsi emulation.

Paul

  reply	other threads:[~2009-06-09 14:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-08 17:17 [PATCH RFC] qemu: fix hot remove assigned device Weidong Han
2009-06-08 14:38 ` Paul Brook
2009-06-09  2:45   ` Han, Weidong
2009-06-09 14:51     ` Paul Brook [this message]
2009-06-09 15:37       ` Gerd Hoffmann
2009-06-10  7:45         ` Han, Weidong
2009-06-10  8:06           ` Avi Kivity
2009-06-10  8:31             ` Han, Weidong
2009-06-10  8:42               ` Avi Kivity
2009-06-10  8:49               ` Gerd Hoffmann
2009-06-10  8:55                 ` Han, Weidong

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=200906091551.41674.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=weidong.han@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