summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | mainstone: Rename PXA2xxState variableAndreas Färber2012-06-111-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid cpu->cpu by using "mpu" as variable name. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
| * | | palm: Rename omap_mpu_state_s variableAndreas Färber2012-06-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid cpu->cpu by using "mpu" as variable name. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
| * | | omap_sx1: Rename omap_mpu_state_s variableAndreas Färber2012-06-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid cpu->cpu by using "mpu" as variable name. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
| * | | nseries: Rename n800_s::cpu to mpuAndreas Färber2012-06-111-36/+36
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | omap_mpu_state_s::env was renamed to cpu while changing its type. With n800_s::cpu of type omap_mpu_state_s* this leads to s->cpu->cpu. Rename the field to "mpu" to avoid this ugliness. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
* | | Merge remote-tracking branch 'afaerber-or/qom-next-1' into stagingAnthony Liguori2012-06-1113-172/+1041
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * afaerber-or/qom-next-1: target-i386: Use uint32 visitor for [x]level properties qdev: Remove PropertyInfo range checking qdev: Switch property accessors to fixed-width visitor interfaces qdev: Use int32_t container for devfn property qapi: Add String visitor coverage to serialization unit tests qapi: String visitor, use %f representation for floats qapi: Unit tests for visitor-based serialization qapi: Add Visitor interfaces for uint*_t and int*_t
| * | | target-i386: Use uint32 visitor for [x]level propertiesAndreas Färber2012-06-081-38/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies the code and resolves TODOs. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
| * | | qdev: Remove PropertyInfo range checkingPaolo Bonzini2012-06-082-82/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Range checking in PropertyInfo is now used only for pci_devfn properties and some error reporting. Remove all code that implements it in the various property types, and the now unused fields. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [AF: Fix blocksize min/max for 32-bit hosts by using const int64_t.] Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | | qdev: Switch property accessors to fixed-width visitor interfacesMichael Roth2012-06-082-63/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces {get,set}_uint{8,16,32,64}() functions for the respective qdev types. TADDR and VLAN are switched to explicit int64, BLOCKSIZE to uint16. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | | qdev: Use int32_t container for devfn propertyMichael Roth2012-06-084-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Valid range for devfn is -1 to 255 (-1 for automatic assignment). We do not currently validate this due to devfn being stored as a uint32_t. This can lead to segfaults and other strange behavior. We could technically just cast it to int32_t to implement the checking, but this will not work for visitor-based setting where we may do additional bounds-checking based on target container type, which is int32_t for this case. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | | qapi: Add String visitor coverage to serialization unit testsMichael Roth2012-06-081-0/+40
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | | qapi: String visitor, use %f representation for floatsMichael Roth2012-06-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently string-output-visitor formats floats as %g, which is nice in that trailing 0's are automatically truncated, but otherwise this causes some issues: - it uses 6 significant figures instead of 6 decimal places, which means something like 155777.5 (which even has an exact floating point representation) will be rounded to 155778 when converted to a string. - output will be presented in scientific notation when the normalized form requires a 10^x multiplier. Not a huge deal, but arguably less readable for command-line arguments. - due to using scientific notation for numbers requiring more than 6 significant figures, instead of hard-defined decimal places, it fails a lot of the test-visitor-serialization unit tests for floats. Instead, let's just use %f, which is what the QJSON and the QMP visitors use. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | | qapi: Unit tests for visitor-based serializationMichael Roth2012-06-082-1/+747
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we test our visitors individually, and seperately for input vs. output. This is useful for validating internal representations against the native C types and vice-versa, and other visitor-specific testing, but it doesn't cover the potential use-case of using visitor pairs for serialization/deserialization very well, and makes it hard to easily extend the coverage for different C types / boundary conditions. To cover that we add a set of unit tests that takes a number of native C values, passes them into an output visitor, extracts the values with an input visitor, then compares the result to the original. Plugging in new visitors to the test harness only requires a user to implement the SerializeOps interface and add it to a list. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
| * | | qapi: Add Visitor interfaces for uint*_t and int*_tMichael Roth2012-06-083-7/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds visitor interfaces for fixed-width integers types. Implementing these in visitors is optional, otherwise we fall back to visit_type_int() (int64_t) with some additional bounds checking to avoid integer overflows for cases where the value fetched exceeds the bounds of our target C type. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [LE: exclude negative values in uint*_t Visitor interfaces] Signed-off-by: Laszlo Ersek <lersek@redhat.com> [AF: Merged fix by Laszlo] Signed-off-by: Andreas Färber <afaerber@suse.de>
* | | | Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-06-113-12/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stefanha/trivial-patches: configure: report missing libraries for virtfs trace/simple.c: fix deprecated glib2 interface Clarify comments of tb_invalidate_phys_[page_]range
| * | | | configure: report missing libraries for virtfsHarsh Prateek Bora2012-06-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | | trace/simple.c: fix deprecated glib2 interfaceHarsh Prateek Bora2012-06-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | | Clarify comments of tb_invalidate_phys_[page_]rangeJan Kiszka2012-06-081-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They could suggest that all TBs of the page containing the range would be invalidated. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | | | | Merge remote-tracking branch 'kraxel/usb.52' into stagingAnthony Liguori2012-06-117-372/+695
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kraxel/usb.52: (37 commits) ehci: rework frame skipping ehci: adaptive wakeup rate. ehci: create ehci_update_frindex ehci: remove unused attach_poll_counter ehci: fix halt status handling ehci: update status bits in ehci_set_state ehci: add ehci_*_enabled() helpers ehci: fix reset ehci: kick async schedule on wakeup ehci: schedule async bh on async packet completion ehci: move async schedule to bottom half ehci: add async field to EHCIQueue ehci: tweak queue initialization ehci: add queuing support ehci: move ehci_flush_qh ehci: cache USBDevice in EHCIQueue ehci: make ehci_execute work on EHCIPacket instead of EHCIQueue ehci: add EHCIPacket xhci: trace: slots xhci: trace: transfers ...
| * | | | ehci: rework frame skippingGerd Hoffmann2012-06-071-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the framecount check out of the loop and use the new ehci_update_frindex function to skip frames if needed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: adaptive wakeup rate.Gerd Hoffmann2012-06-071-18/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapt the frame timer sleeps according to the actual needs. With the periodic schedule being active we'll have to wakeup 1000 times per second and go check for work. In case only the async schedule is active we can be more lazy though. When idle ehci will increate the sleep time step by step, so qemu has to wake up less frequently. When we'll see transactions on the bus or the guest fiddles with the schedule enable/disable bits we'll return to a 1000 Hz wakeup rate and full speed. With both schedules disabled we stop wakeups altogether. This patch also drops the freq property (configures wakeup rate manually) which is obsoleted by this patch. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: create ehci_update_frindexGerd Hoffmann2012-06-071-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor out code from ehci_frame_timer. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: remove unused attach_poll_counterGerd Hoffmann2012-06-071-2/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: fix halt status handlingGerd Hoffmann2012-06-071-15/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the enable bits for controller / async schedule / periodic schedule change just make sure we kick the frame timer and let ehci_advance_periodic_state and ehci_advance_async_state handle the controller state changes. This will make ehci set USBSTS_HALT when the controller shutdown is actually done, once both schedules are in inactive state and the USBSTS_PSS and USBSTS_ASS bits are clear. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: update status bits in ehci_set_stateGerd Hoffmann2012-06-071-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the status register in the ehci_set_state function, to make sure the guest-visible register is in sync with our internal schedule state. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: add ehci_*_enabled() helpersGerd Hoffmann2012-06-071-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add helper functions to query whenever the async / periodic schedule is enabled or not. Put them into use too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: fix resetGerd Hoffmann2012-06-071-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for the reset bit first when processing USBCMD register writes. Also break out of the switch, there is no need to check the other bits. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: kick async schedule on wakeupGerd Hoffmann2012-06-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kick async schedule when we get a wakeup notification from a usb device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: schedule async bh on async packet completionGerd Hoffmann2012-06-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a packet completes which happens to be part of the async schedule kick the async bottom half for processing, Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: move async schedule to bottom halfGerd Hoffmann2012-06-071-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way we can kick the async schedule independant from the periodic frame timer. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: add async field to EHCIQueueGerd Hoffmann2012-06-071-43/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep track whenever a EHCIQueue is part of the async or periodic schedule. This way we don't have to pass around the async flag everywhere but can look it up from the EHCIQueue struct when needed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: tweak queue initializationGerd Hoffmann2012-06-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Little tweak for the queue initialization, set the QH address in the allocation function. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: add queuing supportGerd Hoffmann2012-06-071-9/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add packet queuing. Follow the qTD chain to see if there are more packets we can submit. Improves performance on larger transfers, especially with usb-host, as we don't have to wait for a packet to finish before sending the next one to the host for processing. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: move ehci_flush_qhGerd Hoffmann2012-06-071-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move ehci_flush_qh() function up in the source code. No code change. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: cache USBDevice in EHCIQueueGerd Hoffmann2012-06-071-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep a USBDevice pointer in EHCIQueue so we don't have to lookup the device on each usb packet submission. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: make ehci_execute work on EHCIPacket instead of EHCIQueueGerd Hoffmann2012-06-071-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way it is possible to use ehci_execute to submit others than the first EHCIPacket of the EHCIQueue. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | ehci: add EHCIPacketGerd Hoffmann2012-06-072-77/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-072-6/+12
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | xhci: trace: transfersGerd Hoffmann2012-06-072-8/+16
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | xhci: trace: endpointsGerd Hoffmann2012-06-072-17/+10
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | xhci: trace: ring fetchGerd Hoffmann2012-06-072-8/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | xhci: trace: irq + eventsGerd Hoffmann2012-06-072-8/+7
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | xhci: trace: run+stopGerd Hoffmann2012-06-072-3/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | xhci: trace: mmio reads+writesGerd Hoffmann2012-06-072-58/+117
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | xhci: Clean up reset functionJan Kiszka2012-06-071-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Properly register reset function via the device class. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | usb-storage: migration supportGerd Hoffmann2012-06-071-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With all scsi migration support bits in place the final step is pretty simple ;) Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | usb-storage: add scsi_off, remove scsi_bufGerd Hoffmann2012-06-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Repace the running buffer pointer (scsi_buf) with a buffer offset field (scsi_off). The later is alot easier to live-migrate. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | usb-storage: add usb_msd_packet_complete()Gerd Hoffmann2012-06-071-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor out packet completion to a separate function which cares to get the MSDState->packet update right. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | usb-storage: remove MSDState->residueGerd Hoffmann2012-06-071-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have the field twice, once in MSDState directly and one in the status word struct. Drop one. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | scsi: prepare migration code for usb-storage supportGerd Hoffmann2012-06-072-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usb-storage can't handle requests in one go as the data transfer can be splitted into lots of usb packets. Because of that there can be normal in-flight requests at savevm time and we need to handle that. With other scsi hba's this happens only in case i/o is stopped due to errors and there are pending requests which need to be restarted (req->retry = true). So, first we need to save req->retry and then handle the req->retry = false case. Write requests are handled fine already. For read requests we have to save the buffer as we will not restart the request (and thus not refill the buffer) on the target host. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | | uhci: fix irq routingGerd Hoffmann2012-06-071-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The multifunction ich9 ehci controller with uhci companions uses a different interrupt pin for each function. The three uhci devices get pins A, B and C, whereas ehci uses pin D. This way the guest can assign different IRQ lines to each controller. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
OpenPOWER on IntegriCloud