Collin just confirmed that my results show the proper verification (and
that the 'cpnc to 0' can happen on top). Hence adjusting the tags
accordingly ...

** Tags removed: verification-needed-focal verification-needed-hirsute 
verification-needed-impish
** Tags added: verification-done-focal verification-done-hirsute 
verification-done-impish

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1953334

Title:
  [UBUNTU 20.04] KVM hardware diagnose data improvements for guest
  kernel - kernel part

Status in Ubuntu on IBM z Systems:
  Fix Committed
Status in linux package in Ubuntu:
  Fix Committed
Status in linux source package in Focal:
  Fix Committed
Status in linux source package in Hirsute:
  Fix Committed
Status in linux source package in Impish:
  Fix Committed
Status in linux source package in Jammy:
  Fix Committed

Bug description:
  SRU Justification:
  ==================

  [Impact]

  * Hardware diagnose data (diag 318) of KVM guest kernel cannot be
  handled.

  * A fix is needed to enhance problem determination of guest kernel
  under KVM using DIAG 0x318 instruction execution.

  * The s390x diagnose 318 instruction sets the control program name
  code (CPNC) and control program version code (CPVC) to provide useful
  information regarding the OS during debugging.

  * The CPNC is explicitly set to 4 to indicate a Linux/KVM environment.

  [Fix]

  * In general the following 4 commits are needed:

  * 3fd8417f2c728d810a3b26d7e2008012ffb7fd01 3fd8417f2c72 "KVM: s390: add debug 
statement for diag 318 CPNC data"
    
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1953334/+attachment/5545726/+files/0004-KVM-s390-add-debug-statement-for-diag-318-CPNC-data.patch

  * 6cbf1e960fa52e4c63a6dfa4cda8736375b34ccc 6cbf1e960fa5 "KVM: s390: remove 
diag318 reset code"
    
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1953334/+attachment/5545725/+files/0003-KVM-s390-remove-diag318-reset-code.patch

  * 23a60f834406c8e3805328b630d09d5546b460c1 23a60f834406 "s390/kvm: diagnose 
0x318 sync and reset"
    
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1953334/+attachment/5545724/+files/0002-s390-kvm-diagnose-0x318-sync-and-reset.patch

  * a23816f3cdcbffe5dc6e8c331914b3f51b87c2f3 a23816f3cdcb "s390/setup: diag 
318: refactor struct"
    
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1953334/+attachment/5545723/+files/0001-s390-setup-diag-318-refactor-struct.patch

  * For jammy, hirsute and impish only the first commit is needed, the
  others are already in.

  * For focal all 4 commits are needed, but since they do not apply
  cleanly on focal, the attached backports need to be used instead.

  [Test Case]

  * Setup an IBM Z or LinuxONE LPAR with Ubuntu Server as KVM host.

  * And setup an Ubuntu KVM virtual machine on top.

  * It can then be observed if the CPNC (diag318 data) has been
  successfully set by looking at the s390dbf messages for the KVM guest.

  * The CPNC will always be 4 (denotes Linux environment).

  * Another way to test this 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.

  [Where problems could occur]

  * The approach here is to provide additional debug and diagnose
  information on top.

  * Hence even if the diag318 changes are broken, the existing
  functionality shouldn't be harmed.

  * The changes themselves are relatively discernible and mostly
  introduce new structures.

  * However, with the functional changes broken code could be introduced
  (e.g. due to erroneous pointer arithmetic for example) that does not
  compile or causes crashes. But this is what the test builds are for
  (https://launchpad.net/~fheimes/+archive/ubuntu/lp1953334).

  * On top the diag318 diagnose data might not properly provided - maybe
  empty or wrong. Again that is what the test builds and the
  verification later is targeted at.

  * Since diag318 is s390x specific, all the modifications touch s390x
  code only. (in arch/s390/kvm/ kvm-s390.c and vsie.c,
  arch/s390/kernel/setup.c, arch/s390/include/asm/ kvm_host.h, kvm.h and
  diag.h). At least no other other architecture will be affected.

  * Well, there is one tiny bit of a common code change, but it's just a
  new define statement in include/uapi/linux/kvm.h ('#define
  KVM_CAP_S390_DIAG318 186').

  [Other]

  * Request was to add the patches to focal / 20.04, but to avoid
  potential regressions on upgrades, the patches need to be added to
  jammy, impish and hirsute, too.

  * As mentioned above, Jammy, Hirsute and Impish includes almost
  everything needed, except 3fd8417f2c72 "KVM: s390: add debug statement
  for diag 318 CPNC data".

  * Hence the SRU is for Focal, Jammy, Hirsute and Impish, but less
  invasive for Jammy, Hirsute and Impish, also because commit
  3fd8417f2c72 can be cleanly cherry-picked form there.

  * LP#1953338 is related to this bug and covers the qemu/KVM bits.
  __________

  Hardware diagnose data (diag 318) of KVM guest kernel cannot be handled.
  Fix needed to enhance problem determination of guest kernel under KVM

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1953334/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to