From: Gerd Hoffmann <kraxel@redhat.com>
To: Paul Brook <paul@codesourcery.com>
Cc: "Han, Weidong" <weidong.han@intel.com>,
"'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, 09 Jun 2009 17:37:13 +0200 [thread overview]
Message-ID: <4A2E81A9.4060501@redhat.com> (raw)
In-Reply-To: <200906091551.41674.paul@codesourcery.com>
On 06/09/09 16:51, Paul Brook wrote:
> 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.
Well. Except that you can't (yet) register pci config read/write
callbacks using the qdev-based API.
cheers,
Gerd
next prev parent reply other threads:[~2009-06-09 15:39 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
2009-06-09 15:37 ` Gerd Hoffmann [this message]
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=4A2E81A9.4060501@redhat.com \
--to=kraxel@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=paul@codesourcery.com \
--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 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.