*Re: [PATCH 3/5] nmi: add MCE class for implementing machine check injection commands
2020-03-31 0:22 ` David Gibson@ 2020-04-03 8:04 ` Nicholas Piggin
2020-04-06 6:45 ` David Gibson0 siblings, 1 reply; 24+ messages in thread
From: Nicholas Piggin @ 2020-04-03 8:04 UTC (permalink / raw)
To: David Gibson
Cc: Alexey Kardashevskiy, Mahesh Salgaonkar, Greg Kurz, qemu-devel,
Cédric Le Goater, Ganesh Goudar, qemu-ppc
David Gibson's on March 31, 2020 10:22 am:
> On Thu, Mar 26, 2020 at 12:41:45AM +1000, Nicholas Piggin wrote:
>> Like commit 9cb805fd26 ("cpus: Define callback for QEMU "nmi" command")
>> this implements a machine check injection command framework and defines
>> a monitor command for ppc.
>>
>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>
> So, AFAICT, both x86 and ppc have something called an MCE, and while
> I'm guessing they're somewhat related, they don't work quite the same
> way - different information provided to the handler and so forth.
>
> I think it's reasonable to overload the "mce" HMP command based on
> target for the different types. However, I think calling the
> interface classes which are specific to the ppc type just "mce" could
> be pretty confusing.
Okay. So, convert i386 first?
> In addition, I think this is adding an HMP command to inject the event
> without any corresponding way of injecting via QMP. I believe that's
> frowned upon.
I attempted that but didn't get too far. I guess it's more of a
special test than a management function (nmi has valid uses in
administering a machine), so maybe we can get an exemption. One issue
is different QMP command for powerpc vs x86.
I think error injection as a general concept might be valid there, but
the better interface for that level would be higher up, e.g, not
specifying register settings but rather "simulate uncorrected memory
error on this byte".
Do you think that is reasonable reason to avoid adding QMP for this
nasty low level thing?
Thanks,
Nick
^permalinkrawreply [flat|nested] 24+ messages in thread