diff mbox series

[kvm-unit-tests,14/33] arm: selftest: realm: skip pabt test when running in a realm

Message ID 20240412103408.2706058-15-suzuki.poulose@arm.com (mailing list archive)
State New
Headers show
Series Support for Arm Confidential Compute Architecture | expand

Commit Message

Suzuki K Poulose April 12, 2024, 10:33 a.m. UTC
From: Alexandru Elisei <alexandru.elisei@arm.com>

The realm manager treats instruction aborts as fatal errors, skip this
test.

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
 arm/selftest.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Alexandru Elisei April 22, 2024, 3:48 p.m. UTC | #1
Hi,

On Fri, Apr 12, 2024 at 11:33:49AM +0100, Suzuki K Poulose wrote:
> From: Alexandru Elisei <alexandru.elisei@arm.com>
> 
> The realm manager treats instruction aborts as fatal errors, skip this
> test.

I wrote the commit message, and now I don't remember if this was a
limitation of the (at the time) implementation for the realm manager that I
used for developing the patch or if this was specified in the architecture
:(

Would you mind clearing that up?

Thanks,
Alex

> 
> Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
> Signed-off-by: Joey Gouly <joey.gouly@arm.com>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
>  arm/selftest.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arm/selftest.c b/arm/selftest.c
> index 1553ed8e..8caadad3 100644
> --- a/arm/selftest.c
> +++ b/arm/selftest.c
> @@ -19,6 +19,7 @@
>  #include <asm/smp.h>
>  #include <asm/mmu.h>
>  #include <asm/barrier.h>
> +#include <asm/rsi.h>
>  
>  static cpumask_t ready, valid;
>  
> @@ -393,11 +394,17 @@ static void check_vectors(void *arg __unused)
>  					  user_psci_system_off);
>  #endif
>  	} else {
> +		if (is_realm()) {
> +			report_skip("pabt test not supported in a realm");
> +			goto out;
> +		}
> +
>  		if (!check_pabt_init())
>  			report_skip("Couldn't guess an invalid physical address");
>  		else
>  			report(check_pabt(), "pabt");
>  	}
> +out:
>  	exit(report_summary());
>  }
>  
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/arm/selftest.c b/arm/selftest.c
index 1553ed8e..8caadad3 100644
--- a/arm/selftest.c
+++ b/arm/selftest.c
@@ -19,6 +19,7 @@ 
 #include <asm/smp.h>
 #include <asm/mmu.h>
 #include <asm/barrier.h>
+#include <asm/rsi.h>
 
 static cpumask_t ready, valid;
 
@@ -393,11 +394,17 @@  static void check_vectors(void *arg __unused)
 					  user_psci_system_off);
 #endif
 	} else {
+		if (is_realm()) {
+			report_skip("pabt test not supported in a realm");
+			goto out;
+		}
+
 		if (!check_pabt_init())
 			report_skip("Couldn't guess an invalid physical address");
 		else
 			report(check_pabt(), "pabt");
 	}
+out:
 	exit(report_summary());
 }