m48t59: Rename "type" property to "model"
This resolves a name conflict with the qdev "type" property that isabout to move into Object.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>[AF: Add braces missing in original code.]Signed-off-by: Andreas Färber <afaerber@suse.de>
xilinx_axidma: (un)reversed irq initialisation
The axidma irq orders are reversed in both the device model and the instantion.Undid both reversal (for no net change). Also needs to be reversed forconsistency with Xilinx tools IRQ listing.
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>...
xilinx_uartlite: changed device name
Changed device name to xlnx,xps-uartlite. This is the exact name of the devicein the xilinx EDK development tools.
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
xilinx_timer: added default frequency
Added a reasonable default frequency for the xilinx timer (the 62MHz froms3adsp machine model).
xilinx_timer: changed nr_timers to one_timer_only
The configurable property for this IP in the Xilinx tools is a boolean switch"one-timer-only" that flicks this timer from being dual channel to single.Updated QEMU to work the same way for better match with the IP core and its TRM....
xilinx_timer: changed device name
Changed device name to xlnx,xps-timer. This is the exact name of the devicein the xilinx EDK development tools.
xilinx_intc: changed device name
Changed device name to xlnx,xps-intc. This is the exact name of the devicein the xilinx EDK development tools.
xilinx_ethlite: tweaked naming of ping-pong props
Changed "txpingpong" prop to "tx-ping-pong". Same for rx. This is done tomake the property name exactly match what is output by the xilinx tools forthis IP.
xilinx_ethlite: changed device name
Changed device name to xlnx,xps-ethernetlite. This is the exact name of thedevice in the xilinx EDK development tools.
xilinx_axienet: droped the c_ on parameters
Even though the xilinx tools do have C_ on all params by default, drop thisfor consistency with all the other xilinx IP (I.E. param names are the xilinxnames without the C_ prefix)
xilinx_axienet: changed device name
Changed device name to xlnx,axi-ethernet. This is the exact name of thedevice in the xilinx EDK development tools.
xilinx_axidma: changed device name
Changed device name to xlnx,axi-dma. This is the exact name of the device in theXilinx EDK development tools.
xilinx_axi*: Share devices between microblaze and microblazeel
Speeds up the build.
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
hw/xilinx_*: Share Xilinx devices between ppc and microblaze
xilinx_ethlite uses tswap32() and is thus target-dependent.
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
Merge remote-tracking branch 'afaerber-or/qom-next-1' into staging
Merge remote-tracking branch 'afaerber-or/qom-cpu-3a' into staging
Merge remote-tracking branch 'sstabellini/for_1.1.1' into staging
Merge remote-tracking branch 'kraxel/usb.52' into staging
kvm: i8254: Fix conversion of in-kernel to userspace state
Due to a offset between the clock used to generate the in-kernelcount_load_time (CLOCK_MONOTONIC) and the clock used for processing thisin userspace (vm_clock), reading back the output of PIT channel 2 via...
qemu/xendisk: set maximum number of grants to be used
Legacy (non-pvops) gntdev drivers may require this to be done when thenumber of grants intended to be used simultaneously exceeds a certaindriver specific default limit.
Signed-off-by: Jan Beulich <jbeulich@suse.com>...
kvm/apic: correct short memset
kvm_put_apic_state's attempt to clear kapic before setting itsbits cleared sizeof(void) bytes (no more than 8) rather than theintended 1024 (KVM_APIC_REG_SIZE) bytes. Spotted by coverity.
Signed-off-by: Jim Meyering <meyering@redhat.com>...
integratorcp: Use cpu_arm_init() to obtain ARMCPU
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>
musicpal: Use cpu_arm_init() to obtain ARMCPU
versatilepb: Use cpu_arm_init() to obtain ARMCPU
arm_boot: Pass ARMCPU to arm_boot_info::write_secondary_boot()
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)
arm_boot: Pass ARMCPU to arm_boot_info::secondary_cpu_reset_hook()
Adapt highbank accordingly.
realview: Use cpu_arm_init() to obtain ARMCPU
Needed for arm_pic_init_cpu().
vexpress: Use cpu_arm_init() to obtain ARMCPU
exynos4210: Use cpu_arm_init() to store ARMCPU
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>
pxa2xx: Pass ARMCPU to pxa2xx_pic_init()
Cleans up after storing ARMCPU in PXA2xxState.Prepares for storing ARMCPU in PXA2xxPICState.
pxa2xx_pic: Store ARMCPU in PXA2xxPICState
Prepares for moving halted field to CPUState.
pxa2xx_gpio: Store ARMCPU in PXA2xxGPIOInfo
Prepares for moving halted field into CPUState.
xilinx_zynq: Use cpu_arm_init() to obtain ARMCPU
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Peter A.G. Crosthwaite <peter.crosthwaite@petalogix.com>
arm_boot: Pass ARMCPU to arm_load_kernel()
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)...
arm_pic: Pass ARMCPU to arm_pic_init_cpu()
Pass it through to arm_pic_cpu_handler().
xen_machine_pv: Use cpu_x86_init() to obtain X86CPU
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>
s390-virtio: Use cpu_s390x_init() to obtain S390CPU
Needed to store S390CPU in ipi_states[].
Signed-off-by: Andreas Färber <afaerber@suse.de>
s390-virtio: Let s390_cpu_addr2state() return S390CPU
Convert ipi_states to S390CPU**.
Needed for s390_cpu_restart() in handle_sigp().
nseries: Rename n800_s::cpu to mpu
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>...
omap_sx1: Rename omap_mpu_state_s variable
Avoid cpu->cpu by using "mpu" as variable name.
palm: Rename omap_mpu_state_s variable
mainstone: Rename PXA2xxState variable
spitz: Rename PXA2xxState variable
tosa: Rename PXA2xxState variable
z2: Rename PXA2xxState variable
strongarm: Use cpu_arm_init() to store ARMCPU in StrongARMState
Adapt collie accordingly.
target-ppc: Unbreak kvm_ppc.c build
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>...
qapi: Add Visitor interfaces for uint*_t and int*_t
This adds visitor interfaces for fixed-width integers types.Implementing these in visitors is optional, otherwise we fall back tovisit_type_int() (int64_t) with some additional bounds checking to avoid...
qdev: Use int32_t container for devfn property
Valid range for devfn is -1 to 255 (-1 for automatic assignment). We donot 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,...
qdev: Switch property accessors to fixed-width visitor interfaces
This introduces {get,set}_uint{8,16,32,64}() functions for therespective qdev types.TADDR and VLAN are switched to explicit int64, BLOCKSIZE to uint16.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>...
qdev: Remove PropertyInfo range checking
Range checking in PropertyInfo is now used only for pci_devfnproperties and some error reporting. Remove all code that implementsit in the various property types, and the now unused fields.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
ehci: add ehci_*_enabled() helpers
Add helper functions to query whenever the async / periodic scheduleis enabled or not. Put them into use too.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ehci: update status bits in ehci_set_state
Update the status register in the ehci_set_state function, to make surethe guest-visible register is in sync with our internal schedule state.
ehci: fix halt status handling
When the enable bits for controller / async schedule / periodic schedulechange just make sure we kick the frame timer and letehci_advance_periodic_state and ehci_advance_async_state handle thecontroller state changes.
This will make ehci set USBSTS_HALT when the controller shutdown is...
ehci: remove unused attach_poll_counter
ehci: create ehci_update_frindex
Factor out code from ehci_frame_timer.
ehci: adaptive wakeup rate.
Adapt the frame timer sleeps according to the actual needs. With theperiodic schedule being active we'll have to wakeup 1000 times persecond and go check for work. In case only the async schedule is activewe can be more lazy though. When idle ehci will increate the sleep time...
ehci: rework frame skipping
Move the framecount check out of the loop and use the newehci_update_frindex function to skip frames if needed.
xhci: trace: ring fetch
xhci: trace: endpoints
xhci: trace: transfers
xhci: trace: slots
ehci: add EHCIPacket
Add a separate EHCIPacket struct and move fields over from EHCIQueue.Preparing for supporting multiple packets per queue being in flight atthe same time. No functional changes yet.
Fix some codestyle issues along the way.
ehci: make ehci_execute work on EHCIPacket instead of EHCIQueue
This way it is possible to use ehci_execute to submit others than thefirst EHCIPacket of the EHCIQueue.
ehci: cache USBDevice in EHCIQueue
Keep a USBDevice pointer in EHCIQueue so we don't have to lookup thedevice on each usb packet submission.
ehci: move ehci_flush_qh
Move ehci_flush_qh() function up in the source code.No code change.
ehci: add queuing support
Add packet queuing. Follow the qTD chain to see if there are morepackets we can submit. Improves performance on larger transfers,especially with usb-host, as we don't have to wait for a packet tofinish before sending the next one to the host for processing....
ehci: tweak queue initialization
Little tweak for the queue initialization, set the QH address in theallocation function.
ehci: add async field to EHCIQueue
Keep track whenever a EHCIQueue is part of the async or periodicschedule. This way we don't have to pass around the async flageverywhere but can look it up from the EHCIQueue struct when needed.
ehci: move async schedule to bottom half
This way we can kick the async schedule independant from theperiodic frame timer.
ehci: schedule async bh on async packet completion
When a packet completes which happens to be part of the async schedulekick the async bottom half for processing,
ehci: kick async schedule on wakeup
Kick async schedule when we get a wakeupnotification from a usb device.
ehci: fix reset
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.
scsi: prepare migration code for usb-storage support
usb-storage can't handle requests in one go as the data transfer can besplitted into lots of usb packets. Because of that there can benormal in-flight requests at savevm time and we need to handle that....
usb-storage: remove MSDState->residue
We have the field twice, once in MSDState directly and one in the statusword struct. Drop one.
usb-storage: add usb_msd_packet_complete()
Factor out packet completion to a separate function whichcares to get the MSDState->packet update right.
usb-storage: add scsi_off, remove scsi_buf
Repace the running buffer pointer (scsi_buf) with a buffer offsetfield (scsi_off). The later is alot easier to live-migrate.
usb-storage: migration support
With all scsi migration support bits in place thefinal step is pretty simple ;)
xhci: Clean up reset function
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>
xhci: trace: mmio reads+writes
xhci: trace: run+stop
xhci: trace: irq + events
uhci: fix bandwidth management
uhci_process_frame() can be invoked multiple times per frame, soaccounting usb bandwith in a local variable doesn't fly, use a variablein UHCIState instead. Also check the limit more frequently.
uhci: use bottom half
Schedule bottom half on completion of async packets instead of callinguhci_process_frame directly. This way we run uhci_process_frame onlyonce in case multiple packets finish in a row. Also check wheneverthere is bandwidth left before scheduling uhci_process_frame....
uhci: make bandwidth tunable
Add a property for the uhci bandwidth. Can be used to make uhciemulation run faster than real hardware.
uhci: zap uhci_pre_save
Cancel transactions before saving vmstate is pretty pointless and justcauses disruptions. We need to cancel them before loading vmstate,but in that case uhci_reset() handles it already and no special actionis needed.
uhci: fix irq routing
The multifunction ich9 ehci controller with uhci companions uses adifferent interrupt pin for each function. The three uhci devicesget pins A, B and C, whereas ehci uses pin D. This way the guestcan assign different IRQ lines to each controller....
build: move device tree to per-target Makefile.objs
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
build: convert libhw to nested Makefile.objs
After this patch, the libhw* directories will have a hierarchythat mimics the source tree. This is useful because we do havea couple of files there that are in the top source directory.
build: move per-target hw/ objects to nested Makefile.objs
This completes the move to nested Makefiles for virtio and a fewother files that were not part of obj-TARGET-y, but still werecompiled separately for each target.
build: move target-independent hw/ objects to nested Makefile.objs
This patch starts converting the hw/ directory. Some files in hw/are compiled once, some twice (32-/64-bit), some once per target.Each category is moved in a separate patch.
After this patch, the files that are compiled once will show the...
build: move obj-TARGET-y variables to nested Makefile.objs
Also drop duplicate occurrence of device-hotplug.o.
Merge remote-tracking branch 'qmp/queue/qmp' into staging
Merge remote-tracking branch 'afaerber-or/qom-cpu-3' into staging
Revert "Revert "rtl8139: do the network/host communication only in normal operating mode""
This reverts commit 9c92bf7f6c3f675e60b8ba8a5287bb88ea1eac36.
Per Jason's request.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
sun4u: Let cpu_devinit() return SPARCCPU
Needed for main_cpu_reset().
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Blue Swirl <blauwirbel@gmail.com>
sun4u: Store SPARCCPU in ResetData
We can now use cpu_reset() in place of cpu_state_reset() inmain_cpu_reset().
leon3: Use cpu_sparc_init() to obtain SPARCCPU
leon3: Store SPARCCPU in ResetData
Allows us to use cpu_reset() in place of cpu_state_reset() inmain_cpu_reset().