virtio device id value can be more than 31. Hence, use BIT_ULL in
assignment.
Fixes: 33b347503f01 ("vdpa: Define vdpa mgmt device, ops and a netlink
interface")
Reported-by: kernel test robot
Reported-by: Dan Carpenter
Signed-off-by: Parav Pandit
Acked-by: Jason Wang
---
changelog:
v0->v1:
> From: Jason Wang
> Sent: Thursday, November 25, 2021 10:21 AM
>
> On Thu, Nov 25, 2021 at 12:56 AM Eli Cohen wrote:
> >
> > Add support for querying virtqueue statistics. Supported statistics are:
> >
> > received_desc - number of descriptors received for the virtqueue
> > completed_desc -
On 11/23/21 9:39 AM, Alexander Lobakin wrote:
> +static bool rtnl_get_xdp_stats_xdpxsk(struct sk_buff *skb, u32 ch,
> + const void *attr_data)
> +{
> + const struct ifla_xdp_stats *xstats = attr_data;
> +
> + xstats += ch;
> +
> + if
Hi Michael,
Do you plan to merge this patch through your tree?
If not, I'll resend to have it applied to the net tree.
Thanks,
Wei
On Friday, November 26, 2021 4:54 PM, Stefano Garzarella wrote:
> On Thu, Nov 25, 2021 at 08:18:23PM -0500, Wei Wang wrote:
> >The VMADDR_CID_ANY flag used by a
On 11/25/2021 8:22 AM, Michael S. Tsirkin wrote:
On Thu, Nov 25, 2021 at 09:29:53AM +0200, Eli Cohen wrote:
On Thu, Nov 25, 2021 at 02:21:43AM -0500, Michael S. Tsirkin wrote:
On Wed, Nov 24, 2021 at 07:19:53PM +0200, Eli Cohen wrote:
Increase the limit on the maximum number of supported
For vhost workers we use the kthread API which inherit's its values from
and checks against the kthreadd thread. This results in the wrong RLIMITs
being checked. This patch has us use the user_worker helpers which will
inherit its values/checks from the thread that owns the device similar to
if we
The vhost layer is creating kthreads to execute IO and management
operations. These threads need to share a mm with a userspace thread,
inherit cgroups, and we would like to have the thread accounted for
under the userspace thread's rlimit nproc value so a user can't overwhelm
the system with
The following patches made over Linus's tree, allow the vhost layer to do
a copy_process on the thread that does the VHOST_SET_OWNER ioctl like how
io_uring does a copy_process against its userspace app. This allows the
vhost layer's worker threads to inherit cgroups, namespaces, address
space,
Each vhost device gets a thread that is used to perform IO and management
operations. Instead of a thread that is accessing a device, the thread is
part of the device, so when it calls the user_worker() function added in
the next patch we can't dup or clone the parent's files/FDS because it
would
This is just a prep patch. It moves the worker related fields to a new
vhost_worker struct and moves the code around to create some helpers that
will be used in the next patch.
Signed-off-by: Mike Christie
Reviewed-by: Stefan Hajnoczi
Acked-by: Michael S. Tsirkin
Reviewed-by: Christoph Hellwig
Userspace doesn't know about PF_USER_WORKER threads, so it can't do wait
to clean them up. For cases like where qemu will do dynamic/hot add/remove
of vhost devices, then we need to auto reap the thread like was done for
the kthread case, because qemu does not know what API the kernel/vhost
layer
create_io_thread is not used anymore so remove it.
Signed-off-by: Mike Christie
---
include/linux/sched/task.h | 1 -
kernel/fork.c | 22 --
2 files changed, 23 deletions(-)
diff --git a/include/linux/sched/task.h b/include/linux/sched/task.h
index
The user_worker_create/start helpers allow callers to create threads that
copy or inherit the caller's attributes like mm, cgroups, namespaces, etc,
and are accounted for under the callers rlimits nproc value similar to if
the caller did a clone() in userspace. However, instead of returning to
This adds a new flag, PF_USER_WORKER, that's used for behavior common to
to both PF_IO_WORKER and users like vhost which will use the new
user_worker helpers that will use the flag and are added later in this
patchset.
The common behavior PF_USER_WORKER covers is the initial frame and fpu
setup
From: Christian Brauner
Since this is mirroring kthread's sig ignore api introduced in
commit 10ab825bdef8 ("change kernel threads to ignore signals instead of
blocking them")
this patch adds an option flag, USER_WORKER_SIG_IGN, handled in
copy_process() after copy_sighand() and copy_signals()
This patchset adds a couple new options to kernel_clone_args for IO thread
like/related users. Instead of adding new fields to kernel_clone_args for
each option, this moves us to a flags based approach by first converting
io_thread.
Signed-off-by: Mike Christie
Suggested-by: Christian Brauner
On Sat, Nov 27, 2021 at 06:09:56PM +0100, Eric Auger wrote:
> > - vdomain->viommu = 0;
> > + vdomain->viommu = NULL;
> nit: that change could have been done in patch 2
Ah yes, I changed that in v2 but fixed up the wrong patch
> > return
On Sat, Nov 27, 2021 at 06:09:56PM -0500, Michael S. Tsirkin wrote:
> > > -static int viommu_add_mapping(struct viommu_domain *vdomain, unsigned
> > > long iova,
> > > - phys_addr_t paddr, size_t size, u32 flags)
> > > +static int viommu_add_mapping(struct viommu_domain
On Sat, Nov 27, 2021 at 05:18:28PM +0100, Eric Auger wrote:
> Hi Jean,
>
> On 11/23/21 4:52 PM, Jean-Philippe Brucker wrote:
> > The VIRTIO_IOMMU_F_BYPASS_CONFIG feature adds a new flag to the ATTACH
> > request, that creates a bypass domain. Use it to enable identity
> > domains.
> >
> > When
Hi Eric,
On Sat, Nov 27, 2021 at 08:59:25AM +0100, Eric Auger wrote:
> > @@ -36,6 +37,8 @@ struct virtio_iommu_config {
> > struct virtio_iommu_range_32domain_range;
> > /* Probe buffer size */
> > __le32 probe_size;
> > + __u8
On Mon, Nov 29, 2021 at 09:27:17PM +0800, Tiezhu Yang wrote:
> On 11/29/2021 06:19 PM, Stefan Hajnoczi wrote:
> > On Sat, Nov 27, 2021 at 06:13:22PM +0800, Tiezhu Yang wrote:
> > > No need to generate virtio_fs.o first and then link to virtiofs.o, just
> > > rename virtio_fs.c to virtiofs.c and
Daniel Borkmann writes:
> On 11/26/21 7:06 PM, Jakub Kicinski wrote:
>> On Fri, 26 Nov 2021 13:30:16 +0100 Toke Høiland-Jørgensen wrote:
> TBH I wasn't following this thread too closely since I saw Daniel
> nacked it already. I do prefer rtnl xstats, I'd just report them
> in -s if
Only build the block based iomap code if CONFIG_BLOCK is set. Currently
that is always the case, but it will change soon.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/Kconfig| 4 ++--
fs/iomap/Makefile | 4 ++--
2 files changed, 4
The file system DAX code now does not require the block code. So allow
building a kernel with fuse DAX but not block layer.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
Prepare for the removal of the block_device from the DAX I/O path by
returning the partition offset from fs_dax_get_by_bdev so that the file
systems have it at hand for use during I/O.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
---
drivers/dax/super.c | 9 ++---
The DAX device <-> block device association is only enabled if
CONFIG_BLOCK is enabled. Update dax.h to account for that and use
the right conditions for the fs_put_dax stub as well.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
Remove the last user of ->bdev in dax.c by requiring the file system to
pass in an address that already includes the DAX offset. As part of the
only set ->bdev or ->daxdev when actually required in the ->iomap_begin
methods.
Signed-off-by: Christoph Hellwig
Reviewed-by: Gao Xiang [erofs]
---
Add a flag so that the file system can easily detect DAX operations
based just on the iomap operation requested instead of looking at
inode state using IS_DAX. This will be needed to apply the to be
added partition offset only for operations that actually use DAX,
but not things like fiemap that
To prepare for looking at the IOMAP_DAX flag in xfs_bmbt_to_iomap pass in
the input mapping flags to xfs_bmbt_to_iomap.
Signed-off-by: Christoph Hellwig
---
fs/xfs/libxfs/xfs_bmap.c | 4 ++--
fs/xfs/xfs_aops.c| 2 +-
fs/xfs/xfs_iomap.c | 35 ---
Only call fs_dax_get_by_bdev once the sbi has been allocated and remove
the need for the dax_dev local variable.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/ext4/super.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git
While the buffered write iomap ops do work due to the fact that zeroing
never allocates blocks, the DAX zeroing should use the direct ops just
like actual DAX I/O.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/xfs/xfs_iomap.c | 4 ++--
1 file
Hide the DAX device lookup from the xfs_super.c code.
Signed-off-by: Christoph Hellwig
Reviewed-by: Darrick J. Wong
Reviewed-by: Dan Williams
---
fs/xfs/xfs_buf.c | 8
fs/xfs/xfs_buf.h | 4 ++--
fs/xfs/xfs_super.c | 26 +-
3 files changed, 11
The file relative offset must have the same alignment as the storage
offset, so use that and get rid of the call to iomap_sector.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/dax.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff
Only call fs_dax_get_by_bdev once the sbi has been allocated and remove
the need for the dax_dev local variable.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/ext2/super.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff
Just pass the vm_fault and iomap_iter structures, and figure out the rest
locally. Note that this requires moving dax_iomap_sector up in the file.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/dax.c | 29 +
1 file
Unshare the DAX and iomap buffered I/O page zeroing code. This code
previously did a IS_DAX check deep inside the iomap code, which in
fact was the only DAX check in the code. Instead move these checks
into the callers. Most callers already have DAX special casing anyway
and XFS will need it
Factor out a helper for the "manual" zeroing of a DAX range to clean
up dax_iomap_zero a lot.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/dax.c | 36 +++-
1 file changed, 19 insertions(+), 17 deletions(-)
diff
Replace the two steps of dax_iomap_sector and bdev_dax_pgoff with a
single dax_iomap_pgoff helper that avoids lots of cumbersome sector
conversions.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
drivers/dax/super.c | 14 --
fs/dax.c
Add a helper to perform the entire remapping for DAX accesses. This
helper open codes bdev_dax_pgoff given that the alignment checks have
already been done by the submitting file system and don't need to be
repeated.
Signed-off-by: Christoph Hellwig
Acked-by: Mike Snitzer
Reviewed-by: Dan
From: Shiyang Ruan
Add helpers to prepare for using different DAX operations.
Signed-off-by: Shiyang Ruan
[hch: split from a larger patch + slight cleanups]
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/xfs/xfs_bmap_util.c | 7 +++
Add a helper to perform the entire remapping for DAX accesses. This
helper open codes bdev_dax_pgoff given that the alignment checks have
already been done by the submitting file system and don't need to be
repeated.
Signed-off-by: Christoph Hellwig
Acked-by: Mike Snitzer
Reviewed-by: Dan
Despite its name copy_user_page expected kernel addresses, which is what
we already have.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/dax.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/dax.c b/fs/dax.c
index
Factor out another DAX setup helper to simplify future changes. Also
move the experimental warning after the checks to not clutter the log
too much if the setup failed.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
fs/xfs/xfs_super.c | 47
CONFIG_DAX_DRIVER only selects CONFIG_DAX now, so remove it.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
---
drivers/dax/Kconfig| 4
drivers/nvdimm/Kconfig | 2 +-
drivers/s390/block/Kconfig | 2 +-
fs/fuse/Kconfig| 2 +-
4 files changed, 3
Replace the dax_host_hash with an xarray indexed by the pointer value
of the gendisk, and require explicitly calls from the block drivers that
want to associate their gendisk with a dax_device.
Signed-off-by: Christoph Hellwig
Acked-by: Mike Snitzer
---
drivers/dax/bus.c| 6 +-
Just open code the block size and dax_dev == NULL checks in the callers.
Signed-off-by: Christoph Hellwig
Acked-by: Mike Snitzer
Reviewed-by: Gao Xiang [erofs]
Reviewed-by: Dan Williams
Reviewed-by: Darrick J. Wong
---
drivers/dax/super.c | 36
The device mapper DAX support is all hanging off a block device and thus
can't be used with device dax. Make it depend on CONFIG_FS_DAX instead
of CONFIG_DAX_DRIVER. This also means that bdev_dax_pgoff only needs to
be built under CONFIG_FS_DAX now.
Signed-off-by: Christoph Hellwig
Acked-by:
fs_dax_get_by_bdev is the primary interface to find a dax device for a
block device, so move the partition alignment check there instead of
wiring it up through ->dax_supported.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
---
drivers/dax/super.c | 23 ++-
1
Make sure ->dax_dev is NULL on error so that the cleanup path doesn't
trip over an ERR_PTR.
Reported-by: Dan Williams
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index
Add a helper to perform the entire remapping for DAX accesses. This
helper open codes bdev_dax_pgoff given that the alignment checks have
already been done by the submitting file system and don't need to be
repeated.
Signed-off-by: Christoph Hellwig
Acked-by: Mike Snitzer
Reviewed-by: Dan
Drivers that register a dax_dev should make sure it works, no need
to double check from the file system.
Signed-off-by: Christoph Hellwig
Reviewed-by: Dan Williams
---
drivers/dax/super.c | 49 +
1 file changed, 1 insertion(+), 48 deletions(-)
diff
Hi Dan,
this series decouples the DAX from the block layer so that the
block_device is not needed at all for the DAX I/O path.
Changes since v1:
- rebase on latest v5.16-rc
- ensure the new dax zeroing helpers are always declared
- fix a dax_dev leak in pmem_attach_disk
- remove '\n' from an
On Sat, Nov 27, 2021 at 06:13:22PM +0800, Tiezhu Yang wrote:
> No need to generate virtio_fs.o first and then link to virtiofs.o, just
> rename virtio_fs.c to virtiofs.c and remove "virtiofs-y := virtio_fs.o"
> in Makefile, also update MAINTAINERS. Additionally, rename the private
> header file
53 matches
Mail list logo