All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Nico Boehr <nrb@linux.ibm.com>, kvm@vger.kernel.org
Cc: frankja@linux.ibm.com, imbrenda@linux.ibm.com
Subject: Re: [kvm-unit-tests PATCH v2 1/2] s390x: add a library for CMM-related functions
Date: Fri, 25 Nov 2022 14:45:53 +0100	[thread overview]
Message-ID: <2cc74b33-1b29-c77f-960f-e1c3b35ae47f@redhat.com> (raw)
In-Reply-To: <20221124134429.612467-2-nrb@linux.ibm.com>

On 24/11/2022 14.44, Nico Boehr wrote:
> Upcoming changes will add a test which is very similar to the existing
> CMM migration test. To reduce code duplication, move the common function
> to a library which can be re-used by both tests.
> 
> Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
> ---
>   lib/s390x/cmm.c       | 90 +++++++++++++++++++++++++++++++++++++++++++
>   lib/s390x/cmm.h       | 31 +++++++++++++++
>   s390x/Makefile        |  1 +
>   s390x/migration-cmm.c | 34 ++++------------
>   4 files changed, 130 insertions(+), 26 deletions(-)
>   create mode 100644 lib/s390x/cmm.c
>   create mode 100644 lib/s390x/cmm.h
> 
> diff --git a/lib/s390x/cmm.c b/lib/s390x/cmm.c
> new file mode 100644
> index 000000000000..5da02fe628f9
> --- /dev/null
> +++ b/lib/s390x/cmm.c
> @@ -0,0 +1,90 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * CMM test library
> + *
> + * Copyright IBM Corp. 2022
> + *
> + * Authors:
> + *  Nico Boehr <nrb@linux.ibm.com>
> + */
> +#include <libcflat.h>
> +#include <bitops.h>
> +#include "cmm.h"
> +
> +/*
> + * Maps ESSA actions to states the page is allowed to be in after the
> + * respective action was executed.
> + */
> +const int allowed_essa_state_masks[4] = {

Could be declared as "static const int ...", I guess?

Apart from that nit:
Reviewed-by: Thomas Huth <thuth@redhat.com>


  reply	other threads:[~2022-11-25 13:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24 13:44 [kvm-unit-tests PATCH v2 0/2] s390x: test CMM during migration Nico Boehr
2022-11-24 13:44 ` [kvm-unit-tests PATCH v2 1/2] s390x: add a library for CMM-related functions Nico Boehr
2022-11-25 13:45   ` Thomas Huth [this message]
2022-11-28 11:44     ` Nico Boehr
2022-11-25 14:03   ` Claudio Imbrenda
2022-11-28 12:12     ` Nico Boehr
2022-11-24 13:44 ` [kvm-unit-tests PATCH v2 2/2] s390x: add CMM test during migration Nico Boehr
2022-11-25 13:58   ` Thomas Huth
2022-11-25 14:05     ` Claudio Imbrenda
2022-11-25 14:18       ` Thomas Huth
2022-11-25 14:46   ` Claudio Imbrenda

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=2cc74b33-1b29-c77f-960f-e1c3b35ae47f@redhat.com \
    --to=thuth@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=nrb@linux.ibm.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.