All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <1906536@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1906536] Re: Unable to set SVE VL to 1024 bits or above since 7b6a2198
Date: Wed, 02 Dec 2020 17:05:42 -0000	[thread overview]
Message-ID: <160692874216.26254.12267648197584238813.malone@chaenomeles.canonical.com> (raw)
In-Reply-To: 160692480491.27592.13493676422712150173.malonedeb@chaenomeles.canonical.com

Hi Alex,

This commit mentions:

    The Linux kernel chooses the default of 64 bytes for SVE registers on
    the basis that it is the largest size on known hardware that won't
    grow the signal frame. We still honour the sve-max-vq property and
    userspace can expand the number of lanes by calling PR_SVE_SET_VL.

Expand the number of lanes by calling PR_SVE_SET_VL works for me:

 .global _start
_start:
  mov x0, 50 // PR_SVE_SET_VL
  mov x1, 256 // 16 lanes
  mov x8, #167 // prctl
  svc #0

  rdvl x0, #1
  asr x0, x0, #4
  mov x8, #93 // exit
  svc #0

$ for vl in 1 2 4 8 16; do qemu-aarch64 -strace -cpu max,sve-max-vq=$vl a.out; echo $?; done
1383321 prctl(50,256,0,0,0,0) = 16
1383321 exit(1)
1
1383323 prctl(50,256,0,0,0,0) = 32
1383323 exit(2)
2
1383325 prctl(50,256,0,0,0,0) = 64
1383325 exit(4)
4
1383327 prctl(50,256,0,0,0,0) = 128
1383327 exit(8)
8
1383329 prctl(50,256,0,0,0,0) = 256
1383329 exit(16)
16

** Changed in: qemu
       Status: New => Invalid

** Tags added: arm linux-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/1906536

Title:
  Unable to set SVE VL to 1024 bits or above since 7b6a2198

Status in QEMU:
  Invalid

Bug description:
  Prior to 7b6a2198e71794c851f39ac7a92d39692c786820, the QEMU option
  sve-max-vq could be used to set the vector length of the
  implementation. This is useful (among other reasons) for testing
  software compiled with a fixed SVE vector length. Since this commit,
  the vector length is capped at 512 bits.

  To reproduce the issue:

  $ cat rdvl.s
  .global _start
  _start:
    rdvl x0, #1
    asr x0, x0, #4
    mov x8, #93 // exit
    svc #0
  $ aarch64-linux-gnu-as -march=armv8.2-a+sve rdvl.s -o rdvl.o
  $ aarch64-linux-gnu-ld rdvl.o
  $ for vl in 1 2 4 8 16; do ../build-qemu/aarch64-linux-user/qemu-aarch64 -cpu max,sve-max-vq=$vl a.out; echo $?; done
  1
  2
  4
  4
  4

  For a QEMU built prior to the above revision, we get the output:
  1
  2
  4
  8
  16

  as expected. It seems that either the old behavior should be restored,
  or there should be an option to force a higher vector length?

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


  reply	other threads:[~2020-12-02 17:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02 16:00 [Bug 1906536] [NEW] Unable to set SVE VL to 1024 bits or above since 7b6a2198 Alex Coplan
2020-12-02 17:05 ` Philippe Mathieu-Daudé [this message]
2020-12-02 17:33 ` [Bug 1906536] " Peter Maydell
2020-12-02 17:34 ` Alex Coplan
2020-12-02 17:36 ` Peter Maydell
2020-12-03 10:50 ` Alex Bennée
2020-12-03 11:22 ` Peter Maydell
2021-05-10  4:47 ` Thomas Huth
2021-07-10  4:17 ` Launchpad Bug Tracker
2021-07-14 13:45 ` Peter Maydell
2021-07-14 14:28 ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=160692874216.26254.12267648197584238813.malone@chaenomeles.canonical.com \
    --to=1906536@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.