Add the way_size configuration parameter for the coloring-based
cache-partitioning, and add a color bitmask + color-flags to specify
coloring within a jailhouse memory region.
---
include/jailhouse/cell-config.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/jailhouse/cell-config.h b/include/jailhouse/cell-config.h
index 6b54e34b..79b67981 100644
--- a/include/jailhouse/cell-config.h
+++ b/include/jailhouse/cell-config.h
@@ -115,6 +115,7 @@ struct jailhouse_cell_desc {
#define JAILHOUSE_MEM_LOADABLE 0x0040
#define JAILHOUSE_MEM_ROOTSHARED 0x0080
#define JAILHOUSE_MEM_NO_HUGEPAGES 0x0100
+#define JAILHOUSE_MEM_COLORED 0x0200
#define JAILHOUSE_MEM_IO_UNALIGNED 0x8000
#define JAILHOUSE_MEM_IO_WIDTH_SHIFT 16 /* uses bits 16..19 */
#define JAILHOUSE_MEM_IO_8 (1 << JAILHOUSE_MEM_IO_WIDTH_SHIFT)
@@ -127,6 +128,13 @@ struct jailhouse_memory {
__u64 virt_start;
__u64 size;
__u64 flags;
+ /* only meaningful with JAILHOUSE_MEM_COLORED */
+ __u64 colors;
+} __attribute__((packed));
+
+struct jailhouse_coloring {
+ /* Size of a way to use for coloring */
+ __u64 way_size;
} __attribute__((packed));
#define JAILHOUSE_SHMEM_NET_REGIONS(start, dev_id) \
@@ -333,6 +341,7 @@ struct jailhouse_system {
__u8 pci_is_virtual;
__u16 pci_domain;
struct jailhouse_iommu iommu_units[JAILHOUSE_MAX_IOMMU_UNITS];
+ struct jailhouse_coloring color;
union {
struct {
__u16 pm_timer_address;
--
2.30.2
--
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/20210322194411.82520-3-andrea.bastoni%40tum.de.