Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-22 Thread Andrzej Jakowski
On 7/22/20 10:21 AM, Klaus Jensen wrote: > On Jul 22 10:00, Andrzej Jakowski wrote: >> On 7/22/20 12:43 AM, Klaus Jensen wrote: >>> @keith, please see below - can you comment on the Linux kernel 2 MB >>> boundary requirement for the CMB? Or should we hail Stephen (or Logan >>> maybe) since this

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-22 Thread Klaus Jensen
On Jul 22 10:00, Andrzej Jakowski wrote: > On 7/22/20 12:43 AM, Klaus Jensen wrote: > > @keith, please see below - can you comment on the Linux kernel 2 MB > > boundary requirement for the CMB? Or should we hail Stephen (or Logan > > maybe) since this seems to be related to p2pdma? > > > > On Jul

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-22 Thread Andrzej Jakowski
On 7/22/20 12:43 AM, Klaus Jensen wrote: > @keith, please see below - can you comment on the Linux kernel 2 MB > boundary requirement for the CMB? Or should we hail Stephen (or Logan > maybe) since this seems to be related to p2pdma? > > On Jul 21 14:54, Andrzej Jakowski wrote: >> On 7/15/20 1:06

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-22 Thread Klaus Jensen
@keith, please see below - can you comment on the Linux kernel 2 MB boundary requirement for the CMB? Or should we hail Stephen (or Logan maybe) since this seems to be related to p2pdma? On Jul 21 14:54, Andrzej Jakowski wrote: > On 7/15/20 1:06 AM, Klaus Jensen wrote: > > Hi Andrzej, > > > >

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-21 Thread Andrzej Jakowski
On 7/15/20 1:06 AM, Klaus Jensen wrote: > Hi Andrzej, > > I've not been ignoring this, but sorry for not following up earlier. > > I'm hesitent to merge anything that very obviously breaks an OS that we > know is used a lot to this using this device. Also because the issue has > not been

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-15 Thread Klaus Jensen
On Jul 15 10:06, Klaus Jensen wrote: > > Can you reproduce the issues with that patch? I can't on a stock Arch > Linux 5.7.5-arch1-1 kernel. > Was afraid I said this a bit too early since the stock kernel does not enable the iommu by default. Tested with another kernel and yes, I still cannot

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-15 Thread Klaus Jensen
On Jul 7 21:44, Andrzej Jakowski wrote: > On 7/6/20 12:15 AM, Klaus Jensen wrote: > > On Jul 2 16:33, Andrzej Jakowski wrote: > >> On 7/2/20 10:51 AM, Klaus Jensen wrote: > >>> On Jul 2 08:07, Andrzej Jakowski wrote: > On 7/2/20 3:31 AM, Klaus Jensen wrote: > > Aight, an update here.

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-07 Thread Andrzej Jakowski
On 7/6/20 12:15 AM, Klaus Jensen wrote: > On Jul 2 16:33, Andrzej Jakowski wrote: >> On 7/2/20 10:51 AM, Klaus Jensen wrote: >>> On Jul 2 08:07, Andrzej Jakowski wrote: On 7/2/20 3:31 AM, Klaus Jensen wrote: > Aight, an update here. This only happens when QEMU is run with a virtual

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-06 Thread Klaus Jensen
On Jul 2 16:33, Andrzej Jakowski wrote: > On 7/2/20 10:51 AM, Klaus Jensen wrote: > > On Jul 2 08:07, Andrzej Jakowski wrote: > >> On 7/2/20 3:31 AM, Klaus Jensen wrote: > >>> Aight, an update here. This only happens when QEMU is run with a virtual > >>> IOMMU. Otherwise, the kernel is happy. >

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-02 Thread Andrzej Jakowski
On 7/2/20 10:51 AM, Klaus Jensen wrote: > On Jul 2 08:07, Andrzej Jakowski wrote: >> On 7/2/20 3:31 AM, Klaus Jensen wrote: >>> Aight, an update here. This only happens when QEMU is run with a virtual >>> IOMMU. Otherwise, the kernel is happy. >>> >>> With the vIOMMU, qemu also craps out a bit:

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-02 Thread Klaus Jensen
On Jul 2 08:07, Andrzej Jakowski wrote: > On 7/2/20 3:31 AM, Klaus Jensen wrote: > > Aight, an update here. This only happens when QEMU is run with a virtual > > IOMMU. Otherwise, the kernel is happy. > > > > With the vIOMMU, qemu also craps out a bit: > > > > qemu-system-x86_64:

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-02 Thread Andrzej Jakowski
On 7/2/20 3:31 AM, Klaus Jensen wrote: > Aight, an update here. This only happens when QEMU is run with a virtual > IOMMU. Otherwise, the kernel is happy. > > With the vIOMMU, qemu also craps out a bit: > > qemu-system-x86_64: vtd_iova_to_slpte: detected slpte permission error >

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-02 Thread Klaus Jensen
On Jul 2 12:13, Klaus Jensen wrote: > On Jul 1 14:48, Andrzej Jakowski wrote: > > So far it was not possible to have CMB and PMR emulated on the same > > device, because BAR2 was used exclusively either of PMR or CMB. This > > patch places CMB at BAR4 offset so it not conflicts with MSI-X

Re: [PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-02 Thread Klaus Jensen
On Jul 1 14:48, Andrzej Jakowski wrote: > So far it was not possible to have CMB and PMR emulated on the same > device, because BAR2 was used exclusively either of PMR or CMB. This > patch places CMB at BAR4 offset so it not conflicts with MSI-X vectors. > Linux craps out when I test this (1MB

[PATCH v4 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-07-01 Thread Andrzej Jakowski
So far it was not possible to have CMB and PMR emulated on the same device, because BAR2 was used exclusively either of PMR or CMB. This patch places CMB at BAR4 offset so it not conflicts with MSI-X vectors. Signed-off-by: Andrzej Jakowski --- hw/block/nvme.c | 101