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_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.
qemu-log: Allow usage in libhw
Add #ifdef to avoid complaint about use of poisoned "env".
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
cris: Add break support for v10.
Still no retb
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
Merge remote-tracking branch 'stefanha/trivial-patches' 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>...
target-s390x: Pass S390CPU to s390_cpu_restart()
Needed for qemu_cpu_kick().
Signed-off-by: Andreas Färber <afaerber@suse.de>
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>
target-s390x: Let cpu_s390x_init() return S390CPU
Let cpu_init() return CPUS390XState for backwards compatibility.
s390-virtio: Use cpu_s390x_init() to obtain S390CPU
Needed to store S390CPU in ipi_states[].
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.
Revert "build: compile oslib-obj-y once"
This reverts commit 25f27a4f7160d077d6992e811021b4bc3a82abc1because of bsd-user breakage.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-xtensa: switch to AREG0-free mode
Add env parameter to every helper function that needs it, update'configure' script.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-xtensa: add attributes to helper functions
Mark exception generating functions 'noreturn' and pure constantfunctions as such.
target-xtensa: remove unnecessary include of dyngen-exec.h
Signed-off-by: Peter Portante <peter.portante@redhat.com>Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-xtensa: fix CCOUNT for conditional branches
Taken conditional branches fail to update CCOUNT register becauseaccumulated ccount_delta is reset during translation of non-takenbranch. To fix it only update CCOUNT once per conditional branchinstruction translation....
exec: fix TB invalidation after breakpoint insertion/deletion
tb_invalidate_phys_addr has to be called with the exact physical address ofthe breakpoint we add/remove, not just the page's base address.Otherwise we easily fail to flush the right TB.
This breakage was introduced by the commit f3705d5329 "memory: make...
target-xtensa: flush TLB page for new MMU mapping
Both old and new mappings need flushing because their VPN may bedifferent in MMU case.
target-xtensa: update EXCVADDR in case of page table lookup
According to ISA, 4.4.2.6, EXCVADDR may be changed by any TLB miss, evenif the miss is handled entirely by processor hardware.
target-xtensa: extract TLB entry setting method
target-xtensa: update autorefill TLB entries conditionally
This is to avoid interference of internal QEMU helpers(cpu_get_phys_page_debug, tb_invalidate_virtual_addr) with guest-visibleTLB state.
target-xtensa: control page table lookup explicitly
Hardware pagetable walking may not be nested. Stop guessing and passexplicit flag to the get_physical_addr_mmu function that controls pagetable lookup.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>...
target-xtensa: add MMU pagewalking tests
w32: Fix broken build (missing include file)
dump.c was recently added to the code. It unconditionallyincludes sys/procfs which is not available with MinGW (w32, w64).
It looks like this file is not needed at all (tested on Linux),so I removed it completely....
do not include <libutil.h> needlessly or if it doesn't exist
<libutil.h> and <util.h> on *BSD (some have one, some another)were #included just for openpty() declaration. The only filewhere this function is actually used is qemu-char.c.
In vl.c and net/tap-bsd.c, none of functions declared in libutil.h...
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>...
dump: Fix build breakage (missing sys/procfs.h)
sys/procfs is not available everywhere (MingW does not have it).
Remove this and more unused or redundant include statements.This fixes the broken build.
qerror.h was previously included indirectly.Add an explicit include statement for it because it is needed....
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...
qapi: Unit tests for visitor-based serialization
Currently we test our visitors individually, and seperately for inputvs. output. This is useful for validating internal representationsagainst the native C types and vice-versa, and other visitor-specific...
qapi: String visitor, use %f representation for floats
Currently string-output-visitor formats floats as %g, which is nice inthat trailing 0's are automatically truncated, but otherwise this causessome issues:
- it uses 6 significant figures instead of 6 decimal places, which...
qapi: Add String visitor coverage to serialization unit tests
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
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>...
target-i386: Use uint32 visitor for [x]level properties
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>
configure: report missing libraries for virtfs
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 interface
Clarify comments of tb_invalidate_phys_[page_]range
They could suggest that all TBs of the page containing the range wouldbe invalidated.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Merge remote-tracking branch 'bonzini/nested-makefiles-3' into staging
target-microblaze: fix swx build breakage
The lazy initialisation of r_check was throwing an error on --enable-debug.Removed the lazy initialisation of r_check and swx_addr.
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.