qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 03/14] accel/tcg: Suppress auto-invalidate in probe_access_in


From: Richard Henderson
Subject: Re: [PATCH 03/14] accel/tcg: Suppress auto-invalidate in probe_access_internal
Date: Tue, 23 Aug 2022 08:19:45 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 8/23/22 02:19, David Hildenbrand wrote:
1) s390_probe_access() documents to "With nonfault=1, return the PGM_
exception that would have been injected into the guest; return 0 if no
exception was detected."

But in case of CONFIG_USER_ONLY, we return the flags returned by
s390_probe_access(), not a PGM__* value. Maybe it doesn't matter,
because we'll simply inject a SIGSEGV in any case ...

I would have said it would matter for MVPG, except that is incorrectly *not* marked as a privileged instruction. There should be no CONFIG_USER_ONLY case to answer there.

2) s390_probe_access() documents that for "CONFIG_USER_ONLY, the
faulting address is stored to env->__excp_addr.".

However, that's only set in s390_cpu_record_sigsegv(). With nonfault=1
that will never actually trigger, right?

Correct.

I assume db9aab5783a2 ("target/s390x: Use probe_access_flags in
s390_probe_access") might have introduced both. We had a flag conversion
to PGM_ in there and stored env->__excp_addr:

Indeed, that commit is faulty in that it breaks the contract of 
s390_probe_access.
It's a shame, though, that we need to carry the extra code for the purpose, and that the generic interfaces are not sufficient.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]