History | View | Annotate | Download (136.3 kB)
Sort the help info shown in monitor at runtime
This patch would try sort the command list in monitor at runtime. As a result,command help and help info would show a more friendly sorted command list.For eg:(qemu)helpacl_addacl_policyacl_removeacl_reset...
Merge remote-tracking branch 'qmp/queue/qmp' into staging
Conflicts: ui/spice-core.c
Merge remote-tracking branch 'spice/spice.v45' into staging
qapi: Convert query-cpus
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: Convert query-block
qapi: Convert query-blockstats
qapi: Convert query-vnc
There are three important remarks in relation to the non-qapi command:
1. This commit also fixes the behavior of the 'query-vnc' and 'info vnc' commands to return an error when qemu is built without VNC support (ie. --disable-vnc). The non-qapi command would return the OK...
qapi: Convert query-spice
qapi: Convert query-balloon
Please, note that some of the code supporting memory statistics isstill around (eg. virtio_balloon_receive_stats() and reset_stats()).
Also, the qmp_query_balloon() function is synchronous and thus doesn'tmake any use of the (not fully working) monitor's asynchronous command...
qapi: Convert query-pci
This also fixes a bug with the old version: QMP would invert device idand vendor id. This would look ok on HMP because it was printing"device:vendor" instead of "vendor:device".
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
QMP: Drop the query commands dispatch table
Because QMP development originated in the monitor, it hasinherited the monitor's distinction between query- andnon-query commands.
However, previous commits unified both commands and thedistinction is gone. This commit drops the query commands...
Monitor: do_info(): Drop QMP command handling code
Previous commits converted all existing QMP commands to the QAPI,now each info command does its own QMP call.
Let's then drop all QMP command handling code from do_info().
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: Convert query-mice
qapi: Convert query-migrate
Monitor: Make mon_set_cpu() public
Also rename it to monitor_set_cpu().
Monitor: Introduce monitor_get_cpu_index()
Returns 'cur_mons's CPU index. A future commit will use it.
qapi: Convert the cpu command
target-sparc: Change fpr representation to doubles.
This allows a more efficient representation for 64-bit hosts.It should be about the same for 32-bit hosts, as we can stillaccess the individual pieces of the double.
Signed-off-by: Richard Henderson <rth@twiddle.net>
spice: turn client_migrate_info to async
RHBZ 737921Spice client is required to connect to the migration target before/as migrationstarts. Since after migration starts, the target qemu is blocked and cannot accept new spice clientwe trigger the connection to the target upon client_migrate_info command....
monitor: Restrict pic/irq_info to supporting targets
This allows to drop various stubs and move the i8359 into hwlib.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
block: Keep track of devices' I/O status
This commit adds support to the BlockDriverState type to keep trackof devices' I/O status.
There are three possible status: BDRV_IOS_OK (no error), BDRV_IOS_ENOSPC(no space error) and BDRV_IOS_FAILED (any other error). The distinction...
Merge branch 'tracing' of git://repo.or.cz/qemu/stefanha
ppc: booke206: add "info tlb" support
Signed-off-by: Scott Wood <scottwood@freescale.com>Signed-off-by: Alexander Graf <agraf@suse.de>
qapi: Convert query-kvm
RunState: Rename enum values as generated by the QAPI
Next commit will convert the query-status command to use theRunState type as generated by the QAPI.
In order to "transparently" replace the current enum by the QAPIone, we have to make some changes to some enum values....
qapi: Convert query-status
Please, note that the RunState type as defined in sysemu.h and itsrunstate_as_string() function are being dropped in favor of theRunState type generated by the QAPI.
qapi: Convert query-uuid
qapi: Convert query-chardev
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: Convert query-commands
qapi: Convert quit
qapi: Convert stop
qapi: Convert system_reset
qapi: convert query-name
A simple example conversion 'info name'. This also adds the new files forQMP and HMP.
qapi: Convert query-version
qapi: use middle mode in QMP server
Use the new middle mode within the existing QMP server.
trace: trace monitor qmp dispatch/completion
Add trace events for handle_qmp_command(), which dispatches qmpcommands, and monitor_protocol_emitter(), which produces the reply to aqmp command.
Also remove duplicate #include "trace/control.h".
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
hmp: re-enable trace-file command
Commit 31965ae27bc11e90674be12584bb201b83df5aef reverted a previousrenaming of CONFIG_SIMPLE_TRACE->CONFIG_TRACE_SIMPLE in a couple spots,leading to trace-file currently being unavailable.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>...
memory: simple memory tree printer
Add a monitor command 'info mtree' to show the memory hierarchymuch like /proc/iomem in Linux.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Avi Kivity <avi@redhat.com>
Replace the VMSTOP macros with a proper state type
Today, when notifying a VM state change with vm_state_notify(),we pass a VMSTOP macro as the 'reason' argument. This is not idealbecause the VMSTOP macros tell why qemu stopped and not exactlywhat the current VM state is....
Drop the incoming_expected global variable
Test against RSTATE_IN_MIGRATE instead.
Please, note that the RSTATE_IN_MIGRATE state is only set when all theinitial VM setup is done, while 'incoming_expected' was set right inthe beginning when parsing command-line options. Shouldn't be a problem...
Drop the vm_running global variable
Use runstate_is_running() instead, which is introduced by this commit.
Monitor/QMP: Don't allow cont on bad VM state
We have two states where issuing cont before system_reset cancause problems: RSTATE_SHUTDOWN (when -no-shutdown is used) andRSTATE_PANICKED (which only happens with kvm).
This commit fixes that by doing the following when state is...
QMP: query-status: Introduce 'status' key
This new key reports the current VM status to clients. Please, checkthe documentation being added in this commit for more details.
HMP: info status: Print the VM state
Today our printf format for the "info status" command is:
VM status: %s
Where the string can be "running", "running (single step mode)" or"paused".
This commit extends it to:
VM status: %s (%s)
The second string corresponds to the "status" field as returned...
SPARC: Trivial patch to clean up npc monitor output
This patch fixes the spacing of the PC output from 'info cpus' forSPARC.
Signed-off-by: Nathan Kunkee <nkunkee42@hotmail.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
trace: separate trace event control and query routines from the simple backend
Generalize the 'st_print_trace_events' and 'st_change_trace_event_state' intobackend-specific 'trace_print_events' and 'trace_event_set_state' (respectively)in the "trace/control.h" file....
trace: always compile support for controlling and querying trace event states
The current interface is generic for this small set of operations, and thusother backends can easily modify the "trace/control.c" file to add their ownimplementation.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
trace: [configure] rename CONFIG_*_TRACE into CONFIG_TRACE_*
Provides a more hierarchical view of the variable domain.
Also adds the CONFIG_TRACE_* variables for all backends.
[Stefan added missing 'test' in stap if statement]
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>...
monitor: fix build breakage for !CONFIG_VNC
Commit c62f6d1 (monitor: fix build breakage with --disable-vnc)conditionalised some VNC setup code but left an unused variable. Movethe variable into the conditional code to fix the build breakage.
Cc: Luiz Capitulino <lcapitulino@redhat.com>...
char: rename qemu_chr_get_msgfd() -> qemu_chr_fe_get_msgfd()
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
char: rename qemu_chr_set_echo() -> qemu_chr_fe_set_echo()
char: rename qemu_chr_write() -> qemu_chr_fe_write()
monitor: Prevent sign-extension of 32-bit addresses printed by info tlb
This is the same fix that was recently applied to info mem. Beforethis change, info tlb output looked like:
ffffffffffffc000: 000000000fffc000 --------Wffffffffffffd000: 000000000fffd000 --------W...
monitor: Show combined protection bits in "info mem"
Previously, "info mem" considered and displayed only the last-levelprotection bits for a memory range, which doesn't accurratelyrepresent the protection of that range. Now it shows the combinedprotection....
monitor: Fix "info mem" to print the last memory range
"info mem" groups its output into contiguous ranges with identicalprotection bits, but previously forgot to print the last range.
Signed-off-by: Austin Clements <amdragon@mit.edu>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
monitor: Prevent sign-extension of 32-bit addresses printed by info mem
Previously, on 32-bit i386, info mem used signed 32-bit int's to storethe page table indexes. As a result, address calculation was done in32 bits and then incorrectly sign-extended to 64 bits, yielding output...
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
monitor: fix build breakage with --disable-vnc
The breakage was introduced by the commit 13661089810d3e59931f3e80d7cb541b99af7071
Signed-off-by: TeLeMan <geleman@gmail.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Introduce a 'client_add' monitor command accepting an open FD
Allow client connections for VNC and socket based characterdevices to be passed in over the monitor using SCM_RIGHTS.
One intended usage scenario is to start QEMU with VNC on aUNIX domain socket. An unprivileged user which cannot access...
Remove exec-all.h include directives
Most exec-all.h include directives are now useless, remove them.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
QMP: add inject-nmi qmp command
inject-nmi command injects an NMI on all CPUs of guest.It is only supported for x86 guest currently, it willreturns "Unsupported" error for non-x86 guest.
HMP: Use QMP inject nmi implementation
This CHANGES the human monitor "nmi" command behavior.
Currently it accepts an CPU argument which, when provided, will sendthe NMI to the specified CPU. This feature is of discussable valuethough and HMP shouldn't have more features than QMP, so let's use...
monitor: add PPC BookE SPRs
Read them via KVM_GET_SREGS in kvm_arch_get_registers(),and display them in "info registers".
Also get CR and PID from the existing KVM_GET_REGS.
monitor: Remove some type casts which are no longer needed
All other type casts in calls of cpu_physical_memory_read areused by hardware emulations and will be fixed by separate patches.
Cc: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
Replace cpu_physical_memory_rw were possible
Using cpu_physical_memory_read, cpu_physical_memory_write and ldub_physimproves readability and allows removing some type casts.
lduw_phys and ldl_phys were not used because both require alignedaddresses. Therefore it is not possible to simply replace existing...
Parse SDR1 on mtspr instead of at translate time
On ppc machines with hash table MMUs, the special purpose register SDR1contains both the base address of the encoded size (hashed) page tables.
At present, we interpret the SDR1 value within the address translation...
Make VNC support optional
Per default VNC is enabled.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote branch 'qemu-kvm/uq/master' into staging
change all other clock references to use nanosecond resolution accessors
This was done with:
sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \ $(git grep -l 'qemu_get_clock\>' ) sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \ $(git grep -l 'qemu_new_timer\>' )...
Expose thread_id in info cpus
Based on patch by Glauber Costa:
To allow management applications like libvirt to apply CPU affinities tothe VCPU threads, expose their ID via info cpus. This patch provides thepre-existing and used interface from qemu-kvm....
x86: Small cleanups of MCE helpers
Fix some code style issues, use proper headers, and align to cpu_x86naming scheme. No functional changes.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>CC: Huang Ying <ying.huang@intel.com>CC: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>...
x86: Refine error reporting of MCE injection services
As this service is used by the human monitor, make sure that errors getreported to the right channel, and also raise the verbosity.
This requires to move Monitor typedef in qemu-common.h to resolve the...
x86: Optionally avoid injecting AO MCEs while others are pending
Allow to tell cpu_x86_inject_mce that it should ignore Action OptionalMCE events when the target VCPU is still processing another one. Thiswill be used by KVM soon.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Improve vm_stop reason declarations
Define and use dedicated constants for vm_stop reasons, they actuallyhave nothing to do with the EXCP_* defines used so far. At this chance,specify more detailed reasons so that VM state change handlers canevaluate them....
add qemu_chr_set_echo
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
aliguori: fix build with !defined(KVM_CAP_ASYNC_PF)
Merge remote branch 'spice/spice.v29.pull' into staging
Conflicts: trace-events
vnc: Fix password expiration through 'change vnc ""' (v2)
commit 52c18be9e99dabe295321153fda7fce9f76647ac introduced a regression in thechange vnc password command that changed the behavior of setting the VNCpassword to an empty string from disabling login to disabling authentication....
monitor: use after free in do_wav_capture()
use after free in do_wav_capture() on the error path.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
spice/vnc: client migration.
Handle spice client migration, i.e. inform a spice client connectedabout the new host and connection parameters, so it can move over theconnection automatically.
The monitor command has a not-yet used protocol argument simliar to...
vnc/spice: fix "never" and "now" expire_time
Make strtosz() return int64_t instead of ssize_t
strtosz() needs to return a 64 bit type even on 32 bitarchitectures. Otherwise qemu-img will fail to create diskimages >= 2GB
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Add "broadcast" option for mce command
When the following test case is injected with mce command, maybe user could notget the expected result. DATA command cpu bank status mcg_status addr misc (qemu) mce 1 1 0xbd00000000000000 0x05 0x1234 0x8c...
monitor: fix a typo
Fix usage of wrong variable, spotted by clang:/src/qemu/monitor.c:2278:36: warning: The left operand of '&' is a garbage value prot = pde & (PG_USER_MASK | PG_RW_MASK |
Merge branch 'spice.v23.pull' of git://anongit.freedesktop.org/spice/qemu
Sparc: implement monitor command 'info tlb'
Use existing dump_mmu() to implement monitor command 'info tlb'.
Merge remote branch 'qmp/for-anthony' into staging
monitor: implement x86 info mem for PAE and long modes
'info mem' didn't show correct information for PAE mode andx86_64 long mode.
Fix by implementing the output for missing modes.
monitor: implement x86 info tlb for PAE and long modes
'info tlb' didn't show correct information for PAE mode andx86_64 long mode.
Implement the missing modes. Also print NX bit for PAE and long modes.Fix off-by-one error in 32 bit mode mask.
vnc/spice: add set_passwd monitor command.
This patch adds new set_password and expire_password monitor commandswhich allows to change and expire the password for spice and vncconnections. See the doc update patch chunk for details.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
spice: connection events.
This patch adds support for connection events to spice. The events arequite simliar to the vnc events. Unlike vnc spice uses multiple tcpchannels though. qemu will report every single tcp connection (akaspice channel). If you want track spice sessions only you can filter...
spice: add qmp 'query-spice' and hmp 'info spice' commands.
The patch adds a 'query-spice' monitor command which returnsinformations about the spice server configuration and also a list ofchannel connections.
QMP: Fix default response regression
Commit 030db6e89d dropped do_info() usage from QMP and introducedqmp_call_query_cmd(). However, the new function doesn't emit QMP'sdefault OK response when the handler doesn't return data.
Fix that by also calling monitor_protocol_emitter() when...
QMP: Drop dead code
The first if/else clause in handler_audit() makes no sense for tworeasons:
1. this function is now called only by QMP code, so testing if it's a QMP call makes no sense anymore
2. the else clause first asserts that there's no error in the...
QMP: Simplify monitor_json_emitter()
Use the ternary operator instead of an if (also fixes bad indentation).
QMP: Introduce Human Monitor passthrough command
This command allows QMP clients to execute HMP commands.
Please, check the documentation added to the qmp-commands.hx filefor additional details about the interface and its limitations.
Add support for 'o' octet (bytes) format as monitor parameter.
Octet format relies on strtosz which supports K/k, M/m, G/g, T/tsuffixes and unit support for humans, like 1.3G
Remove obsolete 'f' double parameter type
'f' double is no longer used, and we should be using floating pointvariables to store byte sizes. Remove it.
monitor: Ignore "." and ".." when completing file name.
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>