qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ilya Leoshkevich <iii@linux.ibm.com>
To: David Hildenbrand <david@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	Thomas Huth <thuth@redhat.com>
Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 1/2] target/s390x: Define TARGET_HAS_PRECISE_SMC
Date: Mon, 07 Aug 2023 18:13:55 +0200	[thread overview]
Message-ID: <983d4a7e033b5f1ee455468354d85dfa5f1306b6.camel@linux.ibm.com> (raw)
In-Reply-To: <6961d8e4-7b26-b205-1ffd-4d4b721fe2e2@redhat.com>

On Mon, 2023-08-07 at 17:31 +0200, David Hildenbrand wrote:
> On 07.08.23 13:48, Ilya Leoshkevich wrote:
> > PoP (Sequence of Storage References -> Instruction Fetching) says:
> > 
> >      ... if a store that is conceptually earlier is
> >      made by the same CPU using the same effective
> >      address as that by which the instruction is subse-
> >      quently fetched, the updated information is obtained ...
> > 
> > QEMU already has support for this in the common code; enable it for
> > s390x.
> 
> 
> Figuring out what TARGET_HAS_PRECISE_SMC is all about, I only learned
> from git history
> 
> commit d720b93d0bcfe1beb729245b9ed1e5f071a24bd5
> Author: Fabrice Bellard <fabrice@bellard.org>
> Date:   Sun Apr 25 17:57:43 2004 +0000
> 
>      precise self modifying code support
> 
> 
>      git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@745 
> c046a42c-6fe2-441c-8c8c-71466251a162
> 
> 
> 
> AFAIU, precise SMC is stricter compared to what we have right now. So
> i 
> suspect that this patch is actually fixing SMC behavior: for example,
> when a basic block ends up modifying itself.
> 
> Were there any BUG reports? (does patch #2 test for that and can 
> reproduce the original issue?)

There were no bug reports, I found this issue with fuzzing.

Patch #2 tests a TB modifying itself.
Reverting this commit makes the test fail.

[...]


  reply	other threads:[~2023-08-07 16:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07 11:48 [PATCH 1/2] target/s390x: Define TARGET_HAS_PRECISE_SMC Ilya Leoshkevich
2023-08-07 11:48 ` [PATCH 2/2] tests/tcg/s390x: Test precise self-modifying code handling Ilya Leoshkevich
2023-08-07 15:31 ` [PATCH 1/2] target/s390x: Define TARGET_HAS_PRECISE_SMC David Hildenbrand
2023-08-07 16:13   ` Ilya Leoshkevich [this message]
2023-08-07 16:14     ` 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=983d4a7e033b5f1ee455468354d85dfa5f1306b6.camel@linux.ibm.com \
    --to=iii@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.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 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).