linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rui Wang <rui.y.wang@intel.com>
To: bhelgaas@google.com, tony.luck@intel.com, rafael.j.wysocki@intel.com
Cc: ruiv.wang@gmail.com, chaohong.guo@intel.com,
	dave.hansen@intel.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	Rui Wang <rui.y.wang@intel.com>
Subject: [PATCH v3 0/5] I/O Hook: Trace h/w access and emulate h/w events
Date: Tue, 15 Apr 2014 21:48:06 +0800	[thread overview]
Message-ID: <1397569691-24691-1-git-send-email-rui.y.wang@intel.com> (raw)

Hi All,
This is the 3rd version of I/O Hook, a patch set aimed at intercepting
h/w access by the OS. Some examples of how it can be used:
        1) To emulate h/w events (e.g. hotplug)
        2) To inject h/w errors to the kernel
        3) To trace h/w access by the OS for performance tuning or debugging.
Details of the examples can be found in Documentation/PCI/iohook.txt.

A set of user space tools using I/O Hook for various use cases will be hosted
on https://github.com/iohook. It initially contains inject-aer which takes the
trace event output of /sys/kernel/debug/tracing/events/ras/aer_event/ and
regenerate the same PCIE AER event so that PCIE AER can be easily tested.

Changes since v2:
        - Added the hook for MSRs (can specify a cpu number)
        - Can trigger IPI by a vector (so that exceptions can be emulated)
        - Defined iohook_event as the trace event to trace h/w access. A new
          attribute 'tc' can be defined for any Register Override for tracing
          purpose.

Rui Wang (5):
  I/O Hook: core functions and Register Override
  I/O Hook: Help functions to manage the hook
  I/O Hook: sysfs interface to emulate h/w events
  I/O Hook: Override MSRs while triggering MCEs
  IO Hook: Tracing hw access

 Documentation/PCI/iohook.txt      |  353 ++++++++++
 arch/Kconfig                      |   10 +
 arch/x86/boot/compressed/Makefile |    1 +
 arch/x86/include/asm/io.h         |   57 ++-
 arch/x86/include/asm/msr.h        |  100 +++-
 arch/x86/lib/msr-smp.c            |   31 +
 arch/x86/vdso/Makefile            |    2 +
 drivers/misc/Makefile             |    1 +
 drivers/misc/iohook/Makefile      |    1 +
 drivers/misc/iohook/iohook.c      | 1367 +++++++++++++++++++++++++++++++++++++
 drivers/misc/iohook/iohook.h      |    6 +
 drivers/pci/access.c              |   66 ++
 include/linux/reg_ovrd.h          |   55 ++
 include/trace/events/iohook.h     |   58 ++
 14 files changed, 2101 insertions(+), 7 deletions(-)
 create mode 100644 Documentation/PCI/iohook.txt
 create mode 100644 drivers/misc/iohook/Makefile
 create mode 100644 drivers/misc/iohook/iohook.c
 create mode 100644 drivers/misc/iohook/iohook.h
 create mode 100644 include/linux/reg_ovrd.h
 create mode 100644 include/trace/events/iohook.h

-- 
1.7.5.4


             reply	other threads:[~2014-04-15 13:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15 13:48 Rui Wang [this message]
2014-04-15 13:48 ` [PATCH v3 1/5] I/O Hook: core functions and Register Override Rui Wang
2014-04-15 13:48 ` [PATCH v3 2/5] I/O Hook: Help functions to manage the hook Rui Wang
2014-04-15 13:48 ` [PATCH v3 3/5] I/O Hook: sysfs interface to emulate h/w events Rui Wang
2014-04-15 13:48 ` [PATCH v3 4/5] I/O Hook: Override MSRs while triggering MCEs Rui Wang
2014-04-15 13:48 ` [PATCH v3 5/5] IO Hook: Tracing hw access Rui Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1397569691-24691-1-git-send-email-rui.y.wang@intel.com \
    --to=rui.y.wang@intel.com \
    --cc=bhelgaas@google.com \
    --cc=chaohong.guo@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=ruiv.wang@gmail.com \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).