qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Ilya Leoshkevich <iii@linux.ibm.com>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"David Hildenbrand" <david@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [risu PATCH 0/4] Add support for s390x to RISU
Date: Tue, 5 Sep 2023 14:00:51 +0200	[thread overview]
Message-ID: <39d2a035-f51a-31a6-b294-919d4a27933d@redhat.com> (raw)
In-Reply-To: <d5e28e46b9fab10c0a505fd49f86c12481b9e185.camel@linux.ibm.com>

On 04/09/2023 16.30, Ilya Leoshkevich wrote:
> On Mon, 2023-09-04 at 16:00 +0200, Thomas Huth wrote:
>>   Hi Peter!
>>
>> Here are some patches that add basic support for s390x to RISU.
>> It's still quite limited, e.g. no support for load/store memory
>> operations yet, but the basics with simple 16-bit or 32-bit
>> instructions work already fine.
>>
>> (In the long run, we'd need to support instructions with 48-bit
>> length on s390x, too, since most newer "interesting" instructions
>> like e.g. vector SIMD instructions are encoded with 48 bit. This
>> will require modifications to the generic code, too, so I limited
>> my initial implementation to 16-bit and 32-bit instruction length
>> support to keep the code self-contained in the s390x architecture
>> specific files)
> 
> What's also interesting about SIMD, is that floating-point instructions
> clobber the upper parts of vector registers. I wonder if there is a way
> to systematically solve this?#

No clue yet, so far the code does not support the extended vector registers 
yet (since the weren't part of the information that is provided by the 
ucontext.h header file).

I guess it should be OK to check only the floating point part for the 
registers where it overlaps, and only check the full vector register if the 
register does not overlap ... I don't expect much difference for a vector 
instruction when it executes with register 0 - 15 compared to when it 
executes with register 16 - 31, so skipping half of the check for register 0 
- 15 shouldn't be too bad.

> One other thing - for not-so-near future - is it possible to integrate
> this with coverage-based fuzzers? I.e., somehow generate the
> instructions based on the coverage signal. Maybe even make sure that
> the signal comes from JITed code too. I wanted to try AFLplusplus in
> QEMU mode for this purpose (which would ultimately run QEMU in QEMU),
> but never found the time.

I don't think this is possible yet, but maybe it's be possible to write a 
TCG plugin for QEMU to dump the executed instructions into an input file for 
risu?

  Thomas



      reply	other threads:[~2023-09-05 12:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04 14:00 [risu PATCH 0/4] Add support for s390x to RISU Thomas Huth
2023-09-04 14:00 ` [risu PATCH 1/4] s390x: Add basic s390x support to the C code Thomas Huth
2023-09-04 14:19   ` Ilya Leoshkevich
2023-09-04 14:27     ` Thomas Huth
2023-09-04 14:00 ` [risu PATCH 2/4] s390x: Add simple s390x.risu file Thomas Huth
2023-09-04 14:20   ` Ilya Leoshkevich
2023-09-05  9:56     ` Thomas Huth
2023-09-04 14:00 ` [risu PATCH 3/4] s390x: Add basic risugen perl module for s390x Thomas Huth
2023-09-04 14:00 ` [risu PATCH 4/4] s390x: Update the configure script for s390x support Thomas Huth
2023-09-04 14:23   ` Philippe Mathieu-Daudé
2023-09-04 14:30 ` [risu PATCH 0/4] Add support for s390x to RISU Ilya Leoshkevich
2023-09-05 12:00   ` Thomas Huth [this message]

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=39d2a035-f51a-31a6-b294-919d4a27933d@redhat.com \
    --to=thuth@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=david@redhat.com \
    --cc=iii@linux.ibm.com \
    --cc=peter.maydell@linaro.org \
    --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).