Log Message:
-----------
core: ivshmem: Fix matching of peers
So far, we created another ivshmem_data structure in case two devices
matched by BDF but not by their shared memory regions. This did not make
sense (ivshmem_find only returns the first BDF match) and it could leak
the data structure when the device was destroyed again.
Change the policy so that we match on BDF but fail creating the second
device in case of region mismatch.
Log Message:
-----------
core: ivshmem: Rework device creation and destruction
Moving device from slot 1 to slot 0 in case the first slot becomes free
had a bug: it didn't update the pointer from pci_device to the
ivshmem_endpoint.
Instead of fixing this, let's take the chance and redesign the
management: Thanks to earlier preparation steps, we can now keep the
device in its original slot. We just need to check during creation which
slot is free (device pointer is NULL) and use that. Now ivpos of an
endpoint always equals the array index in ivshmem_data.eps that the
endpoint uses.
Finally, we can significantly simplify the code by folding ivshmem_find
and ivshmem_connect/disconnect_cell into their callers.