Spdk/lib/vmd
Konrad Sztyber 077c6ee4d6 vmd: use config_bus_number when resetting root ports
The config_bus_number is an offset within the config space reserved for
the devices behind the VMD, while bus_number refers to the actual bus
number assigned by VMD that depend on the VMCAP and VMCONFIG registers.
So, to access the mapped config space we have to use config_bus_number.

We didn't do that when resetting root ports', which could lead to
segfaults if these values were different, as we'd access unmapped
memory.

Fixes #2451

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12208 (master)

(cherry picked from commit 91aee82d74)
Change-Id: I4e7bbb81400462284014565099bec98f6171c8c9
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12481
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-06-30 13:32:31 -04:00
..
led.c lib/vmd: LED management support 2019-10-24 17:04:04 +00:00
Makefile so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
spdk_vmd.map lib/vmd: add a map file. 2020-05-14 10:37:14 +00:00
vmd_spec.h vmd: update for changes in IceLake platform 2021-08-31 08:39:37 +00:00
vmd.c vmd: use config_bus_number when resetting root ports 2022-06-30 13:32:31 -04:00
vmd.h vmd: update for changes in IceLake platform 2021-08-31 08:39:37 +00:00