summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-02-01target-s390x: Pass S390CPU to s390_{add, del}_running_cpu()Andreas Färber6-19/+23
This prepares for moving the halted field to CPUState. Most call sites can already supply S390CPU, for some env becomes unused. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-02-01target-s390x: Clean up cpu_inject_*() signaturesAndreas Färber4-11/+16
Despite cautioning that S390CPU is needed for upcoming CPUState refactorings, commit 5d69c547d947798cba92d836d06f6e017ba2b19d (s390: I/O interrupt and machine check injection.) added functions cpu_inject_io() and cpu_inject_crw_mchk() with CPUS390XState argument, claiming consistency with cpu_inject_ext(). This complicates making cpu_interrupt() take a CPUState even more and it required to pass &cpu->env from some S390CPU-aware call sites already, creating inconsistency elsewhere. Address that. This also eliminates the need for CPUS390XState in s390_virtio_irq(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-02-01target-s390x: Fix debug outputAndreas Färber1-1/+1
Commit 71e470886fb6092504503a5fe41092ace71c096c (target-s390x: fix style) renamed the cpu_s390x_handle_mmu_fault() argument from _vaddr to orig_vaddr. Update the debug output code. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-02-01target-s390x: Fix debug output (continued)Andreas Färber1-2/+2
Since its introduction in d5a439645a5a70fed5431318c3bce9dc2caa950f (s390x: helper functions for system emulation) the variable name was raddr. Fix this. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-02-01ide/mmio: QOM'ify MMIO IDE for R2DAndreas Färber3-25/+82
It was not qdev'ified before, so turn it into a SysBusDevice. Keep mmio_ide_init_drives() around to attach the hard drive. Signed-off-by: Andreas Färberr <afaerber@suse.de> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-31target-mips: fix incorrect test for MTHLIPPetar Jovanovic1-1/+1
The pos field in the DSPControl register is not correctly initialized. Per documentation, the result of MTHLIP is unpredictable if the value of the pos field before the execution is greater than 32. Signed-off-by: Petar Jovanovic <petarj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-31target-mips: enable access to DSP ASE if implementedPetar Jovanovic1-4/+2
compute_hflags() will reset DSP h-flags, so MX bit should be initially set for usermode in cpu_state_reset() if DSP ASE is implemented. This change will bring back user-mode support for DSP ASE, since one of the recent changes broke it. Signed-off-by: Petar Jovanovic <petarj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-31target-mips: Unfuse {,N}M{ADD,SUB}.fmtRichard Sandiford1-8/+17
Turn MADD.fmt, MSUB.fmt, NMADD.fmt and NMSUB.fmt from fused to unfused operations, so that they behave in the same way as a separate multiplication and addition. The instructions were only fused in early MIPS IV processors. Signed-off-by: Richard Sandiford <rdsandiford@googlemail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-31target-mips: Sign-extend the result of LWRRichard Sandiford1-0/+1
Sign-extend the result of LWR, as is already done for LWL. This is necessary in the case where LWR loads the full word (i.e. the address is actually aligned). In the other cases, it is implementation defined whether the upper 32 bits of the result are unchanged or a copy of bit 31. The latter seems easier to implement. Previously the code used: (oldval & (0xfffffffe << (31 - bitshift))) | (newval >> bitshift) which zeroed the upper bits of the register, losing any previous sign extension in the unaligned cases. Signed-off-by: Richard Sandiford <rdsandiford@googlemail.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-31target-mips: Fix signedness of loads in MIPS16 RESTOREsRichard Sandiford1-1/+1
Make RESTORE use sign-extending rather than zero-extending loads. Signed-off-by: Richard Sandiford <rdsandiford@googlemail.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-31Merge branch 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-armAurelien Jarno3-6/+18
* 'target-arm.next' of git://git.linaro.org/people/pmaydell/qemu-arm: target-arm: Rename CPU types target-arm: Fix TCG temp leaks for WI and UNDEF VFP sysreg writes
2013-01-31target-mips: implement DSP (d)append sub-class with TCGAurelien Jarno3-126/+87
DSP instruction from the (d)append sub-class can be implemented with TCG. Use a different function for these instructions are they are quite different from compare-pick sub-class. Fix BALIGN instruction for negative value, where the value should be zero-extended before being shift to the right. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-31target-mips: use DSP unions for reduction add instructionsAurelien Jarno1-16/+14
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-31target-mips: use DSP unions for unary DSP operatorsAurelien Jarno1-82/+42
This allow to reduce the number of macros. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-31target-mips: use DSP unions for binary DSP operatorsAurelien Jarno1-268/+116
This allow to reduce the number of macros. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-31target-mips: add unions to access DSP elementsAurelien Jarno1-0/+22
Instead of playing with bit shifting, add two unions (one for 32-bit values, one for 64-bit ones) to access all the DSP elements with the correct type. This make the code easier to read and less error prone, and allow GCC to vectorize the code in some cases. Reviewed-by: Eric Johnson <ericj@mips.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-31target-mips: generate a reserved instruction exception on CPU without DSPAurelien Jarno1-2/+10
On CPU without DSP ASE support, a reserved instruction exception (instead of a DSP ASE sate disabled) should be generated. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-31target-mips: copy insn_flags in DisasContextAurelien Jarno1-381/+381
Copy insn_flags in DisasContext to avoid passing a CPUMIPSState pointer to subroutines, as suggested by Richard Henderson. Change subroutines to use this new field and remove the first argument. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-31target-mips: fix DSP loads with rd = 0Aurelien Jarno1-5/+0
When rd is 0, which still need to do the actually load to possibly generate a TLB exception. Reviewed-by: Eric Johnson <ericj@mips.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-01-30Merge remote-tracking branch 'pmaydell/arm-devs.next' into stagingAnthony Liguori2-1/+2
# By Christoffer Dall (1) and Peter Maydell (1) # Via Peter Maydell * pmaydell/arm-devs.next: hw/vexpress: Use correct HBI (board model number) for vexpress-a15 hw/arm_sysctl: Clear sysctl cfgctrl start bit
2013-01-30Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori29-82/+68
# By Markus Armbruster (12) and others # Via Stefan Hajnoczi * stefanha/trivial-patches: qmp-commands.hx: s/tray-open/tray_open/ to match qapi schema tests: Fix {rtc, m48t59}-test build on illumos qemu-pixman.h: Avoid mutual inclusion loop with console.h qemu-ga: Fix unchecked strdup() by converting to g_strdup() qapi: Fix unchecked strdup() by converting to g_strdup() libcacard: Fix unchecked strdup() by converting to g_strdup() qemu-log: Plug trivial memory leak in cpu_set_log_filename() qemu-log: Fix unchecked strdup() by converting to g_strdup() virtfs-proxy-helper: Fix unchecked strdup() by conv. to g_strdup() spice: Fix unchecked strdup() by converting to g_strdup() readline: Fix unchecked strdup() by converting to g_strdup() hw/9pfs: Fix unchecked strdup() by converting to g_strdup() g_strdup(NULL) returns NULL; simplify g_malloc(0) and g_malloc0(0) return NULL; simplify xilinx_axidma: Fix debug mode compile messages cadence_gem: Debug mode compile fixes cadence_ttc: Debug mode compile fixes vnc: Clean up vncws_send_handshake_response()
2013-01-30Merge remote-tracking branch 'afaerber-or/prep-up' into stagingAnthony Liguori4-32/+57
# By Andreas Färber # Via Andreas Färber * afaerber-or/prep-up: prep: Move PReP machine to hw/ppc/ prep_pci: Convert to QOM realizefn prep_pci: Create PCIBus and PCIDevice in-place
2013-01-30Merge remote-tracking branch 'agraf/s390-for-upstream' into stagingAnthony Liguori21-94/+4398
# By Cornelia Huck (13) and others # Via Alexander Graf * agraf/s390-for-upstream: s390: Drop set_bit usage in virtio_ccw. s390: css error codes. s390: Use s390_cpu_physical_memory_map for tpi. sclpconsole: Don't instantiate sclpconsole with -nodefaults s390: Add s390-ccw-virtio machine. s390-virtio: Check for NULL device in reset hypercall s390: Move hw files to hw/s390x virtio-s390: add a reset function to virtio-s390 devices s390: Make typeinfo const s390: Add new channel I/O based virtio transport. s390-virtio: Factor out some initialization code. s390: Wire up channel I/O in kvm. s390: Virtual channel subsystem support. s390: Add channel I/O instructions. s390: I/O interrupt and machine check injection. s390: Channel I/O basic definitions. s390: Add mapping helper functions. s390: Lowcore mapping helper. s390: Add default support for SCLP console
2013-01-30target-arm: Rename CPU typesAndreas Färber2-5/+14
In the initial conversion of CPU models to QOM types, model names were mapped 1:1 to type names. As a side effect this gained us a type "any", which is now a device. To avoid "-device any" silliness and to pave the way for compiling multiple targets into one executable, adopt a <name>-<arch>-cpu scheme. This leads to names like arm926-arm-cpu but is easiest to handle. No functional changes for -cpu arguments or -cpu ? output. Suggested-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-01-30target-arm: Fix TCG temp leaks for WI and UNDEF VFP sysreg writesPeter Maydell1-1/+4
Fix a leak of a TCG temporary in code paths for VFP system register writes for cases which UNDEF or are write-ignored. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-01-30hw/vexpress: Use correct HBI (board model number) for vexpress-a15Peter Maydell1-1/+1
The vexpress-a15 QEMU model is supposed to be a V2P-CA15; the HBI (a kind of board model number) for this coretile is 237, not 217. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-01-30hw/arm_sysctl: Clear sysctl cfgctrl start bitChristoffer Dall1-0/+1
The start bit should only be set to indicate that a function call is underway, right now. When done with function, clear it. Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-01-30qmp-commands.hx: s/tray-open/tray_open/ to match qapi schemaMichal Privoznik1-1/+1
Currently, we are using 'tray_open' in QMP and 'tray-open' in HMP. However, the QMP documentation was mistakenly using the HMP version. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30tests: Fix {rtc, m48t59}-test build on illumosAndreas Färber2-0/+4
Struct tm does not have tm_gmtoff field on illumos. Fix the build by not zero-initializing these fields on Solaris. Cc: qemu-stable@nongnu.org Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30qemu-pixman.h: Avoid mutual inclusion loop with console.hPeter Maydell3-2/+4
Remove an unnecessary mutual inclusion loop between qemu-pixman.h and console.h, since the former was only including the latter for 'PixelFormat*', which can be provided by typedefs.h. This requires a minor adjustment to the files which included qemu-pixman.h, since they were relying on it implicitly dragging in all of console.h. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30qemu-ga: Fix unchecked strdup() by converting to g_strdup()Markus Armbruster1-1/+1
I figure it's freed somewhere deep down in QAPI, with g_free(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30qapi: Fix unchecked strdup() by converting to g_strdup()Markus Armbruster1-1/+1
Note that we already free with g_free(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30libcacard: Fix unchecked strdup() by converting to g_strdup()Markus Armbruster3-5/+5
Note that we already free with g_free(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30qemu-log: Plug trivial memory leak in cpu_set_log_filename()Markus Armbruster1-4/+9
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30qemu-log: Fix unchecked strdup() by converting to g_strdup()Markus Armbruster1-1/+1
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30virtfs-proxy-helper: Fix unchecked strdup() by conv. to g_strdup()Markus Armbruster1-2/+2
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30spice: Fix unchecked strdup() by converting to g_strdup()Markus Armbruster1-2/+2
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30readline: Fix unchecked strdup() by converting to g_strdup()Markus Armbruster1-2/+2
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30hw/9pfs: Fix unchecked strdup() by converting to g_strdup()Markus Armbruster2-5/+5
Note: the allocation in virtio_9p_init() is still leaked. To be fixed in a followup commit. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30g_strdup(NULL) returns NULL; simplifyMarkus Armbruster5-23/+7
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30g_malloc(0) and g_malloc0(0) return NULL; simplifyMarkus Armbruster4-18/+5
Once upon a time, it was decided that qemu_malloc(0) should abort. Switching to glib retired that bright idea. Some code that was added to cope with it (e.g. in commits 702ef63, b76b6e9) is still around. Bury it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30prep: Move PReP machine to hw/ppc/Andreas Färber3-16/+17
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-01-30xilinx_axidma: Fix debug mode compile messagesPeter Crosthwaite1-1/+1
Missing cast one one of the conditionally compiled printfs. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30cadence_gem: Debug mode compile fixesPeter Crosthwaite1-7/+10
Some printfs are throwing warnings when debug mode is enabled. Fixed. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30cadence_ttc: Debug mode compile fixesPeter Crosthwaite1-2/+2
Some printfs are throwing warnings when debug mode is enabled. Fixed. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-30vnc: Clean up vncws_send_handshake_response()Markus Armbruster1-5/+6
Use appropriate types, drop superfluous casts, use sizeof, don't exploit that this particular call of gnutls_fingerprint() doesn't change its last argument. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-01-29Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori2-1/+26
* qemu-kvm/uq/master: target-i386: kvm: prevent buffer overflow if -cpu foo, [x]level is too big vmxcap: bit 9 of VMX_PROCBASED_CTLS2 is 'virtual interrupt delivery' Conflicts: target-i386/kvm.c Trivial merge resolution due to lack of context. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-29Merge remote-tracking branch 'mdroth/qga-pull-1-28-13' into stagingAnthony Liguori1-9/+11
# By Markus Armbruster # Via Michael Roth * mdroth/qga-pull-1-28-13: qemu-ga: Plug leaks on qmp_guest_network_get_interfaces() error paths qemu-ga: Plug memory leak in guest_fsfreeze_cleanup()
2013-01-29s390: Drop set_bit usage in virtio_ccw.Cornelia Huck1-2/+2
set_bit on indicators doesn't go well on 32 bit targets: note: expected 'long unsigned int *' but argument is of type 'uint64_t *' Switch to bit shifts instead. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> [agraf: use 1ULL instead] Signed-off-by: Alexander Graf <agraf@suse.de>
2013-01-29s390: css error codes.Cornelia Huck2-5/+5
Changed error codes in the channel subsystem / virtio-ccw code (-EOPNOTSUPP -> -ENOSYS, -ERESTART -> -EINPROGRESS). This should hopefully fix building on mingw32. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Alexander Graf <agraf@suse.de>