Displaying 20 results from an estimated 1000 matches similar to: "[PATCH RFC don't apply] vdpa_sim: endian-ness for config space"
2020 Jul 16
1
[PATCH RFC don't apply] vdpa_sim: endian-ness for config space
On Wed, Jul 15, 2020 at 10:02:32PM +0800, Jason Wang wrote:
>
> On 2020/7/15 ??9:58, Michael S. Tsirkin wrote:
> > VDPA sim stores config space as native endian, but that
> > is wrong: modern guests expect LE.
> > I coded up the following to fix it up, but it is wrong too:
> > vdpasim_create is called before guest features are known.
> >
> > So what
2020 Aug 05
3
[PATCH v2 22/24] vdpa_sim: fix endian-ness of config space
On 2020/8/4 ??5:00, Michael S. Tsirkin wrote:
> VDPA sim accesses config space as native endian - this is
> wrong since it's a modern device and actually uses LE.
>
> It only supports modern guests so we could punt and
> just force LE, but let's use the full virtio APIs since people
> tend to copy/paste code, and this is not data path anyway.
>
> Signed-off-by:
2020 Aug 05
3
[PATCH v2 22/24] vdpa_sim: fix endian-ness of config space
On 2020/8/4 ??5:00, Michael S. Tsirkin wrote:
> VDPA sim accesses config space as native endian - this is
> wrong since it's a modern device and actually uses LE.
>
> It only supports modern guests so we could punt and
> just force LE, but let's use the full virtio APIs since people
> tend to copy/paste code, and this is not data path anyway.
>
> Signed-off-by:
2020 Jul 15
0
[PATCH RFC don't apply] vdpa_sim: endian-ness for config space
On 2020/7/15 ??9:58, Michael S. Tsirkin wrote:
> VDPA sim stores config space as native endian, but that
> is wrong: modern guests expect LE.
> I coded up the following to fix it up, but it is wrong too:
> vdpasim_create is called before guest features are known.
>
> So what should we do? New ioctl to specify the interface used?
> More ideas?
>
> Signed-off-by: Michael
2020 Aug 03
0
[PATCH v2 22/24] vdpa_sim: fix endian-ness of config space
VDPA sim accesses config space as native endian - this is
wrong since it's a modern device and actually uses LE.
It only supports modern guests so we could punt and
just force LE, but let's use the full virtio APIs since people
tend to copy/paste code, and this is not data path anyway.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 31
2020 Aug 05
0
[PATCH v3 22/38] vdpa_sim: fix endian-ness of config space
VDPA sim accesses config space as native endian - this is
wrong since it's a modern device and actually uses LE.
It only supports modern guests so we could punt and
just force LE, but let's use the full virtio APIs since people
tend to copy/paste code, and this is not data path anyway.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 33
2020 Aug 05
0
[PATCH v2 22/24] vdpa_sim: fix endian-ness of config space
On Wed, Aug 05, 2020 at 02:21:07PM +0800, Jason Wang wrote:
>
> On 2020/8/4 ??5:00, Michael S. Tsirkin wrote:
> > VDPA sim accesses config space as native endian - this is
> > wrong since it's a modern device and actually uses LE.
> >
> > It only supports modern guests so we could punt and
> > just force LE, but let's use the full virtio APIs since
2023 Mar 21
3
[PATCH v3 5/8] vdpa_sim: make devices agnostic for work management
Let's move work management inside the vdpa_sim core.
This way we can easily change how we manage the works, without
having to change the devices each time.
Acked-by: Eugenio P??rez Martin <eperezma at redhat.com>
Acked-by: Jason Wang <jasowang at redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare at redhat.com>
---
drivers/vdpa/vdpa_sim/vdpa_sim.h | 3 ++-
2023 Mar 02
1
[PATCH v2 7/8] vdpa_sim: replace the spinlock with a mutex to protect the state
The spinlock we use to protect the state of the simulator is sometimes
held for a long time (for example, when devices handle requests).
This also prevents us from calling functions that might sleep (such as
kthread_flush_work() in the next patch), and thus having to release
and retake the lock.
For these reasons, let's replace the spinlock with a mutex that gives
us more flexibility.
2020 Aug 03
51
[PATCH v2 00/24] virtio: config space endian-ness cleanup
Config space endian-ness is currently a mess: fields are
not tagged with the correct endian-ness so it's easy
to make mistakes like instanciating config space in
native endian-ness.
The following patches adding sparse tagging are currently in my tree.
Lightly tested.
As a follow-up, I plan to add new APIs that handle modern config space
in a more efficient way (bypassing the version check).
2020 Aug 10
1
[PATCH] vdpa_sim: init iommu lock
The patch adding the iommu lock did not initialize it.
The struct is zero-initialized so this is mostly a problem
when using lockdep.
Reported-by: kernel test robot <rong.a.chen at intel.com>
Cc: Max Gurtovoy <maxg at mellanox.com>
Fixes: 0ea9ee430e74 ("vdpasim: protect concurrent access to iommu iotlb")
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
2023 Apr 04
9
[PATCH v5 0/9] vdpa_sim: add support for user VA
This series adds support for the use of user virtual addresses in the
vDPA simulator devices.
The main reason for this change is to lift the pinning of all guest memory.
Especially with virtio devices implemented in software.
The next step would be to generalize the code in vdpa-sim to allow the
implementation of in-kernel software devices. Similar to vhost, but using vDPA
so we can reuse the
2023 Mar 02
8
[PATCH v2 0/8] vdpa_sim: add support for user VA
v2:
- rebased on Linus' tree, commit ae3419fbac84 ("vc_screen: don't clobber
return value in vcs_read")
- removed `struct task_struct *owner` param (unused for now, maybe
?useful to support cgroups) [Jason]
- add unbind_mm callback [Jason]
- call the new unbind_mm callback during the release [Jason]
- avoid to call bind_mm callback after the reset, since the device
?is not
2023 Mar 21
5
[PATCH v3 0/8] vdpa_sim: add support for user VA
This series adds support for the use of user virtual addresses in the
vDPA simulator devices.
The main reason for this change is to lift the pinning of all guest memory.
Especially with virtio devices implemented in software.
The next step would be to generalize the code in vdpa-sim to allow the
implementation of in-kernel software devices. Similar to vhost, but using vDPA
so we can reuse the
2023 Apr 07
2
[PATCH 0/2] vdpa_sim_blk: support shared backend
This series is mainly for testing live migration between 2 vdpa_sim_blk
devices.
The first patch is preparation and moves the buffer allocation into devices,
the second patch adds the `shared_buffer_mutex` parameter to vdpa_sim_blk to
use the same ramdisk for all devices.
Tested with QEMU v8.0.0-rc2 in this way:
modprobe vhost_vdpa
modprobe vdpa_sim_blk shared_backend=true
vdpa dev add mgmtdev
2023 Mar 24
1
[PATCH v3 8/8] vdpa_sim: add support for user VA
? 2023/3/21 23:48, Stefano Garzarella ??:
> The new "use_va" module parameter (default: true) is used in
> vdpa_alloc_device() to inform the vDPA framework that the device
> supports VA.
>
> vringh is initialized to use VA only when "use_va" is true and the
> user's mm has been bound. So, only when the bus supports user VA
> (e.g. vhost-vdpa).
>
>
2023 Mar 14
1
[PATCH v2 8/8] vdpa_sim: add support for user VA
On Thu, Mar 2, 2023 at 7:35?PM Stefano Garzarella <sgarzare at redhat.com> wrote:
>
> The new "use_va" module parameter (default: false) is used in
> vdpa_alloc_device() to inform the vDPA framework that the device
> supports VA.
>
> vringh is initialized to use VA only when "use_va" is true and the
> user's mm has been bound. So, only when the
2020 May 14
2
[PATCH] vdpa_sim: do not reset IOTLB during device reset
We reset IOTLB during device reset this breaks the assumption that the
mapping needs to be controlled via vDPA DMA ops explicitly in a
incremental way. So the networking will be broken after e.g a guest
reset.
Fix this by not resetting the IOTLB during device reset.
Signed-off-by: Jason Wang <jasowang at redhat.com>
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 2 --
1 file changed, 2
2020 May 14
2
[PATCH] vdpa_sim: do not reset IOTLB during device reset
We reset IOTLB during device reset this breaks the assumption that the
mapping needs to be controlled via vDPA DMA ops explicitly in a
incremental way. So the networking will be broken after e.g a guest
reset.
Fix this by not resetting the IOTLB during device reset.
Signed-off-by: Jason Wang <jasowang at redhat.com>
---
drivers/vdpa/vdpa_sim/vdpa_sim.c | 2 --
1 file changed, 2
2020 Jun 24
1
[PATCH] virtio: VIRTIO_F_IOMMU_PLATFORM -> VIRTIO_F_ACCESS_PLATFORM
Rename the bit to match latest virtio spec.
Add a compat macro to avoid breaking existing userspace.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
arch/um/drivers/virtio_uml.c | 2 +-
drivers/vdpa/ifcvf/ifcvf_base.h | 2 +-
drivers/vdpa/vdpa_sim/vdpa_sim.c | 4 ++--
drivers/vhost/net.c | 4 ++--
drivers/vhost/vdpa.c | 2 +-