Re: [Qemu-devel] Re: [PATCH v3] qemu, qmp: convert do_inject_nmi() to QObject, QError

Markus Armbruster
2010-12-16T09:42:53Z

Luiz Capitulino <lcapitulino@redhat.com> writes:

> On Wed, 15 Dec 2010 18:45:09 +0100
> Markus Armbruster <armbru@redhat.com> wrote:
>
>> Luiz Capitulino <lcapitulino@redhat.com> writes:
>>
>> > On Wed, 15 Dec 2010 19:18:32 +0200
>> > Avi Kivity <avi@redhat.com> wrote:
[...]
>> >> I'd like to see cpu-index made optional; if not present, nmi all cpus
>> >> (that's what the nmi button on many machines does, or at least I think
>> >> that's what it does).
>> >
>> > Looks like a GUI feature to me,
>>
>> Really? Can't see how you can build "NMI to all CPUs" from "NMI this
>> CPU". Or am I misunderstanding you?
>
> I guess so. Avi referred to 'nmi button on many machines', I assumed he
> meant a virtual machine GUI, am I wrong?
>
>> > _might_ turn out to be an undesirable
>> > side effect to client writers.
>>
>> They seem to be coping fine with optional arguments elsewhere.
>
> Which we might want to review.
>
>> > I guess I prefer a to-all-cpus argument.
>>
>> How would that look like? "cpu-index": "all"?
>
> Like this:
>
> { "execute": "inject-nmi", "arguments": { "to-all-cpus": true } }
>
> But this looks like an optimization to me, because it's also easy to do:
>
> for cpu in query-cpus; do
> inject-nmi cpu
>
> Unless we want to do this in an "atomic" way, due to side effects I'm
> not aware about.

I'd expect a physical NMI button to interrupt all CPUs simultaneously
(modulo wire length). …