linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] s390/kvm: VSIE: fix prefixing and MSO for MVPG
@ 2021-03-19 19:33 Claudio Imbrenda
  2021-03-19 19:33 ` [PATCH v1 1/2] s390/kvm: split kvm_s390_real_to_abs Claudio Imbrenda
  2021-03-19 19:33 ` [PATCH v1 2/2] s390/kvm: VSIE: fix MVPG handling for prefixing and MSO Claudio Imbrenda
  0 siblings, 2 replies; 10+ messages in thread
From: Claudio Imbrenda @ 2021-03-19 19:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: borntraeger, frankja, david, cohuck, kvm, linux-s390

The guest real address needs to pass through prefixing in order to yield
the absolute address.

The absolute address needs to be offset by the MSO in order to get the
host virtual address.

Claudio Imbrenda (2):
  s390/kvm: split kvm_s390_real_to_abs
  s390/kvm: VSIE: fix MVPG handling for prefixing and MSO

 arch/s390/kvm/gaccess.h | 23 +++++++++++++++++------
 arch/s390/kvm/vsie.c    | 10 +++++++---
 2 files changed, 24 insertions(+), 9 deletions(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v1 1/2] s390/kvm: split kvm_s390_real_to_abs
  2021-03-19 19:33 [PATCH v1 0/2] s390/kvm: VSIE: fix prefixing and MSO for MVPG Claudio Imbrenda
@ 2021-03-19 19:33 ` Claudio Imbrenda
  2021-03-20  4:57   ` Thomas Huth
  2021-03-19 19:33 ` [PATCH v1 2/2] s390/kvm: VSIE: fix MVPG handling for prefixing and MSO Claudio Imbrenda
  1 sibling, 1 reply; 10+ messages in thread
From: Claudio Imbrenda @ 2021-03-19 19:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: borntraeger, frankja, david, cohuck, kvm, linux-s390, stable

A new function _kvm_s390_real_to_abs will apply prefixing to a real address
with a given prefix value.

The old kvm_s390_real_to_abs becomes now a wrapper around the new function.

This is needed to avoid code duplication in vSIE.

Cc: stable@vger.kernel.org
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
---
 arch/s390/kvm/gaccess.h | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/arch/s390/kvm/gaccess.h b/arch/s390/kvm/gaccess.h
index daba10f76936..7c72a5e3449f 100644
--- a/arch/s390/kvm/gaccess.h
+++ b/arch/s390/kvm/gaccess.h
@@ -18,17 +18,14 @@
 
 /**
  * kvm_s390_real_to_abs - convert guest real address to guest absolute address
- * @vcpu - guest virtual cpu
+ * @prefix - guest prefix
  * @gra - guest real address
  *
  * Returns the guest absolute address that corresponds to the passed guest real
- * address @gra of a virtual guest cpu by applying its prefix.
+ * address @gra of by applying the given prefix.
  */
-static inline unsigned long kvm_s390_real_to_abs(struct kvm_vcpu *vcpu,
-						 unsigned long gra)
+static inline unsigned long _kvm_s390_real_to_abs(u32 prefix, unsigned long gra)
 {
-	unsigned long prefix  = kvm_s390_get_prefix(vcpu);
-
 	if (gra < 2 * PAGE_SIZE)
 		gra += prefix;
 	else if (gra >= prefix && gra < prefix + 2 * PAGE_SIZE)
@@ -36,6 +33,20 @@ static inline unsigned long kvm_s390_real_to_abs(struct kvm_vcpu *vcpu,
 	return gra;
 }
 
+/**
+ * kvm_s390_real_to_abs - convert guest real address to guest absolute address
+ * @vcpu - guest virtual cpu
+ * @gra - guest real address
+ *
+ * Returns the guest absolute address that corresponds to the passed guest real
+ * address @gra of a virtual guest cpu by applying its prefix.
+ */
+static inline unsigned long kvm_s390_real_to_abs(struct kvm_vcpu *vcpu,
+						 unsigned long gra)
+{
+	return _kvm_s390_real_to_abs(kvm_s390_get_prefix(vcpu), gra);
+}
+
 /**
  * _kvm_s390_logical_to_effective - convert guest logical to effective address
  * @psw: psw of the guest
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v1 2/2] s390/kvm: VSIE: fix MVPG handling for prefixing and MSO
  2021-03-19 19:33 [PATCH v1 0/2] s390/kvm: VSIE: fix prefixing and MSO for MVPG Claudio Imbrenda
  2021-03-19 19:33 ` [PATCH v1 1/2] s390/kvm: split kvm_s390_real_to_abs Claudio Imbrenda
@ 2021-03-19 19:33 ` Claudio Imbrenda
  2021-03-22  9:55   ` David Hildenbrand
  1 sibling, 1 reply; 10+ messages in thread
From: Claudio Imbrenda @ 2021-03-19 19:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: borntraeger, frankja, david, cohuck, kvm, linux-s390, stable

Prefixing needs to be applied to the guest real address to translate it
into a guest absolute address.

The value of MSO needs to be added to a guest-absolute address in order to
obtain the host-virtual.

Fixes: 223ea46de9e79 ("s390/kvm: VSIE: correctly handle MVPG when in VSIE")
Cc: stable@vger.kernel.org
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
---
 arch/s390/kvm/vsie.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
index 48aab6290a77..92864f9b3d84 100644
--- a/arch/s390/kvm/vsie.c
+++ b/arch/s390/kvm/vsie.c
@@ -1002,7 +1002,7 @@ static u64 vsie_get_register(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page,
 static int vsie_handle_mvpg(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
 {
 	struct kvm_s390_sie_block *scb_s = &vsie_page->scb_s;
-	unsigned long pei_dest, pei_src, src, dest, mask;
+	unsigned long pei_dest, pei_src, r1, r2, src, dest, mask, mso, prefix;
 	u64 *pei_block = &vsie_page->scb_o->mcic;
 	int edat, rc_dest, rc_src;
 	union ctlreg0 cr0;
@@ -1010,9 +1010,13 @@ static int vsie_handle_mvpg(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
 	cr0.val = vcpu->arch.sie_block->gcr[0];
 	edat = cr0.edat && test_kvm_facility(vcpu->kvm, 8);
 	mask = _kvm_s390_logical_to_effective(&scb_s->gpsw, PAGE_MASK);
+	mso = READ_ONCE(vsie_page->scb_o->mso) & ~(1UL << 20);
+	prefix = scb_s->prefix << GUEST_PREFIX_SHIFT;
 
-	dest = vsie_get_register(vcpu, vsie_page, scb_s->ipb >> 16) & mask;
-	src = vsie_get_register(vcpu, vsie_page, scb_s->ipb >> 20) & mask;
+	r1 = vsie_get_register(vcpu, vsie_page, scb_s->ipb >> 16);
+	r2 = vsie_get_register(vcpu, vsie_page, scb_s->ipb >> 20);
+	dest = _kvm_s390_real_to_abs(prefix, r1 & mask) + mso;
+	src = _kvm_s390_real_to_abs(prefix, r2 & mask) + mso;
 
 	rc_dest = kvm_s390_shadow_fault(vcpu, vsie_page->gmap, dest, &pei_dest);
 	rc_src = kvm_s390_shadow_fault(vcpu, vsie_page->gmap, src, &pei_src);
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/2] s390/kvm: split kvm_s390_real_to_abs
  2021-03-19 19:33 ` [PATCH v1 1/2] s390/kvm: split kvm_s390_real_to_abs Claudio Imbrenda
@ 2021-03-20  4:57   ` Thomas Huth
  2021-03-22  9:53     ` David Hildenbrand
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Huth @ 2021-03-20  4:57 UTC (permalink / raw)
  To: Claudio Imbrenda, linux-kernel
  Cc: borntraeger, frankja, david, cohuck, kvm, linux-s390, stable

On 19/03/2021 20.33, Claudio Imbrenda wrote:
> A new function _kvm_s390_real_to_abs will apply prefixing to a real address
> with a given prefix value.
> 
> The old kvm_s390_real_to_abs becomes now a wrapper around the new function.
> 
> This is needed to avoid code duplication in vSIE.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> ---
>   arch/s390/kvm/gaccess.h | 23 +++++++++++++++++------
>   1 file changed, 17 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/s390/kvm/gaccess.h b/arch/s390/kvm/gaccess.h
> index daba10f76936..7c72a5e3449f 100644
> --- a/arch/s390/kvm/gaccess.h
> +++ b/arch/s390/kvm/gaccess.h
> @@ -18,17 +18,14 @@
>   
>   /**
>    * kvm_s390_real_to_abs - convert guest real address to guest absolute address
> - * @vcpu - guest virtual cpu
> + * @prefix - guest prefix
>    * @gra - guest real address
>    *
>    * Returns the guest absolute address that corresponds to the passed guest real
> - * address @gra of a virtual guest cpu by applying its prefix.
> + * address @gra of by applying the given prefix.
>    */
> -static inline unsigned long kvm_s390_real_to_abs(struct kvm_vcpu *vcpu,
> -						 unsigned long gra)
> +static inline unsigned long _kvm_s390_real_to_abs(u32 prefix, unsigned long gra)

<bikeshedding>
Just a matter of taste, but maybe this could be named differently? 
kvm_s390_real2abs_prefix() ? kvm_s390_prefix_real_to_abs()?
</bikeshedding>

Anyway:
Reviewed-by: Thomas Huth <thuth@redhat.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/2] s390/kvm: split kvm_s390_real_to_abs
  2021-03-20  4:57   ` Thomas Huth
@ 2021-03-22  9:53     ` David Hildenbrand
  2021-03-22 11:12       ` Heiko Carstens
  0 siblings, 1 reply; 10+ messages in thread
From: David Hildenbrand @ 2021-03-22  9:53 UTC (permalink / raw)
  To: Thomas Huth, Claudio Imbrenda, linux-kernel
  Cc: borntraeger, frankja, cohuck, kvm, linux-s390, stable

On 20.03.21 05:57, Thomas Huth wrote:
> On 19/03/2021 20.33, Claudio Imbrenda wrote:
>> A new function _kvm_s390_real_to_abs will apply prefixing to a real address
>> with a given prefix value.
>>
>> The old kvm_s390_real_to_abs becomes now a wrapper around the new function.
>>
>> This is needed to avoid code duplication in vSIE.
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
>> ---
>>    arch/s390/kvm/gaccess.h | 23 +++++++++++++++++------
>>    1 file changed, 17 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/s390/kvm/gaccess.h b/arch/s390/kvm/gaccess.h
>> index daba10f76936..7c72a5e3449f 100644
>> --- a/arch/s390/kvm/gaccess.h
>> +++ b/arch/s390/kvm/gaccess.h
>> @@ -18,17 +18,14 @@
>>    
>>    /**
>>     * kvm_s390_real_to_abs - convert guest real address to guest absolute address
>> - * @vcpu - guest virtual cpu
>> + * @prefix - guest prefix
>>     * @gra - guest real address
>>     *
>>     * Returns the guest absolute address that corresponds to the passed guest real
>> - * address @gra of a virtual guest cpu by applying its prefix.
>> + * address @gra of by applying the given prefix.
>>     */
>> -static inline unsigned long kvm_s390_real_to_abs(struct kvm_vcpu *vcpu,
>> -						 unsigned long gra)
>> +static inline unsigned long _kvm_s390_real_to_abs(u32 prefix, unsigned long gra)
> 
> <bikeshedding>
> Just a matter of taste, but maybe this could be named differently?
> kvm_s390_real2abs_prefix() ? kvm_s390_prefix_real_to_abs()?
> </bikeshedding>

+1, I also dislike these "_.*" style functions here.

Reviewed-by: David Hildenbrand <david@redhat.com>

> 
> Anyway:
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> 


-- 
Thanks,

David / dhildenb


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 2/2] s390/kvm: VSIE: fix MVPG handling for prefixing and MSO
  2021-03-19 19:33 ` [PATCH v1 2/2] s390/kvm: VSIE: fix MVPG handling for prefixing and MSO Claudio Imbrenda
@ 2021-03-22  9:55   ` David Hildenbrand
  0 siblings, 0 replies; 10+ messages in thread
From: David Hildenbrand @ 2021-03-22  9:55 UTC (permalink / raw)
  To: Claudio Imbrenda, linux-kernel
  Cc: borntraeger, frankja, cohuck, kvm, linux-s390, stable

On 19.03.21 20:33, Claudio Imbrenda wrote:
> Prefixing needs to be applied to the guest real address to translate it
> into a guest absolute address.
> 
> The value of MSO needs to be added to a guest-absolute address in order to
> obtain the host-virtual.
> 
> Fixes: 223ea46de9e79 ("s390/kvm: VSIE: correctly handle MVPG when in VSIE")
> Cc: stable@vger.kernel.org
> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> ---
>   arch/s390/kvm/vsie.c | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
> index 48aab6290a77..92864f9b3d84 100644
> --- a/arch/s390/kvm/vsie.c
> +++ b/arch/s390/kvm/vsie.c
> @@ -1002,7 +1002,7 @@ static u64 vsie_get_register(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page,
>   static int vsie_handle_mvpg(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
>   {
>   	struct kvm_s390_sie_block *scb_s = &vsie_page->scb_s;
> -	unsigned long pei_dest, pei_src, src, dest, mask;
> +	unsigned long pei_dest, pei_src, r1, r2, src, dest, mask, mso, prefix;
>   	u64 *pei_block = &vsie_page->scb_o->mcic;
>   	int edat, rc_dest, rc_src;
>   	union ctlreg0 cr0;
> @@ -1010,9 +1010,13 @@ static int vsie_handle_mvpg(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
>   	cr0.val = vcpu->arch.sie_block->gcr[0];
>   	edat = cr0.edat && test_kvm_facility(vcpu->kvm, 8);
>   	mask = _kvm_s390_logical_to_effective(&scb_s->gpsw, PAGE_MASK);
> +	mso = READ_ONCE(vsie_page->scb_o->mso) & ~(1UL << 20);

I think we should use the one stored in the shadow page - this is what 
the SIE saw and will see when retrying.

> +	prefix = scb_s->prefix << GUEST_PREFIX_SHIFT;
>   
> -	dest = vsie_get_register(vcpu, vsie_page, scb_s->ipb >> 16) & mask;
> -	src = vsie_get_register(vcpu, vsie_page, scb_s->ipb >> 20) & mask;
> +	r1 = vsie_get_register(vcpu, vsie_page, scb_s->ipb >> 16);
> +	r2 = vsie_get_register(vcpu, vsie_page, scb_s->ipb >> 20);

Just reuse dest and src here?

> +	dest = _kvm_s390_real_to_abs(prefix, r1 & mask) + mso;
> +	src = _kvm_s390_real_to_abs(prefix, r2 & mask) + mso;
>   
>   	rc_dest = kvm_s390_shadow_fault(vcpu, vsie_page->gmap, dest, &pei_dest);
>   	rc_src = kvm_s390_shadow_fault(vcpu, vsie_page->gmap, src, &pei_src);
> 

Apart from that, looks good to me.

-- 
Thanks,

David / dhildenb


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/2] s390/kvm: split kvm_s390_real_to_abs
  2021-03-22  9:53     ` David Hildenbrand
@ 2021-03-22 11:12       ` Heiko Carstens
  2021-03-22 11:16         ` David Hildenbrand
  2021-03-22 12:19         ` Christian Borntraeger
  0 siblings, 2 replies; 10+ messages in thread
From: Heiko Carstens @ 2021-03-22 11:12 UTC (permalink / raw)
  To: David Hildenbrand
  Cc: Thomas Huth, Claudio Imbrenda, linux-kernel, borntraeger,
	frankja, cohuck, kvm, linux-s390, stable

On Mon, Mar 22, 2021 at 10:53:46AM +0100, David Hildenbrand wrote:
> > > diff --git a/arch/s390/kvm/gaccess.h b/arch/s390/kvm/gaccess.h
> > > index daba10f76936..7c72a5e3449f 100644
> > > --- a/arch/s390/kvm/gaccess.h
> > > +++ b/arch/s390/kvm/gaccess.h
> > > @@ -18,17 +18,14 @@
> > >    /**
> > >     * kvm_s390_real_to_abs - convert guest real address to guest absolute address
> > > - * @vcpu - guest virtual cpu
> > > + * @prefix - guest prefix
> > >     * @gra - guest real address
> > >     *
> > >     * Returns the guest absolute address that corresponds to the passed guest real
> > > - * address @gra of a virtual guest cpu by applying its prefix.
> > > + * address @gra of by applying the given prefix.
> > >     */
> > > -static inline unsigned long kvm_s390_real_to_abs(struct kvm_vcpu *vcpu,
> > > -						 unsigned long gra)
> > > +static inline unsigned long _kvm_s390_real_to_abs(u32 prefix, unsigned long gra)
> > 
> > <bikeshedding>
> > Just a matter of taste, but maybe this could be named differently?
> > kvm_s390_real2abs_prefix() ? kvm_s390_prefix_real_to_abs()?
> > </bikeshedding>
> 
> +1, I also dislike these "_.*" style functions here.

Yes, let's bikeshed then :)

Could you then please try to rename page_to* and everything that looks
similar to page2* please? I'm wondering what the response will be..

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/2] s390/kvm: split kvm_s390_real_to_abs
  2021-03-22 11:12       ` Heiko Carstens
@ 2021-03-22 11:16         ` David Hildenbrand
  2021-03-22 11:22           ` David Hildenbrand
  2021-03-22 12:19         ` Christian Borntraeger
  1 sibling, 1 reply; 10+ messages in thread
From: David Hildenbrand @ 2021-03-22 11:16 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Thomas Huth, Claudio Imbrenda, linux-kernel, borntraeger,
	frankja, cohuck, kvm, linux-s390, stable

On 22.03.21 12:12, Heiko Carstens wrote:
> On Mon, Mar 22, 2021 at 10:53:46AM +0100, David Hildenbrand wrote:
>>>> diff --git a/arch/s390/kvm/gaccess.h b/arch/s390/kvm/gaccess.h
>>>> index daba10f76936..7c72a5e3449f 100644
>>>> --- a/arch/s390/kvm/gaccess.h
>>>> +++ b/arch/s390/kvm/gaccess.h
>>>> @@ -18,17 +18,14 @@
>>>>     /**
>>>>      * kvm_s390_real_to_abs - convert guest real address to guest absolute address
>>>> - * @vcpu - guest virtual cpu
>>>> + * @prefix - guest prefix
>>>>      * @gra - guest real address
>>>>      *
>>>>      * Returns the guest absolute address that corresponds to the passed guest real
>>>> - * address @gra of a virtual guest cpu by applying its prefix.
>>>> + * address @gra of by applying the given prefix.
>>>>      */
>>>> -static inline unsigned long kvm_s390_real_to_abs(struct kvm_vcpu *vcpu,
>>>> -						 unsigned long gra)
>>>> +static inline unsigned long _kvm_s390_real_to_abs(u32 prefix, unsigned long gra)
>>>
>>> <bikeshedding>
>>> Just a matter of taste, but maybe this could be named differently?
>>> kvm_s390_real2abs_prefix() ? kvm_s390_prefix_real_to_abs()?
>>> </bikeshedding>
>>
>> +1, I also dislike these "_.*" style functions here.
> 
> Yes, let's bikeshed then :)
> 
> Could you then please try to rename page_to* and everything that looks
> similar to page2* please? I'm wondering what the response will be..

Oh, we're bikeshedding about anything now? Cool.

-- 
Thanks,

David / dhildenb


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/2] s390/kvm: split kvm_s390_real_to_abs
  2021-03-22 11:16         ` David Hildenbrand
@ 2021-03-22 11:22           ` David Hildenbrand
  0 siblings, 0 replies; 10+ messages in thread
From: David Hildenbrand @ 2021-03-22 11:22 UTC (permalink / raw)
  To: Heiko Carstens
  Cc: Thomas Huth, Claudio Imbrenda, linux-kernel, borntraeger,
	frankja, cohuck, kvm, linux-s390, stable

On 22.03.21 12:16, David Hildenbrand wrote:
> On 22.03.21 12:12, Heiko Carstens wrote:
>> On Mon, Mar 22, 2021 at 10:53:46AM +0100, David Hildenbrand wrote:
>>>>> diff --git a/arch/s390/kvm/gaccess.h b/arch/s390/kvm/gaccess.h
>>>>> index daba10f76936..7c72a5e3449f 100644
>>>>> --- a/arch/s390/kvm/gaccess.h
>>>>> +++ b/arch/s390/kvm/gaccess.h
>>>>> @@ -18,17 +18,14 @@
>>>>>      /**
>>>>>       * kvm_s390_real_to_abs - convert guest real address to guest absolute address
>>>>> - * @vcpu - guest virtual cpu
>>>>> + * @prefix - guest prefix
>>>>>       * @gra - guest real address
>>>>>       *
>>>>>       * Returns the guest absolute address that corresponds to the passed guest real
>>>>> - * address @gra of a virtual guest cpu by applying its prefix.
>>>>> + * address @gra of by applying the given prefix.
>>>>>       */
>>>>> -static inline unsigned long kvm_s390_real_to_abs(struct kvm_vcpu *vcpu,
>>>>> -						 unsigned long gra)
>>>>> +static inline unsigned long _kvm_s390_real_to_abs(u32 prefix, unsigned long gra)
>>>>
>>>> <bikeshedding>
>>>> Just a matter of taste, but maybe this could be named differently?
>>>> kvm_s390_real2abs_prefix() ? kvm_s390_prefix_real_to_abs()?
>>>> </bikeshedding>
>>>
>>> +1, I also dislike these "_.*" style functions here.
>>
>> Yes, let's bikeshed then :)
>>
>> Could you then please try to rename page_to* and everything that looks
>> similar to page2* please? I'm wondering what the response will be..
> 
> Oh, we're bikeshedding about anything now? Cool.

(I agree that real2abs is not such a good idea ;) )

-- 
Thanks,

David / dhildenb


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 1/2] s390/kvm: split kvm_s390_real_to_abs
  2021-03-22 11:12       ` Heiko Carstens
  2021-03-22 11:16         ` David Hildenbrand
@ 2021-03-22 12:19         ` Christian Borntraeger
  1 sibling, 0 replies; 10+ messages in thread
From: Christian Borntraeger @ 2021-03-22 12:19 UTC (permalink / raw)
  To: Heiko Carstens, David Hildenbrand
  Cc: Thomas Huth, Claudio Imbrenda, linux-kernel, frankja, cohuck,
	kvm, linux-s390, stable



On 22.03.21 12:12, Heiko Carstens wrote:
> On Mon, Mar 22, 2021 at 10:53:46AM +0100, David Hildenbrand wrote:
>>>> diff --git a/arch/s390/kvm/gaccess.h b/arch/s390/kvm/gaccess.h
>>>> index daba10f76936..7c72a5e3449f 100644
>>>> --- a/arch/s390/kvm/gaccess.h
>>>> +++ b/arch/s390/kvm/gaccess.h
>>>> @@ -18,17 +18,14 @@
>>>>     /**
>>>>      * kvm_s390_real_to_abs - convert guest real address to guest absolute address
>>>> - * @vcpu - guest virtual cpu
>>>> + * @prefix - guest prefix
>>>>      * @gra - guest real address
>>>>      *
>>>>      * Returns the guest absolute address that corresponds to the passed guest real
>>>> - * address @gra of a virtual guest cpu by applying its prefix.
>>>> + * address @gra of by applying the given prefix.
>>>>      */
>>>> -static inline unsigned long kvm_s390_real_to_abs(struct kvm_vcpu *vcpu,
>>>> -						 unsigned long gra)
>>>> +static inline unsigned long _kvm_s390_real_to_abs(u32 prefix, unsigned long gra)
>>>
>>> <bikeshedding>
>>> Just a matter of taste, but maybe this could be named differently?
>>> kvm_s390_real2abs_prefix() ? kvm_s390_prefix_real_to_abs()?
>>> </bikeshedding>
>>
>> +1, I also dislike these "_.*" style functions here.
> 
> Yes, let's bikeshed then :)
> 
> Could you then please try to rename page_to* and everything that looks
> similar to page2* please? I'm wondering what the response will be..

Given that this is stable material (due to patch 2), can we try to minimize
the bikeshedding to everything that his touched by this patch?


Claudio, can you respin the series addressing the comments?
I will then either add this to next or fold that into the existing next patches.
Not sure yet.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-03-22 12:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 19:33 [PATCH v1 0/2] s390/kvm: VSIE: fix prefixing and MSO for MVPG Claudio Imbrenda
2021-03-19 19:33 ` [PATCH v1 1/2] s390/kvm: split kvm_s390_real_to_abs Claudio Imbrenda
2021-03-20  4:57   ` Thomas Huth
2021-03-22  9:53     ` David Hildenbrand
2021-03-22 11:12       ` Heiko Carstens
2021-03-22 11:16         ` David Hildenbrand
2021-03-22 11:22           ` David Hildenbrand
2021-03-22 12:19         ` Christian Borntraeger
2021-03-19 19:33 ` [PATCH v1 2/2] s390/kvm: VSIE: fix MVPG handling for prefixing and MSO Claudio Imbrenda
2021-03-22  9:55   ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).