summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* json: fix PRId64 on Win32Roy Tam2010-02-102-1/+18
| | | | | | | | | | OK we are fooled by the json lexer and parser. As we use %I64d to print 'long long' variables in Win32, but lexer and parser only deal with %lld but not %I64d, this patch add support for %I64d and solve 'info pci', 'powser_reset' and 'power_powerdown' assert failure in Win32. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* fix inet_parse typoMarcelo Tosatti2010-02-101-4/+4
| | | | | | | qemu_opt_set wants on/off, not yes/no. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* iothread: fix vcpu stop with smp tcgMarcelo Tosatti2010-02-101-2/+3
| | | | | | | | Round robin vcpus in tcg_cpu_next even if the vm stopped. This allows all cpus to enter stopped state. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: spec: Capability negotiation updatesLuiz Capitulino2010-02-101-17/+29
| | | | | Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Enforce capability negotiation rulesLuiz Capitulino2010-02-101-1/+17
| | | | | | | | | | | | | | | With this commit QMP will be started in Capabilities Negotiation mode, where the only command allowed to run is 'qmp_capabilities'. All other commands will return CommandNotFound error. Asynchronous messages are not delivered either. When 'qmp_capabilities' is successfully executed QMP enters in Command mode, where all commands (except 'qmp_capabilities') are allowed to run and asynchronous messages are delivered. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Introduce the qmp_capabilities commandLuiz Capitulino2010-02-102-0/+25
| | | | | | | | | | | | | | | | | | | | | This command will be used to enable QMP capabilities advertised by the capabilities array. Note that it will be mandatory to issue this command in order to make QMP functional (although this behavior is not being enforced by this commit). Also, as we don't have any capabilities yet, the new command doesn't accept any arguments. I will postpone the decision for a format for this until we get our first capability. Finally, this command is visible from the user Monitor too, in the meaning that you can execute it but it won't do anything. Making it only visible in QMP is beyond this series' goal, as it requires changes in unrelated places. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: Add QEMU's version to the greeting messageLuiz Capitulino2010-02-103-5/+17
| | | | | | | | | | | | | | | | | With capability negotiation support clients will only have a chance to check QEMU's version (ie. issue 'query-version') after the negotiation procedure is done. It might be useful to clients to check QEMU's version before negotiating features, though. To allow that, this commit adds the QEMU's version object to the greeting message. Not really sure this is needed, but doesn't hurt anyway. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* segfault due to buffer overrun in usb-serialDavid S. Ahern2010-02-101-6/+22
| | | | | | | | | | | | This fixes a segfault due to buffer overrun in the usb-serial device. The memcpy was incrementing the start location by recv_used yet, the computation of first_size (how much to write at the end of the buffer before wrapping to the front) was not accounting for it. This causes the next element after the receive buffer (recv_ptr) to get overwritten with random data. Signed-off-by: David Ahern <daahern@cisco.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* audio streaming from usb devicesDavid S. Ahern2010-02-101-12/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have streaming audio devices working within qemu-kvm. This is a port of the changes to qemu. Streaming audio generates a series of isochronous requests that are repetitive and time sensitive. The URBs need to be submitted in consecutive USB frames and responses need to be handled in a timely manner. Summary of the changes for isochronous requests: 1. The initial 'valid' value is increased to 32. It needs to be higher than its current value of 10 since the host adds a 10 frame delay to the scheduling of the first request; if valid is set to 10 the first isochronous request times out and qemu cancels it. 32 was chosen as a nice round number, and it is used in the path where a TD-async pairing already exists. 2. The token field in the TD is *not* unique for isochronous requests, so it is not a good choice for finding a matching async request. The buffer (where to write the guest data) is unique, so use that value instead. 3. TD's for isochronous request need to be completed in the async completion handler so that data is pushed to the guest as soon as it is available. The uhci code currently attempts to process complete isochronous TDs the next time the UHCI frame with the request is processed. The results in lost data since the async requests will have long since timed out based on the valid parameter. Increasing the valid value is not acceptable as it introduces a 1+ second delay in the data getting pushed to the guest. 4. The frame timer needs to be run on 1 msec intervals. Currently, the expire time for the processing the next frame is computed after the processing of each frame. This regularly causes the scheduling of frames to shift in time. When this happens the periodic scheduling of the requests is broken and the subsequent request is seen as a new request by the host resulting in a 10 msec delay (first isochronous request is scheduled for 10 frames from when the URB is submitted). [ For what's worth a small change is needed to the guest driver to have more outstanding URBs (at least 4 URBs with 5 packets per URB).] Signed-off-by: David Ahern <daahern@cisco.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vnc: Migrate to using QTAILQ instead of custom implementationAmit Shah2010-02-102-48/+31
| | | | | | | Just a 1-1 conversion for now. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* kvm: reduce code duplication in config_iothreadAmit Shah2010-02-101-6/+3
| | | | | | | | We have some duplicated code in the CONFIG_IOTHREAD #ifdef and #else cases. Fix that. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Documentation: Add command line options to function indexStefan Weil2010-02-101-28/+125
| | | | | | | | | | | * Add line options to function index. * Add description for -set (TODO). * Add description for -global (TODO). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Documentation: Add monitor commands to function indexStefan Weil2010-02-101-1/+61
| | | | | | | | | * Add monitor commands to function index. * Fix description for acl_remove. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Documentation: Enhance documentation (index, keywords)Stefan Weil2010-02-101-6/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Add some keywords for the concept index. * Add some keywords for the keystroke index. * Mark invalid or unclear documentation with TODO. Is there a better proposal how to do this? * Fix copy+paste error in ColdFire section (options were copied from ARM). * Fix documentation for Wine. * Add placeholders for missing system emulations. * Add placeholders for missing user emulation commands. * Add an appendix with license (to be discussed). * Add an appendix for every type of index which is supported by texinfo. Currently, not all are used, but this might change in the future. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Documentation: Fix item listStefan Weil2010-02-101-1/+1
| | | | | | | | | | @itemize @minus does not work as expected (the items start with "* -"). A simple @itemize gives a better result. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Documentation: Add some basic documentation on make targetsStefan Weil2010-02-101-0/+41
| | | | | | | This should help new users to get started. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Documentation: Use UTF-8 encoding and fix one wrong encodingStefan Weil2010-02-102-1/+9
| | | | | | | | | | | | | | | | | | | | | | At least for Linux distributions UTF-8 is now standard, so the QEMU documentation should use this encoding, too. Even if there was currently only a single special character using ISO-8859-1, this might change in the future. So the texinfo keywords @documentlanguage and @documentencoding now document the language and the encoding. The special character was changed to UTF-8 (it could also have been changed to an x, but the original cross looks really nice if it is displayed correctly). These changes fix the html presentation at http://www.qemu.org/qemu-doc.html#SEC65 (ARM System emulator). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Documentation: Add direntry for info formatStefan Weil2010-02-102-0/+12
| | | | | | | | | | | | | | update-info-dir maintains an index of all available documentation in info format (the file /usr/share/info/dir). It reads special @direntry tags in info files. This patch (extracted from a larger patch provided by Dirk Ullrich) adds these tags for qemu-doc.info and qemu-tech.info. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block: saner flags filtering in bdrv_open2Christoph Hellwig2010-02-101-7/+14
| | | | | | | | | | | Clean up the current mess about figuring out which flags to pass to the driver. BDRV_O_FILE, BDRV_O_SNAPSHOT and BDRV_O_NO_BACKING are flags only used by the block layer internally so filter them out directly. Previously BDRV_O_NO_BACKING could accidentally be passed to the drivers, but wasn't ever used. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-blk: Generate BLOCK_IO_ERROR QMP eventLuiz Capitulino2010-02-101-1/+5
| | | | | | | Just call bdrv_mon_event() in the right place. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* scsi: Generate BLOCK_IO_ERROR QMP eventLuiz Capitulino2010-02-101-1/+5
| | | | | | | Just call bdrv_mon_event() in the right place. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* ide: Generate BLOCK_IO_ERROR QMP eventLuiz Capitulino2010-02-101-1/+5
| | | | | | | Just call bdrv_mon_event() in the right place. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* block: BLOCK_IO_ERROR QMP eventLuiz Capitulino2010-02-102-0/+35
| | | | | | | | | | | | | | | | | | | | | | | This commit introduces the bdrv_mon_event() function, which should be called by block subsystems (eg. IDE) when a I/O error occurs, so that an QMP event is emitted. The following information is currently provided in the event: - device name - operation (ie. "read" or "write") - action taken (eg. "stop") Event example: { "event": "BLOCK_IO_ERROR", "data": { "device": "ide0-hd1", "operation": "write", "action": "stop" }, "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QMP: BLOCK_IO_ERROR event handlingLuiz Capitulino2010-02-103-0/+25
| | | | | | | | | This commit adds the basic definitions for the BLOCK_IO_ERROR event, but actual event emission will be introduced by the next commits. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qcow2: Fix signedness bugsKevin Wolf2010-02-102-10/+8
| | | | | | | | Checking for return codes < 0 isn't really going to work with unsigned types. Use signed types instead. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-img: Fix qemu-img can't create qcow image based on read-only imageSheng Yang2010-02-101-5/+10
| | | | | | | | | | Commit 03cbdac7 "Disable fall-back to read-only when cannot open drive's file for read-write" result in read-only image can't be used as backed image in qemu-img. Cc: Naphtali Sprei <nsprei@redhat.com> Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* doc: Update mingw cross compile instructionsScott Tsai2010-02-101-14/+31
| | | | | | | | | | | | | | | | | The "Cross compilation for Windows with Linux" section of qemu-doc.texi still instructs the user to use 'configure --enable-mingw32' even after the option was removed in Aug 2008: http://git.savannah.gnu.org/cgit/qemu.git/commit/?id=cd01b4a312248dd4e12c3d389d1a349cea4015d8 This documentation only change updates the instructions to: * Remove use of '--enable-mingw32' in the configure example * Correct the 'sdl-config' script name * Remove references to i386-mingw32msvc.tar.gz which no longer exists in recent SDL releases * Document the zlib dependency Signed-off-by: Scott Tsai <scottt.tw@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Do not ignore error, if open file failed (-serial /dev/tty)Evgeniy Dushistov2010-02-101-0/+3
| | | | | | | | | In case, when qemu is executed with option like -serial /dev/ttyS0, report if there are problems with opening of devices. At now errors are silently ignoring. Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Documentation: Add build support for documentation in pdf formatStefan Weil2010-02-102-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | Makefile already supported dvi, html and info formats, but pdf was missing. pdf is especially convenient for printing and for documentation reviews. I hope it will help to improve qemu's documentation. Make now supports the new target 'pdf' which will create qemu-doc.pdf and qemu-tech.pdf. It is also possible to build both files individually. texi2pdf and texi2dvi are rather noisy, so normally some less important warnings are suppressed. When make is called with V=1 (verbose mode), warnings are not suppressed. The patch also sorts the documentation targets alphabetically and wraps a line which was too long. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* fix placement of config-host.h inclusionPaolo Bonzini2010-02-101-3/+4
| | | | | | | The #ifdef CONFIG_SOLARIS below was useless without this patch. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* loop write in qemu_event_increment upon EINTRPaolo Bonzini2010-02-101-2/+6
| | | | | | | Same as what qemu-kvm does. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* do not loop on an incomplete io_thread_fd readPaolo Bonzini2010-02-101-2/+2
| | | | | | | | No need to loop if less than a full buffer is read, the next read would return EAGAIN. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Try not to exceed max downtime on stage3Liran Schour2010-02-091-9/+70
| | | | | | | | Move to stage3 only when remaining work can be done below max downtime. Use qemu_get_clock_ns for measuring read performance. Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Count dirty blocks and expose an API to get dirty countLiran Schour2010-02-093-2/+16
| | | | | | | | This will manage dirty counter for each device and will allow to get the dirty counter from above. Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Tranfer dirty blocks during iterative phaseLiran Schour2010-02-091-36/+99
| | | | | | | | Start transfer dirty blocks during the iterative stage. That will reduce the time that the guest will be suspended Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* add qemu_get_clock_nsPaolo Bonzini2010-02-092-2/+20
| | | | | | | | | Some places use get_clock directly because they want to access the rt_clock with nanosecond precision. Add a function to do exactly that instead of using internal interfaces. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Remove unused codeLiran Schour2010-02-091-43/+18
| | | | | | | | | blk_mig_save_bulked_block is never called with sync flag. Remove the sync flag. Calculate bulk completion during blk_mig_save_bulked_block. Remove unused constants. Signed-off-by: Liran Schour <lirans@il.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* kvm: move kvm to use memory notifiersMichael S. Tsirkin2010-02-093-30/+35
| | | | | | | | | remove direct kvm calls from exec.c, make kvm use memory notifiers framework instead. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* kvm: move kvm_set_phys_mem aroundMichael S. Tsirkin2010-02-091-138/+138
| | | | | | | | | | move kvm_set_phys_mem so that it will be later available earlier in the file. needed for next patch using memory notifiers. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu: memory notifiersMichael S. Tsirkin2010-02-092-3/+129
| | | | | | | | | | This adds notifiers for phys memory changes: a set of callbacks that vhost can register and update kernel accordingly. Down the road, kvm code can be switched to use these as well, instead of calling kvm code directly from exec.c as is done now. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* tcg/mips: fix crash in tcg_out_qemu_ld()Aurelien Jarno2010-02-091-2/+2
| | | | | | | | The address register is overriden when it corresponds to v0 and the fast path is taken, which leads to a crash. Fix that by using the a0 register instead. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-sh4: MMU: separate execute and read/write permissionsAurelien Jarno2010-02-091-21/+6
| | | | | | | | | On SH4, the ITLB and UTLB configurations are memory mapped, so loading ITLB entries from UTLB has to be simulated correctly. For that the QEMU TLB has to be handle the execute (ITLB) and read/write permissions (UTLB) seperately. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-sh4: MMU: fix store queue addressesAurelien Jarno2010-02-091-1/+1
| | | | | | The store queues are located from 0xe0000000 to 0xe3ffffff. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-sh4: MMU: remove dead codeAurelien Jarno2010-02-091-18/+0
| | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-sh4: MMU: reduce the size of a TLB entryAurelien Jarno2010-02-091-12/+11
| | | | | | | Reduce the size of the TLB entry from 32 to 16 bytes, reorganising members and using a bit field. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-sh4: MMU: optimize UTLB accessesAurelien Jarno2010-02-091-24/+14
| | | | | | | | | | | | | | | With the current code, the QEMU TLB is setup to match the read/write mode of the MMU fault. This means when read access is done, the page is setup in read-only mode. When the page is later accessed in write mode, an MMU fault happened, and the page is switch in write-only mode. This flip-flop causes a lot of calls to the MMU code and slow down the emulation. This patch changes the MMU emulation, so that the QEMU TLB is setup to match the UTLB protection key. This impressively increase the speed of the emulation. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-sh4: MMU: fix ITLB priviledge checkAurelien Jarno2010-02-091-1/+1
| | | | | | | There is an ITLB access violation if SR_MD=0 (user mode) while the high bit of the protection key is 0 (priviledge mode). Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-sh4: MMU: simplify call to tlb_set_page()Aurelien Jarno2010-02-091-6/+3
| | | | | | | tlb_set_page() doesn't need addresses with offset, but simply the page aligned addresses. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-sh4: MMU: fix mem_idx computationAurelien Jarno2010-02-091-1/+1
| | | | | | | | The mem_idx is wrongly computed. As written in target-sh4/cpu.h, mode 0 corresponds to kernel mode (SR_MD = 1), while mode 1 corresponds to user mode (SR_MD = 0). Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* sh7750: handle MMUCR TI bitAurelien Jarno2010-02-093-2/+25
| | | | | | | When the MMUCR TI bit is set, all the UTLB and ITLB entries should be flushed. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
OpenPOWER on IntegriCloud