From: Thomas Huth <thuth@redhat.com>
To: Nico Boehr <nrb@linux.ibm.com>,
frankja@linux.ibm.com, imbrenda@linux.ibm.com
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH v6 3/8] s390x: sie: switch to home space mode before entering SIE
Date: Mon, 4 Sep 2023 13:40:36 +0200 [thread overview]
Message-ID: <5fdeb585-9bf6-93f6-1b74-348d6482f28f@redhat.com> (raw)
In-Reply-To: <169382566786.97137.9911014409792025043@t14-nrb>
On 04/09/2023 13.07, Nico Boehr wrote:
> Quoting Thomas Huth (2023-09-04 11:59:30)
> [...]
>> If we want tests to be able in other modes in the future...
>>
>>> + */
>>> + old_cr13 = stctg(13);
>>> + lctlg(13, stctg(1));
>>> +
>>> + /* switch to home space so guest tables can be different from host */
>>> + psw_mask_set_bits(PSW_MASK_HOME);
>>> +
>>> + /* also handle all interruptions in home space while in SIE */
>>> + irq_set_dat_mode(true, AS_HOME);
>>> +
>>> while (vm->sblk->icptcode == 0) {
>>> sie64a(vm->sblk, &vm->save_area);
>>> sie_handle_validity(vm);
>>> @@ -66,6 +86,12 @@ void sie(struct vm *vm)
>>> vm->save_area.guest.grs[14] = vm->sblk->gg14;
>>> vm->save_area.guest.grs[15] = vm->sblk->gg15;
>>>
>>> + irq_set_dat_mode(true, AS_PRIM);
>>> + psw_mask_clear_bits(PSW_MASK_HOME);
>>
>> ... we should maybe restore the previous mode here instead of switching
>> always to primary mode?
>
> I don't want to add untested "should work" code, so I'd much prefer if we'd
> have a proper test which uses multiple address spaces - and that seems out
> of scope for this series to me.
>
>> Anyway, could be done later, but you might want to update your comment.
>
> Yep, agree, I'd prefer to do this later.
>
> Pardon if I'm not getting it but the comment IMO makes sufficiently clear
> that multiple AS are for future extensions. If you have any suggestion on
> how this could be clearer, I'd be happy to incorporate.
I guess it's ok for now. I was thinking of something like:
+ * - switching every time makes it easier to extend this in the future,
+ * for example to allow tests to run in whatever space they want
+ * (this still needs some modification to return to the previous mode below)
... but it's maybe too verbose already. So just keep your
patch the way it currently is.
Thomas
next prev parent reply other threads:[~2023-09-04 11:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 8:22 [kvm-unit-tests PATCH v6 0/8] s390x: Add support for running guests without MSO/MSL Nico Boehr
2023-09-04 8:22 ` [kvm-unit-tests PATCH v6 1/8] lib: s390x: introduce bitfield for PSW mask Nico Boehr
2023-09-04 9:49 ` Thomas Huth
2023-09-05 12:22 ` Janosch Frank
2023-09-04 8:22 ` [kvm-unit-tests PATCH v6 2/8] s390x: add function to set DAT mode for all interrupts Nico Boehr
2023-09-04 9:54 ` Thomas Huth
2023-09-05 12:26 ` Janosch Frank
2023-09-04 8:22 ` [kvm-unit-tests PATCH v6 3/8] s390x: sie: switch to home space mode before entering SIE Nico Boehr
2023-09-04 9:59 ` Thomas Huth
2023-09-04 11:07 ` Nico Boehr
2023-09-04 11:40 ` Thomas Huth [this message]
2023-09-04 8:22 ` [kvm-unit-tests PATCH v6 4/8] s390x: lib: don't forward PSW when handling exception in SIE Nico Boehr
2023-09-04 8:22 ` [kvm-unit-tests PATCH v6 5/8] s390x: lib: sie: don't reenter SIE on pgm int Nico Boehr
2023-09-04 8:22 ` [kvm-unit-tests PATCH v6 6/8] s390x: add test source dir to include paths Nico Boehr
2023-09-04 10:37 ` Thomas Huth
2023-09-04 8:22 ` [kvm-unit-tests PATCH v6 7/8] s390x: add a test for SIE without MSO/MSL Nico Boehr
2023-09-05 13:45 ` Janosch Frank
2023-09-04 8:22 ` [kvm-unit-tests PATCH v6 8/8] lib: s390x: interrupt: remove TEID_ASCE defines Nico Boehr
2023-09-04 10:39 ` Thomas Huth
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=5fdeb585-9bf6-93f6-1b74-348d6482f28f@redhat.com \
--to=thuth@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=nrb@linux.ibm.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