Re: [PATCH v1 0/4] s390/kvm: fix MVPG when in VSIE

From: Claudio Imbrenda
Date: Mon Jan 04 2021 - 10:25:10 EST


On Sun, 20 Dec 2020 10:40:27 +0100
David Hildenbrand <david@xxxxxxxxxx> wrote:

> On 18.12.20 15:18, Claudio Imbrenda wrote:
> > The current handling of the MVPG instruction when executed in a
> > nested guest is wrong, and can lead to the nested guest hanging.
>
> Hi,
>
> thanks for spotting and debugging! Is this related to nested guests
> hanging while migrating (mentioned by Janosch at some point)?

no, it was found by running legacy tests in VSIE (I have written
kvm-unit-tests for this now, I'll post them Soon™)

> Or can this not be reproduced with actual Linux guests?

Linux doesn't use MVPG, and gcc in general seems to avoid it, so we
never really see this in the wild. Moreover Linux does not normally run
with DAT disabled.

> Thanks!
>
> >
> > This patchset fixes the behaviour to be more architecturally
> > correct, and fixes the hangs observed.
> >
> > Claudio Imbrenda (4):
> > s390/kvm: VSIE: stop leaking host addresses
> > s390/kvm: extend guest_translate for MVPG interpretation
> > s390/kvm: add kvm_s390_vsie_mvpg_check needed for VSIE MVPG
> > s390/kvm: VSIE: correctly handle MVPG when in VSIE
> >
> > arch/s390/kvm/gaccess.c | 88
> > ++++++++++++++++++++++++++++++++++++++--- arch/s390/kvm/gaccess.h |
> > 3 ++ arch/s390/kvm/vsie.c | 78
> > +++++++++++++++++++++++++++++++++--- 3 files changed, 159
> > insertions(+), 10 deletions(-)
>
>