On 2018-05-27 15:58, Ralf Ramsauer wrote:
> It's likely better to have one here.

That is actually a weak reason.

We need a barrier if we have to ensure memory ordering. But there are no
memory writes after this line, specifically not to the comm region.
That's different from the messaging interface, e.g.

> 
> Signed-off-by: Ralf Ramsauer <[email protected]>
> ---
>  inmates/lib/setup.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/inmates/lib/setup.c b/inmates/lib/setup.c
> index 4d007322..bf9ec50d 100644
> --- a/inmates/lib/setup.c
> +++ b/inmates/lib/setup.c
> @@ -36,6 +36,7 @@
>   * THE POSSIBILITY OF SUCH DAMAGE.
>   */
>  #include <inmate.h>
> +#include <asm/processor.h>
>  
>  void __attribute__((noreturn)) c_entry(void);
>  
> @@ -48,6 +49,7 @@ void __attribute__((noreturn)) c_entry(void)
>           memcmp(comm_region->signature, COMM_REGION_MAGIC,
>                  sizeof(comm_region->signature))) {
>               comm_region->cell_state = JAILHOUSE_CELL_FAILED_COMM_REV;
> +             memory_barrier();
>       } else {
>               inmate_main();
>       }
> 

Unless we find a real reason, I'm going to skip patches 12..14 for now.
12 and 13 aren't wrong, but they need a use case. The messaging channel
comes with its own barriers.

Jan

-- 
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