From: zyimin <zyimin@linux.vnet.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: cornelia.huck@de.ibm.com, borntraeger@de.ibm.com,
qemu-devel@nongnu.org, agraf@suse.de
Subject: Re: [Qemu-devel] [PATCH v4 1/1] s390 pci infrastructure modelling
Date: Thu, 09 Jul 2015 17:30:08 +0800 [thread overview]
Message-ID: <559E3F20.1070405@linux.vnet.ibm.com> (raw)
In-Reply-To: <20150709074824.GA10208@redhat.com>
On 7/9/2015 3:48 PM, Michael S. Tsirkin wrote:
> On Wed, Jul 08, 2015 at 01:44:55PM +0800, Yi Min Zhao wrote:
>> @@ -588,9 +606,172 @@ static const TypeInfo s390_pcihost_info = {
>> }
>> };
>>
>> +static void s390_pci_device_hot_plug(HotplugHandler *hotplug_dev,
>> + DeviceState *dev, Error **errp)
>> +{
>> + S390PCIBusDevice *zpci = S390_PCI_DEVICE(dev);
>> + S390PCIBusDevice *tmp;
>> + S390PCIFacility *f = S390_PCI_FACILITY(
>> + object_resolve_path(TYPE_S390_PCI_FACILITY, NULL));
>> +
>> + QTAILQ_FOREACH(tmp, &f->zpci_list, next) {
>> + /* for now, we use fid to sort the list, need to use uid instead
>> + * when uid is ready.
> What does ready mean in this context?
uid is a new feature on s390 arch for pci card management.
But support of uid on OS level has not been ready.
>> + */
>> + if (tmp->fid > zpci->fid) {
>> + break;
>> + }
>> + }
>> +
>> + if (tmp) {
>> + QTAILQ_INSERT_BEFORE(tmp, zpci, next);
>> + } else {
>> + QTAILQ_INSERT_TAIL(&f->zpci_list, zpci, next);
>> + }
>> + f->token_valid = false;
>> +}
> This still means hotplug will change the index.
> How about just using an explicit property to set the index?
> Harder to use but keeps code simple.
>
These code were written by Hong Bo. I think he wants to use zpci->fid to
sort pci cards.
"index" what you talked is the order of hotplug? right? If it is, I
think this code actually
can change the index.
next prev parent reply other threads:[~2015-07-09 9:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 5:44 [Qemu-devel] [PATCH v4 0/1] s390 pci infrastruture modelling Yi Min Zhao
2015-07-08 5:44 ` [Qemu-devel] [PATCH v4 1/1] s390 pci infrastructure modelling Yi Min Zhao
2015-07-09 7:48 ` Michael S. Tsirkin
2015-07-09 9:30 ` zyimin [this message]
2015-07-09 9:57 ` Michael S. Tsirkin
2015-07-13 2:49 ` zyimin
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=559E3F20.1070405@linux.vnet.ibm.com \
--to=zyimin@linux.vnet.ibm.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.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 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.