On Fri, Apr 03, 2020 at 06:04:47PM +1000, Nicholas Piggin wrote: > 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 > > > > 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? Uh.. not necessarily. But call your version PpcMce or something instead. > > 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? Hrm, I doubt it will convince the qemu community at large. I think the view is that QMP is the "real" management interface for qemu - HMP is somewhere in between a shim for convenience and something needed for backwards compat. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson