[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] ppc: Add QOM interface for machine check injection

From: Cédric Le Goater
Subject: Re: [PATCH 1/3] ppc: Add QOM interface for machine check injection
Date: Tue, 8 Feb 2022 16:55:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

[ Adding David who I think is the HMP maintainer and Fabiano who has
  been rewriting a lot of the PPC exception model ]

On 10/15/21 04:05, Nicholas Piggin wrote:
Excerpts from Cédric Le Goater's message of October 14, 2021 7:40 am:
From: Nicholas Piggin <npiggin@gmail.com>

This implements a machine check injection framework and defines a
'mce' monitor command for ppc.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[ clg: - moved definition under "hw/ppc/mce.h"
        - renamed to PPCMceInjection
        - simplified injection call in hmp_mce
        - QMP support ]

Nice, thanks for doing this.

Message-Id: <20200325144147.221875-4-npiggin@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
  qapi/misc-target.json | 26 ++++++++++++++++++++
  include/hw/ppc/mce.h  | 31 ++++++++++++++++++++++++
  target/ppc/monitor.c  | 56 +++++++++++++++++++++++++++++++++++++++++++
  hmp-commands.hx       | 20 +++++++++++++++-
  4 files changed, 132 insertions(+), 1 deletion(-)
  create mode 100644 include/hw/ppc/mce.h

diff --git a/qapi/misc-target.json b/qapi/misc-target.json
index 594fbd1577fa..b1456901893c 100644
--- a/qapi/misc-target.json
+++ b/qapi/misc-target.json
@@ -394,3 +394,29 @@
  { 'command': 'query-sgx-capabilities', 'returns': 'SGXInfo', 'if': 
'TARGET_I386' }
+# @mce:
+# This command injects a machine check exception
+# @cpu-index: CPU number on which to inject the machine check exception
+# @srr1-mask : possible reasons for the exception

I would say this is implementation specific mask of bits that are
inserted in the SRR1 register at interrupt-time (except RI - see
@recovered) which indicate the cause of the exception.

These are not architected and may change from CPU to CPU. I.e., the
mask itself may change, not just the reasons.

+# @dsisr : more reasons

This is value inserted into DSISR register, and is typically used
to indicate the cause of a "d-side" MCE. If this is 0 then both
DSISR and DAR registers are left unchanged.

+# @dar : effective address of next instruction

This is the value inserted into the DAR register (if @dsisr was
non-zero). It is implementation specific but is typically used
to indicate the effective address of the target address involved
in the mce for d-side exceptions.

I wonder if we should put an @asdr parameter there too -- I'm not
acutally sure if P10 implements that (getting clarification) but
the architecture at least allows it.

What's the go for updating this API? Can we just break it, or do
we need to version it or call a different name like mce2 etc if
we want to change it?

I am not sure what the answer would be. May be David can tell ?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]