public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.ibm.com>
To: Nina Schoetterl-Glausch <nsg@linux.ibm.com>, kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com,
	thuth@redhat.com, david@redhat.com, nrb@linux.ibm.com
Subject: Re: [kvm-unit-tests PATCH 0/5] s390x: Dirty cc before executing tested instructions
Date: Wed, 17 Jan 2024 15:21:14 +0100	[thread overview]
Message-ID: <6953eadd-6036-4362-9dfa-8810a26a590f@linux.ibm.com> (raw)
In-Reply-To: <186d63da6c58181cc355ea41f70b4cbe75fed338.camel@linux.ibm.com>

On 1/16/24 14:02, Nina Schoetterl-Glausch wrote:
> On Mon, 2024-01-08 at 13:29 +0000, Janosch Frank wrote:
>> A recent s390 KVM fixpatch [1] showed us that checking the cc is not
>> enough when emulation code forgets to set the cc. There might just be
>> the correct cc in the PSW which would make the cc check succeed.
>>
>> This series intentionally dirties the cc for sigp, uvc, some io
>> instructions and sclp to make cc setting errors more apparent. I had a
>> cursory look through the tested instructions and those are the most
>> prominent ones with defined cc values.
>>
>> Since the issue appeared in PQAP my AP test series is now dependent on
>> this series.
>>
>> [1] https://lore.kernel.org/kvm/20231201181657.1614645-1-farman@linux.ibm.com/
> 
> Using SET PROGRAM MASK the way you're doing in this series will also set the
> program mask to 0, right?
> 
> In case you have some non zero register %[reg] and you want to set CC to 1 you
> could do:
> 
> or	%[reg],%[reg] /* set CC to 1 */
> 
> In general, if I understand TEST UNDER MASK right, you could do:
> 
> tmll	%[set_cc],3
> 
> to set the CC to the value in %[set_cc] (without any shifting).


That is a wonderful solution to this problem.
I'll send out a new version in the next couple of days.

      reply	other threads:[~2024-01-17 14:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-08 13:29 [kvm-unit-tests PATCH 0/5] s390x: Dirty cc before executing tested instructions Janosch Frank
2024-01-08 13:29 ` [kvm-unit-tests PATCH 1/5] lib: s390x: Add spm cc shift constant Janosch Frank
2024-01-08 13:29 ` [kvm-unit-tests PATCH 2/5] lib: s390x: sigp: Dirty CC before sigp execution Janosch Frank
2024-01-08 13:29 ` [kvm-unit-tests PATCH 3/5] lib: s390x: uv: Dirty CC before uvc execution Janosch Frank
2024-01-08 13:29 ` [kvm-unit-tests PATCH 4/5] lib: s390x: css: Dirty CC before css instructions Janosch Frank
2024-01-08 13:29 ` [kvm-unit-tests PATCH 5/5] s390x: sclp: Dirty CC before sclp execution Janosch Frank
2024-01-16 13:02 ` [kvm-unit-tests PATCH 0/5] s390x: Dirty cc before executing tested instructions Nina Schoetterl-Glausch
2024-01-17 14:21   ` Janosch Frank [this message]

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=6953eadd-6036-4362-9dfa-8810a26a590f@linux.ibm.com \
    --to=frankja@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=nsg@linux.ibm.com \
    --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