mbox series

[v1,0/2] KVM: s390: Tracing APCB changes

Message ID 1538728270-10340-1-git-send-email-pmorel@linux.ibm.com (mailing list archive)
Headers show
Series KVM: s390: Tracing APCB changes | expand

Message

Pierre Morel Oct. 5, 2018, 8:31 a.m. UTC
In the first patch we define kvm_arch_crypto_set_masks,
a new function to centralize the setup the APCB masks
inside the CRYCB SIE satelite and add KVM_EVENT() to
kvm_arch_crypto_set_masks and kvm_arch_crypto_clear_masks.

In the second patch we replace the vfio_ap_mdev_copy_masks()
by the new kvm_arch_crypto_set_masks() function.


Pierre Morel (2):
  KVM: s390: Tracing APCB changes
  s390: vfio-ap: setup APCB mask using KVM dedicated function

 arch/s390/include/asm/kvm_host.h  |  2 ++
 arch/s390/kvm/kvm-s390.c          | 41 +++++++++++++++++++++++++++++++++++++++
 drivers/s390/crypto/vfio_ap_ops.c | 33 +++----------------------------
 3 files changed, 46 insertions(+), 30 deletions(-)

Comments

Cornelia Huck Oct. 5, 2018, 8:44 a.m. UTC | #1
On Fri,  5 Oct 2018 10:31:08 +0200
Pierre Morel <pmorel@linux.ibm.com> wrote:

> In the first patch we define kvm_arch_crypto_set_masks,
> a new function to centralize the setup the APCB masks
> inside the CRYCB SIE satelite and add KVM_EVENT() to
> kvm_arch_crypto_set_masks and kvm_arch_crypto_clear_masks.
> 
> In the second patch we replace the vfio_ap_mdev_copy_masks()
> by the new kvm_arch_crypto_set_masks() function.
> 
> 
> Pierre Morel (2):
>   KVM: s390: Tracing APCB changes
>   s390: vfio-ap: setup APCB mask using KVM dedicated function
> 
>  arch/s390/include/asm/kvm_host.h  |  2 ++
>  arch/s390/kvm/kvm-s390.c          | 41 +++++++++++++++++++++++++++++++++++++++
>  drivers/s390/crypto/vfio_ap_ops.c | 33 +++----------------------------
>  3 files changed, 46 insertions(+), 30 deletions(-)
> 

I like this version better: it moves the mask-setting next to the
mask-clearing, and, as a bonus, adds a trace event for clearing as
well :)
David Hildenbrand Oct. 5, 2018, 8:56 a.m. UTC | #2
On 05/10/2018 10:44, Cornelia Huck wrote:
> On Fri,  5 Oct 2018 10:31:08 +0200
> Pierre Morel <pmorel@linux.ibm.com> wrote:
> 
>> In the first patch we define kvm_arch_crypto_set_masks,
>> a new function to centralize the setup the APCB masks
>> inside the CRYCB SIE satelite and add KVM_EVENT() to
>> kvm_arch_crypto_set_masks and kvm_arch_crypto_clear_masks.
>>
>> In the second patch we replace the vfio_ap_mdev_copy_masks()
>> by the new kvm_arch_crypto_set_masks() function.
>>
>>
>> Pierre Morel (2):
>>   KVM: s390: Tracing APCB changes
>>   s390: vfio-ap: setup APCB mask using KVM dedicated function
>>
>>  arch/s390/include/asm/kvm_host.h  |  2 ++
>>  arch/s390/kvm/kvm-s390.c          | 41 +++++++++++++++++++++++++++++++++++++++
>>  drivers/s390/crypto/vfio_ap_ops.c | 33 +++----------------------------
>>  3 files changed, 46 insertions(+), 30 deletions(-)
>>
> 
> I like this version better: it moves the mask-setting next to the
> mask-clearing, and, as a bonus, adds a trace event for clearing as
> well :)
> 

Yes, more code but looks cleaner to me.
Halil Pasic Oct. 5, 2018, 10:55 a.m. UTC | #3
On 10/05/2018 10:31 AM, Pierre Morel wrote:
> In the first patch we define kvm_arch_crypto_set_masks,
> a new function to centralize the setup the APCB masks
> inside the CRYCB SIE satelite and add KVM_EVENT() to
> kvm_arch_crypto_set_masks and kvm_arch_crypto_clear_masks.
> 
> In the second patch we replace the vfio_ap_mdev_copy_masks()
> by the new kvm_arch_crypto_set_masks() function.
> 

FWIW I also like this version better. And accommodating for on-the
fly changes seems to be showing in the right direction anyway.

I did not look into the details but it looks good to me.

Halil
Christian Borntraeger Oct. 5, 2018, 11:16 a.m. UTC | #4
Both applied.
(FWIW, this was based on an older version of the ap patch set, I had to fixup the 2 patch)

On 10/05/2018 10:31 AM, Pierre Morel wrote:
> In the first patch we define kvm_arch_crypto_set_masks,
> a new function to centralize the setup the APCB masks
> inside the CRYCB SIE satelite and add KVM_EVENT() to
> kvm_arch_crypto_set_masks and kvm_arch_crypto_clear_masks.
> 
> In the second patch we replace the vfio_ap_mdev_copy_masks()
> by the new kvm_arch_crypto_set_masks() function.
> 
> 
> Pierre Morel (2):
>   KVM: s390: Tracing APCB changes
>   s390: vfio-ap: setup APCB mask using KVM dedicated function
> 
>  arch/s390/include/asm/kvm_host.h  |  2 ++
>  arch/s390/kvm/kvm-s390.c          | 41 +++++++++++++++++++++++++++++++++++++++
>  drivers/s390/crypto/vfio_ap_ops.c | 33 +++----------------------------
>  3 files changed, 46 insertions(+), 30 deletions(-)
>