From: Janosch Frank <frankja@linux.ibm.com>
To: Michael Mueller <mimu@linux.ibm.com>, linux-s390@vger.kernel.org
Cc: borntraeger@linux.ibm.com, nrb@linux.ibm.com
Subject: Re: [PATCH] KVM: s390: fix validity interception issue when gisa is switched off
Date: Wed, 31 Jul 2024 14:05:11 +0200 [thread overview]
Message-ID: <9124f3d3-700f-4d54-be2c-df17cc6a719f@linux.ibm.com> (raw)
In-Reply-To: <20240731113102.849562-1-mimu@linux.ibm.com>
On 7/31/24 1:31 PM, Michael Mueller wrote:
> The following validity interception occures when the gisa usage has been
> switched off either by using kernel parameter "kvm.use_gisa=0" or by
> setting the related sysfs attribute to N (echo N >/sys/module/kvm/
> parameters/use_gisa).
>
> The issue surfaces in the host kernel with the following kernel message as
> soon a new kvm guest start has been attemted.
How about:
We might run into a SIE validity if gisa has been disabled either via
using kernel parameter "kvm.use_gisa=0" or by setting the related sysfs
attribute to N (echo N >/sys/module/kvm/parameters/use_gisa).
The validity is caused by an invalid value in the SIE control block's
gisa designation. That happens because we pass the uninitialized gisa
origin to virt_to_phys() before writing it to the gisa designation.
To fix this we return 0 in kvm_s390_get_gisa_desc() if the origin is 0.
kvm_s390_get_gisa_desc() is used to determine which gisa designation to
set in the SIE control block. A value of 0 in the gisa designation
disables gisa usage.
> Cc: stable@vger.kernel.org
> Reported-by: Christian Borntraeger <borntraeger@linux.ibm.com>
> Closes: https://ibm-systems-z.slack.com/archives/C04BWBXSKEY/p1722280755665409
I'd just remove that since it's not accessible for people outside of
IBM. Yes, checkpatch will complain but in this case it's ok to ignore that.
> Fixes: fe0ef0030463 ("KVM: s390: sort out physical vs virtual pointers usage")
> Signed-off-by: Michael Mueller <mimu@linux.ibm.com>
> ---
> arch/s390/kvm/kvm-s390.h | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h
> index bf8534218af3..e680c6bf0c9d 100644
> --- a/arch/s390/kvm/kvm-s390.h
> +++ b/arch/s390/kvm/kvm-s390.h
> @@ -267,7 +267,12 @@ static inline unsigned long kvm_s390_get_gfn_end(struct kvm_memslots *slots)
>
> static inline u32 kvm_s390_get_gisa_desc(struct kvm *kvm)
> {
> - u32 gd = virt_to_phys(kvm->arch.gisa_int.origin);
> + u32 gd;
> +
> + if (!kvm->arch.gisa_int.origin)
> + return 0;
> +
> + gd = virt_to_phys(kvm->arch.gisa_int.origin);
>
> if (gd && sclp.has_gisaf)
> gd |= GISA_FORMAT1;
next prev parent reply other threads:[~2024-07-31 12:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 11:31 [PATCH] KVM: s390: fix validity interception issue when gisa is switched off Michael Mueller
2024-07-31 12:05 ` Janosch Frank [this message]
2024-08-01 12:27 ` Michael Mueller
2024-07-31 12:24 ` Christian Borntraeger
2024-08-01 12:28 ` Michael Mueller
-- strict thread matches above, loose matches on Subject: below --
2024-07-31 11:29 Michael Mueller
2024-07-30 14:25 Michael Mueller
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=9124f3d3-700f-4d54-be2c-df17cc6a719f@linux.ibm.com \
--to=frankja@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=mimu@linux.ibm.com \
--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