qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/s390x/tcg/mem_helper: Remove bad assert() statement
@ 2023-03-17 13:57 Thomas Huth
  2023-03-17 14:33 ` Richard Henderson
  2023-03-20 11:20 ` David Hildenbrand
  0 siblings, 2 replies; 3+ messages in thread
From: Thomas Huth @ 2023-03-17 13:57 UTC (permalink / raw)
  To: Richard Henderson, David Hildenbrand, qemu-devel
  Cc: qemu-s390x, Ilya Leoshkevich

The "assert(!nonfault)" statement can be triggered by running the
"mvpg" s390x kvm-unit-test with TCG. According to Richard: "... the
assert looks backward. We should only arrive there if nonfault was
true for the probe (otherwise the probe would have raised the
exception directly).  I would think we could just remove the assert."

Fixes: 4049431478 ("target/s390x: Fix s390_probe_access for user-only")
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 target/s390x/tcg/mem_helper.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c
index 6835c26dda..adbc79b446 100644
--- a/target/s390x/tcg/mem_helper.c
+++ b/target/s390x/tcg/mem_helper.c
@@ -149,7 +149,6 @@ static inline int s390_probe_access(CPUArchState *env, target_ulong addr,
                                    nonfault, phost, ra);
 
     if (unlikely(flags & TLB_INVALID_MASK)) {
-        assert(!nonfault);
 #ifdef CONFIG_USER_ONLY
         /* Address is in TEC in system mode; see s390_cpu_record_sigsegv. */
         env->__excp_addr = addr & TARGET_PAGE_MASK;
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] target/s390x/tcg/mem_helper: Remove bad assert() statement
  2023-03-17 13:57 [PATCH] target/s390x/tcg/mem_helper: Remove bad assert() statement Thomas Huth
@ 2023-03-17 14:33 ` Richard Henderson
  2023-03-20 11:20 ` David Hildenbrand
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2023-03-17 14:33 UTC (permalink / raw)
  To: Thomas Huth, David Hildenbrand, qemu-devel; +Cc: qemu-s390x, Ilya Leoshkevich

On 3/17/23 06:57, Thomas Huth wrote:
> The "assert(!nonfault)" statement can be triggered by running the
> "mvpg" s390x kvm-unit-test with TCG. According to Richard: "... the
> assert looks backward. We should only arrive there if nonfault was
> true for the probe (otherwise the probe would have raised the
> exception directly).  I would think we could just remove the assert."
> 
> Fixes: 4049431478 ("target/s390x: Fix s390_probe_access for user-only")
> Suggested-by: Richard Henderson<richard.henderson@linaro.org>
> Signed-off-by: Thomas Huth<thuth@redhat.com>
> ---
>   target/s390x/tcg/mem_helper.c | 1 -
>   1 file changed, 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] target/s390x/tcg/mem_helper: Remove bad assert() statement
  2023-03-17 13:57 [PATCH] target/s390x/tcg/mem_helper: Remove bad assert() statement Thomas Huth
  2023-03-17 14:33 ` Richard Henderson
@ 2023-03-20 11:20 ` David Hildenbrand
  1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2023-03-20 11:20 UTC (permalink / raw)
  To: Thomas Huth, Richard Henderson, qemu-devel; +Cc: qemu-s390x, Ilya Leoshkevich

On 17.03.23 14:57, Thomas Huth wrote:
> The "assert(!nonfault)" statement can be triggered by running the
> "mvpg" s390x kvm-unit-test with TCG. According to Richard: "... the
> assert looks backward. We should only arrive there if nonfault was
> true for the probe (otherwise the probe would have raised the
> exception directly).  I would think we could just remove the assert."
> 
> Fixes: 4049431478 ("target/s390x: Fix s390_probe_access for user-only")
> Suggested-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---

Reviewed-by: David Hildenbrand <david@redhat.com>


-- 
Thanks,

David / dhildenb



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-20 11:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-17 13:57 [PATCH] target/s390x/tcg/mem_helper: Remove bad assert() statement Thomas Huth
2023-03-17 14:33 ` Richard Henderson
2023-03-20 11:20 ` David Hildenbrand

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).