Re: [RFC PATCH v3 04/12] netdev: support binding dma-buf to netdevice

2023-11-09 Thread Mina Almasry
On Thu, Nov 9, 2023 at 12:30 AM Paolo Abeni wrote: > > I'm trying to wrap my head around the whole infra... the above line is > confusing. Why do you increment dma_addr? it will be re-initialized in > the next iteration. > That is just a mistake, sorry. Will remove this increment. On Thu, Nov

Re: [PATCH v2 0/4] cgroup/cpuset: Improve CPU isolation in isolated partitions

2023-11-09 Thread Waiman Long
On 11/9/23 04:02, Zhang, Rui wrote: Hi, Waiman, May I know which kernel this patch series is based on? I'd like to test this feature, but cannot apply it cleanly on top of v6.6. It was originally based on the cgroup/for-6.7 branch. It should be applicable to v6.7 kernel now. Cheers,

Re: [PATCH v1 06/23] KVM: VMX: Defer enabling FRED MSRs save/load until after set CPUID

2023-11-09 Thread Sean Christopherson
On Thu, Nov 09, 2023, Xin3 Li wrote: > > >+static void vmx_vcpu_config_fred_after_set_cpuid(struct kvm_vcpu *vcpu) > > >+{ > > >+ struct vcpu_vmx *vmx = to_vmx(vcpu); > > >+ > > >+ if (!cpu_feature_enabled(X86_FEATURE_FRED) || > > >+ !guest_cpuid_has(vcpu, X86_FEATURE_FRED)) > > >+

RE: [PATCH v1 15/23] KVM: nVMX: Add support for the secondary VM exit controls

2023-11-09 Thread Li, Xin3
> > diff --git a/arch/x86/include/asm/hyperv-tlfs.h > > b/arch/x86/include/asm/hyperv-tlfs.h > > index 2ff26f53cd62..299554708e37 100644 > > --- a/arch/x86/include/asm/hyperv-tlfs.h > > +++ b/arch/x86/include/asm/hyperv-tlfs.h > > @@ -616,6 +616,7 @@ struct hv_enlightened_vmcs { > > u64

RE: [PATCH v1 05/23] KVM: VMX: Initialize FRED VM entry/exit controls in vmcs_config

2023-11-09 Thread Li, Xin3
> > >+ if (cpu_feature_enabled(X86_FEATURE_FRED) && > > >+ !(_vmentry_control & VM_ENTRY_LOAD_IA32_FRED)) { > > >+ pr_warn_once("FRED enabled but no VMX VM-Entry > LOAD_IA32_FRED control: %x\n", > > >+ _vmentry_control); > > > > Can we just hide FRED from

RE: [PATCH v1 06/23] KVM: VMX: Defer enabling FRED MSRs save/load until after set CPUID

2023-11-09 Thread Li, Xin3
> >+static void vmx_vcpu_config_fred_after_set_cpuid(struct kvm_vcpu *vcpu) > >+{ > >+struct vcpu_vmx *vmx = to_vmx(vcpu); > >+ > >+if (!cpu_feature_enabled(X86_FEATURE_FRED) || > >+!guest_cpuid_has(vcpu, X86_FEATURE_FRED)) > >+return; > >+ > >+/* Enable loading

[PATCH 1/2] fuse: ensure submount_lookup is initialized on alloc

2023-11-09 Thread Krister Johansen
When introduced, the submount lookup reference tracking neglected to set an initial value in the fuse inode as part of fuse_inode_alloc. Users running with SLUB_DEBUG enabled caught and reported this error. Fix by ensuring that this value is always initialized to NULL. Signed-off-by: Krister

[v5 PATCH 2/2] fuse: share lookup state between submount and its parent

2023-11-09 Thread Krister Johansen
Fuse submounts do not perform a lookup for the nodeid that they inherit from their parent. Instead, the code decrements the nlookup on the submount's fuse_inode when it is instantiated, and no forget is performed when a submount root is evicted. Trouble arises when the submount's parent is

[PATCH 0/2] Fuse submount_lookup needs to be initialized

2023-11-09 Thread Krister Johansen
Hi Miklos, I got a couple of bug reports[1][2] this morning from teams that are tracking regresssions in linux-next. My patch 513dfacefd71 ("fuse: share lookup state between submount and its parent") is causing panics in the fuse unmount path. The reports came from users with SLUB_DEBUG enabled,

Re: selftests: memfd: run_fuse_test.sh - fuse_evict_inode - fs/fuse/inode.c:162 - panic

2023-11-09 Thread Krister Johansen
On Thu, Nov 09, 2023 at 06:34:24PM +0530, Naresh Kamboju wrote: > Following kernel panic noticed while running selftests: memfd: > run_fuse_test.sh > on arm64 Juno-r2 and x86 devices running Linux next-20231109. > > Reported-by: Linux Kernel Functional Testing > > log:

Re: [PATCH 0/2] selftests/nolibc: run-user improvements

2023-11-09 Thread Konstantin Ryabitsev
On Thu, Nov 09, 2023 at 06:44:44PM +0100, Thomas Weißschuh wrote: > > On Wed, Sep 15, 2077 at 02:13:51AM +0200, Thomas Weißschuh wrote: > >     > > > > I'm curious how this happened, especially since this was sent with b4. > > My system time was messed up. > I blame

Re: [PATCH 0/2] selftests/nolibc: run-user improvements

2023-11-09 Thread Thomas Weißschuh
Nov 9, 2023 17:28:45 Konstantin Ryabitsev : > On Wed, Sep 15, 2077 at 02:13:51AM +0200, Thomas Weißschuh wrote: >     > > I'm curious how this happened, especially since this was sent with b4. My system time was messed up. I blame systemd-timesyncd.

Re: [PATCH 0/2] selftests/nolibc: run-user improvements

2023-11-09 Thread Konstantin Ryabitsev
On Thu, Nov 09, 2023 at 05:31:42PM +0100, Willy Tarreau wrote: > > I'm curious how this happened, especially since this was sent with b4. > > We didn't want to tell you, but you slept 54 years Konstantin, the > current kernel is version 41.8 ;-) Dang, I see we still use email for kernel

Re: [PATCH 0/2] selftests/nolibc: run-user improvements

2023-11-09 Thread Willy Tarreau
On Thu, Nov 09, 2023 at 11:28:41AM -0500, Konstantin Ryabitsev wrote: > On Wed, Sep 15, 2077 at 02:13:51AM +0200, Thomas Weißschuh wrote: > > > I'm curious how this happened, especially since this was sent with b4. We didn't want to tell you, but you slept 54 years

Re: [PATCH 0/2] selftests/nolibc: run-user improvements

2023-11-09 Thread Konstantin Ryabitsev
On Wed, Sep 15, 2077 at 02:13:51AM +0200, Thomas Weißschuh wrote: I'm curious how this happened, especially since this was sent with b4. -K

Re: [PATCH] selftests: sud_test: return correct emulated syscall value on RISC-V

2023-11-09 Thread Palmer Dabbelt
On Thu, 09 Nov 2023 00:22:46 PST (-0800), cle...@rivosinc.com wrote: On 09/11/2023 04:26, Palmer Dabbelt wrote: On Wed, 13 Sep 2023 07:07:11 PDT (-0700), cle...@rivosinc.com wrote: Currently, the sud_test expects the emulated syscall to return the emulated syscall number. This assumption

Re: [PATCH v1 05/23] KVM: VMX: Initialize FRED VM entry/exit controls in vmcs_config

2023-11-09 Thread Sean Christopherson
On Thu, Nov 09, 2023, Chao Gao wrote: > On Wed, Nov 08, 2023 at 10:29:45AM -0800, Xin Li wrote: > >Setup the global vmcs_config for FRED: > >1) Add VM_ENTRY_LOAD_IA32_FRED to KVM_OPTIONAL_VMX_VM_ENTRY_CONTROLS to > > have a FRED CPU load guest FRED MSRs from VMCS upon VM entry. > >2) Add

Re: WARNING: CPU: 6 PID: 474 at include/linux/maple_tree.h:712 mmap_region (include/linux/maple_tree.h:556 include/linux/maple_tree.h:731

2023-11-09 Thread Mark Brown
On Thu, Nov 09, 2023 at 06:57:08PM +0530, Naresh Kamboju wrote: > Following kernel panic noticed while running selftests: exec: load_address > on Fastmodels (FVP) running Linux next-20231109. > Copying in Kees and Eric who maintain the exec API. > Reported-by: Linux Kernel Functi

WARNING: CPU: 6 PID: 474 at include/linux/maple_tree.h:712 mmap_region (include/linux/maple_tree.h:556 include/linux/maple_tree.h:731

2023-11-09 Thread Naresh Kamboju
Following kernel panic noticed while running selftests: exec: load_address on Fastmodels (FVP) running Linux next-20231109. Reported-by: Linux Kernel Functional Testing log: --- # timeout set to 45 # selftests: exec: load_address_16777216 [ 238.405168] [ cut here

Re: [RFC PATCH v3 07/12] page-pool: device memory support

2023-11-09 Thread Yunsheng Lin
On 2023/11/9 20:20, Mina Almasry wrote: > On Thu, Nov 9, 2023 at 1:30 AM Yunsheng Lin wrote: >> >> On 2023/11/9 11:20, Mina Almasry wrote: >>> On Wed, Nov 8, 2023 at 2:56 AM Yunsheng Lin wrote: >> >>> >>> Agreed everything above is undoable. >>> But we might be able to do something as folio

selftests: memfd: run_fuse_test.sh - fuse_evict_inode - fs/fuse/inode.c:162 - panic

2023-11-09 Thread Naresh Kamboju
Following kernel panic noticed while running selftests: memfd: run_fuse_test.sh on arm64 Juno-r2 and x86 devices running Linux next-20231109. Reported-by: Linux Kernel Functional Testing log: --- # timeout set to 45 # selftests: memfd: run_fuse_test.sh # opening: ./mnt/memfd # fuse: DONE

Re: [RFC PATCH v3 07/12] page-pool: device memory support

2023-11-09 Thread Mina Almasry
On Thu, Nov 9, 2023 at 1:30 AM Yunsheng Lin wrote: > > On 2023/11/9 11:20, Mina Almasry wrote: > > On Wed, Nov 8, 2023 at 2:56 AM Yunsheng Lin wrote: > > > > > Agreed everything above is undoable. > > > >> But we might be able to do something as folio is doing now, mm subsystem > >> is still

[PATCH] selftests/resctrl: Add non-contiguous CBMs CAT test

2023-11-09 Thread Maciej Wieczor-Retman
Non-contiguous CBM support for Intel CAT has been merged into the kernel with Commit 0e3cd31f6e90 ("x86/resctrl: Enable non-contiguous CBMs in Intel CAT") but there is no selftest that would validate if this feature works correctly. The selftest needs to verify if writing non-contiguous CBMs to

Re: [RFC PATCH v3 02/12] net: page_pool: create hooks for custom page providers

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: > diff --git a/include/net/page_pool/types.h b/include/net/page_pool/types.h > index 6fc5134095ed..d4bea053bb7e 100644 > --- a/include/net/page_pool/types.h > +++ b/include/net/page_pool/types.h > @@ -60,6 +60,8 @@ struct page_pool_params { >

Re: [RFC PATCH v3 10/12] tcp: RX path for devmem TCP

2023-11-09 Thread Paolo Abeni
On Mon, 2023-11-06 at 14:55 -0800, Willem de Bruijn wrote: > On Mon, Nov 6, 2023 at 2:34 PM Stanislav Fomichev wrote: > > > > On 11/06, Willem de Bruijn wrote: > > > > > IMHO, we need a better UAPI to receive the tokens and give them back > > > > > to > > > > > the kernel. CMSG +

Re: [RFC PATCH v3 12/12] selftests: add ncdevmem, netcat for devmem TCP

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: > @@ -91,6 +95,7 @@ TEST_PROGS += test_bridge_neigh_suppress.sh > TEST_PROGS += test_vxlan_nolocalbypass.sh > TEST_PROGS += test_bridge_backup_port.sh > TEST_PROGS += fdb_flush.sh > +TEST_GEN_FILES += ncdevmem I guess we want something

Re: [RFC PATCH v3 10/12] tcp: RX path for devmem TCP

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: [...] > +/* On error, returns the -errno. On success, returns number of bytes sent to > the > + * user. May not consume all of @remaining_len. > + */ > +static int tcp_recvmsg_devmem(const struct sock *sk, const struct sk_buff > *skb, > +

Re: [RFC PATCH v3 07/12] page-pool: device memory support

2023-11-09 Thread Yunsheng Lin
On 2023/11/9 11:20, Mina Almasry wrote: > On Wed, Nov 8, 2023 at 2:56 AM Yunsheng Lin wrote: > > Agreed everything above is undoable. > >> But we might be able to do something as folio is doing now, mm subsystem >> is still seeing 'struct folio/page', but other subsystem like slab is using >>

Re: [RFC PATCH v3 04/12] netdev: support binding dma-buf to netdevice

2023-11-09 Thread Yunsheng Lin
On 2023/11/9 10:22, Mina Almasry wrote: > On Tue, Nov 7, 2023 at 7:40 PM Yunsheng Lin wrote: >> >> On 2023/11/8 5:59, Mina Almasry wrote: >>> On Mon, Nov 6, 2023 at 11:46 PM Yunsheng Lin wrote: On 2023/11/6 10:44, Mina Almasry wrote: > + > +void

Re: [PATCH v1 07/23] KVM: VMX: Disable intercepting FRED MSRs

2023-11-09 Thread Chao Gao
On Wed, Nov 08, 2023 at 10:29:47AM -0800, Xin Li wrote: >Add FRED MSRs to the valid passthrough MSR list and disable intercepting >FRED MSRs only if FRED is enumerated after set CPUID. > >Tested-by: Shan Kang >Signed-off-by: Xin Li >--- > arch/x86/kvm/vmx/vmx.c | 13 + > 1 file

Re: [PATCH v1 06/23] KVM: VMX: Defer enabling FRED MSRs save/load until after set CPUID

2023-11-09 Thread Chao Gao
On Wed, Nov 08, 2023 at 10:29:46AM -0800, Xin Li wrote: >Clear FRED VM entry/exit controls when initializing a vCPU, and set >these controls only if FRED is enumerated after set CPUID. > >FRED VM entry/exit controls need to be set to establish context >sufficient to support FRED event delivery

Re: [RFC PATCH v3 08/12] net: support non paged skb frags

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: [...] > @@ -3421,7 +3446,7 @@ static inline struct page *skb_frag_page(const > skb_frag_t *frag) > */ > static inline void __skb_frag_ref(skb_frag_t *frag) > { > - get_page(skb_frag_page(frag)); > +

Re: [RFC PATCH v3 07/12] page-pool: device memory support

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: > Overload the LSB of struct page* to indicate that it's a page_pool_iov. > > Refactor mm calls on struct page* into helpers, and add page_pool_iov > handling on those helpers. Modify callers of these mm APIs with calls to > these helpers

Re: [PATCH v2 0/4] cgroup/cpuset: Improve CPU isolation in isolated partitions

2023-11-09 Thread Zhang, Rui
Hi, Waiman, May I know which kernel this patch series is based on? I'd like to test this feature, but cannot apply it cleanly on top of v6.6. thanks, rui On Wed, 2023-10-25 at 14:25 -0400, Waiman Long wrote: > v2: >  - Add 2 read-only workqueue sysfs files to expose the user requested >   

Re: [PATCH v1 05/23] KVM: VMX: Initialize FRED VM entry/exit controls in vmcs_config

2023-11-09 Thread Chao Gao
On Wed, Nov 08, 2023 at 10:29:45AM -0800, Xin Li wrote: >Setup the global vmcs_config for FRED: >1) Add VM_ENTRY_LOAD_IA32_FRED to KVM_OPTIONAL_VMX_VM_ENTRY_CONTROLS to > have a FRED CPU load guest FRED MSRs from VMCS upon VM entry. >2) Add SECONDARY_VM_EXIT_SAVE_IA32_FRED to >

Re: [RFC PATCH v3 05/12] netdev: netdevice devmem allocator

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: [...] > +void netdev_free_devmem(struct page_pool_iov *ppiov) > +{ > + struct netdev_dmabuf_binding *binding = page_pool_iov_binding(ppiov); > + > + refcount_set(>refcount, 1); > + > + if (gen_pool_has_addr(binding->chunk_pool, > +

Re: [RFC PATCH v3 04/12] netdev: support binding dma-buf to netdevice

2023-11-09 Thread Paolo Abeni
On Sun, 2023-11-05 at 18:44 -0800, Mina Almasry wrote: [...] > +int netdev_bind_dmabuf(struct net_device *dev, unsigned int dmabuf_fd, > +struct netdev_dmabuf_binding **out) > +{ > + struct netdev_dmabuf_binding *binding; > + struct scatterlist *sg; > + struct

Re: [PATCH] selftests: sud_test: return correct emulated syscall value on RISC-V

2023-11-09 Thread Clément Léger
On 09/11/2023 04:26, Palmer Dabbelt wrote: > On Wed, 13 Sep 2023 07:07:11 PDT (-0700), cle...@rivosinc.com wrote: >> Currently, the sud_test expects the emulated syscall to return the >> emulated syscall number. This assumption only works on architectures >> were the syscall calling convention

Re: [PATCH v1 15/23] KVM: nVMX: Add support for the secondary VM exit controls

2023-11-09 Thread Jeremi Piotrowski
On 08/11/2023 19:29, Xin Li wrote: > Enable the secondary VM exit controls to prepare for nested FRED. > > Tested-by: Shan Kang > Signed-off-by: Xin Li > --- > Documentation/virt/kvm/x86/nested-vmx.rst | 1 + > arch/x86/include/asm/hyperv-tlfs.h| 1 + >

Re: [RFC 4/7] iommufd: Support attach/replace for SIOV virtual device {dev, pasid}

2023-11-09 Thread Yi Liu
On 2023/10/10 16:24, Tian, Kevin wrote: From: Liu, Yi L Sent: Monday, October 9, 2023 4:51 PM From: Kevin Tian SIOV devices allows driver to tag different PASIDs for the virtual devices within it. Such driver should call iommufd_device_bind_pasid() to connect the pasid of the device to

Re: [RFC 7/7] vfio: Add vfio_register_pasid_iommu_dev()

2023-11-09 Thread Yi Liu
On 2023/10/10 16:33, Tian, Kevin wrote: From: Liu, Yi L Sent: Monday, October 9, 2023 4:51 PM From: Kevin Tian This adds vfio_register_pasid_iommu_dev() for device driver to register virtual devices which are isolated per PASID in physical IOMMU. The major usage is for the SIOV devices which