lkml.org 
[lkml]   [2021]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] KVM: s390: Enable specification exception interpretation
Date
On Tue, Jul 06 2021, Janis Schoetterl-Glausch <scgl@linux.ibm.com> wrote:

> When this feature is enabled the hardware is free to interpret
> specification exceptions generated by the guest, instead of causing
> program interruption interceptions.
>
> This benefits (test) programs that generate a lot of specification
> exceptions (roughly 4x increase in exceptions/sec).
>
> Interceptions will occur as before if ICTL_PINT is set,
> i.e. if guest debug is enabled.
>
> Signed-off-by: Janis Schoetterl-Glausch <scgl@linux.ibm.com>
> ---
> I'll additionally send kvm-unit-tests for testing this feature.
>
> arch/s390/include/asm/kvm_host.h | 1 +
> arch/s390/kvm/kvm-s390.c | 2 ++
> arch/s390/kvm/vsie.c | 2 ++
> 3 files changed, 5 insertions(+)

(...)

> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index b655a7d82bf0..aadd589a3755 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -3200,6 +3200,8 @@ static int kvm_s390_vcpu_setup(struct kvm_vcpu *vcpu)
> vcpu->arch.sie_block->ecb |= ECB_SRSI;
> if (test_kvm_facility(vcpu->kvm, 73))
> vcpu->arch.sie_block->ecb |= ECB_TE;
> + if (!kvm_is_ucontrol(vcpu->kvm))
> + vcpu->arch.sie_block->ecb |= ECB_SPECI;

Does this exist for any hardware version (i.e. not guarded by a cpu
feature?)

>
> if (test_kvm_facility(vcpu->kvm, 8) && vcpu->kvm->arch.use_pfmfi)
> vcpu->arch.sie_block->ecb2 |= ECB2_PFMFI;

\
 
 \ /
  Last update: 2021-07-06 14:40    [W:0.703 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site