summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* hw/qxl: qxl_send_events: nop if stoppedAlon Levy2013-01-121-0/+1
| | | | | | | | | | Added a trace point for easy logging. RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=870972 Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 511aefb0c60e3063ead76d4ba6aabf619eed18ef)
* hw/qxl: tracing fixesAlon Levy2012-11-131-2/+4
| | | | | | | | | | | | | | | | | | Add two new trace events: qxl_send_events(int qid, uint32_t events) "%d %d" qxl_set_guest_bug(int qid) "%d" Change qxl_io_unexpected_vga_mode parameters to be equivalent to those of qxl_io_write for easier grouping under a single systemtap probe. Change d to qxl in one place. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 917ae08ca1565aab2d10c8b6269cd905d6c5c05b) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> (cherry picked from commit bffb221775792f89b4214aa8f7616bfbb760a668)
* ehci: switch to new-style memory opsGerd Hoffmann2012-11-131-3/+6
| | | | | | | | | | | | | | | | | | | Also register different memory regions for capabilities, operational registers and port status registers. Create separate tracepoints for operational regs and port status regs. Ditch a bunch of sanity checks because the memory core will do this for us now. Offloading the byte, word and dword access handling to the memory core also has the side effect of fixing ehci register access on bigendian hosts. Cc: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 3e4f910c8d490a1490409a7e381dbbb229f9d272) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> (cherry picked from commit 1f97f6c9fe45bcfc9e59d23076e5a39f1e22de51)
* xhci: drop bufferingGerd Hoffmann2012-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch splits the xhci_xfer_data function into three. The xhci_xfer_data function used to do does two things: (1) copy transfer data between guest memory and a temporary buffer. (2) report transfer results to the guest using events. Now we three functions to handle this: (1) xhci_xfer_map creates a scatter list for the transfer and uses that (instead of the temporary buffer) to build a USBPacket. (2) xhci_xfer_unmap undoes the mapping. (3) xhci_xfer_report sends out events. The patch also fixes reporting of transaction errors which must be reported unconditinally, not only in case the guest asks for it using the ISP flag. [ v2: fix warning ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit d5a15814b413869667b2a3215772986885be574a) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> (cherry picked from commit 640bda8df50d07daccceb646ed7d047bf1080c55)
* ehci: add doorbell trace eventsGerd Hoffmann2012-11-131-0/+2
| | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 1defcbd1e81d67476b6e4e486bcd4d869162900d) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> (cherry picked from commit d294ad632382a89b8219d7bb7ae675256a39f162)
* ehci: trace guest bugsGerd Hoffmann2012-11-131-0/+1
| | | | | | | | | | | | make qemu_queue_{cancel,reset} return the number of packets released, so the caller can figure whenever there have been active packets even though there shouldn't have been any. Add tracepoint to log this. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 5c514681abbb3ae2f61f517c1aa3197f2f3ca93c) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> (cherry picked from commit 62fc5e6983152380d11d88ae5d3374a6cfda6939)
* qxl: add QXL_IO_MONITORS_CONFIG_ASYNCAlon Levy2012-11-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revision bumped to 4 for new IO support, enabled for spice-server >= 0.11.1. New io enabled if revision is 4. Revision can be set to 4. [ kraxel: 3 continues to be the default revision. Once we have a new stable spice-server release and the qemu patches to enable the new bits merged we'll go flip the switch and make rev4 the default ] This io calls the corresponding new spice api spice_qxl_monitors_config_async to let spice-server read a new guest set monitors config and notify the client. On migration reissue spice_qxl_monitors_config_async. RHBZ: 770842 Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> fixup Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> (cherry picked from commit 020af1c45fec664d5d4cf3b8e5117f8bc1d691f2) Conflicts: hw/qxl.c Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> (cherry picked from commit b75c71057538a5e720afa2a122721fe2e6095d02)
* pseries: Add PCI MSI/MSI-X supportAlexey Kardashevskiy2012-08-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | This patch implements MSI and MSI-X support for the pseries PCI host bridge. To do this it adds: * A "config_space_address to msi_table" map, since the MSI RTAS calls take a PCI config space address as an identifier. * A MSIX memory region to catch msi_notify()/msix_notiry() from virtio-pci and pass them to the guest via qemu_irq_pulse(). * RTAS call "ibm,change-msi" which sets up MSI vectors for a device. Note that this call may configure and return lesser number of vectors than requested. * RTAS call "ibm,query-interrupt-source-number" which translates MSI vector to interrupt controller (XICS) IRQ number. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [agraf: fix error case ndev < 0] Signed-off-by: Alexander Graf <agraf@suse.de>
* pseries: Add trace event for PCI irqsAlexey Kardashevskiy2012-08-151-0/+3
| | | | | | | | | | This adds a trace event in the pseries PCI specific set_irq() function to assist in debugging. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [agraf: add trace.h include] Signed-off-by: Alexander Graf <agraf@suse.de>
* scsi: establish precedence levels for unit attentionPaolo Bonzini2012-07-271-0/+1
| | | | | | | | When a device is resized, we will report a unit attention condition for CAPACITY DATA HAS CHANGED. However, we should ensure that this condition does not override a more important unit attention condition. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* scsi: add tracepoint for scsi_req_cancelPaolo Bonzini2012-07-271-0/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* megasas: Replace trace_megasas_dcmd_dump_frame()Hannes Reinecke2012-07-261-1/+1
| | | | | | | | | | | | trace_megasas_dcmd_dump_frame() takes 9 arguments, which is rather much. Plus the trace infrastructure doesn't support it. As we can get the information via other means it's pointless to have it in the driver, so rather use some proper trace point here and remove the old one. Signed-off-by: Hannes Reinecke <hare@suse.de> Cc: Stefan Weil <sw@weilnetz.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2012-07-181-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kwolf/for-anthony: (41 commits) fdc-test: Clean up a bit fdc-test: introduce test_relative_seek fdc: fix relative seek qemu-iotests: Valgrind support coroutine-ucontext: Help valgrind understand coroutines qemu-io: Fix memory leaks hw/block-common: Factor out fall back to legacy -drive cyls=... blockdev: Don't limit DriveInfo serial to 20 characters hw/block-common: Factor out fall back to legacy -drive serial=... hw/block-common: Move BlockConf & friends from block.h Relax IDE CHS limits from 16383,16,63 to 65535,16,255 blockdev: Drop redundant CHS validation for if=ide hd-geometry: Compute BIOS CHS translation in one place qtest: Test we don't put hard disk info into CMOS for a CD-ROM ide pc: Put hard disk info into CMOS only for hard disks block: Geometry and translation hints are now useless, purge them qtest: Cover qdev property for BIOS CHS translation ide: qdev property for BIOS CHS translation qdev: New property type chs-translation qdev: Collect private helpers in one place ...
| * hd-geometry: Switch to uint32_t to match BlockConfMarkus Armbruster2012-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | Best to use the same type, to avoid unwanted truncation or sign extension. BlockConf can't use plain int for cyls, heads and secs, because integer properties require an exact width. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * hd-geometry: Add tracepointsMarkus Armbruster2012-07-171-0/+4
| | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | Merge remote-tracking branch 'kraxel/usb.57' into stagingAnthony Liguori2012-07-181-1/+15
|\ \ | |/ |/| | | | | | | | | | | | | | | * kraxel/usb.57: ehci: improve expire time calculation ehci: implement Interrupt Threshold Control support ehci: raise irq in the frame timer uhci: initialize expire_time when loading v1 vmstate usb: add usb attached scsi emulation scsi: add free_request callback
| * ehci: implement Interrupt Threshold Control supportGerd Hoffmann2012-07-121-1/+1
| | | | | | | | | | | | Also reorganize and comment the irq functions while being at it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * usb: add usb attached scsi emulationGerd Hoffmann2012-07-121-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $subject says all. First cut. It's a pure UAS (usb attached scsi) emulation, without BOT (bulk-only transport) compatibility. If your guest can't handle it use usb-storage instead. The emulation works like any other scsi hba emulation (eps, lsi, virtio, megasas, ...). It provides just the HBA where you can attach scsi devices as you like using '-device'. A single scsi target with up to 256 luns is supported. For now only usb 2.0 transport is supported. This will change in the future though as I plan to use this as playground when codeing up & testing usb 3.0 transport and streams support in the qemu usb core and the xhci emulation. No migration support yet. I'm planning to add usb 3.0 support first as this probably requires saving additional state. Special thanks go to Paolo for bringing the qemu scsi emulation into shape, so this can be added nicely without having to touch a single line of scsi code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | esp: add AMD PCscsi emulation (PCI SCSI adapter)Hervé Poussineau2012-07-141-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | The PCI version is supported in lots of Operating Systems, and has been successfully tested on: - MS DOS 6.22 (using DC390 driver) - MS Windows 3.11 (using DC390 driver) - MS Windows 98 SE (using default driver) - MS Windows NT 3.1 (using DC390 driver) - MS Windows NT 4.0 (using default driver) Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | esp: use trace framework instead of stderr outputHervé Poussineau2012-07-141-0/+3
| | | | | | | | | | Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | esp: implement Reset ATN commandHervé Poussineau2012-07-141-0/+1
| | | | | | | | | | Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | esp: implement Disable selection commandHervé Poussineau2012-07-141-0/+1
|/ | | | | Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge remote-tracking branch 'quintela/migration-anthony-v2' into stagingAnthony Liguori2012-07-091-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * quintela/migration-anthony-v2: Maintain the number of dirty pages dirty bitmap: abstract its use Exit loop if we have been there too long Only calculate expected_time for stage 2 Only TCG needs TLB handling No need to iterate if we already are over the limit Add tracepoints for savevm section start/end Add spent time for migration Add migration_end function Add debugging infrastructure Add save_block_hdr function Add MigrationParams structure Add missing check for host_from_stream_offset return value for RAM_SAVE_FLAG_PAGE
| * Add tracepoints for savevm section start/endJuan Quintela2012-06-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to know how long each section takes to save. An awk script like this tells us sections that takes more that 10ms $1 ~ /savevm_state_iterate_end/ { /* Print savevm_section_end line when > 10ms duration */ if ($2 > 10000) { printf("%s times_missing=%u\n", $0, times_missing++); } } Signed-off-by: Juan Quintela <quintela@redhat.com> fix ws tracepoints Signed-off-by: Juan Quintela <quintela@redhat.com>
* | Merge remote-tracking branch 'kraxel/usb.55' into stagingAnthony Liguori2012-07-091-2/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kraxel/usb.55: usb-host: add trace events for iso xfers usb: fix interface initialization usb: split endpoint init and reset usb-redir: Correctly handle the usb_redir_babble usbredir status ehci: Kick async schedule on wakeup in the non companion case usb-ehci: Fix an assert whenever isoc transfers are used ehci: don't flush cache on doorbell rings. ehci: fix td writeback ehci: fix ehci_qh_do_overlay
| * | usb-host: add trace events for iso xfersGerd Hoffmann2012-07-091-2/+4
| |/ | | | | | | | | | | | | Replace iso transfer fprintf's with trace points. Also rename existing tracepoints so they all match usb_host_iso_*. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* / megasas: LSI Megaraid SAS HBA emulationHannes Reinecke2012-07-021-0/+79
|/ | | | | | | | | | This patch adds an emulation for the LSI Megaraid SAS 8708EM2 HBA. I've tested it to work with Linux, Windows Vista, and Windows7. Signed-off-by: Hannes Reinecke <hare@suse.de> [ Squashed trivial changes from Andreas Faerber, rebased over IOMMU and QBus changes - Paolo ] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* ehci: tracing improvementsGerd Hoffmann2012-06-201-2/+3
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Add rate limiting of RTC_CHANGE, BALLOON_CHANGE & WATCHDOG eventsDaniel P. Berrange2012-06-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Allow certain event types to be rate limited to avoid flooding monitor clients. The monitor_protocol_event() method is changed such that instead of immediately emitting the event to Monitor instances, it will call a new monitor_protocol_event_queue() method. This will check to see if the rate limit for the event has been exceeded, and if so schedule a timer to wakeup at the end of the rate limit period. If further events arrive before the timer fires, the previously queued event will be discarded in favour of the new event. The event will eventually be emitted when the timer fires. This logic is applied to RTC_CHANGE, BALLOON_CHANGE & WATCHDOG events, since the data associated with these events is stateless * monitor.c: Add support for rate limiting * monitor.h: Define monitor_global_init for one-time setup tasks * vl.c: Invoke monitor_global_init * trace-events: Add hooks for monitor event tracing Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Acked-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* ehci: add EHCIPacketGerd Hoffmann2012-06-071-0/+1
| | | | | | | | | | Add a separate EHCIPacket struct and move fields over from EHCIQueue. Preparing for supporting multiple packets per queue being in flight at the same time. No functional changes yet. Fix some codestyle issues along the way. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* xhci: trace: slotsGerd Hoffmann2012-06-071-0/+6
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* xhci: trace: transfersGerd Hoffmann2012-06-071-0/+6
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* xhci: trace: endpointsGerd Hoffmann2012-06-071-0/+5
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* xhci: trace: ring fetchGerd Hoffmann2012-06-071-0/+1
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* xhci: trace: irq + eventsGerd Hoffmann2012-06-071-0/+3
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* xhci: trace: run+stopGerd Hoffmann2012-06-071-0/+2
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* xhci: trace: mmio reads+writesGerd Hoffmann2012-06-071-0/+12
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* uhci: fix trace format stringsGerd Hoffmann2012-06-071-4/+4
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* uhci: fix bandwidth managementGerd Hoffmann2012-06-071-1/+1
| | | | | | | | uhci_process_frame() can be invoked multiple times per frame, so accounting usb bandwith in a local variable doesn't fly, use a variable in UHCIState instead. Also check the limit more frequently. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ISCSI: Switch to using READ16/WRITE16 for I/O to the LUNRonnie Sahlberg2012-05-281-2/+2
| | | | | | | This allows using LUNs bigger than 2TB. Keep using READ10 for other device types such as MMC. Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
* Merge remote-tracking branch 'spice/spice.v52' into stagingAnthony Liguori2012-04-181-1/+0
|\ | | | | | | | | | | | | * spice/spice.v52: qxl-render: fix broken vnc+spice since commit f934493 qxl: set default values of vram*_size_mb to -1 trace-events: remove unused qxl_vga_ioport_while_not_in_vga_mode
| * trace-events: remove unused qxl_vga_ioport_while_not_in_vga_modeAlon Levy2012-04-181-1/+0
| | | | | | | | | | | | | | The resulting stp file fails to load because of an unresolvable probe. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | usb-host: rewrite usb_linux_update_endp_tableGerd Hoffmann2012-04-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch carries a complete rewrite of the usb descriptor parser. Changes / improvements: * We are using the USBDescriptor struct instead of hard-coded offsets now to access descriptor data. * (debug) printfs are all gone, tracepoints have been added instead. * We don't try (and fail) to skip over unneeded descriptors. We parse them all one by one. We keep track of which configuration, interface and altsetting we are looking at and use this information to figure which desciptors are in use and which we can ignore. * On parse errors we clear all endpoint information, which will disallow any communication with the device, except control endpoint messages. This makes sure we don't end up with a silly device state where half of the endpoints got enabled and the other half was left disabled. * Some sanity checks have been added. The new parser is more robust and also leaves complete device information in the trace log if you enable the ush_host_parse_* tracepoints. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | usb-hub: add tracepointsGerd Hoffmann2012-04-171-1/+10
| | | | | | | | | | | | Add tracepoints to the usb hub emulation. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | usb-host: add usb packet to request tracepointsGerd Hoffmann2012-04-171-5/+5
| | | | | | | | | | | | | | Add pointer to USBPacket to all tracepoints tracking requests to make it easier to identify them when multiple requests are in flight. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | usb-host: trace canceled requestsGerd Hoffmann2012-04-171-0/+2
| | | | | | | | | | | | Add tracepoints to track canceled requests. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | usb-host: trace emulated requestsGerd Hoffmann2012-04-171-0/+1
|/ | | | | | Add tracepoint to track completion of emulated control requests. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* trace-events: Rename 'next' argumentKevin Wolf2012-04-051-1/+1
| | | | | | | 'next' is a systemtap keyword, so it's a bad idea to use it as an argument name. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* trace-events: Fix broken build caused by wrong format specifierStefan Weil2012-03-261-1/+1
| | | | | | | mem is an uint64_t value, so %lx was wrong. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* qxl/qxl_render.c: add trace eventsAlon Levy2012-03-191-0/+7
| | | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>