On 2/3/21 4:58 PM, Maxime Coquelin wrote:
> The Virtio rework series mistakenly moved the rte_pci_device
> pointer to struct virtio_hw, which is shared between the two
> processes. But this structure is per-process, so this change
> made secondary process to try accessing primary process-only
> memory, leading to a crash
>
> This patch reverts to proper behavior, by storing the
> rte_pci_device pointer into the pre-process
> virtio_pci_internal struct. It provides also helper to get
> the pointer from the virtio_hw struct pointer.
>
> Bugzilla ID: 633
> Fixes: c8d4b02f72ae ("net/virtio: move legacy IO to virtio PCI")
>
> Reported-by: Anatoly Burakov <anatoly.bura...@intel.com>
> Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com>
> ---
> drivers/net/virtio/virtio_pci.c | 25 +++++--------------------
> drivers/net/virtio/virtio_pci.h | 12 +++++++++++-
> drivers/net/virtio/virtio_pci_ethdev.c | 2 ++
> 3 files changed, 18 insertions(+), 21 deletions(-)
>
Applied to dpdk-next-virtio/main with typo fixed.
Thanks,
Maxime