public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: "Christoph Schlameuss" <schlameuss@linux.ibm.com>
To: "Thomas Huth" <thuth@redhat.com>, <kvm@vger.kernel.org>
Cc: <linux-s390@vger.kernel.org>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	"Janosch Frank" <frankja@linux.ibm.com>,
	"Claudio Imbrenda" <imbrenda@linux.ibm.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Heiko Carstens" <hca@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>,
	"Alexander Gordeev" <agordeev@linux.ibm.com>,
	"Sven Schnelle" <svens@linux.ibm.com>
Subject: Re: [PATCH v2 2/3] KVM: s390: Always allocate esca_block
Date: Tue, 20 May 2025 10:35:04 +0200	[thread overview]
Message-ID: <DA0UM5YL6IFH.1KE7UH4H6XBZM@linux.ibm.com> (raw)
In-Reply-To: <e5f67090-07a4-4818-b83e-33386313b2af@redhat.com>

On Tue May 20, 2025 at 7:41 AM CEST, Thomas Huth wrote:
> On 19/05/2025 13.36, Christoph Schlameuss wrote:
>> Instead of allocating a BSCA and upgrading it for PV or when adding the
>> 65th cpu we can always use the ESCA.
>> 
>> The only downside of the change is that we will always allocate 4 pages
>> for a 248 cpu ESCA instead of a single page for the BSCA per VM.
>> In return we can delete a bunch of checks and special handling depending
>> on the SCA type as well as the whole BSCA to ESCA conversion.
>> 
>> As a fallback we can still run without SCA entries when the SIGP
>> interpretation facility or ESCA are not available.
>> 
>> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
>> ---
>>   arch/s390/include/asm/kvm_host.h |   1 -
>>   arch/s390/kvm/interrupt.c        |  67 ++++-------------
>>   arch/s390/kvm/kvm-s390.c         | 159 ++++++---------------------------------
>>   arch/s390/kvm/kvm-s390.h         |   4 +-
>>   4 files changed, 42 insertions(+), 189 deletions(-)
>
> Could you now also remove struct bsca_block from the kvm_host_types.h header?
>

We still need these to support sigp with bsca in vsie. (Once I have that
running properly.)

> ...
>> diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h
>> index 8d3bbb2dd8d27802bbde2a7bd1378033ad614b8e..2c8e177e4af8f2dab07fd42a904cefdea80f6855 100644
>> --- a/arch/s390/kvm/kvm-s390.h
>> +++ b/arch/s390/kvm/kvm-s390.h
>> @@ -531,7 +531,7 @@ int kvm_s390_handle_per_event(struct kvm_vcpu *vcpu);
>>   /* support for Basic/Extended SCA handling */
>>   static inline union ipte_control *kvm_s390_get_ipte_control(struct kvm *kvm)
>>   {
>> -	struct bsca_block *sca = kvm->arch.sca; /* SCA version doesn't matter */
>> +	struct esca_block *sca = kvm->arch.sca; /* SCA version doesn't matter */
>
> You might want to adjust/remove the comment here now.
>

Yes. This does not make any sense anymore. But it is already completely removed
along with that whole message in the next patch.

>
>
>>   	return &sca->ipte_control;
>>   }
>> @@ -542,7 +542,7 @@ static inline int kvm_s390_use_sca_entries(void)
>>   	 * might use the entries. By not setting the entries and keeping them
>>   	 * invalid, hardware will not access them but intercept.
>>   	 */
>> -	return sclp.has_sigpif;
>> +	return sclp.has_sigpif && sclp.has_esca;
>>   }
>>   void kvm_s390_reinject_machine_check(struct kvm_vcpu *vcpu,
>>   				     struct mcck_volatile_info *mcck_info);
>> 


--
Cheers,

Christoph

  reply	other threads:[~2025-05-20  8:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-19 11:36 [PATCH v2 0/3] KVM: s390: Use ESCA instead of BSCA at VM init Christoph Schlameuss
2025-05-19 11:36 ` [PATCH v2 1/3] KVM: s390: Set KVM_MAX_VCPUS to 256 Christoph Schlameuss
2025-05-20  5:31   ` Thomas Huth
2025-05-19 11:36 ` [PATCH v2 2/3] KVM: s390: Always allocate esca_block Christoph Schlameuss
2025-05-19 11:49   ` Claudio Imbrenda
2025-05-20  5:41   ` Thomas Huth
2025-05-20  8:35     ` Christoph Schlameuss [this message]
2025-05-20  9:18       ` Thomas Huth
2025-05-19 11:36 ` [PATCH v2 3/3] KVM: s390: Specify kvm->arch.sca as esca_block Christoph Schlameuss
2025-05-20  5:43   ` 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=DA0UM5YL6IFH.1KE7UH4H6XBZM@linux.ibm.com \
    --to=schlameuss@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=svens@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