[PATCH v2.1 4/9] tracing, preempt: Squash _rcuidle tracing

2023-01-31 Thread Peter Zijlstra
Extend commit 9aedeaed6fc6 ("tracing, hardirq: No moar _rcuidle() tracing") to also cover trace_preempt_{on,off}() which were mysteriously untouched. Fixes: 9aedeaed6fc6 ("tracing, hardirq: No moar _rcuidle() tracing") Reported-by: Mark Rutland Signed-off-by: Peter Zijlstra (Intel) Tested-by:

Re: [PATCH v3 2/2] virtio_net: notify MAC address change on device initialization

2023-01-31 Thread Paolo Abeni
On Fri, 2023-01-27 at 21:45 +0100, Laurent Vivier wrote: > In virtnet_probe(), if the device doesn't provide a MAC address the > driver assigns a random one. > As we modify the MAC address we need to notify the device to allow it > to update all the related information. > > The problem can be

Re: [PATCH v3 2/2] virtio_net: notify MAC address change on device initialization

2023-01-31 Thread Laurent Vivier
On 1/31/23 10:01, Paolo Abeni wrote: On Fri, 2023-01-27 at 21:45 +0100, Laurent Vivier wrote: In virtnet_probe(), if the device doesn't provide a MAC address the driver assigns a random one. As we modify the MAC address we need to notify the device to allow it to update all the related

Re: [PATCH 0/2] vhost: improve livepatch switching for heavily loaded vhost worker kthreads

2023-01-31 Thread Peter Zijlstra
On Mon, Jan 30, 2023 at 11:59:30AM -0800, Josh Poimboeuf wrote: > @@ -8662,16 +8665,19 @@ void sched_dynamic_update(int mode) > > switch (mode) { > case preempt_dynamic_none: > - preempt_dynamic_enable(cond_resched); > + if (!klp_override) > +

Re: [PATCH 01/23] block: factor out a bvec_set_page helper

2023-01-31 Thread Christoph Hellwig
On Mon, Jan 30, 2023 at 09:09:23AM -0800, Bart Van Assche wrote: > Has it been considered to use structure assignment instead of introducing > bvec_set_page(), e.g. as follows? > > bip->bip_vec[bip->bip_vcnt] = (struct bio_vec) { > .bv_page = page, .bv_len = len, .bv_offset = offset };

Re: [PATCH v3 2/2] virtio_net: notify MAC address change on device initialization

2023-01-31 Thread Paolo Abeni
On Tue, 2023-01-31 at 10:32 +0100, Laurent Vivier wrote: > On 1/31/23 10:01, Paolo Abeni wrote: > > On Fri, 2023-01-27 at 21:45 +0100, Laurent Vivier wrote: > > > In virtnet_probe(), if the device doesn't provide a MAC address the > > > driver assigns a random one. > > > As we modify the MAC

Re: [PATCH v3 2/2] virtio_net: notify MAC address change on device initialization

2023-01-31 Thread Paolo Abeni
On Tue, 2023-01-31 at 08:43 -0500, Michael S. Tsirkin wrote: > On Tue, Jan 31, 2023 at 10:01:53AM +0100, Paolo Abeni wrote: > > On Fri, 2023-01-27 at 21:45 +0100, Laurent Vivier wrote: > > > In virtnet_probe(), if the device doesn't provide a MAC address the > > > driver assigns a random one. > >

Re: [PATCH v3 2/2] virtio_net: notify MAC address change on device initialization

2023-01-31 Thread Michael S. Tsirkin
On Tue, Jan 31, 2023 at 10:01:53AM +0100, Paolo Abeni wrote: > On Fri, 2023-01-27 at 21:45 +0100, Laurent Vivier wrote: > > In virtnet_probe(), if the device doesn't provide a MAC address the > > driver assigns a random one. > > As we modify the MAC address we need to notify the device to allow it

Re: [PATCH 0/2] vhost: improve livepatch switching for heavily loaded vhost worker kthreads

2023-01-31 Thread Mark Rutland
On Mon, Jan 30, 2023 at 11:48:23AM -0800, Josh Poimboeuf wrote: > On Mon, Jan 30, 2023 at 06:36:32PM +, Mark Rutland wrote: > > On Mon, Jan 30, 2023 at 01:40:18PM +0100, Peter Zijlstra wrote: > > > On Fri, Jan 27, 2023 at 02:11:31PM -0800, Josh Poimboeuf wrote: > > > > @@ -8500,8 +8502,10 @@

Re: [RFC PATCH 01/19] mm: Introduce vm_account

2023-01-31 Thread David Hildenbrand
On 24.01.23 06:42, Alistair Popple wrote: Kernel drivers that pin pages should account these pages against either user->locked_vm or mm->pinned_vm and fail the pinning if RLIMIT_MEMLOCK is exceeded and CAP_IPC_LOCK isn't held. Currently drivers open-code this accounting and use various methods

Re: [PATCH 0/6] features provisioning fixes and mlx5_vdpa support

2023-01-31 Thread Si-Wei Liu
Please disregard this series for v1, please refer to the v2 at: Message-ID: 1675207345-22328-1-git-send-email-si-wei@oracle.com Apologies I accidentally got v1 resent at the same time when v2 was sent. -Siwei On 1/31/2023 3:22 PM, Si-Wei Liu wrote: You are currently receiving this

Re: [PATCH v2 4/6] dt-bindings: hypervisor: Rename virtio to hypervisor

2023-01-31 Thread Rob Herring
On Tue, 31 Jan 2023 10:10:07 -0800, Saurabh Sengar wrote: > Rename virtio folder to more generic hypervisor, so that this can > accommodate more devices of similar type. > > Signed-off-by: Saurabh Sengar > --- > .../devicetree/bindings/{virtio => hypervisor}/mmio.yaml| 2 +- >

Re: [PATCH 1/6] vdpa: fix improper error message when adding vdpa dev

2023-01-31 Thread Si-Wei Liu
On 1/31/2023 3:42 AM, Eli Cohen wrote: On 30/01/2023 22:30, Si-Wei Liu wrote: In below example, before the fix, mtu attribute is supported by the parent mgmtdev, but the error message showing "All provided are not supported" is just misleading. $ vdpa mgmtdev show vdpasim_net:   

Re: [PATCH v3 1/2] virtio_net: disable VIRTIO_NET_F_STANDBY if VIRTIO_NET_F_MAC is not set

2023-01-31 Thread Michael S. Tsirkin
On Fri, Jan 27, 2023 at 09:44:59PM +0100, Laurent Vivier wrote: > failover relies on the MAC address to pair the primary and the standby > devices: > > "[...] the hypervisor needs to enable VIRTIO_NET_F_STANDBY >feature on the virtio-net interface and assign the same MAC address >to

Re: [PATCH 6/6] vdpa/mlx5: support device features provisioning

2023-01-31 Thread Si-Wei Liu
On 1/31/2023 4:56 AM, Eli Cohen wrote: On 30/01/2023 22:30, Si-Wei Liu wrote: This patch implements features provisioning for mlx5_vdpa. 1) Validate the provisioned features are a subset of the parent     features. 2) Clearing features that are not wanted by userspace. 3) Set config space

[PATCH v2 5/7] vdpa: validate device feature provisioning against supported class

2023-01-31 Thread Si-Wei Liu
Today when device features are explicitly provisioned, the features user supplied may contain device class specific features that are not supported by the parent managment device. On the other hand, when parent managment device supports more than one class, the device features to provision may be

[PATCH v2 7/7] vdpa/mlx5: support device features provisioning

2023-01-31 Thread Si-Wei Liu
This patch implements features provisioning for mlx5_vdpa. 1) Validate the provisioned features are a subset of the parent features. 2) Clearing features that are not wanted by userspace. For example: # vdpa mgmtdev show pci/:41:04.2: supported_classes net

[PATCH v2 1/7] vdpa: fix improper error message when adding vdpa dev

2023-01-31 Thread Si-Wei Liu
In below example, before the fix, mtu attribute is supported by the parent mgmtdev, but the error message showing "All provided are not supported" is just misleading. $ vdpa mgmtdev show vdpasim_net: supported_classes net max_supported_vqs 3 dev_features MTU MAC CTRL_VQ CTRL_MAC_ADDR

[PATCH v2 4/7] virtio: VIRTIO_DEVICE_F_MASK for all per-device features

2023-01-31 Thread Si-Wei Liu
Introduce VIRTIO_DEVICE_F_MASK bitmask used for identification of per-device features. Feature bits VIRTIO_TRANSPORT_F_START through VIRTIO_TRANSPORT_F_END are reserved for transport features hence are not counted as per-device features against the 64bit feature space. Signed-off-by: Si-Wei Liu

[PATCH 2/6] vdpa: conditionally read STATUS in config space

2023-01-31 Thread Si-Wei Liu
The spec says: status only exists if VIRTIO_NET_F_STATUS is set Similar to MAC and MTU, vdpa_dev_net_config_fill() should read STATUS conditionally depending on the feature bits. Signed-off-by: Si-Wei Liu --- drivers/vdpa/vdpa.c | 20 +++- 1 file changed, 15 insertions(+),

[PATCH 1/6] vdpa: fix improper error message when adding vdpa dev

2023-01-31 Thread Si-Wei Liu
In below example, before the fix, mtu attribute is supported by the parent mgmtdev, but the error message showing "All provided are not supported" is just misleading. $ vdpa mgmtdev show vdpasim_net: supported_classes net max_supported_vqs 3 dev_features MTU MAC CTRL_VQ CTRL_MAC_ADDR

[PATCH 6/6] vdpa/mlx5: support device features provisioning

2023-01-31 Thread Si-Wei Liu
This patch implements features provisioning for mlx5_vdpa. 1) Validate the provisioned features are a subset of the parent features. 2) Clearing features that are not wanted by userspace. 3) Set config space field only when the corresponding feature is provisioned. For example: # vdpa

[PATCH 4/6] virtio: VIRTIO_DEVICE_F_MASK for all per-device features

2023-01-31 Thread Si-Wei Liu
Introduce VIRTIO_DEVICE_F_MASK bitmask used for identification of per-device features. Feature bits VIRTIO_TRANSPORT_F_START through VIRTIO_TRANSPORT_F_END are reserved for transport features hence are not counted as per-device features against the 64bit feature space. Signed-off-by: Si-Wei Liu

[PATCH 5/6] vdpa: validate device feature provisioning against supported class

2023-01-31 Thread Si-Wei Liu
Today when device features are explicitly provisioned, the features user supplied may contain device class specific features that are not supported by the parent managment device. On the other hand, when parent managment device supports more than one class, the device features to provision may be

[PATCH v2 0/7] features provisioning fixes and mlx5_vdpa support

2023-01-31 Thread Si-Wei Liu
This patchset is pre-requisite to export and provision device config attributes and features for vdpa live migration, in a way backward and forward compatibility can be retained. The follow up work [1] will need to be built around the new feature provisioning uAPI, with which it's easier to

[PATCH v2 6/7] vdpa/mlx5: conditionally show MTU and STATUS in config space

2023-01-31 Thread Si-Wei Liu
The spec says: mtu only exists if VIRTIO_NET_F_MTU is set status only exists if VIRTIO_NET_F_STATUS is set We should only show MTU and STATUS conditionally depending on the feature bits. Signed-off-by: Si-Wei Liu --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 22 ++ 1 file

[PATCH v2 2/7] vdpa: conditionally read STATUS in config space

2023-01-31 Thread Si-Wei Liu
The spec says: status only exists if VIRTIO_NET_F_STATUS is set Similar to MAC and MTU, vdpa_dev_net_config_fill() should read STATUS conditionally depending on the feature bits. Signed-off-by: Si-Wei Liu --- drivers/vdpa/vdpa.c | 20 +++- 1 file changed, 15 insertions(+),

[PATCH v2 3/7] vdpa: validate provisioned device features against specified attribute

2023-01-31 Thread Si-Wei Liu
With device feature provisioning, there's a chance for misconfiguration that the vdpa feature attribute supplied in 'vdpa dev add' command doesn't get selected on the device_features to be provisioned. For instance, when a @mac attribute is specified, the corresponding feature bit _F_MAC in

[PATCH 0/6] features provisioning fixes and mlx5_vdpa support

2023-01-31 Thread Si-Wei Liu
This patchset is pre-requisite to export and provision device config attributes and features for vdpa live migration, in a way backward and forward compatibility can be retained. The follow up work [1] will need to be built around the new feature provisioning uAPI, with which it's easier to

[PATCH 3/6] vdpa: validate provisioned device features against specified attribute

2023-01-31 Thread Si-Wei Liu
With device feature provisioning, there's a chance for misconfiguration that the vdpa feature attribute supplied in 'vdpa dev add' command doesn't get selected on the device_features to be provisioned. For instance, when a @mac attribute is specified, the corresponding feature bit _F_MAC in

Re: [PATCH v3 2/2] virtio_net: notify MAC address change on device initialization

2023-01-31 Thread Michael S. Tsirkin
On Fri, Jan 27, 2023 at 09:45:00PM +0100, Laurent Vivier wrote: > In virtnet_probe(), if the device doesn't provide a MAC address the > driver assigns a random one. > As we modify the MAC address we need to notify the device to allow it > to update all the related information. > > The problem can