[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Aarch64-qemu
From: |
Peter Maydell |
Subject: |
Re: Aarch64-qemu |
Date: |
Sat, 2 Nov 2019 18:10:24 +0000 |
On Sat, 2 Nov 2019 at 13:21, Wissem Yahiaoui <address@hidden> wrote:
> First of all, I wanted to post an issue on the qemu github but apparently is
> not possible and that's why I write a mail with my issue.
Yep; email is fine (or our bugtracker is at
https://bugs.launchpad.net/qemu/ if you like).
> I am using aarch64-qemu with the SVE bind support and I am using the
> aarch64-gnu to compile the SVE instructions. I did use a lot of instructions
> and they work fine, except when it comes to read some register (zcr …), it
> compiles fine but qemu raise an core dumped as the screenshot shows.
This is expected behaviour from QEMU. The ZCR_EL1
register is accessible only from EL1 (ie the kernel), not
from userspace (which is EL0). The qemu-aarch64 program
provides your guest binary with the same environment it
would see if executed as a userspace process under Linux
on real aarch64 -- if you tried to access ZCR_EL1 there it
would also get a SIGILL instruction.
Linux provides some prctl APIs for examining or
changing the vector length, which is the only thing
ZCR_EL1 has in it, and I believe QEMU implements
these: see section 6 of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm64/sve.rst
for details.
thanks
-- PMM