[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv3] piix: fix up/down races
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCHv3] piix: fix up/down races |
Date: |
Tue, 3 Apr 2012 13:05:15 +0300 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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
> >
> >