Re: [Qemu-devel] [PATCH v2 2/5] acpi_piix4: Fix PCI hotplug race

2012-04-12 Thread Alex Williamson
On Thu, 2012-04-12 at 13:28 +0300, Michael S. Tsirkin wrote: > On Thu, Apr 05, 2012 at 11:07:15AM -0600, Alex Williamson wrote: > > diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c > > index 5e8b261..0e7af51 100644 > > --- a/hw/acpi_piix4.c > > +++ b/hw/acpi_piix4.c > > @@ -48,7 +48,7 @@ > > #define

Re: [Qemu-devel] [PATCH v2 2/5] acpi_piix4: Fix PCI hotplug race

2012-04-12 Thread Michael S. Tsirkin
On Thu, Apr 05, 2012 at 11:07:15AM -0600, Alex Williamson wrote: > diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c > index 5e8b261..0e7af51 100644 > --- a/hw/acpi_piix4.c > +++ b/hw/acpi_piix4.c > @@ -48,7 +48,7 @@ > #define PIIX4_PCI_HOTPLUG_STATUS 2 > > struct pci_status { > -uint32_t up;

Re: [Qemu-devel] [PATCH v2 2/5] acpi_piix4: Fix PCI hotplug race

2012-04-10 Thread Marcelo Tosatti
On Tue, Apr 10, 2012 at 12:38:09PM -0600, Alex Williamson wrote: > > > > It's probably harmless if we do let it be clobbered by migration > > > > though: worst case we lose an event and that might have > > > > happened before migration :) > > > > > > Perhaps that's another way to manage it, just l

Re: [Qemu-devel] [PATCH v2 2/5] acpi_piix4: Fix PCI hotplug race

2012-04-10 Thread Alex Williamson
On Tue, 2012-04-10 at 18:45 +0300, Michael S. Tsirkin wrote: > On Tue, Apr 10, 2012 at 09:35:39AM -0600, Alex Williamson wrote: > > On Tue, 2012-04-10 at 18:19 +0300, Michael S. Tsirkin wrote: > > > On Tue, Apr 10, 2012 at 09:14:00AM -0600, Alex Williamson wrote: > > > > On Sun, 2012-04-08 at 01:57

Re: [Qemu-devel] [PATCH v2 2/5] acpi_piix4: Fix PCI hotplug race

2012-04-10 Thread Alex Williamson
On Tue, 2012-04-10 at 18:19 +0300, Michael S. Tsirkin wrote: > On Tue, Apr 10, 2012 at 09:14:00AM -0600, Alex Williamson wrote: > > On Sun, 2012-04-08 at 01:57 -0300, Marcelo Tosatti wrote: > > > On Thu, Apr 05, 2012 at 11:07:15AM -0600, Alex Williamson wrote: > > > > As Michael Tsirkin demonstrate

Re: [Qemu-devel] [PATCH v2 2/5] acpi_piix4: Fix PCI hotplug race

2012-04-10 Thread Michael S. Tsirkin
On Tue, Apr 10, 2012 at 09:35:39AM -0600, Alex Williamson wrote: > On Tue, 2012-04-10 at 18:19 +0300, Michael S. Tsirkin wrote: > > On Tue, Apr 10, 2012 at 09:14:00AM -0600, Alex Williamson wrote: > > > On Sun, 2012-04-08 at 01:57 -0300, Marcelo Tosatti wrote: > > > > On Thu, Apr 05, 2012 at 11:07:

Re: [Qemu-devel] [PATCH v2 2/5] acpi_piix4: Fix PCI hotplug race

2012-04-10 Thread Michael S. Tsirkin
On Tue, Apr 10, 2012 at 09:14:00AM -0600, Alex Williamson wrote: > On Sun, 2012-04-08 at 01:57 -0300, Marcelo Tosatti wrote: > > On Thu, Apr 05, 2012 at 11:07:15AM -0600, Alex Williamson wrote: > > > As Michael Tsirkin demonstrated, current PCI hotplug is vulnerable > > > to a few races. The first

Re: [Qemu-devel] [PATCH v2 2/5] acpi_piix4: Fix PCI hotplug race

2012-04-10 Thread Alex Williamson
On Sun, 2012-04-08 at 01:57 -0300, Marcelo Tosatti wrote: > On Thu, Apr 05, 2012 at 11:07:15AM -0600, Alex Williamson wrote: > > As Michael Tsirkin demonstrated, current PCI hotplug is vulnerable > > to a few races. The first is a race with other hotplug operations > > because we clear the up & do

Re: [Qemu-devel] [PATCH v2 2/5] acpi_piix4: Fix PCI hotplug race

2012-04-07 Thread Marcelo Tosatti
On Thu, Apr 05, 2012 at 11:07:15AM -0600, Alex Williamson wrote: > As Michael Tsirkin demonstrated, current PCI hotplug is vulnerable > to a few races. The first is a race with other hotplug operations > because we clear the up & down registers at each event. If a new > event comes before the las

[Qemu-devel] [PATCH v2 2/5] acpi_piix4: Fix PCI hotplug race

2012-04-05 Thread Alex Williamson
As Michael Tsirkin demonstrated, current PCI hotplug is vulnerable to a few races. The first is a race with other hotplug operations because we clear the up & down registers at each event. If a new event comes before the last is processed, up/down is cleared and the event is lost. To fix this fo