All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Cc: qemu-devel@nongnu.org, "Cédric Le Goater" <clg@kaod.org>,
	"Troy Lee" <leetroy@gmail.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Andrew Jeffery" <andrew@codeconstruct.com.au>,
	"Jamin Lin" <jamin_lin@aspeedtech.com>,
	qemu-arm@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Steven Lee" <steven_lee@aspeedtech.com>,
	"Niek Linnenbank" <nieklinnenbank@gmail.com>,
	"Joel Stanley" <joel@jms.id.au>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Subject: Re: [PATCH v2] tests/functional/aarch64: add tests for FEAT_RME
Date: Tue, 03 Dec 2024 14:56:04 +0000	[thread overview]
Message-ID: <87mshcdddn.fsf@draig.linaro.org> (raw)
In-Reply-To: <20241128213729.1021961-1-pierrick.bouvier@linaro.org> (Pierrick Bouvier's message of "Thu, 28 Nov 2024 13:37:29 -0800")

Pierrick Bouvier <pierrick.bouvier@linaro.org> writes:

> This boot an OP-TEE environment, and launch a nested guest VM inside it
> using the Realms feature. We do it for virt and sbsa-ref platforms.
>
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>
<snip>
> +
> +        self.vm.add_args('-accel', 'tcg')
> +        self.vm.add_args('-cpu', 'max,x-rme=on')

With debug on the PAC function are certainly very high in the perf
report. So pauth-impdef=on seems worthwhile here.

> +        self.vm.add_args('-m', '2G')
> +        self.vm.add_args('-M', 'sbsa-ref')
> +        self.vm.add_args('-drive', f'file={pflash0},format=raw,if=pflash')
> +        self.vm.add_args('-drive', f'file={pflash1},format=raw,if=pflash')
> +        self.vm.add_args('-drive', f'file=fat:rw:{virtual},format=raw')
> +        self.vm.add_args('-drive', f'format=raw,if=none,file={drive},id=hd0')
> +        self.vm.add_args('-device', 'virtio-blk-pci,drive=hd0')
> +        self.vm.add_args('-device', 'virtio-9p-pci,fsdev=shr0,mount_tag=shr0')
> +        self.vm.add_args('-fsdev', f'local,security_model=none,path={rme_stack},id=shr0')
> +        self.vm.add_args('-device', 'virtio-net-pci,netdev=net0')
> +        self.vm.add_args('-netdev', 'user,id=net0')
<snip>
> +
> +        self.vm.add_args('-accel', 'tcg')
> +        self.vm.add_args('-cpu', 'max,x-rme=on')

And here.

<snip>

With that the tests both pass with --enable-debug (312s, 352s) and the
profile looks like:

   6.33%  qemu-system-aar  qemu-system-aarch64                       [.] arm_feature
   5.66%  qemu-system-aar  qemu-system-aarch64                       [.] tcg_flush_jmp_cache
   3.44%  qemu-system-aar  qemu-system-aarch64                       [.] rebuild_hflags_a64

This I suspect is triggered by assert_hflags_rebuild_correctly() which
is validating we've not skipped rebuilding the flags when we need to.
It's a lot easier than debugging why your execution trace looks weird.

   2.95%  qemu-system-aar  qemu-system-aarch64                       [.] extract64
   2.52%  qemu-system-aar  qemu-system-aarch64                       [.] extract64

This is usually triggered by translation code which uses extract64
heavily during instruction decode.

It might be useful to see if we can get functional tests run under TCG
to dump "info jit" at the end and ensure we are not over generating code
and exhausting the translation cache.

   2.12%  qemu-system-aar  qemu-system-aarch64                       [.] arm_el_is_aa64
   2.11%  qemu-system-aar  qemu-system-aarch64                       [.] arm_security_space_below_el3
   2.11%  qemu-system-aar  qemu-system-aarch64                       [.] deposit64
   1.49%  qemu-system-aar  qemu-system-aarch64                       [.] arm_hcr_el2_eff_secstate
   1.46%  qemu-system-aar  qemu-system-aarch64                       [.] arm_is_el2_enabled_secstate
   1.38%  qemu-system-aar  qemu-system-aarch64                       [.] extract32
   1.34%  qemu-system-aar  qemu-system-aarch64                       [.] extract64
   1.30%  qemu-system-aar  qemu-system-aarch64                       [.] get_phys_addr_lpae
   1.23%  qemu-system-aar  qemu-system-aarch64                       [.] aa64_va_parameters
   1.09%  qemu-system-aar  qemu-system-aarch64                       [.] rol32
   1.07%  qemu-system-aar  qemu-system-aarch64                       [.] probe_access_internal
   1.02%  qemu-system-aar  qemu-system-aarch64                       [.] deposit32


-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

  parent reply	other threads:[~2024-12-03 14:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-28 21:37 [PATCH v2] tests/functional/aarch64: add tests for FEAT_RME Pierrick Bouvier
2024-12-01 13:34 ` Marcin Juszkiewicz
2024-12-01 18:09   ` Pierrick Bouvier
2024-12-02 10:57     ` Peter Maydell
2024-12-02 17:31       ` Pierrick Bouvier
2024-12-02 18:23         ` Alex Bennée
2024-12-02 18:36           ` Pierrick Bouvier
2024-12-02 19:56             ` Peter Maydell
2024-12-02 20:09               ` Pierrick Bouvier
2024-12-03 10:29                 ` Peter Maydell
2024-12-02 20:09               ` Pierrick Bouvier
2024-12-03 15:02           ` Gustavo Romero
2024-12-03 15:31             ` Alex Bennée
2024-12-02 10:58     ` Marcin Juszkiewicz
2024-12-02 11:04       ` Peter Maydell
2024-12-02 17:33         ` Pierrick Bouvier
2024-12-03 14:55           ` Gustavo Romero
2024-12-03 15:12             ` Richard Henderson
2024-12-03 15:30             ` Alex Bennée
2024-12-03 14:56 ` Alex Bennée [this message]
2024-12-03 18:24   ` Pierrick Bouvier

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=87mshcdddn.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=alistair@alistair23.me \
    --cc=andrew@codeconstruct.com.au \
    --cc=clg@kaod.org \
    --cc=edgar.iglesias@gmail.com \
    --cc=jamin_lin@aspeedtech.com \
    --cc=joel@jms.id.au \
    --cc=leetroy@gmail.com \
    --cc=nieklinnenbank@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=steven_lee@aspeedtech.com \
    /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.