db331d80 | 03-Oct-2023 |
Konrad Sztyber <konrad.sztyber@intel.com> |
vmd: fix comments around resetting root ports
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I169cef4b795dc5c3910140e9b4111958352731db Reviewed-on: https://review.spdk.io/gerrit
vmd: fix comments around resetting root ports
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I169cef4b795dc5c3910140e9b4111958352731db Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20188 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <jim.harris@samsung.com> Community-CI: Mellanox Build Bot Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
show more ...
|
f0b52280 | 03-Oct-2023 |
Konrad Sztyber <konrad.sztyber@intel.com> |
vmd: read domain's config space to get BAR's physical address
Since commit a36bc251d ("env_dpdk: Automatically map PCI BARs into VFIO") the physical address of the BAR returned by spdk_pci_device_ma
vmd: read domain's config space to get BAR's physical address
Since commit a36bc251d ("env_dpdk: Automatically map PCI BARs into VFIO") the physical address of the BAR returned by spdk_pci_device_map_bar() can be either an actual physical address or a virtual one (if IOMMU is enabled). Since the VMD driver always needs an actual physical address to fill out the base/limit registers and the BARs of the devices behind the VMD, we read config space to get the correct address, regardless of IOVA configuration.
Fixes #3117.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I16bc221a9621bb1a08950697ba4537ae2274277f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20187 Reviewed-by: Jim Harris <jim.harris@samsung.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
show more ...
|
bedc760d | 06-Oct-2023 |
Konrad Sztyber <konrad.sztyber@intel.com> |
vmd: use a variable to reference current domain in vmd_enum_cb()
This function spelled out vmd_c->vmd[i] 12 times.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: Ida991a05739fb
vmd: use a variable to reference current domain in vmd_enum_cb()
This function spelled out vmd_c->vmd[i] 12 times.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: Ida991a05739fbd9a3228c03362d495181e44bfdd Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20255 Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <jim.harris@samsung.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
c120c3d1 | 02-Oct-2023 |
Konrad Sztyber <konrad.sztyber@intel.com> |
vmd: rename vmd_map_bars -> vmd_domain_map_bars
There already is a function called vmd_dev_map_bar(), but it's used in a different context (it maps BARs of the devices behind the VMD), so vmd_map_ba
vmd: rename vmd_map_bars -> vmd_domain_map_bars
There already is a function called vmd_dev_map_bar(), but it's used in a different context (it maps BARs of the devices behind the VMD), so vmd_map_bars() was renamed to better reflect its purpose.
Additionally, this patch removes the spdk_pci_device argument from this function, as it's available from struct vmd_adapter.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I8de03c159653a04286e71e9adf226eee40ef06ae Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20186 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <jim.harris@samsung.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
show more ...
|
1a2eaf9b | 02-Oct-2023 |
Konrad Sztyber <konrad.sztyber@intel.com> |
vmd: don't map bar with MSI-X table
It wasn't used for anything.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I8f78256a68e399bba442b7a7e00f2bf4f09dcda7 Reviewed-on: https://r
vmd: don't map bar with MSI-X table
It wasn't used for anything.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I8f78256a68e399bba442b7a7e00f2bf4f09dcda7 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20185 Reviewed-by: Jim Harris <jim.harris@samsung.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
show more ...
|
4cbd23e2 | 05-Jul-2022 |
Konrad Sztyber <konrad.sztyber@intel.com> |
vmd: method for forcing a rescan
Added a new RPC, vmd_rescan, that forces the VMD driver to do a rescan of all devices behind the VMD. A device that was previously removed via spdk_vmd_remove_devic
vmd: method for forcing a rescan
Added a new RPC, vmd_rescan, that forces the VMD driver to do a rescan of all devices behind the VMD. A device that was previously removed via spdk_vmd_remove_device() will be found again during vmd_rescan.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: Ide87eb44c1d6d524234820dc07c78ba5b8bcd3ad Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13958 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tom Nabarro <tom.nabarro@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
052ea0ba | 05-Jul-2022 |
Konrad Sztyber <konrad.sztyber@intel.com> |
vmd: method for removing devices behind VMD
Added new RPC, vmd_remove_device, that allows users to remove a PCI device managed by the VMD library simulating a hot-remove.
Signed-off-by: Konrad Szty
vmd: method for removing devices behind VMD
Added new RPC, vmd_remove_device, that allows users to remove a PCI device managed by the VMD library simulating a hot-remove.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: Ifb84818ce8d147d1d586b52590527e85fe9c10de Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13957 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tom Nabarro <tom.nabarro@intel.com>
show more ...
|
4c482a62 | 09-Aug-2022 |
Konrad Sztyber <konrad.sztyber@intel.com> |
vmd: don't create new buses in hotplug
This doesn't work anyway and can cause creating duplicate bus objects if vmd_scan_single_bus() is called on a parent bus with previously allocated child buses.
vmd: don't create new buses in hotplug
This doesn't work anyway and can cause creating duplicate bus objects if vmd_scan_single_bus() is called on a parent bus with previously allocated child buses. Also, while here, removed a few unused functions and flags in struct vmd_adapter.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: Ic757070188157d9851f648acd074ca4943a14c39 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13955 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tom Nabarro <tom.nabarro@intel.com>
show more ...
|
ee1ab6f6 | 09-Aug-2022 |
Konrad Sztyber <konrad.sztyber@intel.com> |
vmd: increment dev_cnt once device is initialized
This is done in order to avoid having to decrement this counter in case of a failure. Also, it makes the result valid for the few error cases when
vmd: increment dev_cnt once device is initialized
This is done in order to avoid having to decrement this counter in case of a failure. Also, it makes the result valid for the few error cases when we didn't decrement it.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: Ia944fb8b810ce69caa8db5bc7c941e0905c9d3bd Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13954 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tom Nabarro <tom.nabarro@intel.com>
show more ...
|
55bdd885 | 06-Jul-2022 |
Konrad Sztyber <konrad.sztyber@intel.com> |
env/pci: add detach() callback to pci_device_provider
This makes it possible to notify other PCI device providers (VMD) that a PCI device is no longer used. The VMD will driver will unhook that dev
env/pci: add detach() callback to pci_device_provider
This makes it possible to notify other PCI device providers (VMD) that a PCI device is no longer used. The VMD will driver will unhook that device and free any resources tied to it.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I42752afbb371a1d33972dac50fd679f68d05b597 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13887 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tom Nabarro <tom.nabarro@intel.com>
show more ...
|
690eebb4 | 04-Jul-2022 |
Konrad Sztyber <konrad.sztyber@intel.com> |
vmd: extract removing devices to separate function
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: Idc9c7d0e5d0ebce8278e089bcfe5b7f76b86c270 Reviewed-on: https://review.spdk.io/g
vmd: extract removing devices to separate function
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: Idc9c7d0e5d0ebce8278e089bcfe5b7f76b86c270 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13953 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Tom Nabarro <tom.nabarro@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
ffa9953a | 04-Aug-2022 |
Konrad Sztyber <konrad.sztyber@intel.com> |
vmd: add attach_device()
This patch implements the callback for attaching devices behind the VMD with a given PCI address.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I07cf9
vmd: add attach_device()
This patch implements the callback for attaching devices behind the VMD with a given PCI address.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I07cf92c94cc7e6d3c8e31af7a8615e9a4ca641bf Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13886 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tom Nabarro <tom.nabarro@intel.com>
show more ...
|
3b2097f3 | 29-Aug-2022 |
Konrad Sztyber <konrad.sztyber@intel.com> |
vmd: use vmd_container.count when iterating over domains
It makes it possible to call this function even if the VMD library wasn't initialized.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.c
vmd: use vmd_container.count when iterating over domains
It makes it possible to call this function even if the VMD library wasn't initialized.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I3d0f4677c4a1189f9d8acf07baee50a4e2050459 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14260 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tom Nabarro <tom.nabarro@intel.com>
show more ...
|
4b08c07a | 04-Aug-2022 |
Konrad Sztyber <konrad.sztyber@intel.com> |
env/pci: call driver callback in pci_hook_device
Now that we have a attach_device() callback, the devices can be hooked during spdk_pci_device_attach(). With DPDK, driver->cb_fn() is called in pci_
env/pci: call driver callback in pci_hook_device
Now that we have a attach_device() callback, the devices can be hooked during spdk_pci_device_attach(). With DPDK, driver->cb_fn() is called in pci_device_init(), so we need to do the same in spdk_pci_hook_device().
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: Iada8b83ce7592aa62561530192072a50ec3a904b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13884 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tom Nabarro <tom.nabarro@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
show more ...
|
ac8b65bd | 29-Aug-2022 |
Konrad Sztyber <konrad.sztyber@intel.com> |
vmd: extract freeing device resources to vmd_dev_free
This allows to free resources tied to a vmd_pci_device that isn't on the dev_list or wasn't hooked to the PCI driver. Also, use that function w
vmd: extract freeing device resources to vmd_dev_free
This allows to free resources tied to a vmd_pci_device that isn't on the dev_list or wasn't hooked to the PCI driver. Also, use that function whenever a vmd_pci_device is freed instead of regular free().
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: Ifca177a7eb6d8180d6f2ee2a9d9e36d58810e8ad Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14259 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tom Nabarro <tom.nabarro@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
3f4e968d | 29-Aug-2022 |
Konrad Sztyber <konrad.sztyber@intel.com> |
vmd: add device to dev_list after initialization is complete
That way, we don't have to do TAILQ_REMOVE if vmd_assign_base_addrs() fails.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Ch
vmd: add device to dev_list after initialization is complete
That way, we don't have to do TAILQ_REMOVE if vmd_assign_base_addrs() fails.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: Id7a5df2093e4f9dfc95ee1fe415eb644c61bc971 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14258 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tom Nabarro <tom.nabarro@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
35f8bd2a | 29-Aug-2022 |
Konrad Sztyber <konrad.sztyber@intel.com> |
vmd: move pci_hook_device to vmd_dev_init_end_device
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I79c35600fc9a758bbd9d58393b7eb98c8ac82acc Reviewed-on: https://review.spdk.io
vmd: move pci_hook_device to vmd_dev_init_end_device
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I79c35600fc9a758bbd9d58393b7eb98c8ac82acc Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14257 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tom Nabarro <tom.nabarro@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|