diff mbox series

[kvm-unit-tests,3/5] lib: s390x: sie: Set guest memory pointer

Message ID 20221123084656.19864-4-frankja@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390x: Snippet fixes | expand

Commit Message

Janosch Frank Nov. 23, 2022, 8:46 a.m. UTC
Seems like it was introduced but never set. It's nicer to have a
pointer than to cast the MSO of a VM.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
 lib/s390x/sie.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Nico Boehr Nov. 23, 2022, 11:01 a.m. UTC | #1
Quoting Janosch Frank (2022-11-23 09:46:54)
> Seems like it was introduced but never set. It's nicer to have a
> pointer than to cast the MSO of a VM.
> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>

Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
Claudio Imbrenda Nov. 23, 2022, 12:46 p.m. UTC | #2
On Wed, 23 Nov 2022 08:46:54 +0000
Janosch Frank <frankja@linux.ibm.com> wrote:

> Seems like it was introduced but never set. It's nicer to have a
> pointer than to cast the MSO of a VM.
> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>

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

> ---
>  lib/s390x/sie.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/s390x/sie.c b/lib/s390x/sie.c
> index a71985b6..9241b4b4 100644
> --- a/lib/s390x/sie.c
> +++ b/lib/s390x/sie.c
> @@ -93,6 +93,7 @@ void sie_guest_create(struct vm *vm, uint64_t guest_mem, uint64_t guest_mem_len)
>  
>  	/* Guest memory chunks are always 1MB */
>  	assert(!(guest_mem_len & ~HPAGE_MASK));
> +	vm->guest_mem = (uint8_t *)guest_mem;
>  	/* For non-PV guests we re-use the host's ASCE for ease of use */
>  	vm->save_area.guest.asce = stctg(1);
>  	/* Currently MSO/MSL is the easiest option */
diff mbox series

Patch

diff --git a/lib/s390x/sie.c b/lib/s390x/sie.c
index a71985b6..9241b4b4 100644
--- a/lib/s390x/sie.c
+++ b/lib/s390x/sie.c
@@ -93,6 +93,7 @@  void sie_guest_create(struct vm *vm, uint64_t guest_mem, uint64_t guest_mem_len)
 
 	/* Guest memory chunks are always 1MB */
 	assert(!(guest_mem_len & ~HPAGE_MASK));
+	vm->guest_mem = (uint8_t *)guest_mem;
 	/* For non-PV guests we re-use the host's ASCE for ease of use */
 	vm->save_area.guest.asce = stctg(1);
 	/* Currently MSO/MSL is the easiest option */