[PATCH] arm64: clear_page() shouldn't use DC ZVA when DCZID_EL0.DZP == 1

Catalin Marinas catalin.marinas at arm.com
Tue Oct 26 02:06:17 PDT 2021


On Mon, Oct 25, 2021 at 08:48:44PM -0700, Reiji Watanabe wrote:
> Currently, clear_page() uses DC ZVA instruction unconditionally.  But it
> should make sure that DCZID_EL0.DZP, which indicates whether or not use
> of DC ZVA instruction is prohibited, is zero when using the instruction.
> Use stp as memset does instead when DCZID_EL0.DZP == 1.

For correctness, this is fine, but have you come across a system that
has DZP == 1 (or hypervisor setting HCR_EL2.TDZ)?

-- 
Catalin



More information about the linux-arm-kernel mailing list