Re: [kvm-unit-tests PATCH v5 3/6] s390x: sie: switch to home space mode before entering SIE

Claudio Imbrenda
2023-07-13T08:57:34Z

On Thu, 13 Jul 2023 09:28:19 +0200
Thomas Huth <thuth@redhat.com> wrote:

[...]

> > + irq_set_dat_mode(IRQ_DAT_ON, AS_PRIM);
> > + psw_mask_clear_bits(PSW_MASK_HOME);
> > +
> > + /* restore the old CR 13 */
> > + lctlg(13, old_cr13);
>
> Wouldn't it be better to always switch to HOME address mode directly in our
> startup code already (where we enable DAT)? Switching back and forth every
> time we enter SIE looks confusing to me ... or is there a reason why we
> should continue to run in primary address mode by default and only switch to
> home mode here?

the existing tests are written with the assumption that they are
running in primary mode.

switching back and forth might be confusing, but avoids having to
fix all the tests

>
> Thomas
>
>