History | View | Annotate | Download (130.7 kB)
qmp: add and use q type specifier
"O" is being used by the transaction and qom-set commands to mean "anyQObject", but it really means "do not validate the argument list".Add a new specifier with the correct meaning.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
monitor: fix client_migrate_info error handling
Report QERR_MISSING_PARAMETER when port is missing. OtherwiseQERR_UNDEFINED_ERROR will occur.
rhbz #795652
Signed-off-by: Yonit Halperin <yhalperi@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
monitor: Remove unused bool field 'qapi' in mon_cmd_t struct
Some minor code cleanup: the 'qapi' bool field in mon_cmd_t isunused, and can be removed.
Signed-off-by: Jeff Cody <jcody@redhat.com>Acked-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Rename CPUState -> CPUArchState
Scripted conversion: for file in .[hc] hw/.[hc] hw/kvm/*.[hc] linux-user/*.[hc] linux-user/m68k/*.[hc] bsd-user/*.[hc] darwin-user/*.[hc] tcg/*/*.[hc] target-*/cpu.h; do sed -i "s/CPUState/CPUArchState/g" $file done...
monitor: Don't access registers through CPUState
Use CPUX86State etc. instead (hand-converted).
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Merge branch 'xtensa' of git://jcmvbkbc.spb.ru/dumb/qemu-xtensa
suspend: add qmp events
Send qmp events on suspend and wakeup so libvirthas a chance to track the vm state.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qmp: add DEVICE_TRAY_MOVED event
It's emitted whenever the tray is moved by the guest or by HMP/QMPcommands.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>Acked-by: Kevin Wolf <kwolf@redhat.com>
Add SPICE support to add_client monitor command
With the acceptance of some new APIs to libspice-server.so itis possible to add support for SPICE to the 'add_client'monitor command, bringing parity with VNC. Since SPICE canuse TLS or plain connections, the command also gains a new...
target-xtensa: implement info tlb monitor command
Command dumps valid ITLB and DTLB entries.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
qmp: add block_job_cancel command
Add block_job_cancel, which stops an active block streaming operation.When the operation has been cancelled the new BLOCK_JOB_CANCELLED eventis emitted.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Acked-by: Luiz Capitulino <lcapitulino@redhat.com>...
qmp: add query-block-jobs
Add query-block-jobs, which shows the progress of ongoing block deviceoperations.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Acked-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qmp: add block_stream command
Add the block_stream command, which starts copy backing file contentsinto the image file. Also add the BLOCK_JOB_COMPLETED QMP event whichis emitted when image streaming completes. Later patches add controlover the background copy speed, cancelation, and querying running...
monitor: expose readline state
HMP is now implemented in terms of QMP. The monitor has a bunch of logic todeal with HMP right now like readline support. Export it from the monitor sowe can consume it in hmp.c.
In short time, hmp.c will take over all of the readline bits....
qerror: Extend QERR_DEVICE_ENCRYPTED
Include the name of the encrypted file.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: Convert change
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
vnc: Simplify vnc_display_password()
Drop the qerror_report() call from it and let its callers set the errorthemselves. This also allows for dropping the 'ret' variable.
qapi: Convert set_password
qapi: Convert expire_password
qapi: Convert pmemsave
qapi: Convert cont
qapi: Convert inject-nmi
qapi: Convert human-monitor-command
qapi: Complete system_powerdown conversion
Commit 5bc465e4b1b6f4582a400c0a7033a1c841744278 converted onlythe HMP part of the system_powerdown command to the QAPI, thiscommit completes it by converting the QMP part too.
qapi: Convert memsave
Please, note that the QMP command has a new 'cpu-index' parameter.
monitor: Fix file_completion() to check for stat() failure
stat() can fail for a file name just read with readdir(). Easiest wayto trigger is a dangling symbolic link --- look ma, no race! When itfails, file_completion() uses sb.st_mode uninitialized. If the...
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
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().
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: 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>...