vdpa: solidrun: Replace deprecated PCI functionsThe PCI functions pcim_iomap_regions() pcim_iounmap_regions() pcim_iomap_table()have been deprecated by the PCI subsystem.Replace these funct
vdpa: solidrun: Replace deprecated PCI functionsThe PCI functions pcim_iomap_regions() pcim_iounmap_regions() pcim_iomap_table()have been deprecated by the PCI subsystem.Replace these functions with their successors pcim_iomap_region() andpcim_iounmap_region().Signed-off-by: Philipp Stanner <pstanner@redhat.com>Message-Id: <20241219094428.21511-2-phasta@kernel.org>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Stefano Garzarella <sgarzare@redhat.com>
show more ...
vdpa: solidrun: Fix UB bug with devresIn psnet_open_pf_bar() and snet_open_vf_bar() a string later passed topcim_iomap_regions() is placed on the stack. Neitherpcim_iomap_regions() nor the functi
vdpa: solidrun: Fix UB bug with devresIn psnet_open_pf_bar() and snet_open_vf_bar() a string later passed topcim_iomap_regions() is placed on the stack. Neitherpcim_iomap_regions() nor the functions it calls copy that string.Should the string later ever be used, this, consequently, causesundefined behavior since the stack frame will by then have disappeared.Fix the bug by allocating the strings on the heap throughdevm_kasprintf().Cc: stable@vger.kernel.org # v6.3Fixes: 51a8f9d7f587 ("virtio: vdpa: new SolidNET DPU driver.")Reported-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>Closes: https://lore.kernel.org/all/74e9109a-ac59-49e2-9b1d-d825c9c9f891@wanadoo.fr/Suggested-by: Andy Shevchenko <andy@kernel.org>Signed-off-by: Philipp Stanner <pstanner@redhat.com>Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>Message-Id: <20241028074357.9104-3-pstanner@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
vdpa/snet: implement the resume vDPA callbackThe callback sends a resume command to the DPU throughthe control mechanism.Signed-off-by: Alvaro Karsz <alvaro.karsz@solid-run.com>Message-Id: <202
vdpa/snet: implement the resume vDPA callbackThe callback sends a resume command to the DPU throughthe control mechanism.Signed-off-by: Alvaro Karsz <alvaro.karsz@solid-run.com>Message-Id: <20230502131048.61134-1-alvaro.karsz@solid-run.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Jason Wang <jasowang@redhat.com>
vdpa: solidrun: constify pointers to hwmon_channel_infoStatically allocated array of pointers to hwmon_channel_info can be madeconst for safety.Acked-by: Michael S. Tsirkin <mst@redhat.com>Revi
vdpa: solidrun: constify pointers to hwmon_channel_infoStatically allocated array of pointers to hwmon_channel_info can be madeconst for safety.Acked-by: Michael S. Tsirkin <mst@redhat.com>Reviewed-by: Alvaro Karsz <alvaro.karsz@solid-run.com>Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>Message-Id: <20230511175451.282096-1-krzysztof.kozlowski@linaro.org>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Jason Wang <jasowang@redhat.com>
vdpa/snet: use likely/unlikely macros in hot functions- kick callback: most likely that the VQ is ready.- interrupt handlers: most likely that the callback is not NULL.Signed-off-by: Alvaro Kars
vdpa/snet: use likely/unlikely macros in hot functions- kick callback: most likely that the VQ is ready.- interrupt handlers: most likely that the callback is not NULL.Signed-off-by: Alvaro Karsz <alvaro.karsz@solid-run.com>Message-Id: <20230409120242.3460074-1-alvaro.karsz@solid-run.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
vdpa/snet: implement kick_vq_with_data callbackImplement the kick_vq_with_data vDPA callback.On kick, we pass the next available data to the DPU by writing it inthe kick offset.Signed-off-by: A
vdpa/snet: implement kick_vq_with_data callbackImplement the kick_vq_with_data vDPA callback.On kick, we pass the next available data to the DPU by writing it inthe kick offset.Signed-off-by: Alvaro Karsz <alvaro.karsz@solid-run.com>Message-Id: <20230417083853.375076-1-alvaro.karsz@solid-run.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
vdpa/snet: support the suspend vDPA callbackWhen suspend is called, the driver sends a suspend command to the DPUthrough the control mechanism.Signed-off-by: Alvaro Karsz <alvaro.karsz@solid-run
vdpa/snet: support the suspend vDPA callbackWhen suspend is called, the driver sends a suspend command to the DPUthrough the control mechanism.Signed-off-by: Alvaro Karsz <alvaro.karsz@solid-run.com>Message-Id: <20230413073337.31367-3-alvaro.karsz@solid-run.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Jason Wang <jasowang@redhat.com>
vdpa/snet: support getting and setting VQ stateThis patch adds the get_vq_state and set_vq_state vDPA callbacks.In order to get the VQ state, the state needs to be read from the DPU.In order to
vdpa/snet: support getting and setting VQ stateThis patch adds the get_vq_state and set_vq_state vDPA callbacks.In order to get the VQ state, the state needs to be read from the DPU.In order to allow that, the old messaging mechanism is replaced with a new,flexible control mechanism.This mechanism allows to read data from the DPU.The mechanism can be used if the negotiated config version is 2 orhigher.If the new mechanism is used when the config version is 1, it will callsnet_send_ctrl_msg_old, which is config 1 compatible.Signed-off-by: Alvaro Karsz <alvaro.karsz@solid-run.com>Message-Id: <20230413073337.31367-2-alvaro.karsz@solid-run.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Jason Wang <jasowang@redhat.com>
virtio: vdpa: new SolidNET DPU driver.This commit includes: 1) The driver to manage the controlplane over vDPA bus. 2) A HW monitor device to read health values from the DPU.Signed-off-by: Alva
virtio: vdpa: new SolidNET DPU driver.This commit includes: 1) The driver to manage the controlplane over vDPA bus. 2) A HW monitor device to read health values from the DPU.Signed-off-by: Alvaro Karsz <alvaro.karsz@solid-run.com>Acked-by: Jason Wang <jasowang@redhat.com>Message-Id: <20230110165638.123745-4-alvaro.karsz@solid-run.com>Message-Id: <20230209075128.78915-1-alvaro.karsz@solid-run.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>