[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] optionally specify vm stop message

From: Jan Kiszka
Subject: [Qemu-devel] Re: [PATCH] optionally specify vm stop message
Date: Fri, 16 Jan 2009 17:24:01 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv: Gecko/20080226 SUSE/ Thunderbird/ Mnenhy/

Anthony Liguori wrote:
> Gleb Natapov wrote:
>> On Thu, Jan 15, 2009 at 02:46:06PM -0600, Anthony Liguori wrote:
>>> Gleb Natapov wrote:
>>>> Should be applied on top of ENOSPC series.
>>> How about just adding a new vm_stop reason?  That will work out
>>> better  when we introduce the improved monitor.
>> We may want to specify different message for the same reason. For
>> instance we may want to print the name of the file we failed to write
>> to.
> I'm thinking about this from a management tool perspective.  When we
> have a better monitor interface, this would generate an async
> notification.  Instead of generating an arbitrary string, it could send
> a reason code that has a well defined meaning.
> For now, within vm_stop, it can say if (reason == VM_STOP_ENOSPC)
> printf("ran out of space"); or something.
> There are other places we stop a vm, like when -no-shutdown is used,
> where using a reason code would be very useful.
>>  Also non zero reasons a handled differently by vm_stop. Don't know
>> why.
> It's an ugly hack for gdbstub.  It notifies gdb when a breakpoint
> occurs.  We have far too many state tracking mechanisms.  Anyway, gdb
> can pass something like VM_STOP_BP and that can be used to trigger the
> callback.

It's not only used for breakpoints but any stop condition that should be
reported to the gdb frontend (so far: EXCP_DEBUG and EXCP_INTERRUPT).
Not sure, though, how to deal with ENOSPC - it's not a guest fault, it's
a host problem. From that POV, gdb should not receive it.

Nevertheless, gdb_vm_stopped should better do the filtering, not the
caller of vm_stop by passing 0 for "any other reason gdb should be
bothered with".


Siemens AG, Corporate Technology, CT SE 26
Corporate Competence Center Embedded Linux

reply via email to

[Prev in Thread] Current Thread [Next in Thread]