------- Comment From bssrika...@in.ibm.com 2018-02-27 00:21 EDT-------
(In reply to comment #5)
> When you say "Power9 DD 2.2 needs HMI fixup backport of..." in the original
> bug description. Is this patchset required to boot P9 DD2.2?

We need this patch for KVM guest testing on DD 2.2 revision. Good
explanation on why this is required is in commit pointed.

==========================================================_
Hypervisor maintenance interrupts (HMIs) are generated by various
causes, signalled by bits in the hypervisor maintenance exception
register (HMER).  In most cases calling OPAL to handle the interrupt
is the correct thing to do, but the "debug trigger" HMIs signalled by
PPC bit 17 (bit 46) of HMER are used to invoke software workarounds
for hardware bugs, and OPAL does not have any code to handle this
cause.  The debug trigger HMI is used in POWER9 DD2.0 and DD2.1 chips
to work around a hardware bug in executing vector load instructions to
cache inhibited memory.  In POWER9 DD2.2 chips, it is generated when
conditions are detected relating to threads being in TM (transactional
memory) suspended mode when the core SMT configuration needs to be
reconfigured.

The kernel currently has code to detect the vector CI load condition,
but only when the HMI occurs in the host, not when it occurs in a
guest.  If a HMI occurs in the guest, it is always passed to OPAL, and
then we always re-sync the timebase, because the HMI cause might have
been a timebase error, for which OPAL would re-sync the timebase, thus
removing the timebase offset which KVM applied for the guest.  Since
we don't know what OPAL did, we don't know whether to subtract the
timebase offset from the timebase, so instead we re-sync the timebase.

This adds code to determine explicitly what the cause of a debug
trigger HMI will be.  This is based on a new device-tree property
under the CPU nodes called ibm,hmi-special-triggers, if it is
present, or otherwise based on the PVR (processor version register).
The handling of debug trigger HMIs is pulled out into a separate
function which can be called from the KVM guest exit code.  If this
function handles and clears the HMI, and no other HMI causes remain,
then we skip calling OPAL and we proceed to subtract the guest
timebase offset from the timebase.

The overall handling for HMIs that occur in the host (i.e. not in a
KVM guest) is largely unchanged, except that we now don't set the flag
for the vector CI load workaround on DD2.2 processors.

This also removes a BUG_ON in the KVM code.  BUG_ON is generally not
useful in KVM guest entry/exit code since it is difficult to handle
the resulting trap gracefully.
==========================================================_

-- 
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/1751834

Title:
  Power9 DD 2.2 needs HMI fixup backport of upstream
  patch(d075745d893c78730e4a3b7a60fca23c2f764081) into kernel

Status in The Ubuntu-power-systems project:
  New
Status in linux package in Ubuntu:
  New

Bug description:
  == Comment: #0 - Satheesh Rajendran <sathe...@in.ibm.com> - 2018-02-23 
06:55:23 ==
  ---Problem Description---
  Power9 DD 2.2 needs HMI fixup backport of upstream 
patch(d075745d893c78730e4a3b7a60fca23c2f764081) into kernel
   
  ---uname output---
  4.15.0-10-generic
   
  Machine Type = power9 boston 2.2 (pvr 004e 1202) 
   
  ---Debugger---
  A debugger is not configured
   
  ---Steps to Reproduce---
   commit d075745d893c78730e4a3b7a60fca23c2f764081
  Author: Paul Mackerras <pau...@ozlabs.org>
  Date:   Wed Jan 17 20:51:13 2018 +1100

      KVM: PPC: Book3S HV: Improve handling of debug-trigger HMIs on POWER9
      

  Dependancy commit, looks like already present.
  commit 5080332c2c893118dbc18755f35c8b0131cf0fc4
  Author: Michael Neuling <mi...@neuling.org>
  Date:   Fri Sep 15 15:25:48 2017 +1000

      powerpc/64s: Add workaround for P9 vector CI load issue
      

   
  Contact Information = sathe...@in.ibm.com 
   
  Stack trace output:
   no
   
  Oops output:
   no
   
  System Dump Info:
    The system is not configured to capture a system dump.
   
  *Additional Instructions for sathe...@in.ibm.com: 
  -Attach sysctl -a output output to the bug.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/1751834/+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