[2/2] KVM: s390: add debug logging for cpu model subfunctions
diff mbox series

Message ID 20190221184304.42805-3-borntraeger@de.ibm.com
State New
Headers show
Series
  • KVM: s390: small prep patches for cpu model
Related show

Commit Message

Christian Borntraeger Feb. 21, 2019, 6:43 p.m. UTC
As userspace can now get/set the subfunctions we want to trace those.
This will allow to also check QEMUs cpu model vs. what the real
hardware provides.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
 arch/s390/kvm/kvm-s390.c | 136 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 136 insertions(+)

Comments

David Hildenbrand Feb. 21, 2019, 7:10 p.m. UTC | #1
On 21.02.19 19:43, Christian Borntraeger wrote:
> As userspace can now get/set the subfunctions we want to trace those.
> This will allow to also check QEMUs cpu model vs. what the real
> hardware provides.
> 
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  arch/s390/kvm/kvm-s390.c | 136 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 136 insertions(+)
> 
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 5058fe58ece77..ae41799e52313 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -1271,6 +1271,51 @@ static int kvm_s390_set_processor_subfunc(struct kvm *kvm,
>  	}
>  	mutex_unlock(&kvm->lock);
>  
> +	VM_EVENT(kvm, 3, "SET: guest PLO    subfunc 0x%16.16lx.%16.16lx.%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[1],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[2],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[3]);
> +	VM_EVENT(kvm, 3, "SET: guest PTFF   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ptff)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ptff)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KMAC   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmac)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmac)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KMC    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmc)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmc)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KM     subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.km)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.km)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KIMD   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kimd)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kimd)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KLMD   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.klmd)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.klmd)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest PCKMO  subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pckmo)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pckmo)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KMCTR  subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmctr)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmctr)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KMF    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmf)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmf)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KMO    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmo)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmo)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest PCC    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pcc)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pcc)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest PPNO   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ppno)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ppno)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KMA    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kma)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kma)[1]);
> +
>  	return 0;
>  }
>  
> @@ -1394,6 +1439,51 @@ static int kvm_s390_get_processor_subfunc(struct kvm *kvm,
>  	    sizeof(struct kvm_s390_vm_cpu_subfunc)))
>  		return -EFAULT;
>  
> +	VM_EVENT(kvm, 3, "GET: guest PLO    subfunc 0x%16.16lx.%16.16lx.%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[1],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[2],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[3]);
> +	VM_EVENT(kvm, 3, "GET: guest PTFF   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ptff)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ptff)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KMAC   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmac)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmac)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KMC    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmc)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmc)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KM     subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.km)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.km)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KIMD   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kimd)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kimd)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KLMD   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.klmd)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.klmd)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest PCKMO  subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pckmo)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pckmo)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KMCTR  subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmctr)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmctr)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KMF    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmf)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmf)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KMO    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmo)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmo)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest PCC    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pcc)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pcc)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest PPNO   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ppno)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ppno)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KMA    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kma)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kma)[1]);
> +
>  	return 0;
>  }
>  
> @@ -1403,6 +1493,52 @@ static int kvm_s390_get_machine_subfunc(struct kvm *kvm,
>  	if (copy_to_user((void __user *)attr->addr, &kvm_s390_available_subfunc,
>  	    sizeof(struct kvm_s390_vm_cpu_subfunc)))
>  		return -EFAULT;
> +
> +	VM_EVENT(kvm, 3, "GET: host  PLO    subfunc 0x%16.16lx.%16.16lx.%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.plo)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.plo)[1],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.plo)[2],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.plo)[3]);
> +	VM_EVENT(kvm, 3, "GET: host  PTFF   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.ptff)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.ptff)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KMAC   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmac)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmac)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KMC    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmc)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmc)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KM     subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.km)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.km)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KIMD   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kimd)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kimd)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KLMD   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.klmd)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.klmd)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  PCKMO  subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.pckmo)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.pckmo)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KMCTR  subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmctr)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmctr)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KMF    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmf)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmf)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KMO    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmo)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmo)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  PCC    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.pcc)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.pcc)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  PPNO   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.ppno)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.ppno)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KMA    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kma)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kma)[1]);
> +
>  	return 0;
>  }
>  
> 

Reviewed-by: David Hildenbrand <david@redhat.com>
Cornelia Huck Feb. 22, 2019, 9:30 a.m. UTC | #2
On Thu, 21 Feb 2019 19:43:04 +0100
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> As userspace can now get/set the subfunctions we want to trace those.
> This will allow to also check QEMUs cpu model vs. what the real
> hardware provides.
> 
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  arch/s390/kvm/kvm-s390.c | 136 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 136 insertions(+)

These look... extensive :)

Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Janosch Frank Feb. 22, 2019, 9:58 a.m. UTC | #3
On 21.02.19 19:43, Christian Borntraeger wrote:
> As userspace can now get/set the subfunctions we want to trace those.
> This will allow to also check QEMUs cpu model vs. what the real
> hardware provides.
> 
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>

Checks out with FIII list.
Maybe replace PPNO by PPNO/PRNO?

Reviewed-by: Janosch Frank <frankja@linux.vnet.ibm.com>


> ---
>  arch/s390/kvm/kvm-s390.c | 136 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 136 insertions(+)
> 
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 5058fe58ece77..ae41799e52313 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -1271,6 +1271,51 @@ static int kvm_s390_set_processor_subfunc(struct kvm *kvm,
>  	}
>  	mutex_unlock(&kvm->lock);
>  
> +	VM_EVENT(kvm, 3, "SET: guest PLO    subfunc 0x%16.16lx.%16.16lx.%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[1],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[2],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[3]);
> +	VM_EVENT(kvm, 3, "SET: guest PTFF   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ptff)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ptff)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KMAC   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmac)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmac)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KMC    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmc)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmc)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KM     subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.km)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.km)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KIMD   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kimd)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kimd)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KLMD   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.klmd)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.klmd)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest PCKMO  subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pckmo)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pckmo)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KMCTR  subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmctr)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmctr)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KMF    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmf)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmf)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KMO    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmo)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmo)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest PCC    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pcc)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pcc)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest PPNO   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ppno)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ppno)[1]);
> +	VM_EVENT(kvm, 3, "SET: guest KMA    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kma)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kma)[1]);
> +
>  	return 0;
>  }
>  
> @@ -1394,6 +1439,51 @@ static int kvm_s390_get_processor_subfunc(struct kvm *kvm,
>  	    sizeof(struct kvm_s390_vm_cpu_subfunc)))
>  		return -EFAULT;
>  
> +	VM_EVENT(kvm, 3, "GET: guest PLO    subfunc 0x%16.16lx.%16.16lx.%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[1],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[2],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[3]);
> +	VM_EVENT(kvm, 3, "GET: guest PTFF   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ptff)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ptff)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KMAC   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmac)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmac)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KMC    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmc)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmc)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KM     subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.km)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.km)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KIMD   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kimd)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kimd)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KLMD   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.klmd)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.klmd)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest PCKMO  subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pckmo)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pckmo)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KMCTR  subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmctr)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmctr)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KMF    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmf)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmf)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KMO    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmo)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kmo)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest PCC    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pcc)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.pcc)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest PPNO   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ppno)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.ppno)[1]);
> +	VM_EVENT(kvm, 3, "GET: guest KMA    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kma)[0],
> +		 ((unsigned long *) &kvm->arch.model.subfuncs.kma)[1]);
> +
>  	return 0;
>  }
>  
> @@ -1403,6 +1493,52 @@ static int kvm_s390_get_machine_subfunc(struct kvm *kvm,
>  	if (copy_to_user((void __user *)attr->addr, &kvm_s390_available_subfunc,
>  	    sizeof(struct kvm_s390_vm_cpu_subfunc)))
>  		return -EFAULT;
> +
> +	VM_EVENT(kvm, 3, "GET: host  PLO    subfunc 0x%16.16lx.%16.16lx.%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.plo)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.plo)[1],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.plo)[2],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.plo)[3]);
> +	VM_EVENT(kvm, 3, "GET: host  PTFF   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.ptff)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.ptff)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KMAC   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmac)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmac)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KMC    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmc)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmc)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KM     subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.km)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.km)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KIMD   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kimd)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kimd)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KLMD   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.klmd)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.klmd)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  PCKMO  subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.pckmo)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.pckmo)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KMCTR  subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmctr)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmctr)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KMF    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmf)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmf)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KMO    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmo)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kmo)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  PCC    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.pcc)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.pcc)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  PPNO   subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.ppno)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.ppno)[1]);
> +	VM_EVENT(kvm, 3, "GET: host  KMA    subfunc 0x%16.16lx.%16.16lx",
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kma)[0],
> +		 ((unsigned long *) &kvm_s390_available_subfunc.kma)[1]);
> +
>  	return 0;
>  }
>  
>

Patch
diff mbox series

diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 5058fe58ece77..ae41799e52313 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -1271,6 +1271,51 @@  static int kvm_s390_set_processor_subfunc(struct kvm *kvm,
 	}
 	mutex_unlock(&kvm->lock);
 
+	VM_EVENT(kvm, 3, "SET: guest PLO    subfunc 0x%16.16lx.%16.16lx.%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[1],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[2],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[3]);
+	VM_EVENT(kvm, 3, "SET: guest PTFF   subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.ptff)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.ptff)[1]);
+	VM_EVENT(kvm, 3, "SET: guest KMAC   subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmac)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmac)[1]);
+	VM_EVENT(kvm, 3, "SET: guest KMC    subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmc)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmc)[1]);
+	VM_EVENT(kvm, 3, "SET: guest KM     subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.km)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.km)[1]);
+	VM_EVENT(kvm, 3, "SET: guest KIMD   subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kimd)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kimd)[1]);
+	VM_EVENT(kvm, 3, "SET: guest KLMD   subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.klmd)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.klmd)[1]);
+	VM_EVENT(kvm, 3, "SET: guest PCKMO  subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.pckmo)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.pckmo)[1]);
+	VM_EVENT(kvm, 3, "SET: guest KMCTR  subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmctr)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmctr)[1]);
+	VM_EVENT(kvm, 3, "SET: guest KMF    subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmf)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmf)[1]);
+	VM_EVENT(kvm, 3, "SET: guest KMO    subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmo)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmo)[1]);
+	VM_EVENT(kvm, 3, "SET: guest PCC    subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.pcc)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.pcc)[1]);
+	VM_EVENT(kvm, 3, "SET: guest PPNO   subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.ppno)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.ppno)[1]);
+	VM_EVENT(kvm, 3, "SET: guest KMA    subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kma)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kma)[1]);
+
 	return 0;
 }
 
@@ -1394,6 +1439,51 @@  static int kvm_s390_get_processor_subfunc(struct kvm *kvm,
 	    sizeof(struct kvm_s390_vm_cpu_subfunc)))
 		return -EFAULT;
 
+	VM_EVENT(kvm, 3, "GET: guest PLO    subfunc 0x%16.16lx.%16.16lx.%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[1],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[2],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.plo)[3]);
+	VM_EVENT(kvm, 3, "GET: guest PTFF   subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.ptff)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.ptff)[1]);
+	VM_EVENT(kvm, 3, "GET: guest KMAC   subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmac)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmac)[1]);
+	VM_EVENT(kvm, 3, "GET: guest KMC    subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmc)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmc)[1]);
+	VM_EVENT(kvm, 3, "GET: guest KM     subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.km)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.km)[1]);
+	VM_EVENT(kvm, 3, "GET: guest KIMD   subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kimd)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kimd)[1]);
+	VM_EVENT(kvm, 3, "GET: guest KLMD   subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.klmd)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.klmd)[1]);
+	VM_EVENT(kvm, 3, "GET: guest PCKMO  subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.pckmo)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.pckmo)[1]);
+	VM_EVENT(kvm, 3, "GET: guest KMCTR  subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmctr)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmctr)[1]);
+	VM_EVENT(kvm, 3, "GET: guest KMF    subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmf)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmf)[1]);
+	VM_EVENT(kvm, 3, "GET: guest KMO    subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmo)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kmo)[1]);
+	VM_EVENT(kvm, 3, "GET: guest PCC    subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.pcc)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.pcc)[1]);
+	VM_EVENT(kvm, 3, "GET: guest PPNO   subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.ppno)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.ppno)[1]);
+	VM_EVENT(kvm, 3, "GET: guest KMA    subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kma)[0],
+		 ((unsigned long *) &kvm->arch.model.subfuncs.kma)[1]);
+
 	return 0;
 }
 
@@ -1403,6 +1493,52 @@  static int kvm_s390_get_machine_subfunc(struct kvm *kvm,
 	if (copy_to_user((void __user *)attr->addr, &kvm_s390_available_subfunc,
 	    sizeof(struct kvm_s390_vm_cpu_subfunc)))
 		return -EFAULT;
+
+	VM_EVENT(kvm, 3, "GET: host  PLO    subfunc 0x%16.16lx.%16.16lx.%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm_s390_available_subfunc.plo)[0],
+		 ((unsigned long *) &kvm_s390_available_subfunc.plo)[1],
+		 ((unsigned long *) &kvm_s390_available_subfunc.plo)[2],
+		 ((unsigned long *) &kvm_s390_available_subfunc.plo)[3]);
+	VM_EVENT(kvm, 3, "GET: host  PTFF   subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm_s390_available_subfunc.ptff)[0],
+		 ((unsigned long *) &kvm_s390_available_subfunc.ptff)[1]);
+	VM_EVENT(kvm, 3, "GET: host  KMAC   subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm_s390_available_subfunc.kmac)[0],
+		 ((unsigned long *) &kvm_s390_available_subfunc.kmac)[1]);
+	VM_EVENT(kvm, 3, "GET: host  KMC    subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm_s390_available_subfunc.kmc)[0],
+		 ((unsigned long *) &kvm_s390_available_subfunc.kmc)[1]);
+	VM_EVENT(kvm, 3, "GET: host  KM     subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm_s390_available_subfunc.km)[0],
+		 ((unsigned long *) &kvm_s390_available_subfunc.km)[1]);
+	VM_EVENT(kvm, 3, "GET: host  KIMD   subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm_s390_available_subfunc.kimd)[0],
+		 ((unsigned long *) &kvm_s390_available_subfunc.kimd)[1]);
+	VM_EVENT(kvm, 3, "GET: host  KLMD   subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm_s390_available_subfunc.klmd)[0],
+		 ((unsigned long *) &kvm_s390_available_subfunc.klmd)[1]);
+	VM_EVENT(kvm, 3, "GET: host  PCKMO  subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm_s390_available_subfunc.pckmo)[0],
+		 ((unsigned long *) &kvm_s390_available_subfunc.pckmo)[1]);
+	VM_EVENT(kvm, 3, "GET: host  KMCTR  subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm_s390_available_subfunc.kmctr)[0],
+		 ((unsigned long *) &kvm_s390_available_subfunc.kmctr)[1]);
+	VM_EVENT(kvm, 3, "GET: host  KMF    subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm_s390_available_subfunc.kmf)[0],
+		 ((unsigned long *) &kvm_s390_available_subfunc.kmf)[1]);
+	VM_EVENT(kvm, 3, "GET: host  KMO    subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm_s390_available_subfunc.kmo)[0],
+		 ((unsigned long *) &kvm_s390_available_subfunc.kmo)[1]);
+	VM_EVENT(kvm, 3, "GET: host  PCC    subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm_s390_available_subfunc.pcc)[0],
+		 ((unsigned long *) &kvm_s390_available_subfunc.pcc)[1]);
+	VM_EVENT(kvm, 3, "GET: host  PPNO   subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm_s390_available_subfunc.ppno)[0],
+		 ((unsigned long *) &kvm_s390_available_subfunc.ppno)[1]);
+	VM_EVENT(kvm, 3, "GET: host  KMA    subfunc 0x%16.16lx.%16.16lx",
+		 ((unsigned long *) &kvm_s390_available_subfunc.kma)[0],
+		 ((unsigned long *) &kvm_s390_available_subfunc.kma)[1]);
+
 	return 0;
 }