|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 6/6] xen/arm: disable CPUs with different cacheline sizes
Hi Stefano, On 01/03/18 23:26, Stefano Stabellini wrote: Even different cpus in big.LITTLE systems are expected to have the same cacheline size. Unless the minimum of all cacheline sizes is used across all cpu cores, cache coherency protocols can go wrong. Instead, for now, just disable any cpu with a different cacheline size. This check is not covered by the hmp-unsafe option, because even with the correct scheduling and vcpu pinning in place, the system breaks if cacheline sizes differ across cores. We don't believe it is a problem for most big.LITTLE systems. This patch moves the implementation of setup_cache to a static inline, still setting cacheline_bytes at the beginning of start_xen as before. In start_secondary we check that the cacheline sizes match, otherwise we disable the cpu. I am afraid that this commit message is only valid after "xen/arm: Read the cacheline from CTR register". What you effectively check in that patch is the D-cache level 1 line size is equal on every CPU. You could rewrite the commit message to reflect that, but then people may wonder why you impose such restriction on Xen? So it would really make sense to fix the way to read the D-cacheline size first. Suggested-by: Julien Grall <julien.grall@xxxxxxx> Signed-off-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- Changes in v3: - new patch --- Interestingly I couldn't find a better way in C89 to printk a size_t than casting it to unsigned long. You can use %zu. --- xen/arch/arm/setup.c | 15 +-------------- xen/arch/arm/smpboot.c | 8 ++++++++ xen/include/asm-arm/page.h | 12 ++++++++++++ 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 032a6a8..b5f4c3a 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -682,19 +682,6 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size)size_t __read_mostly cacheline_bytes; -/* Very early check of the CPU cache properties */ -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |