All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
To: "Nico Böhr" <nrb@linux.ibm.com>,
	"Nina Schoetterl-Glausch" <nsg@linux.ibm.com>,
	"Colton Lewis" <coltonlewis@google.com>,
	"Andrew Jones" <andrew.jones@linux.dev>,
	"Claudio Imbrenda" <imbrenda@linux.ibm.com>,
	"Janosch Frank" <frankja@linux.ibm.com>,
	"Nikos Nikoleris" <nikos.nikoleris@arm.com>,
	"Sean Christopherson" <seanjc@google.com>,
	"Ricardo Koller" <ricarkol@google.com>,
	"Thomas Huth" <thuth@redhat.com>
Cc: kvm@vger.kernel.org, David Hildenbrand <david@redhat.com>,
	linux-s390@vger.kernel.org
Subject: [kvm-unit-tests PATCH v3 00/10] s390x: topology: Fixes and extension
Date: Mon, 30 Oct 2023 17:03:39 +0100	[thread overview]
Message-ID: <20231030160349.458764-1-nsg@linux.ibm.com> (raw)

v2 -> v3 (range-diff below):
 * pick up tags (thanks Janosch, thanks Nico, thanks Thomas)
 * fix ordering test
 * get rid of duplicate reports

v1 -> v2:
 * patch 1, introducing enums (Janosch)
 * add comment explaining 8 alignment of stsi block length
 * unsigned cpu_in_masks, iteration (Nico)
 * fix copy paste error when checking ordering (thanks Nina)
 * don't escape newline when \\ at end of line in multiline string
 * change commit messages (thanks Janosch, thanks Nico)
 * pick up tags (thanks Janosch, thanks Nico)

Fix a number of issues as well as rewrite and extend the topology list
checking.
Add a test case with a complex topology configuration.
In order to keep the unittests.cfg file readable, implement multiline
strings for extra_params.

Nina Schoetterl-Glausch (10):
  s390x: topology: Introduce enums for polarization & cpu type
  s390x: topology: Fix report message
  s390x: topology: Use function parameter in stsi_get_sysib
  s390x: topology: Fix parsing loop
  s390x: topology: Make some report messages unique
  s390x: topology: Refine stsi header test
  s390x: topology: Rename topology_core to topology_cpu
  s390x: topology: Rewrite topology list test
  scripts: Implement multiline strings for extra_params
  s390x: topology: Add complex topology test

 scripts/common.bash  |  16 +++
 scripts/runtime.bash |   4 +-
 lib/s390x/stsi.h     |  47 ++++++---
 s390x/topology.c     | 244 +++++++++++++++++++++++++++----------------
 s390x/unittests.cfg  | 133 +++++++++++++++++++++++
 5 files changed, 335 insertions(+), 109 deletions(-)

Range-diff against v2:
 1:  334fec11 !  1:  c9bf5572 s390x: topology: Introduce enums for polarization & cpu type
    @@ Commit message
     
         Thereby get rid of magic values.
     
    +    Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
    +    Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
         Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
     
      ## lib/s390x/stsi.h ##
 2:  e3fabae5 !  2:  038330af s390x: topology: Fix report message
    @@ Commit message
         A polarization value of 0 means horizontal polarization.
     
         Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
    +    Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
         Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
     
      ## s390x/topology.c ##
 3:  95c652d4 =  3:  37cc2bb5 s390x: topology: Use function parameter in stsi_get_sysib
 4:  c3d2eabb !  4:  d4fcb174 s390x: topology: Fix parsing loop
    @@ Commit message
         Without a comparison the loop is infinite.
     
         Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
    +    Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
         Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
     
      ## s390x/topology.c ##
 5:  3bab8b7a =  5:  ac883c6c s390x: topology: Make some report messages unique
 6:  3aac2b2d !  6:  744a15b7 s390x: topology: Refine stsi header test
    @@ Commit message
         Also minor refactor.
     
         Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
    +    Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
         Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
     
      ## s390x/topology.c ##
 7:  c2cdd5ff =  7:  f6eea5d1 s390x: topology: Rename topology_core to topology_cpu
 8:  95e9a32f !  8:  55eb47bf s390x: topology: Rewrite topology list test
    @@ Commit message
         This improves comprehension and allows for more tests.
         We now also test for ordering of CPU TLEs and number of child entries.
     
    +    Acked-by: Janosch Frank <frankja@linux.ibm.com>
         Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
     
      ## lib/s390x/stsi.h ##
    @@ s390x/topology.c: static int stsi_get_sysib(struct sysinfo_15_1_x *info, int sel
     +{
     +	void *last = ((void *)info) + info->length;
     +	union topology_cpu *prev_cpu = NULL;
    ++	bool correct_ordering = true;
     +	unsigned int cpus = 0;
     +	int i;
     +
    -+	for (i = 0; (void *)&child[i] < last && child[i].nl == 0; i++) {
    ++	for (i = 0; (void *)&child[i] < last && child[i].nl == 0; prev_cpu = &child[i++]) {
     +		cpus += check_cpu(&child[i], cont);
     +		if (prev_cpu) {
    -+			report(prev_cpu->type <= child[i].type, "Correct ordering wrt type");
    ++			if (prev_cpu->type > child[i].type) {
    ++				report_info("Incorrect ordering wrt type for child %d", i);
    ++				correct_ordering = false;
    ++			}
     +			if (prev_cpu->type < child[i].type)
     +				continue;
    -+			report(prev_cpu->pp >= child[i].pp, "Correct ordering wrt polarization");
    ++			if (prev_cpu->pp < child[i].pp) {
    ++				report_info("Incorrect ordering wrt polarization for child %d", i);
    ++				correct_ordering = false;
    ++			}
     +			if (prev_cpu->pp > child[i].pp)
     +				continue;
    -+			report(prev_cpu->d || !child[i].d, "Correct ordering wrt dedication");
    ++			if (!prev_cpu->d && child[i].d) {
    ++				report_info("Incorrect ordering wrt dedication for child %d", i);
    ++				correct_ordering = false;
    ++			}
     +			if (prev_cpu->d && !child[i].d)
     +				continue;
    -+			report(prev_cpu->origin <= child[i].origin, "Correct ordering wrt origin");
    ++			if (prev_cpu->origin > child[i].origin) {
    ++				report_info("Incorrect ordering wrt origin for child %d", i);
    ++				correct_ordering = false;
    ++			}
     +		}
    -+		prev_cpu = &child[i];
     +	}
    ++	report(correct_ordering, "children correctly ordered");
     +	report(cpus <= expected_topo_lvl[0], "%d children <= max of %d",
     +	       cpus, expected_topo_lvl[0]);
     +	*cpus_in_masks += cpus;
 9:  d7317d8b !  9:  8099ad07 scripts: Implement multiline strings for extra_params
    @@ Commit message
         The command string built with extra_params is eval'ed by the runtime
         script, so the newlines need to be escaped with \.
     
    +    Reviewed-by: Thomas Huth <thuth@redhat.com>
         Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
     
      ## scripts/common.bash ##
10:  fe527ddb = 10:  5e667461 s390x: topology: Add complex topology test

base-commit: bfe5d7d0e14c8199d134df84d6ae8487a9772c48
-- 
2.41.0


             reply	other threads:[~2023-10-30 16:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-30 16:03 Nina Schoetterl-Glausch [this message]
2023-10-30 16:03 ` [kvm-unit-tests PATCH v3 01/10] s390x: topology: Introduce enums for polarization & cpu type Nina Schoetterl-Glausch
2023-10-30 16:03 ` [kvm-unit-tests PATCH v3 02/10] s390x: topology: Fix report message Nina Schoetterl-Glausch
2023-10-30 16:03 ` [kvm-unit-tests PATCH v3 03/10] s390x: topology: Use function parameter in stsi_get_sysib Nina Schoetterl-Glausch
2023-10-30 16:03 ` [kvm-unit-tests PATCH v3 04/10] s390x: topology: Fix parsing loop Nina Schoetterl-Glausch
2023-10-30 16:03 ` [kvm-unit-tests PATCH v3 05/10] s390x: topology: Make some report messages unique Nina Schoetterl-Glausch
2023-10-30 16:03 ` [kvm-unit-tests PATCH v3 06/10] s390x: topology: Refine stsi header test Nina Schoetterl-Glausch
2023-10-30 16:03 ` [kvm-unit-tests PATCH v3 07/10] s390x: topology: Rename topology_core to topology_cpu Nina Schoetterl-Glausch
2023-10-30 16:03 ` [kvm-unit-tests PATCH v3 08/10] s390x: topology: Rewrite topology list test Nina Schoetterl-Glausch
2023-10-30 16:03 ` [kvm-unit-tests PATCH v3 09/10] scripts: Implement multiline strings for extra_params Nina Schoetterl-Glausch
2023-10-30 16:03 ` [kvm-unit-tests PATCH v3 10/10] s390x: topology: Add complex topology test Nina Schoetterl-Glausch
2023-11-07  9:04 ` [kvm-unit-tests PATCH v3 00/10] s390x: topology: Fixes and extension Nico Boehr

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=20231030160349.458764-1-nsg@linux.ibm.com \
    --to=nsg@linux.ibm.com \
    --cc=andrew.jones@linux.dev \
    --cc=coltonlewis@google.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=nikos.nikoleris@arm.com \
    --cc=nrb@linux.ibm.com \
    --cc=ricarkol@google.com \
    --cc=seanjc@google.com \
    --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
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.