Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Dec 2017 22:29:28 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 224350] [PATCH] powerpc64: Add handler for Facility Unavailable
Message-ID:  <bug-224350-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D224350

            Bug ID: 224350
           Summary: [PATCH] powerpc64: Add handler for Facility
                    Unavailable
           Product: Base System
           Version: CURRENT
          Hardware: powerpc
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: gromero@br.ibm.com
          Keywords: patch

Created attachment 188843
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D188843&action=
=3Dedit
Patch for this bug

Currently Facility Unavailable is absent and once an application
tries to use or access a register from a feature disabled in the
CPU it causes a kernel panic.=20

A simple test-case is:

#include <stdio.h>

int main() { asm volatile ("tbegin.;"); }

which will use TM (Hardware Transactional Memory) feature
which is not supported by the kernel and so I'll trigger
the following panic:

fatal user trap:

   exception       =3D 0xf60 (unknown)
   srr0            =3D 0x10000890
   srr1            =3D 0x800000000000f032
   lr              =3D 0x100004e4
   curthread       =3D 0x5f93000
          pid =3D 1021, comm =3D htm

panic: unknown trap
cpuid =3D 40
KDB: stack backtrace:
#0 0x59d1c8 at ??+0
#1 0x59d264 at ??+0
#2 0x959490 at ??+0
#3 0x95a94c at ??+0
#4 0x94ea4c at ??+0
Uptime: 3m18s
Dumping 10 MB (3 chunks)
  chunk 0: 11MB (2648 pages) ... ok
  chunk 1: 1MB (24 pages) ... ok
  chunk 2: 1MB (2 pages)panic: IOMMU mapping error: -4

cpuid =3D 40
Uptime: 3m18s

This commit fixes that state by adding a handler for
Facility Unavailable exception (0xF60), treating
the instruction that trigged the exception as an
illegal instruction.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-224350-8>