From: "Michael S. Tsirkin" <mst@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
gleb@redhat.com, qemu-devel@nongnu.org,
Isaku Yamahata <yamahata@valinux.co.jp>,
Alex Williamson <alex.williamson@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCHv3] piix: fix up/down races
Date: Tue, 3 Apr 2012 13:05:15 +0300 [thread overview]
Message-ID: <20120403100515.GA9697@redhat.com> (raw)
In-Reply-To: <f98fb4eb-fc31-42e6-b066-bd3d6b67af4a@zmail16.collab.prod.int.phx2.redhat.com>
On Tue, Apr 03, 2012 at 02:40:41AM -0400, Igor Mammedov wrote:
> > > + */
> > > + s->pci0_status.down &= ~(1U << slot);
> >
> > Should we clear "up" here too?
> Is it possible to create pci dev for not yet freed pci slot?
It's not possible ATM.
> If not then we should not care, otherwise we should fix that.
> > > @@ -567,8 +595,6 @@ static int piix4_device_hotplug(DeviceState
> > > *qdev, PCIDevice *dev,
> > > return 0;
> > > }
> > >
> > > - s->pci0_status.up = 0;
> > > - s->pci0_status.down = 0;
> > > if (state == PCI_HOTPLUG_ENABLED) {
> > > enable_device(s, slot);
> > > } else {
> >
> > So if we have an old bios and do an add, followed by a remove, guest
> > ACPI finds both "up" and "down" set for the slot and we rely on the
> > ordering of the AML checking up before down to keep the duct tape and
> > bailing wire from exploding?
In fact UP triggers a rescan - there is no injection event in ACPI.
So it seems you can check the events in any order.
> > Hmm, can't say I'm excited about this
> > hack
> > either. Thanks,
> >
> > Alex
> >
> >
next prev parent reply other threads:[~2012-04-03 10:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-02 10:03 [Qemu-devel] [PATCHv3] piix: fix up/down races Michael S. Tsirkin
2012-04-02 18:59 ` Alex Williamson
2012-04-02 19:20 ` Michael S. Tsirkin
2012-04-03 6:14 ` Igor Mammedov
2012-04-03 6:40 ` Igor Mammedov
2012-04-03 10:05 ` Michael S. Tsirkin [this message]
2012-04-03 13:59 ` Alex Williamson
2012-04-03 14:48 ` Michael S. Tsirkin
2012-04-03 12:56 ` Michael S. Tsirkin
2012-04-03 13:51 ` Michael S. Tsirkin
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=20120403100515.GA9697@redhat.com \
--to=mst@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=aurelien@aurel32.net \
--cc=gleb@redhat.com \
--cc=imammedo@redhat.com \
--cc=kraxel@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=yamahata@valinux.co.jp \
/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).