linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s390: uv: Add offset comments to UV query struct
@ 2021-12-07 16:05 Janosch Frank
  2021-12-08  8:10 ` Claudio Imbrenda
  0 siblings, 1 reply; 3+ messages in thread
From: Janosch Frank @ 2021-12-07 16:05 UTC (permalink / raw)
  To: kvm; +Cc: linux-s390, imbrenda, borntraeger

Changes to the struct are easier to manage with offset comments so
let's add some.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
 arch/s390/include/asm/uv.h | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/arch/s390/include/asm/uv.h b/arch/s390/include/asm/uv.h
index 72d3e49c2860..235bd5cc8289 100644
--- a/arch/s390/include/asm/uv.h
+++ b/arch/s390/include/asm/uv.h
@@ -91,23 +91,23 @@ struct uv_cb_header {
 
 /* Query Ultravisor Information */
 struct uv_cb_qui {
-	struct uv_cb_header header;
-	u64 reserved08;
-	u64 inst_calls_list[4];
-	u64 reserved30[2];
-	u64 uv_base_stor_len;
-	u64 reserved48;
-	u64 conf_base_phys_stor_len;
-	u64 conf_base_virt_stor_len;
-	u64 conf_virt_var_stor_len;
-	u64 cpu_stor_len;
-	u32 reserved70[3];
-	u32 max_num_sec_conf;
-	u64 max_guest_stor_addr;
-	u8  reserved88[158 - 136];
-	u16 max_guest_cpu_id;
-	u64 uv_feature_indications;
-	u8  reserveda0[200 - 168];
+	struct uv_cb_header header;		/* 0x0000 */
+	u64 reserved08;				/* 0x0008 */
+	u64 inst_calls_list[4];			/* 0x0010 */
+	u64 reserved30[2];			/* 0x0030 */
+	u64 uv_base_stor_len;			/* 0x0040 */
+	u64 reserved48;				/* 0x0048 */
+	u64 conf_base_phys_stor_len;		/* 0x0050 */
+	u64 conf_base_virt_stor_len;		/* 0x0058 */
+	u64 conf_virt_var_stor_len;		/* 0x0060 */
+	u64 cpu_stor_len;			/* 0x0068 */
+	u32 reserved70[3];			/* 0x0070 */
+	u32 max_num_sec_conf;			/* 0x007c */
+	u64 max_guest_stor_addr;		/* 0x0080 */
+	u8  reserved88[158 - 136];		/* 0x0088 */
+	u16 max_guest_cpu_id;			/* 0x009e */
+	u64 uv_feature_indications;		/* 0x00a0 */
+	u8  reserveda0[200 - 168];		/* 0x00a8 */
 } __packed __aligned(8);
 
 /* Initialize Ultravisor */
-- 
2.32.0


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

* Re: [PATCH] s390: uv: Add offset comments to UV query struct
  2021-12-07 16:05 [PATCH] s390: uv: Add offset comments to UV query struct Janosch Frank
@ 2021-12-08  8:10 ` Claudio Imbrenda
  2021-12-08 13:57   ` Janosch Frank
  0 siblings, 1 reply; 3+ messages in thread
From: Claudio Imbrenda @ 2021-12-08  8:10 UTC (permalink / raw)
  To: Janosch Frank; +Cc: kvm, linux-s390, borntraeger

On Tue,  7 Dec 2021 16:05:10 +0000
Janosch Frank <frankja@linux.ibm.com> wrote:

> Changes to the struct are easier to manage with offset comments so
> let's add some.
> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
>  arch/s390/include/asm/uv.h | 34 +++++++++++++++++-----------------
>  1 file changed, 17 insertions(+), 17 deletions(-)
> 
> diff --git a/arch/s390/include/asm/uv.h b/arch/s390/include/asm/uv.h
> index 72d3e49c2860..235bd5cc8289 100644
> --- a/arch/s390/include/asm/uv.h
> +++ b/arch/s390/include/asm/uv.h
> @@ -91,23 +91,23 @@ struct uv_cb_header {
>  
>  /* Query Ultravisor Information */
>  struct uv_cb_qui {
> -	struct uv_cb_header header;
> -	u64 reserved08;
> -	u64 inst_calls_list[4];
> -	u64 reserved30[2];
> -	u64 uv_base_stor_len;
> -	u64 reserved48;
> -	u64 conf_base_phys_stor_len;
> -	u64 conf_base_virt_stor_len;
> -	u64 conf_virt_var_stor_len;
> -	u64 cpu_stor_len;
> -	u32 reserved70[3];
> -	u32 max_num_sec_conf;
> -	u64 max_guest_stor_addr;
> -	u8  reserved88[158 - 136];
> -	u16 max_guest_cpu_id;
> -	u64 uv_feature_indications;
> -	u8  reserveda0[200 - 168];
> +	struct uv_cb_header header;		/* 0x0000 */
> +	u64 reserved08;				/* 0x0008 */
> +	u64 inst_calls_list[4];			/* 0x0010 */
> +	u64 reserved30[2];			/* 0x0030 */
> +	u64 uv_base_stor_len;			/* 0x0040 */
> +	u64 reserved48;				/* 0x0048 */
> +	u64 conf_base_phys_stor_len;		/* 0x0050 */
> +	u64 conf_base_virt_stor_len;		/* 0x0058 */
> +	u64 conf_virt_var_stor_len;		/* 0x0060 */
> +	u64 cpu_stor_len;			/* 0x0068 */
> +	u32 reserved70[3];			/* 0x0070 */
> +	u32 max_num_sec_conf;			/* 0x007c */
> +	u64 max_guest_stor_addr;		/* 0x0080 */
> +	u8  reserved88[158 - 136];		/* 0x0088 */
> +	u16 max_guest_cpu_id;			/* 0x009e */
> +	u64 uv_feature_indications;		/* 0x00a0 */
> +	u8  reserveda0[200 - 168];		/* 0x00a8 */

since you're changing stuff, maybe fix the name?
s/reserveda0/reserveda8/

with that fixed:

Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>

>  } __packed __aligned(8);
>  
>  /* Initialize Ultravisor */


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

* Re: [PATCH] s390: uv: Add offset comments to UV query struct
  2021-12-08  8:10 ` Claudio Imbrenda
@ 2021-12-08 13:57   ` Janosch Frank
  0 siblings, 0 replies; 3+ messages in thread
From: Janosch Frank @ 2021-12-08 13:57 UTC (permalink / raw)
  To: Claudio Imbrenda; +Cc: kvm, linux-s390, borntraeger

On 12/8/21 09:10, Claudio Imbrenda wrote:
> On Tue,  7 Dec 2021 16:05:10 +0000
> Janosch Frank <frankja@linux.ibm.com> wrote:
> 
>> Changes to the struct are easier to manage with offset comments so
>> let's add some.
>>
>> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
>> ---
>>   arch/s390/include/asm/uv.h | 34 +++++++++++++++++-----------------
>>   1 file changed, 17 insertions(+), 17 deletions(-)
>>
>> diff --git a/arch/s390/include/asm/uv.h b/arch/s390/include/asm/uv.h
>> index 72d3e49c2860..235bd5cc8289 100644
>> --- a/arch/s390/include/asm/uv.h
>> +++ b/arch/s390/include/asm/uv.h
>> @@ -91,23 +91,23 @@ struct uv_cb_header {
>>   
>>   /* Query Ultravisor Information */
>>   struct uv_cb_qui {
>> -	struct uv_cb_header header;
>> -	u64 reserved08;
>> -	u64 inst_calls_list[4];
>> -	u64 reserved30[2];
>> -	u64 uv_base_stor_len;
>> -	u64 reserved48;
>> -	u64 conf_base_phys_stor_len;
>> -	u64 conf_base_virt_stor_len;
>> -	u64 conf_virt_var_stor_len;
>> -	u64 cpu_stor_len;
>> -	u32 reserved70[3];
>> -	u32 max_num_sec_conf;
>> -	u64 max_guest_stor_addr;
>> -	u8  reserved88[158 - 136];
>> -	u16 max_guest_cpu_id;
>> -	u64 uv_feature_indications;
>> -	u8  reserveda0[200 - 168];
>> +	struct uv_cb_header header;		/* 0x0000 */
>> +	u64 reserved08;				/* 0x0008 */
>> +	u64 inst_calls_list[4];			/* 0x0010 */
>> +	u64 reserved30[2];			/* 0x0030 */
>> +	u64 uv_base_stor_len;			/* 0x0040 */
>> +	u64 reserved48;				/* 0x0048 */
>> +	u64 conf_base_phys_stor_len;		/* 0x0050 */
>> +	u64 conf_base_virt_stor_len;		/* 0x0058 */
>> +	u64 conf_virt_var_stor_len;		/* 0x0060 */
>> +	u64 cpu_stor_len;			/* 0x0068 */
>> +	u32 reserved70[3];			/* 0x0070 */
>> +	u32 max_num_sec_conf;			/* 0x007c */
>> +	u64 max_guest_stor_addr;		/* 0x0080 */
>> +	u8  reserved88[158 - 136];		/* 0x0088 */
>> +	u16 max_guest_cpu_id;			/* 0x009e */
>> +	u64 uv_feature_indications;		/* 0x00a0 */
>> +	u8  reserveda0[200 - 168];		/* 0x00a8 */
> 
> since you're changing stuff, maybe fix the name?
> s/reserveda0/reserveda8/

Good catch

> 
> with that fixed:
> 
> Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>

Thanks

> 
>>   } __packed __aligned(8);
>>   
>>   /* Initialize Ultravisor */
> 


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

end of thread, other threads:[~2021-12-08 13:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 16:05 [PATCH] s390: uv: Add offset comments to UV query struct Janosch Frank
2021-12-08  8:10 ` Claudio Imbrenda
2021-12-08 13:57   ` Janosch Frank

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).