Re: [PATCH net,v3, 2/2] hv_netvsc: Fix race of register_netdevice_notifier and VF register

2023-11-08 Thread Jakub Kicinski
On Tue, 7 Nov 2023 13:05:32 -0800 Haiyang Zhang wrote: > If VF NIC is registered earlier, NETDEV_REGISTER event is replayed, > but NETDEV_POST_INIT is not. But Long Li sent the patch which starts to use POST_INIT against the net-next tree. If we apply this to net and Long Li's patch to net-next

Re: [PATCH net-next v4] hv_netvsc: Mark VF as slave before exposing it to user-mode

2023-11-08 Thread Jakub Kicinski
On Wed, 8 Nov 2023 14:56:52 -0800 lon...@linuxonhyperv.com wrote: > From: Long Li > > When a VF is being exposed form the kernel, it should be marked as "slave" > before exposing to the user-mode. The VF is not usable without netvsc running > as master. The user-mode should never see a VF withou

[PATCH net-next v4] hv_netvsc: Mark VF as slave before exposing it to user-mode

2023-11-08 Thread longli
From: Long Li When a VF is being exposed form the kernel, it should be marked as "slave" before exposing to the user-mode. The VF is not usable without netvsc running as master. The user-mode should never see a VF without the "slave" flag. An example of a user-mode program depending on this flag

[PATCH net v3] hv_netvsc: Mark VF as slave before exposing it to user-mode

2023-11-08 Thread longli
From: Long Li When a VF is being exposed form the kernel, it should be marked as "slave" before exposing to the user-mode. The VF is not usable without netvsc running as master. The user-mode should never see a VF without the "slave" flag. An example of a user-mode program depending on this flag

Re: [PATCH RFC 00/17] Solve iommu probe races around iommu_fwspec

2023-11-08 Thread Jason Gunthorpe
On Wed, Nov 08, 2023 at 06:34:58PM +, André Draszik wrote: > For me, it's working fine so far on master, and I've also done my own back > port > to 6.1 and am currently testing both. An official back port once finalised > could be useful, though :-) Great, I'll post a non-RFC version next we

Re: [PATCH RFC 00/17] Solve iommu probe races around iommu_fwspec

2023-11-08 Thread André Draszik
Hi Jason, On Fri, 2023-11-03 at 13:44 -0300, Jason Gunthorpe wrote: > This is a more complete solution that the first attempt here: > https://lore.kernel.org/r/1698825902-10685-1-git-send-email-quic_zhenh...@quicinc.com > > I haven't been able to test this on any HW that touches these paths, so i

Re: [PATCH RFC 12/17] iommu: Make iommu_ops_from_fwnode() static

2023-11-08 Thread André Draszik
Hi Jason, On Fri, 2023-11-03 at 13:44 -0300, Jason Gunthorpe wrote: > There are no external callers now. > > Signed-off-by: Jason Gunthorpe > --- >  drivers/iommu/iommu.c | 3 ++- >  include/linux/iommu.h | 6 -- >  2 files changed, 2 insertions(+), 7 deletions(-) > > diff --git a/drivers/iom

Re: [PATCH RFC 01/17] iommu: Remove struct iommu_ops *iommu from arch_setup_dma_ops()

2023-11-08 Thread Rob Herring
On Fri, Nov 03, 2023 at 01:44:46PM -0300, Jason Gunthorpe wrote: > This is not being used to pass ops, it is just a way to tell if an > iommu driver was probed. These days this can be detected directly via > device_iommu_mapped(). Call device_iommu_mapped() in the two places that > need to check it

Re: [PATCH RFC 02/17] of: Do not return struct iommu_ops from of_iommu_configure()

2023-11-08 Thread Rob Herring
On Fri, Nov 03, 2023 at 01:44:47PM -0300, Jason Gunthorpe wrote: > Nothing needs this pointer. Return a normal error code with the usual > IOMMU semantic that ENODEV means 'there is no IOMMU driver'. > > Signed-off-by: Jason Gunthorpe > --- > drivers/iommu/of_iommu.c | 29 ++-

Re: [PATCH RFC 03/17] of: Use -ENODEV consistently in of_iommu_configure()

2023-11-08 Thread Rob Herring
On Fri, Nov 03, 2023 at 01:44:48PM -0300, Jason Gunthorpe wrote: > Instead of returning 1 and trying to handle positive error codes just > stick to the convention of returning -ENODEV. Remove references to ops > from of_iommu_configure(), a NULL ops will already generate an error code. nit: "iommu

Re: [PATCH RFC 17/17] iommu: Mark dev_iommu_priv_set() with a lockdep

2023-11-08 Thread Baolu Lu
On 2023/11/4 0:45, Jason Gunthorpe wrote: A perfect driver would only call dev_iommu_priv_set() from its probe callback. We've made it functionally correct to call it from the of_xlate by adding a lock around that call. lockdep assert that iommu_probe_device_lock is held to discourage misuse. E

Re: [PATCH RFC 01/17] iommu: Remove struct iommu_ops *iommu from arch_setup_dma_ops()

2023-11-08 Thread Baolu Lu
On 2023/11/4 0:44, Jason Gunthorpe wrote: This is not being used to pass ops, it is just a way to tell if an iommu driver was probed. These days this can be detected directly via device_iommu_mapped(). Call device_iommu_mapped() in the two places that need to check it and remove the iommu paramet