Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-11-15 Thread Marcel Apfelbaum
Hi Michael, On Wed, Nov 11, 2020 at 2:35 PM Michael S. Tsirkin wrote: > On Thu, Oct 22, 2020 at 02:40:26PM +0300, Marcel Apfelbaum wrote: > > From: Marcel Apfelbaum > > > > During PCIe Root Port's transition from Power-Off to Power-ON (or > vice-versa) > > the "Slot Control Register" has the

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-11-15 Thread Marcel Apfelbaum
Hi Roman, On Wed, Nov 11, 2020 at 6:10 PM Roman Kagan wrote: > On Thu, Oct 22, 2020 at 02:40:26PM +0300, Marcel Apfelbaum wrote: > > From: Marcel Apfelbaum > > > > During PCIe Root Port's transition from Power-Off to Power-ON (or > vice-versa) > > the "Slot Control Register" has the "Power

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-11-11 Thread Roman Kagan
On Thu, Oct 22, 2020 at 02:40:26PM +0300, Marcel Apfelbaum wrote: > From: Marcel Apfelbaum > > During PCIe Root Port's transition from Power-Off to Power-ON (or vice-versa) > the "Slot Control Register" has the "Power Indicator Control" > set to "Blinking" expressing a "power transition" mode. >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-11-11 Thread Michael S. Tsirkin
On Thu, Oct 22, 2020 at 02:40:26PM +0300, Marcel Apfelbaum wrote: > From: Marcel Apfelbaum > > During PCIe Root Port's transition from Power-Off to Power-ON (or vice-versa) > the "Slot Control Register" has the "Power Indicator Control" > set to "Blinking" expressing a "power transition" mode. >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-28 Thread Michael S. Tsirkin
On Wed, Oct 28, 2020 at 04:39:45PM +0100, Igor Mammedov wrote: > On Wed, 28 Oct 2020 14:31:35 +1100 > David Gibson wrote: > > > On Tue, 27 Oct 2020 13:54:26 +0100 > > Igor Mammedov wrote: > > > > > On Tue, 27 Oct 2020 07:26:44 -0400 > > > "Michael S. Tsirkin" wrote: > > > > > > [...] > >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-28 Thread Igor Mammedov
On Wed, 28 Oct 2020 14:31:35 +1100 David Gibson wrote: > On Tue, 27 Oct 2020 13:54:26 +0100 > Igor Mammedov wrote: > > > On Tue, 27 Oct 2020 07:26:44 -0400 > > "Michael S. Tsirkin" wrote: > > > > [...] > > [...] > > [...] > > [...] > > [...] > > > > > > > > It certainly

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-27 Thread David Gibson
On Tue, 27 Oct 2020 09:02:06 -0400 "Michael S. Tsirkin" wrote: > On Tue, Oct 27, 2020 at 01:54:26PM +0100, Igor Mammedov wrote: > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > > I have more questions wrt the

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-27 Thread David Gibson
On Tue, 27 Oct 2020 13:54:26 +0100 Igor Mammedov wrote: > On Tue, 27 Oct 2020 07:26:44 -0400 > "Michael S. Tsirkin" wrote: > > [...] > [...] > [...] > [...] > [...] > > > > > > It certainly shouldn't wait an unbounded time. But a wait with timeout > > > seems worth investigating

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-27 Thread Michael S. Tsirkin
On Tue, Oct 27, 2020 at 01:54:26PM +0100, Igor Mammedov wrote: > On Tue, 27 Oct 2020 07:26:44 -0400 > "Michael S. Tsirkin" wrote: > > > On Mon, Oct 26, 2020 at 05:45:37PM +1100, David Gibson wrote: > > > On Fri, 23 Oct 2020 09:26:48 +0300 > > > Marcel Apfelbaum wrote: > > > > > > > Hi

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-27 Thread Igor Mammedov
On Tue, 27 Oct 2020 07:26:44 -0400 "Michael S. Tsirkin" wrote: > On Mon, Oct 26, 2020 at 05:45:37PM +1100, David Gibson wrote: > > On Fri, 23 Oct 2020 09:26:48 +0300 > > Marcel Apfelbaum wrote: > > > > > Hi Michael, > > > > > > On Thu, Oct 22, 2020 at 6:01 PM Michael S. Tsirkin > > >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-27 Thread Michael S. Tsirkin
On Fri, Oct 23, 2020 at 09:26:48AM +0300, Marcel Apfelbaum wrote: > Hi Michael, > > On Thu, Oct 22, 2020 at 6:01 PM Michael S. Tsirkin wrote: > > On Thu, Oct 22, 2020 at 05:50:51PM +0300, Marcel Apfelbaum wrote: > > > > > > On Thu, Oct 22, 2020 at 5:33 PM Michael S. Tsirkin >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-27 Thread Michael S. Tsirkin
On Mon, Oct 26, 2020 at 05:45:37PM +1100, David Gibson wrote: > On Fri, 23 Oct 2020 09:26:48 +0300 > Marcel Apfelbaum wrote: > > > Hi Michael, > > > > On Thu, Oct 22, 2020 at 6:01 PM Michael S. Tsirkin wrote: > > > > [...] > > [...] > > [...] > > [...] > > [...] > > [...] >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-26 Thread Peter Krempa
On Fri, Oct 23, 2020 at 19:27:55 +0200, Igor Mammedov wrote: > On Fri, 23 Oct 2020 11:54:40 -0400 > "Michael S. Tsirkin" wrote: > > > On Fri, Oct 23, 2020 at 09:47:14AM +0300, Marcel Apfelbaum wrote: > > > Hi David, > > > > > > On Fri, Oct 23, 2020 at 6:49 AM David Gibson wrote: > > > > > >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-26 Thread David Gibson
On Fri, 23 Oct 2020 09:26:48 +0300 Marcel Apfelbaum wrote: > Hi Michael, > > On Thu, Oct 22, 2020 at 6:01 PM Michael S. Tsirkin wrote: > > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-26 Thread David Gibson
On Fri, 23 Oct 2020 19:27:55 +0200 Igor Mammedov wrote: > On Fri, 23 Oct 2020 11:54:40 -0400 > "Michael S. Tsirkin" wrote: > > [...] > [...] > [...] > [...] > > > > Rather than adding_device_allowed, something like "query slot" > > might be helpful for debugging. That would help

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-26 Thread David Gibson
On Fri, 23 Oct 2020 09:47:14 +0300 Marcel Apfelbaum wrote: > Hi David, > > On Fri, Oct 23, 2020 at 6:49 AM David Gibson wrote: > > > On Thu, 22 Oct 2020 11:01:04 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Thu, Oct 22, 2020 at 05:50:51PM +0300, Marcel Apfelbaum wrote: > > > [...] >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-23 Thread Igor Mammedov
On Fri, 23 Oct 2020 11:54:40 -0400 "Michael S. Tsirkin" wrote: > On Fri, Oct 23, 2020 at 09:47:14AM +0300, Marcel Apfelbaum wrote: > > Hi David, > > > > On Fri, Oct 23, 2020 at 6:49 AM David Gibson wrote: > > > > On Thu, 22 Oct 2020 11:01:04 -0400 > > "Michael S. Tsirkin" wrote: > >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-23 Thread Michael S. Tsirkin
On Fri, Oct 23, 2020 at 09:47:14AM +0300, Marcel Apfelbaum wrote: > Hi David, > > On Fri, Oct 23, 2020 at 6:49 AM David Gibson wrote: > > On Thu, 22 Oct 2020 11:01:04 -0400 > "Michael S. Tsirkin" wrote: > > > On Thu, Oct 22, 2020 at 05:50:51PM +0300, Marcel Apfelbaum wrote: >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-23 Thread Marcel Apfelbaum
Hi David, On Fri, Oct 23, 2020 at 6:49 AM David Gibson wrote: > On Thu, 22 Oct 2020 11:01:04 -0400 > "Michael S. Tsirkin" wrote: > > > On Thu, Oct 22, 2020 at 05:50:51PM +0300, Marcel Apfelbaum wrote: > > [...] > > > > Right. After detecting just failing unconditionally it a bit too > >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-23 Thread Marcel Apfelbaum
Hi Michael, On Thu, Oct 22, 2020 at 6:01 PM Michael S. Tsirkin wrote: > On Thu, Oct 22, 2020 at 05:50:51PM +0300, Marcel Apfelbaum wrote: > > > > > > On Thu, Oct 22, 2020 at 5:33 PM Michael S. Tsirkin > wrote: > > > > On Thu, Oct 22, 2020 at 05:10:43PM +0300, Marcel Apfelbaum wrote: > >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread David Gibson
On Thu, 22 Oct 2020 11:01:04 -0400 "Michael S. Tsirkin" wrote: > On Thu, Oct 22, 2020 at 05:50:51PM +0300, Marcel Apfelbaum wrote: > [...] > > Right. After detecting just failing unconditionally it a bit too > simplistic IMHO. There's also another factor here, which I thought I'd mentioned

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread David Gibson
On Thu, 22 Oct 2020 16:55:10 +0300 Marcel Apfelbaum wrote: > Hi David, Michael, > > On Thu, Oct 22, 2020 at 3:56 PM David Gibson wrote: > > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] > [...] >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread David Gibson
On Thu, 22 Oct 2020 09:15:28 -0400 "Michael S. Tsirkin" wrote: > On Thu, Oct 22, 2020 at 11:56:32PM +1100, David Gibson wrote: > [...] > [...] > [...] > > > > > > Probably the only way to handle for existing machine types. > > > For new ones, can't we queue it in host memory somewhere?

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2020 at 05:50:51PM +0300, Marcel Apfelbaum wrote: > > > On Thu, Oct 22, 2020 at 5:33 PM Michael S. Tsirkin wrote: > > On Thu, Oct 22, 2020 at 05:10:43PM +0300, Marcel Apfelbaum wrote: > > > > > > On Thu, Oct 22, 2020 at 5:01 PM Michael S. Tsirkin > wrote: >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Marcel Apfelbaum
On Thu, Oct 22, 2020 at 5:33 PM Michael S. Tsirkin wrote: > On Thu, Oct 22, 2020 at 05:10:43PM +0300, Marcel Apfelbaum wrote: > > > > > > On Thu, Oct 22, 2020 at 5:01 PM Michael S. Tsirkin > wrote: > > > > On Thu, Oct 22, 2020 at 04:55:10PM +0300, Marcel Apfelbaum wrote: > > > Hi David,

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2020 at 05:10:43PM +0300, Marcel Apfelbaum wrote: > > > On Thu, Oct 22, 2020 at 5:01 PM Michael S. Tsirkin wrote: > > On Thu, Oct 22, 2020 at 04:55:10PM +0300, Marcel Apfelbaum wrote: > > Hi David, Michael, > > > > On Thu, Oct 22, 2020 at 3:56 PM David Gibson

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Marcel Apfelbaum
On Thu, Oct 22, 2020 at 5:01 PM Michael S. Tsirkin wrote: > On Thu, Oct 22, 2020 at 04:55:10PM +0300, Marcel Apfelbaum wrote: > > Hi David, Michael, > > > > On Thu, Oct 22, 2020 at 3:56 PM David Gibson wrote: > > > > On Thu, 22 Oct 2020 08:06:55 -0400 > > "Michael S. Tsirkin" wrote: >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2020 at 04:55:10PM +0300, Marcel Apfelbaum wrote: > Hi David, Michael, > > On Thu, Oct 22, 2020 at 3:56 PM David Gibson wrote: > > On Thu, 22 Oct 2020 08:06:55 -0400 > "Michael S. Tsirkin" wrote: > > > On Thu, Oct 22, 2020 at 02:40:26PM +0300, Marcel Apfelbaum

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Marcel Apfelbaum
Hi David, Michael, On Thu, Oct 22, 2020 at 3:56 PM David Gibson wrote: > On Thu, 22 Oct 2020 08:06:55 -0400 > "Michael S. Tsirkin" wrote: > > > On Thu, Oct 22, 2020 at 02:40:26PM +0300, Marcel Apfelbaum wrote: > > > From: Marcel Apfelbaum > > > > > > During PCIe Root Port's transition from

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2020 at 11:56:32PM +1100, David Gibson wrote: > On Thu, 22 Oct 2020 08:06:55 -0400 > "Michael S. Tsirkin" wrote: > > > On Thu, Oct 22, 2020 at 02:40:26PM +0300, Marcel Apfelbaum wrote: > > > From: Marcel Apfelbaum > > > > > > During PCIe Root Port's transition from Power-Off to

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread David Gibson
On Thu, 22 Oct 2020 08:06:55 -0400 "Michael S. Tsirkin" wrote: > On Thu, Oct 22, 2020 at 02:40:26PM +0300, Marcel Apfelbaum wrote: > > From: Marcel Apfelbaum > > > > During PCIe Root Port's transition from Power-Off to Power-ON (or > > vice-versa) > > the "Slot Control Register" has the

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2020 at 02:40:26PM +0300, Marcel Apfelbaum wrote: > From: Marcel Apfelbaum > > During PCIe Root Port's transition from Power-Off to Power-ON (or vice-versa) > the "Slot Control Register" has the "Power Indicator Control" > set to "Blinking" expressing a "power transition" mode. >

[PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Marcel Apfelbaum
From: Marcel Apfelbaum During PCIe Root Port's transition from Power-Off to Power-ON (or vice-versa) the "Slot Control Register" has the "Power Indicator Control" set to "Blinking" expressing a "power transition" mode. Any hotplug operation during the "power transition" mode is not permitted or