Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-14 Thread mika.westerb...@linux.intel.com
On Wed, Nov 14, 2018 at 02:30:14PM +0100, Lukas Wunner wrote: > On Wed, Nov 14, 2018 at 11:52:25AM +0200, mika.westerb...@linux.intel.com > wrote: > > On Tue, Nov 13, 2018 at 03:57:47PM +, Shameerali Kolothum Thodi wrote: > > > > The smb_mb() thing is not that clear (at least to me) because

Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-14 Thread mika.westerb...@linux.intel.com
On Wed, Nov 14, 2018 at 02:30:14PM +0100, Lukas Wunner wrote: > On Wed, Nov 14, 2018 at 11:52:25AM +0200, mika.westerb...@linux.intel.com > wrote: > > On Tue, Nov 13, 2018 at 03:57:47PM +, Shameerali Kolothum Thodi wrote: > > > > The smb_mb() thing is not that clear (at least to me) because

Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-14 Thread Lukas Wunner
On Wed, Nov 14, 2018 at 11:52:25AM +0200, mika.westerb...@linux.intel.com wrote: > On Tue, Nov 13, 2018 at 03:57:47PM +, Shameerali Kolothum Thodi wrote: > > > The smb_mb() thing is not that clear (at least to me) because it is used > > > in two places in the driver and both seem to be making

Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-14 Thread Lukas Wunner
On Wed, Nov 14, 2018 at 11:52:25AM +0200, mika.westerb...@linux.intel.com wrote: > On Tue, Nov 13, 2018 at 03:57:47PM +, Shameerali Kolothum Thodi wrote: > > > The smb_mb() thing is not that clear (at least to me) because it is used > > > in two places in the driver and both seem to be making

Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-14 Thread mika.westerb...@linux.intel.com
On Tue, Nov 13, 2018 at 03:57:47PM +, Shameerali Kolothum Thodi wrote: > > The smb_mb() thing is not that clear (at least to me) because it is used > > in two places in the driver and both seem to be making write to > > ctrl->cmd_busy visible to other CPUs but I don't see where we deal with >

Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-14 Thread mika.westerb...@linux.intel.com
On Tue, Nov 13, 2018 at 03:57:47PM +, Shameerali Kolothum Thodi wrote: > > The smb_mb() thing is not that clear (at least to me) because it is used > > in two places in the driver and both seem to be making write to > > ctrl->cmd_busy visible to other CPUs but I don't see where we deal with >

RE: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread Shameerali Kolothum Thodi
s > Wunner > Subject: Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue [...] > > Right. As I mentioned in my previous mail, I missed the fact that you are > updating > > the ctrl->slot_ctrl with cmd value while in my test I did my update with the > value > > r

RE: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread Shameerali Kolothum Thodi
s > Wunner > Subject: Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue [...] > > Right. As I mentioned in my previous mail, I missed the fact that you are > updating > > the ctrl->slot_ctrl with cmd value while in my test I did my update with the > value > > r

Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread mika.westerb...@linux.intel.com
> > Cc: linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; Wangzhou (B) > > ; Linuxarm ; Lukas > > Wunner > > Subject: Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue > > > > On Tue, Nov 13, 2018 at 12:36:20PM +, Shameerali Kolothum Thodi wr

Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread mika.westerb...@linux.intel.com
> > Cc: linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; Wangzhou (B) > > ; Linuxarm ; Lukas > > Wunner > > Subject: Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue > > > > On Tue, Nov 13, 2018 at 12:36:20PM +, Shameerali Kolothum Thodi wr

RE: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread Shameerali Kolothum Thodi
t; Wunner > Subject: Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue > > On Tue, Nov 13, 2018 at 12:36:20PM +, Shameerali Kolothum Thodi wrote: > > > @@ -156,9 +156,9 @@ static void pcie_do_write_cmd(struct controller > > > *ctrl, > > > u16 cmd, &

RE: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread Shameerali Kolothum Thodi
t; Wunner > Subject: Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue > > On Tue, Nov 13, 2018 at 12:36:20PM +, Shameerali Kolothum Thodi wrote: > > > @@ -156,9 +156,9 @@ static void pcie_do_write_cmd(struct controller > > > *ctrl, > > > u16 cmd, &

Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread mika.westerb...@linux.intel.com
On Tue, Nov 13, 2018 at 12:36:20PM +, Shameerali Kolothum Thodi wrote: > > @@ -156,9 +156,9 @@ static void pcie_do_write_cmd(struct controller *ctrl, > > u16 cmd, > > slot_ctrl |= (cmd & mask); > > ctrl->cmd_busy = 1; > > smp_mb(); > > + ctrl->slot_ctrl = slot_ctrl; > > Actually

Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread mika.westerb...@linux.intel.com
On Tue, Nov 13, 2018 at 12:36:20PM +, Shameerali Kolothum Thodi wrote: > > @@ -156,9 +156,9 @@ static void pcie_do_write_cmd(struct controller *ctrl, > > u16 cmd, > > slot_ctrl |= (cmd & mask); > > ctrl->cmd_busy = 1; > > smp_mb(); > > + ctrl->slot_ctrl = slot_ctrl; > > Actually

RE: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread Shameerali Kolothum Thodi
; Linuxarm > Subject: RE: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue > > > > > -Original Message- > > From: mika.westerb...@linux.intel.com > > [mailto:mika.westerb...@linux.intel.com] > > Sent: 13 November 2018 12:25 > > To: Shameerali

RE: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread Shameerali Kolothum Thodi
; Linuxarm > Subject: RE: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue > > > > > -Original Message- > > From: mika.westerb...@linux.intel.com > > [mailto:mika.westerb...@linux.intel.com] > > Sent: 13 November 2018 12:25 > > To: Shameerali

RE: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread Shameerali Kolothum Thodi
s > Wunner > Subject: Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue > > +Lukas > > On Tue, Nov 13, 2018 at 11:45:42AM +, Shameerali Kolothum Thodi wrote: > > Hi Mika, > > Hi, > > > Since the commit commit 720d6a671a6e("PCI: pciehp: Do not

RE: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread Shameerali Kolothum Thodi
s > Wunner > Subject: Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue > > +Lukas > > On Tue, Nov 13, 2018 at 11:45:42AM +, Shameerali Kolothum Thodi wrote: > > Hi Mika, > > Hi, > > > Since the commit commit 720d6a671a6e("PCI: pciehp: Do not

Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread mika.westerb...@linux.intel.com
+Lukas On Tue, Nov 13, 2018 at 11:45:42AM +, Shameerali Kolothum Thodi wrote: > Hi Mika, Hi, > Since the commit commit 720d6a671a6e("PCI: pciehp: Do not handle events > if interrupts are masked"), the hotplug support on Qemu Guest(4.120-rc1) > with a vfio passthrough device seems to be

Re: Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread mika.westerb...@linux.intel.com
+Lukas On Tue, Nov 13, 2018 at 11:45:42AM +, Shameerali Kolothum Thodi wrote: > Hi Mika, Hi, > Since the commit commit 720d6a671a6e("PCI: pciehp: Do not handle events > if interrupts are masked"), the hotplug support on Qemu Guest(4.120-rc1) > with a vfio passthrough device seems to be

Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread Shameerali Kolothum Thodi
Hi Mika, Since the commit commit 720d6a671a6e("PCI: pciehp: Do not handle events if interrupts are masked"), the hotplug support on Qemu Guest(4.120-rc1) with a vfio passthrough device seems to be broken. This is on an ARM64 platform. I am booting a Guest with below command line options with the

Qemu Guest kernel 4.20-rc1 PCIe hotplug issue

2018-11-13 Thread Shameerali Kolothum Thodi
Hi Mika, Since the commit commit 720d6a671a6e("PCI: pciehp: Do not handle events if interrupts are masked"), the hotplug support on Qemu Guest(4.120-rc1) with a vfio passthrough device seems to be broken. This is on an ARM64 platform. I am booting a Guest with below command line options with the