On 2016-11-30 17:50, Henning Schild wrote:
> Since 3e970ab533c4 we can specify a protocol to run on the ivshmem channel.
> This patch considers a protocol mismatch between the two endpoints a
> configuration error and does not connect them to each other.
> 
> Signed-off-by: Henning Schild <[email protected]>
> 
> diff --git a/Documentation/inter-cell-communication.txt 
> b/Documentation/inter-cell-communication.txt
> --- a/Documentation/inter-cell-communication.txt
> +++ b/Documentation/inter-cell-communication.txt
> @@ -61,7 +61,8 @@
>   try using the same value that works for the other pci devices.
>  The link between two such virtual PCI devices is established by using the 
> same
>  "bdf". The size and location of the shared memory can be configured freely 
> but
> -you have to make sure that the values match on both sides.
> +you have to make sure that the values match on both sides. The 
> "shmem_protocol"
> +has to match as well.
>  For an example have a look at the cell configuration files of qemu and the
>  ivshmem-demo.
>  
> diff --git a/hypervisor/ivshmem.c b/hypervisor/ivshmem.c
> --- a/hypervisor/ivshmem.c
> +++ b/hypervisor/ivshmem.c
> @@ -396,7 +396,9 @@
>  
>               /* we already have a datastructure, connect second endpoint */
>               if ((mem0->phys_start == mem->phys_start) &&
> -                 (mem0->size == mem->size)) {
> +                 (mem0->size == mem->size) &&
> +                 (dev0->info->shmem_protocol == device->info->shmem_protocol)
> +                ) {
>                       if ((*ivp)->eps[1].device)
>                               return trace_error(-EBUSY);
>                       ivshmem_connect_cell(*ivp, device, mem, 1);
> 

Makes sense.

BTW, I was wondering these days if we cannot relax the matching criteria
to identical shmem regions and, with with patch, protocol. This should
simplify the configuration a bit. What do you think?

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to