Message ID | 20180116142337.24942-4-julien.grall@linaro.org |
---|---|
State | Accepted |
Commit | ba73070af43a38d200413f446d6a718e108867b6 |
Headers | show |
Series | xen/arm64: Branch predictor hardening (XSA-254 variant 2) | expand |
On Tue, 16 Jan 2018, Julien Grall wrote: > Introduce a new macro MIDR_ALL_VERSIONS to match all variant/revision of a > given CPU model. > > This is part of XSA-254. > > Signed-off-by: Julien Grall <julien.grall@linaro.org> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> > --- > xen/arch/arm/cpuerrata.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c > index 772587c05a..c50d3331f2 100644 > --- a/xen/arch/arm/cpuerrata.c > +++ b/xen/arch/arm/cpuerrata.c > @@ -7,6 +7,12 @@ > .midr_range_min = min, \ > .midr_range_max = max > > +#define MIDR_ALL_VERSIONS(model) \ > + .matches = is_affected_midr_range, \ > + .midr_model = model, \ > + .midr_range_min = 0, \ > + .midr_range_max = (MIDR_VARIANT_MASK | MIDR_REVISION_MASK) > + > static bool __maybe_unused > is_affected_midr_range(const struct arm_cpu_capabilities *entry) > { > -- > 2.11.0 >
diff --git a/xen/arch/arm/cpuerrata.c b/xen/arch/arm/cpuerrata.c index 772587c05a..c50d3331f2 100644 --- a/xen/arch/arm/cpuerrata.c +++ b/xen/arch/arm/cpuerrata.c @@ -7,6 +7,12 @@ .midr_range_min = min, \ .midr_range_max = max +#define MIDR_ALL_VERSIONS(model) \ + .matches = is_affected_midr_range, \ + .midr_model = model, \ + .midr_range_min = 0, \ + .midr_range_max = (MIDR_VARIANT_MASK | MIDR_REVISION_MASK) + static bool __maybe_unused is_affected_midr_range(const struct arm_cpu_capabilities *entry) {
Introduce a new macro MIDR_ALL_VERSIONS to match all variant/revision of a given CPU model. This is part of XSA-254. Signed-off-by: Julien Grall <julien.grall@linaro.org> --- xen/arch/arm/cpuerrata.c | 6 ++++++ 1 file changed, 6 insertions(+)