mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
tests/tcg/aarch64: Adjust pauth tests for FEAT_FPAC
With FEAT_FPAC, AUT* instructions that fail authentication do not produce an error value but instead fault. For pauth-2, install a signal handler and verify it gets called. For pauth-4 and pauth-5, we are explicitly testing the error value, so there's nothing to test with FEAT_FPAC, so exit early. Adjust the makefile to use -cpu neoverse-v1, which has FEAT_EPAC but not FEAT_FPAC. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20230829232335.965414-2-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
03a3a62fbd
commit
871a7f6a9a
5 changed files with 98 additions and 13 deletions
|
@ -1,4 +1,5 @@
|
|||
#include <assert.h>
|
||||
#include "pauth.h"
|
||||
|
||||
static int x;
|
||||
|
||||
|
@ -6,6 +7,15 @@ int main()
|
|||
{
|
||||
int *p0 = &x, *p1, *p2, *p3;
|
||||
unsigned long salt = 0;
|
||||
int pac_feature = get_pac_feature();
|
||||
|
||||
/*
|
||||
* Exit if no PAuth or FEAT_FPAC, which will SIGILL on AUTDA failure
|
||||
* rather than return an error for us to check below.
|
||||
*/
|
||||
if (pac_feature == 0 || pac_feature >= 4) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* With TBI enabled and a 48-bit VA, there are 7 bits of auth, and so
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue