qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Sven Schnelle <svens@stackframe.org>
Cc: qemu-devel@nongnu.org, Helge Deller <deller@gmx.de>
Subject: Re: [PATCH] target/hppa: mask upper iaoq bits when returning to narrow mode
Date: Mon, 1 Apr 2024 11:17:13 -1000	[thread overview]
Message-ID: <069d1894-0c91-43f2-a33b-904cb89ac16e@linaro.org> (raw)
In-Reply-To: <87edboztrt.fsf@t14.stackframe.org>

On 4/1/24 10:56, Sven Schnelle wrote:
>> This seems to be caused by IIAOQ's containing the upper bits. With the
>> patch below i'm able to boot. Not sure whether it's correct though.
>>
>> diff --git a/target/hppa/int_helper.c b/target/hppa/int_helper.c
>> index 58c13d3e61..f7c4cca8f1 100644
>> --- a/target/hppa/int_helper.c
>> +++ b/target/hppa/int_helper.c
>> @@ -123,8 +123,14 @@ void hppa_cpu_do_interrupt(CPUState *cs)
>>           env->cr[CR_IIASQ] = 0;
>>           env->cr_back[0] = 0;
>>       }
>> -    env->cr[CR_IIAOQ] = env->iaoq_f;
>> -    env->cr_back[1] = env->iaoq_b;
>> +    if (old_psw & PSW_W) {
>> +        env->cr[CR_IIAOQ] = env->iaoq_f;
>> +        env->cr_back[1] = env->iaoq_b;
>> +    } else {
>> +        env->cr[CR_IIAOQ] = (env->iaoq_f & 0xffffffff);
>> +        env->cr_back[1] = env->iaoq_b & 0xffffffff;
>> +    }
>> +
> 
> I guess the interesting question where should these bits get masked out
> - i would assume that this place is to late, and it should happen
> earlier in trans_be/when the iaoq value is copied. On the other hand
> you had one commit that removed the masking in copy_iaoq_entry()...

I would have said this masking should not happen at all.


r~


  reply	other threads:[~2024-04-01 21:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01 14:52 [PATCH] target/hppa: mask upper iaoq bits when returning to narrow mode Sven Schnelle
2024-04-01 18:43 ` Richard Henderson
2024-04-01 20:39   ` Sven Schnelle
2024-04-01 20:49     ` Sven Schnelle
2024-04-01 20:56       ` Sven Schnelle
2024-04-01 21:17         ` Richard Henderson [this message]
2024-04-01 21:21     ` Richard Henderson
2024-04-01 21:31       ` Sven Schnelle

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=069d1894-0c91-43f2-a33b-904cb89ac16e@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=deller@gmx.de \
    --cc=qemu-devel@nongnu.org \
    --cc=svens@stackframe.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).