Comment 2 for bug 1953338

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2021-12-06 10:43 EDT-------
The DIAG 318 invocation has been present in the the Linux kernel for some time, so it's likely you can pick up any modern kernel release and run with it for testing. The only way we can easily observe if the CPNC (diag318 data) has been successfully set is by looking at the s390dbf messages for the KVM guest. The CPNC will always be 4 (denotes Linux environment).

Another way to check is by running the sync_regs_test under tools/testing/selftests/kvm/s390x/sync_regs_test. Just running the kernel self test suite can trigger this.

Lastly, I suppose if you were to create a userspace program that simply ran the instruction using whatever values you wanted, that could work. I have not done this myself, so I cannot offer much guidance with this route other than to suggest looking at function "setup_control_program_code" in arch/s390/kernel/setup.c