When device get command fails to find the device or mdev,
it skips to free the skb during error unwinding path.
Fix it by freeing in error unwind path.
While at it, make error unwind path more clear to avoid such errors.
Fixes: a12a2f694ce8 ("vdpa: Enable user to query vdpa device info")
Signed-of
On 2/10/2021 7:45 AM, Eli Cohen wrote:
On Wed, Feb 10, 2021 at 12:59:03AM -0800, Si-Wei Liu wrote:
On 2/9/2021 7:53 PM, Jason Wang wrote:
On 2021/2/10 上午10:30, Si-Wei Liu wrote:
On 2/8/2021 10:37 PM, Jason Wang wrote:
On 2021/2/9 下午2:12, Eli Cohen wrote:
On Tue, Feb 09, 2021 at 11:20:14A
> On Feb 16, 2021, at 4:10 AM, Peter Zijlstra wrote:
>
> On Tue, Feb 09, 2021 at 02:16:49PM -0800, Nadav Amit wrote:
>> @@ -816,8 +821,8 @@ STATIC_NOPV void native_flush_tlb_others(const struct
>> cpumask *cpumask,
>> * doing a speculative memory access.
>> */
>> if (info->freed
On Tue, Feb 16, 2021 at 12:50 AM Stefano Garzarella wrote:
>
> On Tue, Feb 16, 2021 at 12:23:19AM -0800, Jiang Wang . wrote:
> >On Tue, Feb 16, 2021 at 12:09 AM Stefano Garzarella
> >wrote:
> >>
> >> On Mon, Feb 15, 2021 at 08:50:36PM -0800, Jiang Wang . wrote:
> >> >On Mon, Feb 15, 2021 at 12:3
On Tue, 2021-02-16 at 16:04 +0100, Greg Kroah-Hartman wrote:
> It is impossible for debugfs_create_dir() to return NULL, so checking
> for it gives people a false sense that they actually are doing something
> if an error occurs. As there is no need to ever change kernel logic if
> debugfs is work
It is impossible for debugfs_create_dir() to return NULL, so checking
for it gives people a false sense that they actually are doing something
if an error occurs. As there is no need to ever change kernel logic if
debugfs is working "properly" or not, there is no need to check the
return value of
commit f37cbbc65178e0a45823d281d290c4c02da9631c upstream.
Add new 'config_size' attribute in 'vdpasim_dev_attr' and allocates
'config' dynamically to support any device types.
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
Link: https://lore.kernel.org/r/20201215144256.155342-12-sgarz..
commit 65b709586e222fa6ffd4166ac7fdb5d5dad113ee upstream.
The get_config callback can be used by the device to fill the
config structure.
The callback will be invoked in vdpasim_get_config() before copying
bytes into caller buffer.
Move vDPA-net config updates from vdpasim_set_features() in the
n
From: Max Gurtovoy
commit 423248d60d2b655321fc49eca1545f95a1bc9d6c upstream.
Add a new attribute that will define the number of virt queues to be
created for the vdpasim device.
Signed-off-by: Max Gurtovoy
[sgarzare: replace kmalloc_array() with kcalloc()]
Acked-by: Jason Wang
Signed-off-by:
commit cf1a3b35382c10ce315c32bd2b3d7789897fbe13 upstream.
As preparation for the next patches, we store the MAC address,
parsed during the vdpasim_create(), in a buffer that will be used
to fill 'config' together with other configurations.
Acked-by: Jason Wang
Signed-off-by: Stefano Garzarella
commit 6c6e28fe45794054410ad8cd2770af69fbe0338d upstream.
vdpasim_dev_attr will contain device specific attributes. We starting
moving the number of virtqueues (i.e. nvqs) to vdpasim_dev_attr.
vdpasim_create() creates a new vDPA simulator following the device
attributes defined in the vdpasim_dev
v1: https://lore.kernel.org/stable/20210211162519.215418-1-sgarz...@redhat.com/
v2:
- backport the upstream patch and related patches needed
Commit 65b709586e22 ("vdpa_sim: add get_config callback in
vdpasim_dev_attr") unintentionally solved an issue in vdpasim_get_config()
upstream while refacto
On Mon, Feb 15, 2021 at 04:23:54PM +0100, Greg KH wrote:
On Mon, Feb 15, 2021 at 04:03:21PM +0100, Stefano Garzarella wrote:
On Mon, Feb 15, 2021 at 03:32:19PM +0100, Greg KH wrote:
> On Thu, Feb 11, 2021 at 05:25:19PM +0100, Stefano Garzarella wrote:
> > Commit 65b709586e222fa6ffd4166ac7fdb5d5d
Am 16.02.21 um 14:27 schrieb Thomas Zimmermann:
Hi
this is a shadow-buffered plane. Did you consider using the new helpers
for shadow-buffered planes? They will map the user BO for you and
provide the mapping in the plane state.
From there, you should implement your own plane state on top
Hi
Am 16.02.21 um 12:37 schrieb Gerd Hoffmann:
Try avoid re-introducing locking bugs.
Signed-off-by: Gerd Hoffmann
Acked-by: Thomas Zimmermann
IMHO this should eventually be done in the rsp TTM functions. But so
far, I'd expect this to break some drivers.
Best regards
Thomas
---
dri
Hi
this is a shadow-buffered plane. Did you consider using the new helpers
for shadow-buffered planes? They will map the user BO for you and
provide the mapping in the plane state.
From there, you should implement your own plane state on top of struct
drm_shadow_plane_state, and also move al
Am 16.02.21 um 12:37 schrieb Gerd Hoffmann:
Use the correct kmap variant. We don't hold a reservation here,
so we can't use the _locked variant. We can drop the pin because
qxl_bo_kmap will do that for us.
Signed-off-by: Gerd Hoffmann
Acked-by: Thomas Zimmermann
---
drivers/gpu/drm/q
On Tue, Feb 16, 2021 at 02:45:40PM +0200, Eli Cohen wrote:
> On Tue, Feb 16, 2021 at 09:37:34AM +0200, Leon Romanovsky wrote:
> > On Tue, Feb 16, 2021 at 08:42:26AM +0200, Eli Cohen wrote:
> > > On Tue, Feb 16, 2021 at 08:35:51AM +0200, Leon Romanovsky wrote:
> > > > On Tue, Feb 16, 2021 at 07:50:2
Hi
Am 16.02.21 um 12:37 schrieb Gerd Hoffmann:
Add kmap/kunmap variants which reserve (and pin) the bo.
They can be used in case the caller doesn't hold a reservation
for the bo.
Again, these functions should rather be called vmap/vunamp.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/
Hi
Am 16.02.21 um 12:37 schrieb Gerd Hoffmann:
Use the correct kmap variant. We don't have a reservation here,
so we can't use the _locked version.
I'd merge this change into patch 6. So the new functions come with a caller.
Best regards
Thomas
Signed-off-by: Gerd Hoffmann
---
drivers/
Hi
Am 16.02.21 um 12:37 schrieb Gerd Hoffmann:
Make clear that these functions should be called with reserved
bo's only. No functional change.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_object.h | 4 ++--
drivers/gpu/drm/qxl/qxl_display.c | 14 +++---
drivers/gpu/d
Am 16.02.21 um 12:37 schrieb Gerd Hoffmann:
Specifically do not try release resources which where
not allocated in the first place.
I still think this should eventually be resolved by using managed code.
But for now
Acked-by: Thomas Zimmermann
Cc: Tong Zhang
Tested-by: Tong Zhang
Sig
On Tue, Feb 09, 2021 at 02:16:49PM -0800, Nadav Amit wrote:
> @@ -816,8 +821,8 @@ STATIC_NOPV void native_flush_tlb_others(const struct
> cpumask *cpumask,
>* doing a speculative memory access.
>*/
> if (info->freed_tables) {
> - smp_call_function_many(cpumask, fl
We don't have to map in atomic_update callback then,
making locking a bit less complicated.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_display.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/qxl/qxl_display.c
b/drivers/gpu/drm/q
Allow to set priorities for buffer objects. Use priority 1 for surface
and cursor command releases. Use priority 0 for drawing command
releases. That way the short-living drawing commands are first in line
when it comes to eviction, making it *much* less likely that
ttm_bo_mem_force_space() pick
Add kmap/kunmap variants which reserve (and pin) the bo.
They can be used in case the caller doesn't hold a reservation
for the bo.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_object.h | 2 ++
drivers/gpu/drm/qxl/qxl_object.c | 36
2 files changed,
Use the correct kmap variant. We don't hold a reservation here,
so we can't use the _locked variant. We can drop the pin because
qxl_bo_kmap will do that for us.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_display.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
dif
Make clear that these functions should be called with reserved
bo's only. No functional change.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_object.h | 4 ++--
drivers/gpu/drm/qxl/qxl_display.c | 14 +++---
drivers/gpu/drm/qxl/qxl_draw.c| 8
drivers/gpu/drm/q
Try avoid re-introducing locking bugs.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_object.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/qxl/qxl_object.c b/drivers/gpu/drm/qxl/qxl_object.c
index 22748b9566af..90d5e5b7f927 100644
--- a/drivers/gpu/drm/qxl/q
Use the correct kmap variant. We don't have a reservation here,
so we can't use the _locked version.
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_prime.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/qxl/qxl_prime.c b/drivers/gpu/drm/qxl/qxl
Specifically do not try release resources which where
not allocated in the first place.
Cc: Tong Zhang
Tested-by: Tong Zhang
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_display.c | 3 +++
drivers/gpu/drm/qxl/qxl_kms.c | 4
2 files changed, 7 insertions(+)
diff --git a/dr
Call qxl_bo_unpin (which does a reservation) without holding the
release_mutex lock. Fixes lockdep (correctly) warning on a possible
deadlock.
Fixes: 65ffea3c6e73 ("drm/qxl: unpin release objects")
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/drm/qxl/qxl_release.c | 13 ++---
1 file cha
Move qxl_io_notify_oom() call into wait condition.
That way the driver will call it again if one call
wasn't enough.
Also allows to remove the extra dma_fence_is_signaled()
check and the goto.
Fixes: 5a838e5d5825 ("drm/qxl: simplify qxl_fence_wait")
Signed-off-by: Gerd Hoffmann
---
drivers/gpu/
CCW_CMD_READ_STATUS was introduced with revision 2 of virtio-ccw,
and drivers should only rely on it being implemented when they
negotiated at least that revision with the device.
However, virtio_ccw_get_status() issued READ_STATUS for any
device operating at least at revision 1. If the device acc
On Tue, 16 Feb 2021 11:39:07 +0100
Cornelia Huck wrote:
> >
> > Reviewed-by: Halil Pasic
>
> Thanks!
>
> I'll do a v2 with a tweaked commit message and cc:stable.
Sounds good!
___
Virtualization mailing list
Virtualization@lists.linux-foundation
On Mon, 15 Feb 2021 19:51:44 +0100
Halil Pasic wrote:
> On Mon, 15 Feb 2021 12:47:02 +0100
> Cornelia Huck wrote:
>
> > On Fri, 12 Feb 2021 18:04:11 +0100
> > Cornelia Huck wrote:
> >
> > > CCW_CMD_READ_STATUS was introduced with revision 2 of virtio-ccw,
> > > and drivers should only rely
vdpa_get_config() and vdpa_set_config() now return the amount
of bytes read and written, so let's return them to the user space.
We also modify vhost_vdpa_config_validate() to return 0 (bytes read
or written) instead of an error, when the buffer length is 0.
Signed-off-by: Stefano Garzarella
---
Let's use the new 'get_config_size()' callback available instead of
using the 'virtio_id' to get the size of the device config space.
Signed-off-by: Stefano Garzarella
---
drivers/vhost/vdpa.c | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/vhost/vdpa.c b/dri
vdpa_get_config() and vdpa_set_config() now are able to read/write
only the bytes available in the device configuration space, also if
the buffer provided is bigger than that.
Let's use this feature to allow the user space application to pass any
buffer. We limit the size of the internal bounce bu
Instead of calling the 'set_config' callback directly, we call the
new vdpa_set_config() helper which also checks the parameters.
Signed-off-by: Stefano Garzarella
---
drivers/virtio/virtio_vdpa.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/virtio/virtio_vdpa.c
Instead of calling the 'set_config' callback directly, we call the
new vdpa_set_config() helper which also checks the parameters.
Signed-off-by: Stefano Garzarella
---
drivers/vhost/vdpa.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/
vdpa_get_config() and vdpa_set_config() now check parameters before
calling callbacks, so we can remove these redundant checks.
Signed-off-by: Stefano Garzarella
---
drivers/vdpa/mlx5/net/mlx5_vnet.c | 3 +--
drivers/vdpa/vdpa_sim/vdpa_sim.c | 6 --
2 files changed, 1 insertion(+), 8 deleti
vdpa_get_config() and vdpa_set_config() now check parameters before
calling callbacks, so we can remove these warnings.
Signed-off-by: Stefano Garzarella
---
Maybe we can skip this patch and leave the WARN_ONs in place.
What do you recommend?
---
drivers/vdpa/ifcvf/ifcvf_base.c | 3 +--
drivers/
Let's add a function similar to vpda_get_config() to check the
'offset' and 'len' parameters, call the set_config() device callback,
and return the amount of bytes written.
Signed-off-by: Stefano Garzarella
---
include/linux/vdpa.h | 2 ++
drivers/vdpa/vdpa.c | 16
2 files cha
This new callback is used to get the size of the configuration space
of vDPA devices.
Signed-off-by: Stefano Garzarella
---
include/linux/vdpa.h | 4
drivers/vdpa/ifcvf/ifcvf_main.c | 6 ++
drivers/vdpa/mlx5/net/mlx5_vnet.c | 6 ++
drivers/vdpa/vdpa_sim/vdpa_sim.c |
Now we have the 'get_config_size()' callback available, so we can
check that 'offset' and 'len' parameters are valid.
When these exceed boundaries, we limit the reading to the available
configuration space in the device, and we return the amount of bytes
read.
We also move vdpa_get_config() imple
Following the discussion with Michael and Jason [1], I reworked a bit
get/set_config() in vdpa.
I changed vdpa_get_config() to check the boundaries and added vdpa_set_config().
When 'offset' or 'len' parameters exceed boundaries, we limit the reading to
the available configuration space in the dev
On Tue, Feb 16, 2021 at 12:23:19AM -0800, Jiang Wang . wrote:
On Tue, Feb 16, 2021 at 12:09 AM Stefano Garzarella wrote:
On Mon, Feb 15, 2021 at 08:50:36PM -0800, Jiang Wang . wrote:
>On Mon, Feb 15, 2021 at 12:31 AM Stefano Garzarella
wrote:
>>
>> On Sat, Feb 13, 2021 at 03:26:18PM -0800, J
On Tue, Feb 16, 2021 at 12:09 AM Stefano Garzarella wrote:
>
> On Mon, Feb 15, 2021 at 08:50:36PM -0800, Jiang Wang . wrote:
> >On Mon, Feb 15, 2021 at 12:31 AM Stefano Garzarella
> >wrote:
> >>
> >> On Sat, Feb 13, 2021 at 03:26:18PM -0800, Jiang Wang . wrote:
> >> >On Fri, Feb 12, 2021 at 1:02
On Mon, Feb 15, 2021 at 08:50:36PM -0800, Jiang Wang . wrote:
On Mon, Feb 15, 2021 at 12:31 AM Stefano Garzarella wrote:
On Sat, Feb 13, 2021 at 03:26:18PM -0800, Jiang Wang . wrote:
>On Fri, Feb 12, 2021 at 1:02 AM Stefano Garzarella wrote:
>>
>> Hi Jiang,
>>
>> CCing Arseny who is working o
50 matches
Mail list logo