On 08.01.20 12:18, nikhil.nd via Jailhouse wrote:
From: Nikhil Devshatwar <[email protected]>
Move the amd specific fields in separate structures.
Add new tipvu fields for TLB base address and size.
Wrap all the vendor specific IOMMU structs in single union.
Signed-off-by: Nikhil Devshatwar <[email protected]>
---
include/jailhouse/cell-config.h | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/include/jailhouse/cell-config.h b/include/jailhouse/cell-config.h
index 5b983b38..b22275eb 100644
--- a/include/jailhouse/cell-config.h
+++ b/include/jailhouse/cell-config.h
@@ -251,10 +251,18 @@ struct jailhouse_iommu {
__u64 base;
__u32 size;
- __u16 amd_bdf;
- __u8 amd_base_cap;
- __u8 amd_msi_cap;
- __u32 amd_features;
+ union {
+ struct {
+ __u16 amd_bdf;
+ __u8 amd_base_cap;
+ __u8 amd_msi_cap;
+ __u32 amd_features;
+ };
+ struct {
+ __u64 tipvu_tlb_base;
+ __u32 tipvu_tlb_size;
+ };
+ };
} __attribute__((packed));
struct jailhouse_pio {
Let's give the struct names, amd and tipvu. Then you can remove the
prefixes from the fields.
And better add __attribute__((packed)) to the substructures as well. I'm
not sure of the packed from the superstruct makes it there.
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jailhouse-dev/85a704de-6d0b-eb11-0deb-1450e5d0df86%40web.de.