aboutsummaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)Author
2012-06-11Merge remote-tracking branch 'sstabellini/for_1.1.1' into stagingAnthony Liguori
* sstabellini/for_1.1.1: qemu/xendisk: set maximum number of grants to be used
2012-06-11Merge remote-tracking branch 'afaerber-or/qom-cpu-3a' into stagingAnthony Liguori
* afaerber-or/qom-cpu-3a: (27 commits) target-s390x: Pass S390CPU to s390_cpu_restart() s390-virtio: Let s390_cpu_addr2state() return S390CPU s390-virtio: Use cpu_s390x_init() to obtain S390CPU target-s390x: Let cpu_s390x_init() return S390CPU xen_machine_pv: Use cpu_x86_init() to obtain X86CPU arm_pic: Pass ARMCPU to arm_pic_init_cpu() arm_boot: Pass ARMCPU to arm_load_kernel() xilinx_zynq: Use cpu_arm_init() to obtain ARMCPU pxa2xx_gpio: Store ARMCPU in PXA2xxGPIOInfo pxa2xx_pic: Store ARMCPU in PXA2xxPICState pxa2xx: Pass ARMCPU to pxa2xx_pic_init() exynos4210: Use cpu_arm_init() to store ARMCPU vexpress: Use cpu_arm_init() to obtain ARMCPU realview: Use cpu_arm_init() to obtain ARMCPU arm_boot: Pass ARMCPU to arm_boot_info::secondary_cpu_reset_hook() arm_boot: Pass ARMCPU to arm_boot_info::write_secondary_boot() versatilepb: Use cpu_arm_init() to obtain ARMCPU musicpal: Use cpu_arm_init() to obtain ARMCPU integratorcp: Use cpu_arm_init() to obtain ARMCPU strongarm: Use cpu_arm_init() to store ARMCPU in StrongARMState ...
2012-06-11Merge remote-tracking branch 'afaerber-or/qom-next-1' into stagingAnthony Liguori
* 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
2012-06-11Merge remote-tracking branch 'kraxel/usb.52' into stagingAnthony Liguori
* 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 ...
2012-06-11qemu/xendisk: set maximum number of grants to be usedJan Beulich
Legacy (non-pvops) gntdev drivers may require this to be done when the number of grants intended to be used simultaneously exceeds a certain driver specific default limit. Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-06-11s390-virtio: Let s390_cpu_addr2state() return S390CPUAndreas Färber
Convert ipi_states to S390CPU**. Needed for s390_cpu_restart() in handle_sigp(). Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-11s390-virtio: Use cpu_s390x_init() to obtain S390CPUAndreas Färber
Needed to store S390CPU in ipi_states[]. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-11xen_machine_pv: Use cpu_x86_init() to obtain X86CPUAndreas Färber
Needed for moving halted field to CPUState. Signed-off-by: Andreas Färber <afaerber@suse.de> Tested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-06-11arm_pic: Pass ARMCPU to arm_pic_init_cpu()Andreas Färber
Pass it through to arm_pic_cpu_handler(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Igor Mitsyanko <i.mitsyanko@samsung.com> (for exynos)
2012-06-11arm_boot: Pass ARMCPU to arm_load_kernel()Andreas Färber
In particular this simplifies the &s->mpu->cpu->env expression again. first_cpu and ->next_cpu are expected to be QOM'ified later. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Igor Mitsyanko <i.mitsyanko@samsung.com> (for exynos) Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11xilinx_zynq: Use cpu_arm_init() to obtain ARMCPUAndreas Färber
Needed for arm_load_kernel(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter A.G. Crosthwaite <peter.crosthwaite@petalogix.com>
2012-06-11pxa2xx_gpio: Store ARMCPU in PXA2xxGPIOInfoAndreas Färber
Prepares for moving halted field into CPUState. Add missing braces. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11pxa2xx_pic: Store ARMCPU in PXA2xxPICStateAndreas Färber
Prepares for moving halted field to CPUState. Add missing braces. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11pxa2xx: Pass ARMCPU to pxa2xx_pic_init()Andreas Färber
Cleans up after storing ARMCPU in PXA2xxState. Prepares for storing ARMCPU in PXA2xxPICState. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11exynos4210: Use cpu_arm_init() to store ARMCPUAndreas Färber
Needed for arm_pic_init_cpu(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Igor Mitsyanko <i.mitsyanko@samsung.com>
2012-06-11vexpress: Use cpu_arm_init() to obtain ARMCPUAndreas Färber
Needed for arm_pic_init_cpu(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11realview: Use cpu_arm_init() to obtain ARMCPUAndreas Färber
Needed for arm_pic_init_cpu(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11arm_boot: Pass ARMCPU to arm_boot_info::secondary_cpu_reset_hook()Andreas Färber
Adapt highbank accordingly. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11arm_boot: Pass ARMCPU to arm_boot_info::write_secondary_boot()Andreas Färber
Adapt exynos4210 and highbank accordingly. The parameter itself is unused. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Igor Mitsyanko <i.mitsyanko@samsung.com> (for exynos)
2012-06-11versatilepb: Use cpu_arm_init() to obtain ARMCPUAndreas Färber
Needed for arm_load_kernel(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11musicpal: Use cpu_arm_init() to obtain ARMCPUAndreas Färber
Needed for arm_load_kernel(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11integratorcp: Use cpu_arm_init() to obtain ARMCPUAndreas Färber
Needed for arm_load_kernel(). Add missing braces. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11strongarm: Use cpu_arm_init() to store ARMCPU in StrongARMStateAndreas Färber
Adapt collie accordingly. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11z2: Rename PXA2xxState variableAndreas Färber
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>
2012-06-11tosa: Rename PXA2xxState variableAndreas Färber
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>
2012-06-11spitz: Rename PXA2xxState variableAndreas Färber
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>
2012-06-11mainstone: Rename PXA2xxState variableAndreas Färber
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>
2012-06-11palm: Rename omap_mpu_state_s variableAndreas Färber
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>
2012-06-11omap_sx1: Rename omap_mpu_state_s variableAndreas Färber
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>
2012-06-11nseries: Rename n800_s::cpu to mpuAndreas Färber
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>
2012-06-09target-ppc: Unbreak kvm_ppc.c buildAndreas Färber
The file is located in target-ppc/, not hw/. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-08qdev: Remove PropertyInfo range checkingPaolo Bonzini
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>
2012-06-08qdev: Switch property accessors to fixed-width visitor interfacesMichael Roth
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>
2012-06-08qdev: Use int32_t container for devfn propertyMichael Roth
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>
2012-06-08qapi: Add Visitor interfaces for uint*_t and int*_tMichael Roth
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>
2012-06-07ehci: rework frame skippingGerd Hoffmann
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>
2012-06-07ehci: adaptive wakeup rate.Gerd Hoffmann
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>
2012-06-07ehci: create ehci_update_frindexGerd Hoffmann
Factor out code from ehci_frame_timer. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07ehci: remove unused attach_poll_counterGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07ehci: fix halt status handlingGerd Hoffmann
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>
2012-06-07ehci: update status bits in ehci_set_stateGerd Hoffmann
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>
2012-06-07ehci: add ehci_*_enabled() helpersGerd Hoffmann
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>
2012-06-07ehci: fix resetGerd Hoffmann
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>
2012-06-07ehci: kick async schedule on wakeupGerd Hoffmann
Kick async schedule when we get a wakeup notification from a usb device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07ehci: schedule async bh on async packet completionGerd Hoffmann
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>
2012-06-07ehci: move async schedule to bottom halfGerd Hoffmann
This way we can kick the async schedule independant from the periodic frame timer. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07ehci: add async field to EHCIQueueGerd Hoffmann
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>
2012-06-07ehci: tweak queue initializationGerd Hoffmann
Little tweak for the queue initialization, set the QH address in the allocation function. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07ehci: add queuing supportGerd Hoffmann
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>
2012-06-07ehci: move ehci_flush_qhGerd Hoffmann
Move ehci_flush_qh() function up in the source code. No code change. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>