qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/2] Split out dump-guest-memory memory mapping


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 1/2] Split out dump-guest-memory memory mapping code
Date: Wed, 24 Apr 2013 13:57:32 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5

On 04/24/2013 11:07 AM, Ekaterina Tumanova wrote:
>> This raises an interesting question about introspection - how will
>> management apps (such as libvirt) be able to determine whether the
>> paging command is supported for a given architecture?  Do we need to
>> expand the 'MachineInfo' QMP datatype so that 'query-machines' can tell
>> us whether a given machine will support or reject attempts to set
>> 'paging':true during 'dump-guest-memory'?
>>
> as far as I understand libvirt doesn't actually use -p dump-guest-memory
> parameter.
> and virsh dump doesn't have paging param

Hmm, you're right.  At the public libvirt API level,
virDomainCoreDumpFlags currently exposes VIR_DUMP_MEMORY_ONLY (request
to use dump-guest-memory instead of migration to file), but does not
have a flag for exposing the paging boolean.  At the internal C level,
qemuMonitorJSONDump hardcodes 'paging' to false in current libvirt.git.
 I did a bit more digging, and found this libvirt commit:

commit d239085e956ca6ca42480e877e98a4302e91b853
Author: Eric Blake <address@hidden>
Date:   Mon Sep 17 13:05:29 2012 -0600

    qemu: drop unused arguments for dump-guest-memory

    Upstream qemu has raised a concern about whether dumping guest
    memory by reading guest paging tables is a security hole:
    https://lists.gnu.org/archive/html/qemu-devel/2012-09/msg02607.html

    While auditing libvirt to see if we would be impacted, I noticed
    that we had some dead code.  It is simpler to nuke the dead code
    and limit our monitor code to just the subset we make use of.

    * src/qemu/qemu_monitor.h (QEMU_MONITOR_DUMP): Drop poorly named
    and mostly-unused enum.
    * src/qemu/qemu_monitor.c (qemuMonitorDumpToFd): Drop arguments.
    * src/qemu/qemu_monitor_json.h (qemuMonitorJSONDump): Likewise.
    * src/qemu/qemu_monitor_json.c (qemuMonitorJSONDump): Likewise.
    * src/qemu/qemu_driver.c (qemuDumpToFd): Update caller.

[Is it a bad sign when I can remember that libvirt USED to partially
support the paging flag, but not that _I_ was the one that ripped it out
because the public API never supported it?]

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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