On 11/2/2020 11:45 PM, Alex Williamson wrote:
Thanks, Dan.
Diana, can I get an ack for this? Thanks,
Yes, sure, I apologize for not doing it earlier.
Thanks,
Diana
Alex
On Fri, 23 Oct 2020 14:34:50 +0300
Dan Carpenter wrote:
The copy_to_user() function returns the number of bytes
Hi,
The warning is fixed by this patch:
https://www.spinics.net/lists/kvm/msg227575.html
The errors are caused by the fact that the vfio fsl-mc patches have a
dependency on the fsl-mc bus series. For this particular error the
missing patch is: bus/fsl-mc: Export IRQ pool handling functions
Acked-by: Diana Craciun
On 10/23/2020 2:29 PM, Dan Carpenter wrote:
My static analsysis tool complains that the "index" can be negative.
There are some checks in do_mmap() which try to prevent underflows but
I don't know if they are sufficient for this situation. Either way,
mak
Acked-by: Diana Craciun
On 10/23/2020 2:34 PM, Dan Carpenter wrote:
The copy_to_user() function returns the number of bytes remaining to be
copied, but this code should return -EFAULT.
Fixes: df747bcd5b21 ("vfio/fsl-mc: Implement VFIO_DEVICE_GET_REGION_INFO ioctl
call")
Signed-o
of this translation unit
int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
Reported-by: kernel test robot
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c
b
for
interrupt handling")
Reported-by: Colin Ian King
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
index 80fc7f4ed343..0113a980f974 10064
On 10/15/2020 9:52 PM, Alex Williamson wrote:
On Thu, 15 Oct 2020 13:22:26 +0100
Colin King wrote:
From: Colin Ian King
Currently the success path in function vfio_fsl_mc_reflck_attach is
returning an uninitialized value in variable ret. Fix this by setting
this to zero to indicate success.
Static analysis discovered that some code in vfio_fsl_mc_set_irq_trigger
is dead code. Fixed the code by changing the conditions order.
Fixes: cc0ee20bd969 ("vfio/fsl-mc: trigger an interrupt via eventfd")
Reported-by: Colin Ian King
Signed-off-by: Diana Craciun
---
drivers/v
/14/2020 1:16 AM, Stephen Rothwell wrote:
Hi Diana,
On Tue, 13 Oct 2020 18:56:07 +0300 Diana Craciun OSS
wrote:
Hi,
How does it fail? What's the error?
Sorry about that:
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c: In function
'vfio_fsl_mc_set_irq_trigger':
drivers/vfio/fsl-mc
Hi,
How does it fail? What's the error?
Thanks,
Diana
On 10/13/2020 6:07 AM, Stephen Rothwell wrote:
Hi all,
After merging the vfio tree, today's linux-next build (x86_64
allmodconfig) failed like this:
Caused by commit
cc0ee20bd969 ("vfio/fsl-mc: trigger an interrupt via eventfd")
The FSL_MC_BUS on which the VFIO-FSL-MC driver is dependent on
can be compiled on other architectures as well (not only ARM64)
including 32 bit architectures.
Include linux/io-64-nonatomic-hi-lo.h to make writeq/readq used
in the driver available on 32bit platforms.
Signed-off-by: Diana Craciun
The FSL_MC_BUS on which the VFIO-FSL-MC driver is dependent on
can be compiled on other architectures as well (not only ARM64)
including 32 bit architectures.
Include linux/io-64-nonatomic-hi-lo.h to make writeq/readq used
in the driver available on 32bit platforms.
Signed-off-by: Diana Craciun
Allow userspace to mmap device regions for direct access of
fsl-mc devices.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 68 ++-
1 file changed, 66 insertions(+), 2 deletions(-)
diff --git a/drivers/vfio/fsl-mc
The DPRC (Data Path Resource Container) device is a bus device and has
child devices attached to it. When the vfio-fsl-mc driver is probed
the DPRC is scanned and the child devices discovered and initialized.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc
-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 92 +--
drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 7 +-
2 files changed, 90 insertions(+), 9 deletions(-)
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
index 55190a2730fb
This patch adds the skeleton for interrupt support
for fsl-mc devices. The interrupts are not yet functional,
the functionality will be added by subsequent patches.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/Makefile | 2 +-
drivers/vfio
about the DPAA2 objects can be found here:
Documentation/networking/device_drivers/freescale/dpaa2/overview.rst
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
MAINTAINERS | 6 +
drivers/vfio/Kconfig | 1 +
drivers/vfio/Ma
. However, currently, the contents of a DPRC
assigned to the guest cannot be changed at runtime, so this interrupt
is not configured.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 24 +++-
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c
Expose to userspace information about the memory regions.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 79 ++-
drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 18 ++
2 files changed, 96 insertions(+), 1 deletion
Currently only resetting the DPRC container is supported which
will reset all the objects inside it. Resetting individual
objects is possible from the userspace by issueing commands
towards MC firmware.
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 18
command once and read 64byte response by one ioctl.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 118 +-
drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 1 +
2 files changed, 116 insertions(+), 3 deletions(-)
diff
Allow userspace to get fsl-mc device info (number of regions
and irqs).
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
Reviewed-by: Eric Auger
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 21 -
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers
the firmware command
- Implement a bus notifier for setting driver_override
Bharat Bhushan (1):
vfio/fsl-mc: Add VFIO framework skeleton for fsl-mc devices
Diana Craciun (9):
vfio/fsl-mc: Scan DPRC objects on vfio-fsl-mc driver bind
vfio/fsl-mc: Implement VFIO_DEVICE_GET_INFO ioctl
v
On 10/2/2020 11:50 PM, Alex Williamson wrote:
On Tue, 29 Sep 2020 12:03:38 +0300
Diana Craciun wrote:
The software uses a memory-mapped I/O command interface (MC portals) to
communicate with the MC hardware. This command interface is used to
discover, enumerate, configure and remove DPAA2
On 10/2/2020 8:24 PM, Alex Williamson wrote:
On Tue, 29 Sep 2020 12:03:31 +0300
Diana Craciun wrote:
The DPRC (Data Path Resource Container) device is a bus device and has
child devices attached to it. When the vfio-fsl-mc driver is probed
the DPRC is scanned and the child devices discovered
tifier for setting driver_override
Bharat Bhushan (1):
vfio/fsl-mc: Add VFIO framework skeleton for fsl-mc devices
Diana Craciun (9):
vfio/fsl-mc: Scan DPRC objects on vfio-fsl-mc driver bind
vfio/fsl-mc: Implement VFIO_DEVICE_GET_INFO ioctl
vfio/fsl-mc: Implement VFIO_DEVICE_GET_REGION_INFO ioctl
Expose to userspace information about the memory regions.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 79 ++-
drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 18 ++
2 files changed, 96 insertions(+), 1 deletion
The DPRC (Data Path Resource Container) device is a bus device and has
child devices attached to it. When the vfio-fsl-mc driver is probed
the DPRC is scanned and the child devices discovered and initialized.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc
about the DPAA2 objects can be found here:
Documentation/networking/device_drivers/freescale/dpaa2/overview.rst
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
MAINTAINERS | 6 +
drivers/vfio/Kconfig | 1 +
drivers/vfio/Ma
. However, currently, the contents of a DPRC
assigned to the guest cannot be changed at runtime, so this interrupt
is not configured.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 24 +++-
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c
-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 92 +--
drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 7 +-
2 files changed, 90 insertions(+), 9 deletions(-)
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
index 7ceadb801082
Allow userspace to mmap device regions for direct access of
fsl-mc devices.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 68 ++-
1 file changed, 66 insertions(+), 2 deletions(-)
diff --git a/drivers/vfio/fsl-mc
command once and read 64byte response by one ioctl.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 118 +-
drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 1 +
2 files changed, 116 insertions(+), 3 deletions(-)
diff
Allow userspace to get fsl-mc device info (number of regions
and irqs).
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
Reviewed-by: Eric Auger
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 21 -
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers
Currently only resetting the DPRC container is supported which
will reset all the objects inside it. Resetting individual
objects is possible from the userspace by issueing commands
towards MC firmware.
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 14 +-
1
This patch adds the skeleton for interrupt support
for fsl-mc devices. The interrupts are not yet functional,
the functionality will be added by subsequent patches.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/Makefile | 2 +-
drivers/vfio
The QMAN region is memory mapped, so it should be of type
IORESOURCE_MEM. The region flags bits were wrongly used to
pass additional information. Use the bus specific bits for
this purpose.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/fsl-mc-bus.c | 7 ++-
drivers/bus/fsl-mc/fsl
cached.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc.c | 30 +-
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/drivers/bus/fsl-mc/dprc.c b/drivers/bus/fsl-mc/dprc.c
index 602f030d84eb..e76f2c76f4c8 100644
--- a/drivers/bus/fsl-mc/dprc.c
+++ b
From: Bharat Bhushan
DPRC reset is required by VFIO-mc in order to stop a device
to further generate DMA transactions.
Signed-off-by: Bharat Bhushan
Signed-off-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc.c | 71
igned-off-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
---
The patch does not address the comment regarding moving driver_override
in the core code. I prefer not to tie these patches on that change and
address that separately.
drivers/bus/fsl-mc/fsl-mc-b
The IRQ pool handling functions can be used by both DPRC
driver and VFIO. Adapt and export those functions.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc-driver.c | 8 +++-
drivers/bus/fsl-mc/fsl-mc-allocator.c | 12
drivers/bus/fsl-mc/fsl-mc-private.h | 10
fsl-mc: Add dprc-reset-container support
bus/fsl-mc: Extend ICID size from 16bit to 32bit
Diana Craciun (10):
bus/fsl-mc: Do no longer export the total number of irqs outside
dprc_scan_objects
bus/fsl-mc: Add a new parameter to dprc_scan_objects function
bus/fsl-mc: Set the QMAN/BMAN
is created, not in dprc_probe in order
to be used by both VFIO and bus driver.
Similarily dprc_remove_devices is exported to be used by VFIO.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc-driver.c | 26 +++---
drivers/bus/fsl-mc/fsl-mc-bus.c | 1 +
include/linux/fsl
Both DPRC driver and VFIO driver use the same initialization code
for the DPRC. Introduced a new function which groups this
initialization code. The function is exported and may be
used by VFIO as well.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc-driver.c | 71
Create and export a cleanup function for DPRC. The function
is used by the DPRC driver, but it will be used by the VFIO
driver as well.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc-driver.c | 62
include/linux/fsl/mc.h | 2 ++
2 files
The region size reported by the firmware for mc and software
portals was less than allocated by the hardware. This may be
problematic when mmapping the region in user space because the
region size is less than page size. However the size as reserved
by the hardware is 64K.
Signed-off-by: Diana
Before destroying the mc_io, check first that it was
allocated.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/mc-io.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/fsl-mc/mc-io.c b/drivers/bus/fsl-mc/mc-io.c
index a30b53f1d87d..305015486b91 100644
From: Bharat Bhushan
In virtual machines the device-id range is defined
between 0x1-0x2. The reason for using such a
large range is to avoid overlapping with the PCI range.
Signed-off-by: Bharat Bhushan
Signed-off-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
---
drivers/bus/fsl
. In order to use the same function
in both drivers add a new parameter.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc-driver.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/fsl-mc/dprc-driver.c b/drivers/bus/fsl-mc/dprc-driver.c
index
The total number of interrupts is only used for some checks
outside the dprc_scan_objects function. Furthermore, in some
situations the check is made twice. Move the bounds check inside
the function for all situations.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc-driver.c | 30
Hi Eric,
On 9/10/2020 11:20 AM, Auger Eric wrote:
Hi Diana,
On 9/7/20 4:34 PM, Diana Craciun OSS wrote:
Hi Eric,
On 9/4/2020 11:18 AM, Auger Eric wrote:
Hi Diana,
On 8/26/20 11:33 AM, Diana Craciun wrote:
The software uses a memory-mapped I/O command interface (MC portals) to
communicate
Hi Eric,
On 9/3/2020 11:15 PM, Auger Eric wrote:
Hi Diana,
On 8/26/20 11:33 AM, Diana Craciun wrote:
This patch adds the skeleton for interrupt support
for fsl-mc devices. The interrupts are not yet functional,
the functionality will be added by subsequent patches.
Signed-off-by: Bharat
Hi Eric,
On 9/4/2020 11:02 AM, Auger Eric wrote:
Hi Diana,
On 8/26/20 11:33 AM, Diana Craciun wrote:
This patch allows to set an eventfd for fsl-mc device interrupts
and also to trigger the interrupt eventfd from userspace for testing.
All fsl-mc device interrupts are MSIs. The MSIs
Hi Eric,
On 9/4/2020 11:21 AM, Auger Eric wrote:
Hi Diana,
On 8/26/20 11:33 AM, Diana Craciun wrote:
Currently only resetting the DPRC container is supported which
will reset all the objects inside it. Resetting individual
objects is possible from the userspace by issueing commands
towards MC
Hi Eric,
On 9/3/2020 5:06 PM, Auger Eric wrote:
Hi Diana,
On 8/26/20 11:33 AM, Diana Craciun wrote:
The DPRC (Data Path Resource Container) device is a bus device and has
child devices attached to it. When the vfio-fsl-mc driver is probed
the DPRC is scanned and the child devices discovered
Hi Eric,
On 9/4/2020 11:18 AM, Auger Eric wrote:
Hi Diana,
On 8/26/20 11:33 AM, Diana Craciun wrote:
The software uses a memory-mapped I/O command interface (MC portals) to
communicate with the MC hardware. This command interface is used to
discover, enumerate, configure and remove DPAA2
Hi Eric,
On 9/3/2020 7:05 PM, Auger Eric wrote:
Hi Diana,
On 8/26/20 11:33 AM, Diana Craciun wrote:
Allow userspace to mmap device regions for direct access of
fsl-mc devices.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 60
Hi Eric,
On 9/3/2020 5:06 PM, Auger Eric wrote:
Hi Diana,
On 8/26/20 11:33 AM, Diana Craciun wrote:
From: Bharat Bhushan
DPAA2 (Data Path Acceleration Architecture) consists in
mechanisms for processing Ethernet packets, queue management,
accelerators, etc.
The Management Complex (mc
Hi Eric,
On 9/3/2020 4:40 PM, Auger Eric wrote:
The patches are dependent on some changes in the mc-bus (bus/fsl-mc)
driver. The changes were needed in order to re-use code and to export
some more functions that are needed by the VFIO driver. Currenlty the
mc-bus patches are under review:
The DPRC (Data Path Resource Container) device is a bus device and has
child devices attached to it. When the vfio-fsl-mc driver is probed
the DPRC is scanned and the child devices discovered and initialized.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc
Allow userspace to get fsl-mc device info (number of regions
and irqs).
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 21 -
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
sl-mc: Add VFIO framework skeleton for fsl-mc devices
Diana Craciun (9):
vfio/fsl-mc: Scan DPRC objects on vfio-fsl-mc driver bind
vfio/fsl-mc: Implement VFIO_DEVICE_GET_INFO ioctl
vfio/fsl-mc: Implement VFIO_DEVICE_GET_REGION_INFO ioctl call
vfio/fsl-mc: Allow userspace to MMAP fsl-mc devi
Allow userspace to mmap device regions for direct access of
fsl-mc devices.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 60 +--
1 file changed, 58 insertions(+), 2 deletions(-)
diff --git a/drivers/vfio/fsl-mc
command once and read 64byte response by one ioctl.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 115 +-
drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 1 +
2 files changed, 114 insertions(+), 2 deletions(-)
diff
This patch adds the skeleton for interrupt support
for fsl-mc devices. The interrupts are not yet functional,
the functionality will be added by subsequent patches.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/Makefile | 2 +-
drivers/vfio
Expose to userspace information about the memory regions.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 79 ++-
drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 19 ++
2 files changed, 97 insertions(+), 1 deletion
-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 91 +--
drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 8 +-
2 files changed, 91 insertions(+), 8 deletions(-)
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
b/drivers/vfio/fsl-mc/vfio_fsl_mc.c
index 64d5c1fff51f
about the DPAA2 objects can be found here:
Documentation/networking/device_drivers/freescale/dpaa2/overview.rst
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
MAINTAINERS | 6 +
drivers/vfio/Kconfig | 1 +
drivers/vfio/Ma
. However, currently, the contents of a DPRC
assigned to the guest cannot be changed at runtime, so this interrupt
is not configured.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 18 ++-
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c| 160
Currently only resetting the DPRC container is supported which
will reset all the objects inside it. Resetting individual
objects is possible from the userspace by issueing commands
towards MC firmware.
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 15 ++-
1
From: Bharat Bhushan
DPRC reset is required by VFIO-mc in order to stop a device
to further generate DMA transactions.
Signed-off-by: Bharat Bhushan
Signed-off-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc.c | 71
Both DPRC driver and VFIO driver use the same initialization code
for the DPRC. Introduced a new function which groups this
initialization code. The function is exported and may be
used by VFIO as well.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc-driver.c | 65
Before destroying the mc_io, check first that it was
allocated.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/mc-io.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/fsl-mc/mc-io.c b/drivers/bus/fsl-mc/mc-io.c
index a30b53f1d87d..305015486b91 100644
is created, not in dprc_probe in order
to be used by both VFIO and bus driver.
Similarily dprc_remove_devices is exported to be used by VFIO.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc-driver.c | 26 +++---
drivers/bus/fsl-mc/fsl-mc-bus.c | 1 +
include/linux/fsl
The region size reported by the firmware for mc and software
portals was less than allocated by the hardware. This may be
problematic when mmapping the region in user space because the
region size is less than page size. However the size as reserved
by the hardware is 64K.
Signed-off-by: Diana
Create and export a cleanup function for DPRC. The function
is used by the DPRC driver, but it will be used by the VFIO
driver as well.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc-driver.c | 52
include/linux/fsl/mc.h | 2 ++
2 files
bus/fsl-mc: Extend ICID size from 16bit to 32bit
Diana Craciun (10):
bus/fsl-mc: Do no longer export the total number of irqs outside
dprc_scan_objects
bus/fsl-mc: Add a new parameter to dprc_scan_objects function
bus/fsl-mc: Set the QMAN/BMAN region flags
bus/fsl-mc: Cache the DPRC AP
From: Bharat Bhushan
In virtual machines the device-id range is defined
between 0x1-0x2. The reason for using such a
large range is to avoid overlapping with the PCI range.
Signed-off-by: Bharat Bhushan
Signed-off-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
---
drivers/bus/fsl
igned-off-by: Laurentiu Tudor
Signed-off-by: Diana Craciun
---
The patche do not address the comment regarding moving driver_override
in the core code. I prefer not to tie these patches on that change and
address that separately.
drivers/bus/fsl-mc/fsl-mc-b
The IRQ pool handling functions can be used by both DPRC
driver and VFIO. Adapt and export those functions.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc-driver.c | 7 +++
drivers/bus/fsl-mc/fsl-mc-allocator.c | 12
drivers/bus/fsl-mc/fsl-mc-private.h | 10
The QMAN region is memory mapped, so it should be of type
IORESOURCE_MEM. The region flags bits were wrongly used to
pass additional information. Use the bus specific bits for
this purpose.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/fsl-mc-bus.c | 7 ++-
drivers/bus/fsl-mc/fsl
cached.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc.c | 30 +-
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/drivers/bus/fsl-mc/dprc.c b/drivers/bus/fsl-mc/dprc.c
index 602f030d84eb..e76f2c76f4c8 100644
--- a/drivers/bus/fsl-mc/dprc.c
+++ b
. In order to use the same function
in both drivers add a new parameter.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc-driver.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/fsl-mc/dprc-driver.c b/drivers/bus/fsl-mc/dprc-driver.c
index
The total number of interrupts is only used for some checks
outside the dprc_scan_objects function. Furthermore, in some
situations the check is made twice. Move the bounds check inside
the function for all situations.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc-driver.c | 30
now).
Diana
On 7/6/2020 4:57 PM, Andrew Lunn wrote:
Hi Diana
On Mon, Jul 06, 2020 at 03:42:33PM +0300, Diana Craciun wrote:
From: Bharat Bhushan
This patch is required for vfio-fsl-mc meta driver to successfully bind
layerscape container devices for device passthrough. This patch adds
On 7/6/2020 4:14 PM, Laurentiu Tudor wrote:
On 7/6/2020 3:42 PM, Diana Craciun wrote:
From: Diana Craciun
The region size reported by the firmware for mc and software
portals was less than allocated by the hardware. This may be
problematic when mmapping the region in user space because
Expose to userspace information about the memory regions.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 77 ++-
drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 19 ++
2 files changed, 95 insertions(+), 1 deletion
. However, currently, the contents of a DPRC
assigned to the guest cannot be changed at runtime, so this interrupt
is not configured.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 18 ++-
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c| 160
This patch adds the skeleton for interrupt support
for fsl-mc devices. The interrupts are not yet functional,
the functionality will be added by subsequent patches.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/Makefile | 2 +-
drivers/vfio
From: Diana Craciun
Only the DPRC object allocates interrupts from the MSI
interrupt domain. The interrupts are managed by the DPRC in
a pool of interrupts. The access to this pool of interrupts
has to be protected with a lock.
This patch extends the current lock implementation to have a
lock
The DPRC (Data Path Resource Container) device is a bus device and has
child devices attached to it. When the vfio-fsl-mc driver is probed
the DPRC is scanned and the child devices discovered and initialized.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc
command once and read 64byte response by one ioctl.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 115 +-
drivers/vfio/fsl-mc/vfio_fsl_mc_private.h | 1 +
2 files changed, 114 insertions(+), 2 deletions(-)
diff
about the DPAA2 objects can be found here:
Documentation/networking/device_drivers/freescale/dpaa2/overview.rst
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
MAINTAINERS | 6 +
drivers/vfio/Kconfig | 1 +
drivers/vfio/Ma
Allow userspace to mmap device regions for direct access of
fsl-mc devices.
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 59 +--
1 file changed, 57 insertions(+), 2 deletions(-)
diff --git a/drivers/vfio/fsl-mc
Allow userspace to get fsl-mc device info (number of regions
and irqs).
Signed-off-by: Bharat Bhushan
Signed-off-by: Diana Craciun
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 21 -
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
d for all DPAA2 objects
- review fixes
v1 --> v2
- Fixed the container reset, a new flag added to the firmware command
- Implement a bus notifier for setting driver_override
Bharat Bhushan (1):
vfio/fsl-mc: Add VFIO framework skeleton for fsl-mc devices
Diana Craciun (8):
vfio/fsl-mc: Scan
From: Diana Craciun
The IRQ pool handling functions can be used by both DPRC
driver and VFIO. Adapt and export those functions.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc-driver.c | 7 +++
drivers/bus/fsl-mc/fsl-mc-allocator.c | 12
drivers/bus/fsl-mc/fsl
From: Diana Craciun
The vfio-mc bus driver needs some additional services to be exported by the
mc-bus driver like:
- a way to reset the DPRC container
- driver_override support
- functions to setup/tear down a DPRC
- functions for allocating the pool of interrupts. In case of VFIO
From: Diana Craciun
Create and export a cleanup function for DPRC. The function
is used by the DPRC driver, but it will be used by the VFIO
driver as well.
Signed-off-by: Diana Craciun
---
drivers/bus/fsl-mc/dprc-driver.c | 52
include/linux/fsl/mc.h
From: Diana Craciun
The region size reported by the firmware for mc and software
portals was less than allocated by the hardware. This may be
problematic when mmapping the region in user space because the
region size is less than page size. However the size as reserved
by the hardware is 64K
1 - 100 of 141 matches
Mail list logo