On 11/5/21 18:46, Collin Walling wrote: > The CPNC portion of the diag 318 data is erroneously reset during an > initial CPU reset caused by SIGP. Let's go ahead and relocate the > diag318_info field within the CPUS390XState struct such that it is > only zeroed during a clear reset. This way, the CPNC will be retained > for each VCPU in the configuration after the diag 318 instruction > has been invoked by the kernel. > > Additionally, the diag 318 data reset is handled via the CPU reset > code. The set_diag318 code can be merged into the handler function > and the helper functions can consequently be removed. > > Signed-off-by: Collin Walling <wall...@linux.ibm.com>
I neglected to mention that this addresses a bug that was discovered internally, observed by a recent patch I sent upstream: [PATCH] KVM: s390x: add debug statement for diag 318 CPNC data This patch removes most of the code from one of my past patches. Does it make more sense to revert the old patch and then introduce a follow-up that includes the additions introduced by this new one? commit e2c6cd567422bfa563be026b9741a1854aecdc06 Author: Collin L. Walling <wall...@linux.ibm.com> Date: Fri Nov 13 17:10:22 2020 -0500 s390/kvm: fix diag318 propagation and reset functionality There is also a bug where hotplugged CPUs are not acquiring the CPNC as well. I will address a fix to this in a follow-up patch in the future. -- Regards, Collin Stay safe and stay healthy