* Aarch64-qemu
@ 2019-11-02 12:55 Wissem Yahiaoui
2019-11-02 18:10 ` Aarch64-qemu Peter Maydell
0 siblings, 1 reply; 7+ messages in thread
From: Wissem Yahiaoui @ 2019-11-02 12:55 UTC (permalink / raw)
To: qemu-arm
[-- Attachment #1.1: Type: text/plain, Size: 515 bytes --]
Dear Qemu Team,
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.
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.
Please help me to read the ZCR register.
Regards,
[-- Attachment #1.2: Type: text/html, Size: 660 bytes --]
[-- Attachment #2: mrs.png --]
[-- Type: image/png, Size: 14430 bytes --]
[-- Attachment #3: qemu.png --]
[-- Type: image/png, Size: 19051 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Aarch64-qemu
2019-11-02 12:55 Aarch64-qemu Wissem Yahiaoui
@ 2019-11-02 18:10 ` Peter Maydell
[not found] ` <CAA8B=UTMXMOKsMjDQ3oCP1J8QdL+UXLM3Paf81w=E5sV=RDg=Q@mail.gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2019-11-02 18:10 UTC (permalink / raw)
To: Wissem Yahiaoui; +Cc: qemu-arm
On Sat, 2 Nov 2019 at 13:21, Wissem Yahiaoui <wissem.yahiaouii@gmail.com> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Aarch64-qemu
[not found] ` <CAFEAcA9WYCmD+oGHtM=g8pxyCmYt=12NchojdtgPufQUwWFRpg@mail.gmail.com>
@ 2019-11-06 11:44 ` Wissem Yahiaoui
2019-11-06 11:54 ` Aarch64-qemu Peter Maydell
2019-11-06 12:06 ` Aarch64-qemu Alex Bennée
0 siblings, 2 replies; 7+ messages in thread
From: Wissem Yahiaoui @ 2019-11-06 11:44 UTC (permalink / raw)
To: Peter Maydell, qemu-arm
[-- Attachment #1: Type: text/plain, Size: 1127 bytes --]
Hi Qemu team,
As I sent you in the first email, that the SVE specific registers in
aarch64-qemu results an core dumped/segmentation fault. I Tried the
ZCR_EL1, ZCR_EL2 and ZCR_EL12, it compiles fine with the gnu toolchain, but
it doesn't run in qemu. I need to simulate the length check at run-time, I
am using Qemu but apparently I am missing some step/s.
Can u please help me to achieve this task?
Regards,
Wissem Yahiaoui
Student at Technical University,
On Wed, 6 Nov 2019 at 10:59, Peter Maydell <peter.maydell@linaro.org> wrote:
> On Tue, 5 Nov 2019 at 21:39, Wissem Yahiaoui <wissem.yahiaouii@gmail.com>
> wrote:
> >
> > Sure, I will do that. Actually it was my intention but i didn't find the
> link and it idn't possible to raise an issue in github. Can u please
> provide me a link?
>
> I'm confused, this is email, there are no links. Just
> use reply-to-all rather than reply so your replies go
> to both the person whose email you're replying to
> and also to the mailing list. (You'll have to go back
> and redo a reply to my original email which went to
> both the list and to you.)
>
> thanks
> - PMM
>
[-- Attachment #2: Type: text/html, Size: 1668 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Aarch64-qemu
2019-11-06 11:44 ` Aarch64-qemu Wissem Yahiaoui
@ 2019-11-06 11:54 ` Peter Maydell
2019-11-06 12:16 ` Aarch64-qemu Wissem Yahiaoui
2019-11-06 12:06 ` Aarch64-qemu Alex Bennée
1 sibling, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2019-11-06 11:54 UTC (permalink / raw)
To: Wissem Yahiaoui; +Cc: qemu-arm
On Wed, 6 Nov 2019 at 11:44, Wissem Yahiaoui <wissem.yahiaouii@gmail.com> wrote:
>
> Hi Qemu team,
>
> As I sent you in the first email, that the SVE specific registers in aarch64-qemu results an core dumped/segmentation fault. I Tried the ZCR_EL1, ZCR_EL2 and ZCR_EL12, it compiles fine with the gnu toolchain, but it doesn't run in qemu. I need to simulate the length check at run-time, I am using Qemu but apparently I am missing some step/s.
You need to use the prctl() that I suggested, you cannot directly
access any of those registers from userspace. If you have a
simple test program which tries to use the prctl() but does not
work then I can have a look at what is going wrong.
thanks
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Aarch64-qemu
2019-11-06 11:44 ` Aarch64-qemu Wissem Yahiaoui
2019-11-06 11:54 ` Aarch64-qemu Peter Maydell
@ 2019-11-06 12:06 ` Alex Bennée
1 sibling, 0 replies; 7+ messages in thread
From: Alex Bennée @ 2019-11-06 12:06 UTC (permalink / raw)
To: qemu-arm; +Cc: Peter Maydell
Wissem Yahiaoui <wissem.yahiaouii@gmail.com> writes:
> Hi Qemu team,
>
> As I sent you in the first email, that the SVE specific registers in
> aarch64-qemu results an core dumped/segmentation fault. I Tried the
> ZCR_EL1, ZCR_EL2 and ZCR_EL12, it compiles fine with the gnu toolchain, but
> it doesn't run in qemu. I need to simulate the length check at run-time, I
> am using Qemu but apparently I am missing some step/s.
Peter's already responded - you can't access ZCR_EL1 from userspace. You
need to use the ioctl to query the kernel for the vector length.
>
> Can u please help me to achieve this task?
>
> Regards,
> Wissem Yahiaoui
> Student at Technical University,
>
>
>
>
> On Wed, 6 Nov 2019 at 10:59, Peter Maydell <peter.maydell@linaro.org> wrote:
>
>> On Tue, 5 Nov 2019 at 21:39, Wissem Yahiaoui <wissem.yahiaouii@gmail.com>
>> wrote:
>> >
>> > Sure, I will do that. Actually it was my intention but i didn't find the
>> link and it idn't possible to raise an issue in github. Can u please
>> provide me a link?
>>
>> I'm confused, this is email, there are no links. Just
>> use reply-to-all rather than reply so your replies go
>> to both the person whose email you're replying to
>> and also to the mailing list. (You'll have to go back
>> and redo a reply to my original email which went to
>> both the list and to you.)
>>
>> thanks
>> - PMM
>>
--
Alex Bennée
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Aarch64-qemu
2019-11-06 11:54 ` Aarch64-qemu Peter Maydell
@ 2019-11-06 12:16 ` Wissem Yahiaoui
2019-11-06 14:16 ` Aarch64-qemu Alex Bennée
0 siblings, 1 reply; 7+ messages in thread
From: Wissem Yahiaoui @ 2019-11-06 12:16 UTC (permalink / raw)
To: Peter Maydell, qemu-arm
[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]
Hi Peter & Qemu Team,
Actually, I also tried it after you send me the documentation. but it will
be also an segmentation fault. Here, it a screenshot on how I did use it.
Thanks,
On Wed, 6 Nov 2019 at 12:55, Peter Maydell <peter.maydell@linaro.org> wrote:
> On Wed, 6 Nov 2019 at 11:44, Wissem Yahiaoui <wissem.yahiaouii@gmail.com>
> wrote:
> >
> > Hi Qemu team,
> >
> > As I sent you in the first email, that the SVE specific registers in
> aarch64-qemu results an core dumped/segmentation fault. I Tried the
> ZCR_EL1, ZCR_EL2 and ZCR_EL12, it compiles fine with the gnu toolchain, but
> it doesn't run in qemu. I need to simulate the length check at run-time, I
> am using Qemu but apparently I am missing some step/s.
>
> You need to use the prctl() that I suggested, you cannot directly
> access any of those registers from userspace. If you have a
> simple test program which tries to use the prctl() but does not
> work then I can have a look at what is going wrong.
>
> thanks
> -- PMM
>
[-- Attachment #2: Type: text/html, Size: 1457 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Aarch64-qemu
2019-11-06 12:16 ` Aarch64-qemu Wissem Yahiaoui
@ 2019-11-06 14:16 ` Alex Bennée
0 siblings, 0 replies; 7+ messages in thread
From: Alex Bennée @ 2019-11-06 14:16 UTC (permalink / raw)
To: qemu-arm; +Cc: Peter Maydell
Wissem Yahiaoui <wissem.yahiaouii@gmail.com> writes:
> Hi Peter & Qemu Team,
>
>
> Actually, I also tried it after you send me the documentation. but it will
> be also an segmentation fault. Here, it a screenshot on how I did use
> it.
Please just use inline text. Screenshots for text output or test cases
is just a pain to copy/transcribe.
>
>
> Thanks,
>
> On Wed, 6 Nov 2019 at 12:55, Peter Maydell <peter.maydell@linaro.org> wrote:
>
>> On Wed, 6 Nov 2019 at 11:44, Wissem Yahiaoui <wissem.yahiaouii@gmail.com>
>> wrote:
>> >
>> > Hi Qemu team,
>> >
>> > As I sent you in the first email, that the SVE specific registers in
>> aarch64-qemu results an core dumped/segmentation fault. I Tried the
>> ZCR_EL1, ZCR_EL2 and ZCR_EL12, it compiles fine with the gnu toolchain, but
>> it doesn't run in qemu. I need to simulate the length check at run-time, I
>> am using Qemu but apparently I am missing some step/s.
>>
>> You need to use the prctl() that I suggested, you cannot directly
>> access any of those registers from userspace. If you have a
>> simple test program which tries to use the prctl() but does not
>> work then I can have a look at what is going wrong.
>>
>> thanks
>> -- PMM
>>
--
Alex Bennée
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-11-06 14:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-02 12:55 Aarch64-qemu Wissem Yahiaoui
2019-11-02 18:10 ` Aarch64-qemu Peter Maydell
[not found] ` <CAA8B=UTMXMOKsMjDQ3oCP1J8QdL+UXLM3Paf81w=E5sV=RDg=Q@mail.gmail.com>
[not found] ` <CAFEAcA9w5be6HO+ghPHrJsy4KxhBZ1MNLdPOQ4kE4nHqFKneUg@mail.gmail.com>
[not found] ` <CAA8B=URoKnQTZdQar_D-xrid-JoaF_mz-EYr0SasprPpvXznoQ@mail.gmail.com>
[not found] ` <CAFEAcA9WYCmD+oGHtM=g8pxyCmYt=12NchojdtgPufQUwWFRpg@mail.gmail.com>
2019-11-06 11:44 ` Aarch64-qemu Wissem Yahiaoui
2019-11-06 11:54 ` Aarch64-qemu Peter Maydell
2019-11-06 12:16 ` Aarch64-qemu Wissem Yahiaoui
2019-11-06 14:16 ` Aarch64-qemu Alex Bennée
2019-11-06 12:06 ` Aarch64-qemu Alex Bennée
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.