summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* PPC: Make interrupts workAlexander Graf2010-02-141-3/+11
| | | | | | | | | | | | | | | | | | | | | | The interrupt code as is didn't really work for me. I couldn't even convince Linux to take interrupt 9 in an interrupt-map. So let's do this right. Let's map all PCI interrupts to 0x1b - 0x1e. That way we're at least a small step closer to what real hardware does. I also took the interrupt pin to line conversion from OpenBIOS, which at least assures us we're compatible with our firmware :-). A dump of the PCI interrupt-map from a U2 (iBook): 00009000 00000000 00000000 00000000 ff97c528 00000034 00000001 0000d800 00000000 00000000 00000000 ff97c528 0000003f 00000001 0000c000 00000000 00000000 00000000 ff97c528 0000001b 00000001 0000c800 00000000 00000000 00000000 ff97c528 0000001c 00000001 0000d000 00000000 00000000 00000000 ff97c528 0000001d 00000001 Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* PPC: Include dump of lspci -nn on real G5Alexander Graf2010-02-141-0/+24
| | | | | | | | | | | To ease debugging and to know what we're lacking, I found it really useful to have an lspci dump of a real U3 based G5 around. So I added a comment for it. If people don't think it's important enough to include this information in the sources, just don't apply this patch. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* PPC: Use Mac99_U3 type on ppc64Alexander Graf2010-02-145-2/+83
| | | | | | | | | | | | | The "Mac99" type so far defines a "U2" based configuration. Unfortunately, there have never been any U2 based PPC64 machines. That's what the U3 was developed for. So let's split the Mac99 machine in a PPC64 and a PPC32 machine. The PPC32 machine stays "Mac99", while the PPC64 one becomes "Mac99_U3". All peripherals stay the same. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* PPC: Uninorth config space accessorAlexander Graf2010-02-141-1/+66
| | | | | | | | | | | | | | | The Uninorth PCI bridge requires different layouts in its PCI config space accessors. This patch introduces a conversion function that makes it compatible with the way Linux accesses it. I also kept an OpenBIOS compatibility hack in. I think it'd be better to take small steps here and do the config space access rework in OpenBIOS later on. When that's done we can remove that hack. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pci_host: rewrite using rwhandlerMichael S. Tsirkin2010-02-143-211/+74
| | | | | | Save a ton of code by switching pcihost to use rwhandler. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* rwhandler: simplified way to register for mem/ioMichael S. Tsirkin2010-02-143-0/+119
| | | | | | | | | | | | | | | Some users prefer a single callback with length passed as parameter to using b/w/l callbacks. It would maybe be cleaner to just pass length to existing callbacks but that's a lot of churn. So for now add a wrapper. For convenience use pcibus_t for address so a single callback can be used for pci io and pci memory. I did have to resort to preprocessor to reduce code duplication. It is however slightly more straightforward, and better contained than what we had with pci_host_template.h. Again, it would go away if we just passed len to existing callbacks. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* bwap: add qemu_bswap helperMichael S. Tsirkin2010-02-141-0/+6
| | | | | | add helper that can swap values of 4, 2, 1 bytes Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pci: move pcibus_t to qemu-commonMichael S. Tsirkin2010-02-142-1/+2
| | | | | | move pcibus_t to qemu-common.h to simplify header dependencies. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* Remove conditional rom loading supportBlue Swirl2010-02-143-9/+0
| | | | | | | | Commit c2039bd0ffce8807e0eaac55254fde790825fa92 made rom loading automatic for non-PC architectures. Remove now mostly unused conditional rom loading support. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Fix incorrect exception_index useBlue Swirl2010-02-143-4/+4
| | | | | | | | | | env->exception_index should be cleared with -1, not 0. See also 821b19fe923ac49a24cdb4af902584fdd019cee6. Spotted by Igor Kovalenko. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* pci: fix info pci with host bridge.Isaku Yamahata2010-02-131-3/+3
| | | | | | | | | | | This patch fixes 525e05147d5a3bdc08caa422d108c1ef71b584b5. pci host bridge doesn't have header type of bridge. The check should be by header type, instead of pci class device. Cc: Blue Swirl <blauwirbel@gmail.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge branch 'for_anthony' of ↵Blue Swirl2010-02-131-1/+1
|\ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu * 'for_anthony' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu: pci: fix pci_find_bus()
| * pci: fix pci_find_bus()Isaku Yamahata2010-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | typo in c021f8e65f5009a5ab5711d9d5326fcab553ef1c. comparison fix. Cc: Blue Swirl <blauwirbel@gmail.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | ide: add topology supportChristoph Hellwig2010-02-101-0/+2
| | | | | | | | | | | | | | | | Export the physical block size in the ATA IDENTIFY command. The other topology values are not supported in ATA so skip them. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | scsi: add topology supportChristoph Hellwig2010-02-101-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Export the physical block size in the READ CAPACITY (16) command, and add the new block limits VPD page to export the minimum and optiomal I/O sizes. Note that we also need to bump the scsi revision level to SPC-2 as that is the minimum requirement by at least the Linux kernel to try READ CAPACITY (16) first and look at the block limits VPD page. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | virtio-blk: add topology supportChristoph Hellwig2010-02-102-0/+12
| | | | | | | | | | | | | | | | Export all topology information in the block config structure, guarded by a new VIRTIO_BLK_F_TOPOLOGY feature flag. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | block: add topology qdev propertiesChristoph Hellwig2010-02-1013-73/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add three new qdev properties to export block topology information to the guest. This is needed to get optimal I/O alignment for RAID arrays or SSDs. The options are: - physical_block_size to specify the physical block size of the device, this is going to increase from 512 bytes to 4096 kilobytes for many modern storage devices - min_io_size to specify the minimal I/O size without performance impact, this is typically set to the RAID chunk size for arrays. - opt_io_size to specify the optimal sustained I/O size, this is typically the RAID stripe width for arrays. I decided to not auto-probe these values from blkid which might easily be possible as I don't know how to deal with these issues on migration. Note that we specificly only set the physical_block_size, and not the logial one which is the unit all I/O is described in. The reason for that is that IDE does not support increasing the logical block size and at last for now I want to stick to one meachnisms in queue and allow for easy switching of transports for a given backing image which would not be possible if scsi and virtio use real 4k sectors, while ide only uses the physical block exponent. To make this more common for the different block drivers introduce a new BlockConf structure holding all common block properties and a DEFINE_BLOCK_PROPERTIES macro to add them all together, mirroring what is done for network drivers. Also switch over all block drivers to use it, except for the floppy driver which has weird driveA/driveB properties and probably won't require any advanced block options ever. Example usage for a virtio device with 4k physical block size and 8k optimal I/O size: -drive file=scratch.img,media=disk,cache=none,id=scratch \ -device virtio-blk-pci,drive=scratch,physical_block_size=4096,opt_io_size=8192 aliguori: updated patch to take into account BLOCK events Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | virtio-blk: revert serial number supporthch@lst.de2010-02-102-64/+3
| | | | | | | | | | | | | | | | | | | | The addition of the whole ATA IDENTIY page caused the config space to go above the allowed size in the PCI spec, and thus the feature was already reverted in the Linux guest driver and disabled by default in qemu. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | Increase VNC_MAX_WIDTHBrian Jackson2010-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | Increase VNC_MAX_WIDTH to match "commonly available" consumer level monitors available these days. This also closes KVM bug 2907597 Signed-off-by: Brian Jackson <iggy@theiggy.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | qemu-img: use the heap instead of the huge stack array for win32TeLeMan2010-02-101-3/+11
| | | | | | | | | | | | | | | | | | | | | | The default stack size of PE is 1MB on win32 and IO_BUF_SIZE in img_convert() & img_rebase() is 2MB, so qemu-img will crash when doing "convert" & "rebase" on win32. Although we can improve the stack size of PE to resolve it, I think we should avoid using the huge stack variables. Signed-off-by: TeLeMan <geleman@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | don't dereference NULL after failed strdupJim Meyering2010-02-104-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of these are obvious NULL-deref bug fixes, for example, the ones in these files: block/curl.c net.c slirp/misc.c and the first one in block/vvfat.c. The others in block/vvfat.c may not lead to an immediate segfault, but I traced the two schedule_rename(..., strdup(path)) uses, and a failed strdup would appear to trigger this assertion in handle_renames_and_mkdirs: assert(commit->path); The conversion to use qemu_strdup in envlist_to_environ is not technically needed, but does avoid a theoretical leak in the caller when strdup fails for one value, but later succeeds in allocating another buffer(plausible, if one string length is much larger than the others). The caller does not know the length of the returned list, and as such can only free pointers until it hits the first NULL. If there are non-NULL pointers beyond the first, their buffers would be leaked. This one is admittedly far-fetched. The two in linux-user/main.c are worth fixing to ensure that an OOM error is diagnosed up front, rather than letting it provoke some harder-to-diagnose secondary error, in case of exec failure, or worse, in case the exec succeeds but with an invalid list of command line options. However, considering how unlikely it is to encounter a failed strdup early in main, this isn't a big deal. Note that adding the required uses of qemu_strdup here and in envlist.c induce link failures because qemu_strdup is not currently in any library they're linked with. So for now, I've omitted those changes, as well as the fixes in target-i386/helper.c and target-sparc/helper.c. If you'd like to see the above discussion (or anything else) in the commit log, just let me know and I'll be happy to adjust. >From 9af42864fd1ea666bd25e2cecfdfae74c20aa8c7 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@redhat.com> Date: Mon, 8 Feb 2010 18:29:29 +0100 Subject: [PATCH] don't dereference NULL after failed strdup Handle failing strdup by replacing each use with qemu_strdup, so as not to dereference NULL or trigger a failing assertion. * block/curl.c (curl_open): s/\bstrdup\b/qemu_strdup/ * block/vvfat.c (init_directories): Likewise. (get_cluster_count_for_direntry, check_directory_consistency): Likewise. * net.c (parse_host_src_port): Likewise. * slirp/misc.c (fork_exec): Likewise. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | QMP: Don't leak on connection closeLuiz Capitulino2010-02-101-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | QMP's chardev event callback doesn't call json_message_parser_destroy() on CHR_EVENT_CLOSED. As the call to json_message_parser_init() on CHR_EVENT_OPENED allocates memory, we'are leaking on close. Fix that by just calling json_message_parser_destroy() on CHR_EVENT_CLOSED. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | QError: Don't abort on multiple faultsLuiz Capitulino2010-02-101-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ideally, Monitor code should report an error only once and return the error information up the call chain. To assure that this happens as expected and that no error is lost, we have an assert() in qemu_error_internal(). However, we still have not fully converted handlers using monitor_printf() to report errors. As there can be multiple monitor_printf() calls on an error, the assertion is easily triggered when debugging is enabled; and we will get a memory leak if it's not. The solution to this problem is to allow multiple faults by only reporting the first one, and to release the additional error objects. A better mechanism to report multiple errors to programmers is underway. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | Monitor: remove unneeded checksLuiz Capitulino2010-02-104-12/+0
| | | | | | | | | | | | | | | | It's not needed to check the return of qobject_from_jsonf() anymore, as an assert() has been added there. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | qjson: Improve debuggingLuiz Capitulino2010-02-101-0/+5
| | | | | | | | | | | | | | | | Add an assert() to qobject_from_jsonf() to assure that the returned QObject is not NULL. Currently this is duplicated in the callers. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | virtio-net: fix network stall under loadTom Lendacky2010-02-101-1/+9
| | | | | | | | | | | | | | | | | | Fix a race condition where qemu finds that there are not enough virtio ring buffers available and the guest make more buffers available before qemu can enable notifications. Signed-off-by: Tom Lendacky <toml@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | 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>
OpenPOWER on IntegriCloud