From: David Hildenbrand <david@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-s390x@nongnu.org, Cornelia Huck <cohuck@redhat.com>,
Thomas Huth <thuth@redhat.com>
Subject: Re: [PATCH v5 1/2] target/s390x: Implement the MVPG condition-code-option bit
Date: Thu, 11 Mar 2021 18:12:18 +0100 [thread overview]
Message-ID: <e9c74b31-28c9-6757-567e-a6d14a9a5b7e@redhat.com> (raw)
In-Reply-To: <594f6840-2dad-89a2-9103-098e5f465ed4@linaro.org>
On 11.03.21 18:02, Richard Henderson wrote:
> On 3/11/21 10:17 AM, David Hildenbrand wrote:
>> +#if !defined(CONFIG_USER_ONLY)
>> + if (env->tlb_fill_exc) {
>> + return env->tlb_fill_exc;
>> + }
>> +#else
>> + if (!haddr1) {
>> + env->__excp_addr = vaddr1;
>> + return PGM_ADDRESSING;
>> + }
>> +#endif
>
> For user-only, we can rely on TLB_INVALID_MASK, and check once for both pages.
Then, I cannot set the proper vaddr1 vs. vaddr2 (see patch #2).
>> @@ -858,13 +925,26 @@ uint32_t HELPER(mvpg)(CPUS390XState *env, uint64_t r0, uint64_t r1, uint64_t r2)
>> /*
>> * TODO:
>> * - Access key handling
>> - * - CC-option with surpression of page-translation exceptions
>> * - Store r1/r2 register identifiers at real location 162
>> */
>> - srca = access_prepare(env, r2, TARGET_PAGE_SIZE, MMU_DATA_LOAD, mmu_idx,
>> - ra);
>> - desta = access_prepare(env, r1, TARGET_PAGE_SIZE, MMU_DATA_STORE, mmu_idx,
>> - ra);
>> + exc = access_prepare_nf(&srca, env, cco, r2, TARGET_PAGE_SIZE,
>> + MMU_DATA_LOAD, mmu_idx, ra);
>> + if (exc) {
>> + return 2;
>> + }
>> + exc = access_prepare_nf(&desta, env, cco, r1, TARGET_PAGE_SIZE,
>> + MMU_DATA_STORE, mmu_idx, ra);
>> + if (exc) {
>> +#if !defined(CONFIG_USER_ONLY)
>> + if (exc == PGM_PROTECTION) {
>> + stq_phys(env_cpu(env)->as,
>> + env->psa + offsetof(LowCore, trans_exc_code),
>> + env->tlb_fill_tec);
>> + tcg_s390_program_interrupt(env, PGM_PROTECTION, ra);
>> + }
>> +#endif
>> + return 1;
>> + }
>> access_memmove(env, &desta, &srca, ra);
>> return 0; /* data moved */
>> }
>
> If we're going to have an ifdef at all here, it should be around the entire
> helper -- this is a privileged operation.
Privileged operation (access key specified, and
selected PSW-key-mask bit is zero in the prob-
lem state)
Without an access key in GR0, we're using the PSW key - which should
always work, no?
What am I missing?
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2021-03-11 17:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-11 16:17 [PATCH v5 0/2] target/s390x: Implement the MVPG condition-code-option bit David Hildenbrand
2021-03-11 16:17 ` [PATCH v5 1/2] " David Hildenbrand
2021-03-11 17:02 ` Richard Henderson
2021-03-11 17:12 ` David Hildenbrand [this message]
2021-03-11 17:26 ` Richard Henderson
2021-03-11 17:52 ` Richard Henderson
2021-03-11 18:16 ` David Hildenbrand
2021-03-11 18:24 ` Richard Henderson
2021-03-11 16:17 ` [PATCH v5 2/2] target/s390x: Store r1/r2 for page-translation exceptions during MVPG David Hildenbrand
2021-03-11 16:26 ` 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=e9c74b31-28c9-6757-567e-a6d14a9a5b7e@redhat.com \
--to=david@redhat.com \
--cc=cohuck@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).