Re: [PATCH 5/6] KVM: s390: vsie: Assert crycb alignment in vsie_page

Claudio Imbrenda <[email protected]>
Newsgroups org.kernel.vger.linux-s390,org.kernel.vger.kvm
Organization IBM
Message-ID <20260807132547.3a4b7160@p-imbrenda>
On Fri, 07 Aug 2026 11:57:46 +0200
Christoph Schlameuss <[email protected]> wrote:

> The crypto control block address is required to have double word
> alignment.

I would add:

"Add a static_assert to enforce correct alignment."

> 
> Signed-off-by: Christoph Schlameuss <[email protected]>
> ---
>  arch/s390/kvm/vsie.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
> index 7c3b5e11b301..c9392460edca 100644
> --- a/arch/s390/kvm/vsie.c
> +++ b/arch/s390/kvm/vsie.c
> @@ -69,6 +69,7 @@ struct vsie_page {
>  
>  static_assert(sizeof(struct vsie_page) == PAGE_SIZE);
>  static_assert(offsetof(struct vsie_page, mcck_info) == offsetof(struct sie_page, mcck_info));
> +static_assert(IS_ALIGNED(offsetof(struct vsie_page, crycb), 8));
>  
>  /* trigger a validity icpt for the given scb */
>  static int set_validity_icpt(struct kvm_s390_sie_block *scb,
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.