qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug 1926044] [NEW] QEMU-user doesn't report HWCAP2_MTE


From: Vitaly Buka
Subject: [Bug 1926044] [NEW] QEMU-user doesn't report HWCAP2_MTE
Date: Sun, 25 Apr 2021 02:32:05 -0000

Public bug reported:

Reproducible on ffa090bc56e73e287a63261e70ac02c0970be61a

Host Debian 5.10.24 x86_64 GNU

Configured with "configure --disable-system --enable-linux-user
--static"

This one works and prints "OK" as expected:
clang tests/tcg/aarch64/mte-3.c -target aarch64-linux-gnu  -fsanitize=memtag 
-march=armv8+memtag
qemu-aarch64 --cpu max -L /usr/aarch64-linux-gnu ./a.out && echo OK


This one fails and print "0":
cat mytest.c
#include <stdio.h>
#include <sys/auxv.h>

#ifndef HWCAP2_MTE
#define HWCAP2_MTE (1 << 18)
#endif

int main(int ac, char **av)
{
    printf("%d\n", (int)(getauxval(AT_HWCAP2) & HWCAP2_MTE));
}


clang mytest.c -target aarch64-linux-gnu  -fsanitize=memtag -march=armv8+memtag
qemu-aarch64 --cpu max -L /usr/aarch64-linux-gnu ./a.out

** Affects: qemu
     Importance: Undecided
         Status: New


** Tags: aarch64 mte user

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1926044

Title:
  QEMU-user doesn't report HWCAP2_MTE

Status in QEMU:
  New

Bug description:
  Reproducible on ffa090bc56e73e287a63261e70ac02c0970be61a

  Host Debian 5.10.24 x86_64 GNU

  Configured with "configure --disable-system --enable-linux-user
  --static"

  This one works and prints "OK" as expected:
  clang tests/tcg/aarch64/mte-3.c -target aarch64-linux-gnu  -fsanitize=memtag 
-march=armv8+memtag
  qemu-aarch64 --cpu max -L /usr/aarch64-linux-gnu ./a.out && echo OK

  
  This one fails and print "0":
  cat mytest.c
  #include <stdio.h>
  #include <sys/auxv.h>

  #ifndef HWCAP2_MTE
  #define HWCAP2_MTE (1 << 18)
  #endif

  int main(int ac, char **av)
  {
      printf("%d\n", (int)(getauxval(AT_HWCAP2) & HWCAP2_MTE));
  }

  
  clang mytest.c -target aarch64-linux-gnu  -fsanitize=memtag 
-march=armv8+memtag
  qemu-aarch64 --cpu max -L /usr/aarch64-linux-gnu ./a.out

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1926044/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]