Re: [kvm-unit-tests PATCH v3 5/5] s390x: css: testing measurement block format 1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2/23/21 2:29 PM, Cornelia Huck wrote:
On Thu, 18 Feb 2021 18:26:44 +0100
Pierre Morel <pmorel@xxxxxxxxxxxxx> wrote:

Measurement block format 1 is made available by the extended
measurement block facility and is indicated in the SCHIB by
the bit in the PMCW.

The MBO is specified in the SCHIB of each channel and the MBO
defined by the SCHM instruction is ignored.

The test of the MB format 1 is just skipped if the feature is
not available.

Signed-off-by: Pierre Morel <pmorel@xxxxxxxxxxxxx>
---
  lib/s390x/css.h     | 16 ++++++++++++++
  lib/s390x/css_lib.c | 25 ++++++++++++++++++++-
  s390x/css.c         | 53 +++++++++++++++++++++++++++++++++++++++++++++
  3 files changed, 93 insertions(+), 1 deletion(-)


(...)

diff --git a/lib/s390x/css_lib.c b/lib/s390x/css_lib.c
index 4c8a6ae..1f09f93 100644
--- a/lib/s390x/css_lib.c
+++ b/lib/s390x/css_lib.c
@@ -298,7 +298,7 @@ static bool schib_update_mb(int schid, uint64_t mb, uint16_t mbi,
  			pmcw->flags2 &= ~PMCW_MBF1;
pmcw->mbi = mbi;
-		schib.mbo = mb;
+		schib.mbo = mb & ~0x3f;

indeed, looks like a later change.


...snip...
+ */
+static void test_schm_fmt1(void)
+{
+	
...snip...
+	/* Expect success */
+	report_prefix_push("Valid MB address and index");
+	report(start_measure((u64)mb1, 0, true) &&
+	       mb1->ssch_rsch_count == SCHM_UPDATE_CNT,
+	       "SSCH measured %d", mb1->ssch_rsch_count);
+	report_prefix_pop();
+
+	schm(NULL, 0); /* Stop the measurement */

Same here, I think you should call css_disable_mb().

I agree.

Thanks,
Pierre

--
Pierre Morel
IBM Lab Boeblingen



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux