qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Cc: David Hildenbrand <david@redhat.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	Cornelia Huck <cohuck@redhat.com>,
	Harald Freudenberger <freude@linux.ibm.com>,
	Holger Dengler <dengler@linux.ibm.com>
Subject: Re: [PATCH v8 2/2] target/s390x: support PRNO_TRNG instruction
Date: Mon, 26 Sep 2022 17:11:23 +0200	[thread overview]
Message-ID: <1ab81fe3-07d6-28f6-0f34-61eda592e1d8@redhat.com> (raw)
In-Reply-To: <20220921100729.2942008-2-Jason@zx2c4.com>

On 21/09/2022 12.07, Jason A. Donenfeld wrote:
> In order for hosts running inside of TCG to initialize the kernel's
> random number generator, we should support the PRNO_TRNG instruction,
> backed in the usual way with the qemu_guest_getrandom helper. This is
> confirmed working on Linux 5.19.
> 
> Cc: Thomas Huth <thuth@redhat.com>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
> Cc: Richard Henderson <richard.henderson@linaro.org>
> Cc: Cornelia Huck <cohuck@redhat.com>
> Cc: Harald Freudenberger <freude@linux.ibm.com>
> Cc: Holger Dengler <dengler@linux.ibm.com>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> ---
>   target/s390x/gen-features.c      |  1 +
>   target/s390x/tcg/crypto_helper.c | 30 ++++++++++++++++++++++++++++++
>   2 files changed, 31 insertions(+)

Seems like this is even working fine with older Linux kernels ... your patch accidentally broke test_s390x_devices in tests/avocado/machine_s390_ccw_virtio.py: This test adds two virtio-rng devices to the guest, then ejects them to see whether /dev/hwrng will be gone ... which does not happen anymore with the prno-trng feature enabled :-)

I'm going to squash this one-liner to fix this issue:

diff a/tests/avocado/machine_s390_ccw_virtio.py b/tests/avocado/machine_s390_ccw_virtio.py
--- a/tests/avocado/machine_s390_ccw_virtio.py
+++ b/tests/avocado/machine_s390_ccw_virtio.py
@@ -66,6 +66,7 @@ def test_s390x_devices(self):
                           '-kernel', kernel_path,
                           '-initrd', initrd_path,
                           '-append', kernel_command_line,
+                         '-cpu', 'max,prno-trng=off',
                           '-device', 'virtio-net-ccw,devno=fe.1.1111',
                           '-device',
                           'virtio-rng-ccw,devno=fe.2.0000,max_revision=0,id=rn1',

  Thomas



  parent reply	other threads:[~2022-09-26 15:27 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 10:07 [PATCH v8 1/2] target/s390x: support SHA-512 extensions Jason A. Donenfeld
2022-09-21 10:07 ` [PATCH v8 2/2] target/s390x: support PRNO_TRNG instruction Jason A. Donenfeld
2022-09-22 13:09   ` David Hildenbrand
2022-09-22 15:40   ` Thomas Huth
2022-09-26 15:11   ` Thomas Huth [this message]
2022-09-26 15:19     ` Jason A. Donenfeld
2022-09-22 13:07 ` [PATCH v8 1/2] target/s390x: support SHA-512 extensions David Hildenbrand
2022-09-22 14:35   ` Jason A. Donenfeld
2022-09-22 14:51     ` David Hildenbrand
2022-09-22 15:11       ` David Hildenbrand
2022-09-22 15:36       ` Thomas Huth
2022-09-22 15:37         ` David Hildenbrand
2022-09-23 10:14   ` Alex Bennée
2022-09-22 15:38 ` [PATCH v8.1 " David Hildenbrand
2022-09-22 15:55   ` Thomas Huth
2022-09-22 16:35     ` Jason A. Donenfeld
2022-09-23  6:25       ` Thomas Huth
2022-09-22 17:18     ` David Hildenbrand
2022-09-23  6:23       ` Thomas Huth
2022-09-23  6:37         ` David Hildenbrand
2022-09-23  9:19           ` Jason A. Donenfeld
2022-09-23 10:47             ` David Hildenbrand
2022-09-23 11:19               ` Jason A. Donenfeld
2022-09-23 11:35                 ` David Hildenbrand
2022-09-23 11:46                   ` Jason A. Donenfeld
2022-09-23 12:05                     ` Thomas Huth
2022-09-23 12:07                       ` Jason A. Donenfeld
2022-09-23 12:45                         ` Thomas Huth
2022-09-23 12:13                     ` David Hildenbrand

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=1ab81fe3-07d6-28f6-0f34-61eda592e1d8@redhat.com \
    --to=thuth@redhat.com \
    --cc=Jason@zx2c4.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=dengler@linux.ibm.com \
    --cc=freude@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).