On Mon, Apr 18, 2011 at 04:54:25PM -0600, Eric Blake wrote: > On 04/18/2011 02:39 AM, Lai Jiangshan wrote: > >>> +int qemuMonitorTextInjectNMI(qemuMonitorPtr mon, unsigned int flags ATTRIBUTE_UNUSED) > >>> +{ > >>> + const char *cmd = "nmi 0"; > >>> + char *reply = NULL; > >>> + > >>> + /* > >>> + * FIXME: qemu's nmi command just injects NMI to a specified CPU, > >>> + * use "nmi 0" instead temporary. > >>> + */ > >> > >> This bothers me. Is it possible to inject NMI to a particular CPU in > >> bare-metal hardware? If so, then we ought to support that in the API. > >> > > > > The real world NMI button just sends NMI to all cpus, the qemu side code will > > also be modified that hmp nmi command just sends NMI to all CPU and > > the cpu-index parameter will be removed. > > > > My original qemu side patch lefts cpu-index parameter for kernel debugging, > > but the qemu guys persuade me that inject-nmi command should just send NMI > > to CPUs. I accepted it. I think the libvirt will handle it at the same way. > > Makes sense, and matches with what I learned on a google search about > the "NMI button" on real hardware. Thus, the real fixme is that qemu's > nmi command has a bogus argument during preliminary patch review that > will be going away before inject-nmi is made official, and therefore, > libvirt should just be sending "nmi" and not "nmi 0" once there is a > released version of qemu that actually supports injecting NMI, and you > are right that the API should not expose a vcpu parameter. > > Any timeframe on when a released qemu might support nmi injection, or > even a pointer to a URL where the qemu patch stream is under discussion? > It doesn't make too much sense to push this patch into libvirt until we > are reasonably sure that the qemu interface is well-baked, to minimize > needing later libvirt tweaks. QEMU has included an HMP command for NMI for quite a while. We're only arguing upstream about the QMP version of it. We could take this patch with the HMP command any time we like, but it would be nice to have a little more clarity about what's going to happen to the QMP version in qemu-devel. We don't have to wait for a new QEMU release, but in ideal world we'd see them accept Lai's QMP patches into GIT. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list