KVM Archive on lore.kernel.org
 help / color / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Janosch Frank <frankja@linux.ibm.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
	thuth@redhat.com, david@redhat.com, imbrenda@linux.ibm.com
Subject: Re: [kvm-unit-tests PATCH 2/6] s390x: Add more Ultravisor command structure definitions
Date: Wed, 21 Apr 2021 13:13:35 +0200
Message-ID: <20210421131335.31a2bf47.cohuck@redhat.com> (raw)
In-Reply-To: <20210316091654.1646-3-frankja@linux.ibm.com>

On Tue, 16 Mar 2021 09:16:50 +0000
Janosch Frank <frankja@linux.ibm.com> wrote:

> They are needed in the new UV tests.
> 
> As we now extend the size of the query struct, we need to set the
> length in the UV guest query test to a constant instead of using
> sizeof.
> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
>  lib/s390x/asm/uv.h | 148 ++++++++++++++++++++++++++++++++++++++++++++-
>  s390x/uv-guest.c   |   2 +-
>  2 files changed, 148 insertions(+), 2 deletions(-)
> 

(...)

>  struct uv_cb_qui {
>  	struct uv_cb_header header;
>  	u64 reserved08;
>  	u64 inst_calls_list[4];
> -	u64 reserved30[15];
> +	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_cpus;
> +	u8  reserveda0[200 - 160];
> +}  __attribute__((packed))  __attribute__((aligned(8)));

(...)

> diff --git a/s390x/uv-guest.c b/s390x/uv-guest.c
> index a13669ab..95a968c5 100644
> --- a/s390x/uv-guest.c
> +++ b/s390x/uv-guest.c
> @@ -59,7 +59,7 @@ static void test_query(void)
>  {
>  	struct uv_cb_qui uvcb = {
>  		.header.cmd = UVC_CMD_QUI,
> -		.header.len = sizeof(uvcb) - 8,
> +		.header.len = 0xa0,

This is a magic constant coming out of nowhere. Could you please at
least add a comment to make clear what you are testing?

>  	};
>  	int cc;
>  


  parent reply index

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16  9:16 [kvm-unit-tests PATCH 0/6] s390x: uv: Extend guest test and add host test Janosch Frank
2021-03-16  9:16 ` [kvm-unit-tests PATCH 1/6] s390x: uv-guest: Add invalid share location test Janosch Frank
2021-04-19 11:24   ` Thomas Huth
2021-04-19 11:45     ` Janosch Frank
2021-04-20  8:48       ` Thomas Huth
2021-04-20 13:40   ` Claudio Imbrenda
2021-04-21 11:04   ` Cornelia Huck
2021-03-16  9:16 ` [kvm-unit-tests PATCH 2/6] s390x: Add more Ultravisor command structure definitions Janosch Frank
2021-04-20 14:09   ` Claudio Imbrenda
2021-04-21 11:13   ` Cornelia Huck [this message]
2021-04-26 14:33     ` Janosch Frank
2021-03-16  9:16 ` [kvm-unit-tests PATCH 3/6] s390x: uv: Add UV lib Janosch Frank
2021-04-20 14:15   ` Claudio Imbrenda
2021-04-26 14:20     ` Janosch Frank
2021-03-16  9:16 ` [kvm-unit-tests PATCH 4/6] s390x: Test for share/unshare call support before using them Janosch Frank
2021-04-20 14:18   ` Claudio Imbrenda
2021-03-16  9:16 ` [kvm-unit-tests PATCH 5/6] s390x: uv-guest: Test invalid commands Janosch Frank
2021-04-20 14:26   ` Claudio Imbrenda
2021-04-26 13:40     ` Janosch Frank
2021-03-16  9:16 ` [kvm-unit-tests PATCH 6/6] s390x: Add UV host test Janosch Frank
2021-04-20 15:47   ` Claudio Imbrenda
2021-04-26 14:31     ` Janosch Frank
2021-04-19  7:24 ` [kvm-unit-tests PATCH 0/6] s390x: uv: Extend guest test and add " Janosch Frank

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210421131335.31a2bf47.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

KVM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kvm/0 kvm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kvm kvm/ https://lore.kernel.org/kvm \
		kvm@vger.kernel.org
	public-inbox-index kvm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.kvm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git