[kvm-unit-tests PATCH 1/1] s390x: css: check the CSS is working with any ISC

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

 



In the previous version we did only check that one ISC dedicated by
Linux for I/O is working fine.

However, there is no reason to prefer one ISC to another ISC, we are
free to take anyone.

Let's check all possible ISC to verify that QEMU/KVM is really ISC
independent.

Signed-off-by: Pierre Morel <pmorel@xxxxxxxxxxxxx>
---
 s390x/css.c | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/s390x/css.c b/s390x/css.c
index c340c539..aa005309 100644
--- a/s390x/css.c
+++ b/s390x/css.c
@@ -22,6 +22,7 @@
 
 #define DEFAULT_CU_TYPE		0x3832 /* virtio-ccw */
 static unsigned long cu_type = DEFAULT_CU_TYPE;
+static int io_isc;
 
 static int test_device_sid;
 static struct senseid *senseid;
@@ -46,7 +47,7 @@ static void test_enable(void)
 		return;
 	}
 
-	cc = css_enable(test_device_sid, IO_SCH_ISC);
+	cc = css_enable(test_device_sid, io_isc);
 
 	report(cc == 0, "Enable subchannel %08x", test_device_sid);
 }
@@ -67,7 +68,7 @@ static void test_sense(void)
 		return;
 	}
 
-	ret = css_enable(test_device_sid, IO_SCH_ISC);
+	ret = css_enable(test_device_sid, io_isc);
 	if (ret) {
 		report(0, "Could not enable the subchannel: %08x",
 		       test_device_sid);
@@ -142,7 +143,6 @@ static void sense_id(void)
 
 static void css_init(void)
 {
-	assert(register_io_int_func(css_irq_io) == 0);
 	lowcore_ptr->io_int_param = 0;
 
 	report(get_chsc_scsc(), "Store Channel Characteristics");
@@ -351,11 +351,20 @@ int main(int argc, char *argv[])
 	int i;
 
 	report_prefix_push("Channel Subsystem");
-	enable_io_isc(0x80 >> IO_SCH_ISC);
-	for (i = 0; tests[i].name; i++) {
-		report_prefix_push(tests[i].name);
-		tests[i].func();
-		report_prefix_pop();
+
+	for (io_isc = 0; io_isc < 8; io_isc++) {
+		report_info("ISC: %d\n", io_isc);
+
+		enable_io_isc(0x80 >> io_isc);
+		assert(register_io_int_func(css_irq_io) == 0);
+
+		for (i = 0; tests[i].name; i++) {
+			report_prefix_push(tests[i].name);
+			tests[i].func();
+			report_prefix_pop();
+		}
+
+		unregister_io_int_func(css_irq_io);
 	}
 	report_prefix_pop();
 
-- 
2.25.1




[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