Re: [PATCH 2/2] KVM: s390: add exit io request stats and simplify code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 23 Feb 2018 08:11:42 +0000
Christian Borntraeger <borntraeger@xxxxxxxxxx> wrote:

> We want to count IO exit requests in kvm_stat. At the same time
> we can get rid of the handle_noop function.
> 
> Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
> ---
>  arch/s390/include/asm/kvm_host.h |  1 +
>  arch/s390/kvm/intercept.c        | 19 +++++--------------
>  arch/s390/kvm/kvm-s390.c         |  1 +
>  3 files changed, 7 insertions(+), 14 deletions(-)
> 

> diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c
> index 07c6e81163bf..cad2ea216007 100644
> --- a/arch/s390/kvm/intercept.c
> +++ b/arch/s390/kvm/intercept.c
> @@ -50,18 +50,6 @@ u8 kvm_s390_get_ilen(struct kvm_vcpu *vcpu)
>  	return ilen;
>  }
>  
> -static int handle_noop(struct kvm_vcpu *vcpu)
> -{
> -	switch (vcpu->arch.sie_block->icptcode) {
> -	case 0x10:
> -		vcpu->stat.exit_external_request++;
> -		break;
> -	default:
> -		break; /* nothing */
> -	}
> -	return 0;
> -}
> -
>  static int handle_stop(struct kvm_vcpu *vcpu)
>  {
>  	struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int;
> @@ -458,15 +446,18 @@ static int handle_operexc(struct kvm_vcpu *vcpu)
>  
>  int kvm_handle_sie_intercept(struct kvm_vcpu *vcpu)
>  {
> -	int rc, per_rc = 0;
> +	int rc = 0, per_rc = 0;
>  
>  	if (kvm_is_ucontrol(vcpu->kvm))
>  		return -EOPNOTSUPP;
>  
>  	switch (vcpu->arch.sie_block->icptcode) {
>  	case ICPT_EXTREQ:
> +		vcpu->stat.exit_external_request++;
> +		break;
>  	case ICPT_IOREQ:
> -		return handle_noop(vcpu);
> +		vcpu->stat.exit_io_request++;
> +		break;
>  	case ICPT_INST:
>  		rc = handle_instruction(vcpu);
>  		break;

This also enables PER processing for those intercepts, doesn't it? Or
is that not applicable in these cases anyway?
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux