search for: vdpasim_set_status

Displaying 16 results from an estimated 16 matches for "vdpasim_set_status".

Did you mean: vdpasim_get_status
2023 Mar 02
1
[PATCH v2 7/8] vdpa_sim: replace the spinlock with a mutex to protect the state
...struct vdpasim *vdpasim = vdpa_to_sim(vdpa); u8 status; - spin_lock(&vdpasim->lock); + mutex_lock(&vdpasim->mutex); status = vdpasim->status; - spin_unlock(&vdpasim->lock); + mutex_unlock(&vdpasim->mutex); return status; } @@ -409,19 +409,19 @@ static void vdpasim_set_status(struct vdpa_device *vdpa, u8 status) { struct vdpasim *vdpasim = vdpa_to_sim(vdpa); - spin_lock(&vdpasim->lock); + mutex_lock(&vdpasim->mutex); vdpasim->status = status; - spin_unlock(&vdpasim->lock); + mutex_unlock(&vdpasim->mutex); } static int vdpasim_re...
2020 Apr 02
0
[vhost:vhost 22/22] vdpa_sim.c:undefined reference to `vringh_iov_push_iotlb'
...fined reference to `vringh_getdesc_iotlb' m68k-linux-ld: vdpa_sim.c:(.text+0x496): undefined reference to `vringh_getdesc_iotlb' m68k-linux-ld: vdpa_sim.c:(.text+0x4b0): undefined reference to `vringh_complete_iotlb' m68k-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim.o: in function `vdpasim_set_status': vdpa_sim.c:(.text+0x764): undefined reference to `vringh_init_iotlb' m68k-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim.o: in function `vdpasim_set_vq_ready': vdpa_sim.c:(.text+0x844): undefined reference to `vringh_init_iotlb' m68k-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim....
2020 Apr 02
0
[PATCH v3 -next] vdpasim: Return status in vdpasim_get_status
...a12a 100644 --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c @@ -488,7 +488,7 @@ static u8 vdpasim_get_status(struct vdpa_device *vdpa) status = vdpasim->status; spin_unlock(&vdpasim->lock); - return vdpasim->status; + return status; } static void vdpasim_set_status(struct vdpa_device *vdpa, u8 status) -- 2.17.1
2020 Apr 02
0
[vhost:vhost 22/22] riscv64-linux-ld: vdpa_sim.c:undefined reference to `vringh_getdesc_iotlb'
...pa/vdpa_sim/vdpa_sim.o: in function `.L38': >> vdpa_sim.c:(.text+0x718): undefined reference to `vringh_complete_iotlb' riscv64-linux-ld: vdpa_sim.c:(.text+0x736): undefined reference to `vringh_complete_iotlb' riscv64-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim.o: in function `vdpasim_set_status': vdpa_sim.c:(.text+0xad2): undefined reference to `vringh_init_iotlb' >> riscv64-linux-ld: vdpa_sim.c:(.text+0xb4e): undefined reference to `vringh_init_iotlb' riscv64-linux-ld: drivers/vdpa/vdpa_sim/vdpa_sim.o: in function `vdpasim_set_vq_ready': vdpa_sim.c:(.text+0...
2023 Jan 29
1
[PATCH v3 2/2] vdpasim: support doorbell mapping
...PASIM_NOTIFY_DEFVAL; WRITE_ONCE()? > + > vdpasim->config = kzalloc(dev_attr->config_size, GFP_KERNEL); > if (!vdpasim->config) > goto err_iommu; > @@ -498,16 +529,21 @@ static u8 vdpasim_get_status(struct vdpa_device *vdpa) > static void vdpasim_set_status(struct vdpa_device *vdpa, u8 status) > { > struct vdpasim *vdpasim = vdpa_to_sim(vdpa); > + bool started = vdpasim->status & VIRTIO_CONFIG_S_DRIVER_OK; Do we need to do the check under the vdpasim->lock? > > spin_lock(&vdpasim->lock); >...
2020 Feb 10
0
[PATCH V2 5/5] vdpasim: vDPA device simulator
...VDPASIM_VENDOR_ID; +} + +static u8 vdpasim_get_status(struct vdpa_device *vdpa) +{ + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); + u8 status; + + spin_lock(&vdpasim->lock); + status = vdpasim->status; + spin_unlock(&vdpasim->lock); + + return vdpasim->status; +} + +static void vdpasim_set_status(struct vdpa_device *vdpa, u8 status) +{ + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); + + spin_lock(&vdpasim->lock); + vdpasim->status = status; + if (status == 0) + vdpasim_reset(vdpasim); + spin_unlock(&vdpasim->lock); +} + +static void vdpasim_get_config(struct vdpa_device *vd...
2020 Feb 20
0
[PATCH V3 5/5] vdpasim: vDPA device simulator
...VDPASIM_VENDOR_ID; +} + +static u8 vdpasim_get_status(struct vdpa_device *vdpa) +{ + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); + u8 status; + + spin_lock(&vdpasim->lock); + status = vdpasim->status; + spin_unlock(&vdpasim->lock); + + return vdpasim->status; +} + +static void vdpasim_set_status(struct vdpa_device *vdpa, u8 status) +{ + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); + + spin_lock(&vdpasim->lock); + vdpasim->status = status; + if (status == 0) + vdpasim_reset(vdpasim); + spin_unlock(&vdpasim->lock); +} + +static void vdpasim_get_config(struct vdpa_device *vd...
2020 Feb 10
1
[PATCH V2 5/5] vdpasim: vDPA device simulator
...t vdpa_device *vdpa) > +{ > + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); > + u8 status; > + > + spin_lock(&vdpasim->lock); > + status = vdpasim->status; > + spin_unlock(&vdpasim->lock); > + > + return vdpasim->status; > +} > + > +static void vdpasim_set_status(struct vdpa_device *vdpa, u8 status) > +{ > + struct vdpasim *vdpasim = vdpa_to_sim(vdpa); > + > + spin_lock(&vdpasim->lock); > + vdpasim->status = status; > + if (status == 0) > + vdpasim_reset(vdpasim); > + spin_unlock(&vdpasim->lock); > +} > + >...
2020 Jul 01
5
[PATCH 0/5]
Hi all: This series tries to support batched IOTLB updating vhost-vdpa. Currently vhost-vdpa accepts userspace mapping via IOTLB API, and it can only forward one mapping to IOMMU or device through IOMMU API or dma_map(). Though set_map() is designed to have the capability to pass an rbtree based mapping to vDPA device, it's still be called at least once for each VHOST_IOTLB_UPDATE or
2020 Jun 18
6
[PATCH RFC 0/5] support batched IOTLB updating in vhost-vdpa
Hi all: This series tries to support batched IOTLB updating vhost-vdpa. Currently vhost-vdpa accepts userspace mapping via IOTLB API, and it can only forward one mapping to IOMMU or device through IOMMU API or dma_map(). Though set_map() is deisgend to have the capability to pass an rbtree based mapping to vDPA device, it's still be called at least once for each VHOST_IOTLB_UPDATE or
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 ++-
2020 Feb 10
9
[PATCH V2 0/5] vDPA support
Hi all: This is an updated version of kernel support for vDPA device. Various changes were made based on the feedback since last verion. One major change is to drop the sysfs API and leave the management interface for future development, and introudce the incremental DMA bus operations. Please see changelog for more information. The work on vhost, IFCVF (intel VF driver for vDPA) and qemu is
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 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
2020 Feb 20
5
[PATCH V4 0/5] vDPA support
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: - PF (Physical Function) - A single
2020 Feb 20
9
[PATCH V3 0/5] vDPA support
Hi all: This is an update version of vDPA support in kernel. vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. vDPA hardware devices are usually implemented through PCIE with the following types: - PF (Physical Function) - A single