On 09/27/2016 10:51 PM, Eduardo Habkost wrote: > On Thu, Sep 22, 2016 at 02:49:35PM -0500, Corey Minyard wrote: >> On 09/22/2016 01:42 PM, Eduardo Habkost wrote: > [...] >>> In the case of the inject-nmi QMP command, I need to understand >>> what "default CPU" is supposed to mean in the inject-nmi >>> documentation. Maybe it can be changed to use the first CPU, too >>> (that's probably the existing behavior because there's no way to >>> change cur_mon->mon_cpu in a QMP monitor). >>> >> I looked through is a bit, and the only place I found it was used was >> the x390 code. > > s390 maintainers: is the ability to send a NMI to a specific CPU > really used in s390? The only way to use it today is to use HMP, > so I guess no management interface really supports it. > > s390-ccw is the only machine that uses the cpu_index parameter. > If we remove it, it will allow us to simplify the code. > Otherwise, we will need to extend the inject-nmi command to > accept a "cpu" parameter. >
Doing it always on the first CPU should be ok for Linux guests. This is wired up to a PSW restart interrupt, which has the same handler on all CPUs. Originally it was wired up on the real old irons as a button, so I assume from a historical perspective it is ok to not be able to specify the cpu number. Under z/VM it is possible to specify the CPU though. I will try to find out if there is a real use case for specifying the CPU. Christian