@@ -172,6 +172,16 @@ static unsigned int set_default_domain_colors(unsigned int *colors)
return max_colors;
}
+static void print_colors(unsigned int *colors, unsigned int num_colors)
+{
+ unsigned int i;
+
+ printk("[ ");
+ for ( i = 0; i < num_colors; i++ )
+ printk("%u ", colors[i]);
+ printk("]\n");
+}
+
static void dump_coloring_info(unsigned char key)
{
printk("'%c' pressed -> dumping coloring general info\n", key);
@@ -289,6 +299,12 @@ void domain_coloring_free(struct domain *d)
xfree(d->arch.colors);
}
+void domain_dump_coloring_info(struct domain *d)
+{
+ printk("Domain %pd has %u colors: ", d, d->arch.num_colors);
+ print_colors(d->arch.colors, d->arch.num_colors);
+}
+
/*
* Local variables:
* mode: C
@@ -1083,6 +1083,8 @@ int domain_relinquish_resources(struct domain *d)
void arch_dump_domain_info(struct domain *d)
{
p2m_dump_info(d);
+ if ( IS_ENABLED(CONFIG_CACHE_COLORING) )
+ domain_dump_coloring_info(d);
}
@@ -36,6 +36,7 @@ bool __init coloring_init(void);
int domain_coloring_init(struct domain *d,
const struct xen_arch_domainconfig *config);
void domain_coloring_free(struct domain *d);
+void domain_dump_coloring_info(struct domain *d);
#else /* !CONFIG_CACHE_COLORING */
@@ -43,6 +44,7 @@ static inline bool __init coloring_init(void) { return true; }
static inline int domain_coloring_init(
struct domain *d, const struct xen_arch_domainconfig *config) { return 0; }
static inline void domain_coloring_free(struct domain *d) {}
+static inline void domain_dump_coloring_info(struct domain *d) {}
#endif /* CONFIG_CACHE_COLORING */
#endif /* __ASM_ARM_COLORING_H__ */