On 27.01.20 12:40, Ralf Ramsauer wrote:


On 27/01/2020 07:37, Jan Kiszka wrote:
From: Jan Kiszka <[email protected]>

Better pad than rely on both sides using the same compiler logic.

Ack. But shouldn't we then, in turn, use __attribute__((unpacked)) to
avoid that the compiler accidentally does some other unintended
alignment / reordering?

Do you mean "packed"? It shouldn't be needed at this stage, but it
shouldn't harm as well.



Signed-off-by: Jan Kiszka <[email protected]>
---
  include/arch/arm-common/asm/jailhouse_hypercall.h | 1 +
  1 file changed, 1 insertion(+)

diff --git a/include/arch/arm-common/asm/jailhouse_hypercall.h 
b/include/arch/arm-common/asm/jailhouse_hypercall.h
index 83cec97b..aeab2816 100644
--- a/include/arch/arm-common/asm/jailhouse_hypercall.h
+++ b/include/arch/arm-common/asm/jailhouse_hypercall.h
@@ -38,6 +38,7 @@

  #define COMM_REGION_COMMON_PLATFORM_INFO      \
        __u8 gic_version;                       \
+       __u8 padding[7];                        \
        __u64 gicd_base;                        \
        __u64 gicc_base;                        \
        __u64 gicr_base;                        \

BTW: It's really hard to trace how the structures are being defined.

Instead of creating the structure in arch-specific parts for each
architecture, I think it would be nicer to introduce the structure for
all architectures, and then include arch-specific parts.

...as anonymous sub-structs - possibly.

Jan


Maybe I'll find some time for a patch...

   Ralf

--
2.16.4


--
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/185db5e4-618f-db9c-cd1b-d199b6af0c61%40web.de.

Reply via email to