summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-10-13tcg-sparc: Dump illegal opode contentsRichard Henderson1-1/+1
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-13tcg-sparc: Drop use of Bicc in favor of BPccRichard Henderson1-160/+145
Now that we're always sparcv9, we can not bother using Bicc for 32-bit branches and BPcc for 64-bit branches and instead always use BPcc. New interfaces allow less direct use of tcg_out32 and raw numbers inside the qemu_ld/st routines. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-13tcg-sparc: Optimize setcond2 equality compare with 0.Richard Henderson1-3/+12
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-13tcg-sparc: Use Z constraint for %g0Richard Henderson2-60/+66
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-13tcg-sparc: Fix add2/sub2Richard Henderson1-8/+22
We must care not to clobber the high parts before we consume them. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-13tcg-sparc: Fix setcondRichard Henderson1-14/+19
The set of comparisons that can immediately use the carry are LTU/GEU, not LTU/LEU. Don't swap operands when we need a temp register; the register may already be in use from setcond2. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-13tcg-sparc: Fix qemu_st for 32-bitRichard Henderson1-3/+4
The datalo variable is still live in the miss path. Use another when reconstructing the full data value. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-13tcg-sparc: Fix setcond2Richard Henderson1-20/+18
Like brcond2, use tcg_high_cond. Use movcc instead of branches. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-13tcg-sparc: Implement movcond.Richard Henderson2-9/+38
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-13tcg-sparc: Fix brcond2Richard Henderson1-16/+7
Much the same problem as recently fixed for hppa. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-13target-sparc: Don't compute full flags value so oftenRichard Henderson4-19/+26
Avoid speculatively computing flags before every potentially trapping operation and instead do the flags computation when a trap actually occurs. This gives approximately 30% speedup in emulation. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-13target-sparc: Avoid unnecessary local temporariesRichard Henderson1-21/+9
Now that save_state never ends a BB, we don't need to copy values into local temps around it. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-13target-sparc: Optimize CC_OP_LOGIC conditionsRichard Henderson1-18/+40
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-13target-sparc: Fix optimized %icc comparisonsRichard Henderson1-0/+1
Signed-off-by: Richard Henderson <rth@twiddle.net> Tested-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-10-12Merge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into stagingAnthony Liguori8-83/+137
* pmaydell/arm-devs.for-upstream: arm_gic: Rename gic_state to GICState zynq_slcr: Fixed ResetValues enum versatilepb: add gpio pl061 support hw/ds1338: Implement state save/restore hw/ds1338: Remove 'now' field from state struct hw/ds1338: Recapture current time when register pointer wraps around hw/ds1338: Fix mishandling of register pointer hw/arm_gic.c: Fix improper DPRINTF output. cadence_ttc: Fix 'clear on read' behavior
2012-10-12Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori3-37/+39
* stefanha/trivial-patches: vnc: fix "info vnc" with "-vnc ..., reverse=on" sheepdog: use bool for boolean variables configure: Tidy up remnants of non-64-bit physaddrs
2012-10-12Merge remote-tracking branch 'kraxel/usb.67' into stagingAnthony Liguori2-11/+23
* kraxel/usb.67: uhci: Raise interrupt when requested even for non active tds usb-redir: Don't make migration fail in none seamless case usb-redir: Change usbredir_open_chardev into usbredir_create_parser
2012-10-12Merge remote-tracking branch 'mdroth/qga-pull-10-9-12' into stagingAnthony Liguori2-4/+11
* mdroth/qga-pull-10-9-12: qemu-ga: ga_open_pidfile(): add new line to pidfile qemu-ga: use state dir from CONFIG_QEMU_LOCALSTATEDIR configure: add --localstatedir
2012-10-12Merge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20121008.0' ↵Anthony Liguori2-307/+305
into staging * awilliam/tags/vfio-pci-for-qemu-20121008.0: vfio-pci: Fix BAR->VFIODevice translation in vfio-pci: Clang cleanup vfio-pci: Cleanup on INTx setup failure vfio-pci: Extend reset vfio-pci: Remove setting of MSI qsize vfio-pci: Use uintptr_t for void* cast vfio-pci: Don't peak at msi_supported vfio-pci: Roll the header into the .c file vfio-pci: No spurious MSIs vfio-pci: Rework MSIX setup/teardown vfio-pci: Unmap and retry DMA mapping vfio-pci: Re-order map/unmap vfio-pci: Update slow path INTx algorithm
2012-10-12Merge remote-tracking branch 'stefanha/net' into stagingAnthony Liguori17-101/+77
* stefanha/net: net: consolidate NetClientState header files into one virtio-net: update nc.link_down in virtio_net_load() e1000: update nc.link_down in e1000_post_load() rtl8139: implement 8139cp link status
2012-10-12Merge remote-tracking branch 'spice/spice.v61' into stagingAnthony Liguori8-162/+24
* spice/spice.v61: qxl: set default revision to 4 spice: raise requirement to 0.12 hw/qxl: qxl_dirty_surfaces: use uintptr_t hw/qxl: fix condition for exiting guest_bug hw/qxl: exit on failure to register qxl interface qxl: fix range check for rev3 io commands. qxl/update_area_io: cleanup invalid parameters handling qxl: always update displaysurface on resize
2012-10-12linux-user: register align p{read, write}64Alexander Graf1-0/+8
pread64 and pwrite64 pass 64bit parameters which for some architectures need to be aligned to special argument pairs, creating a gap argument. Handle this special case the same way we handle it in other places of the code. Reported-by: Alex Barcelo <abarcelo@ac.upc.edu> Signed-off-by: Alexander Graf <agraf@suse.de> Tested-by: Alex Barcelo <abarcelo@ac.upc.edu> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-10-12linux-user: ppc: mark as long long alignedAlexander Graf1-1/+6
The SysV PPC32 ABI dictates that long long (64bit) parameters are pass in odd/even register pairs. Because unlike ARM and MIPS we start at an odd register number, we can reuse the same aligning code that ARM and MIPS use. Clarified inline comment that it is SysV ABI that requires long long aligned parameters - Riku Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-10-12tcg: Remove TCG_TARGET_HAS_GUEST_BASE definePeter Maydell11-26/+0
GUEST_BASE support is now supported by all TCG backends, and is now mandatory. Drop the now-pointless TCG_TARGET_HAS_GUEST_BASE define (set by every backend) and the error if it is unset. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-10-12configure: Remove unnecessary host_guest_base codePeter Maydell1-29/+2
All TCG hosts now support guest-base functionality, so we can remove the setting of host_guest_base to 'yes' in every arm of the case "$cpu" statement, and simply set guest_base to default to 'yes'. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-10-12linux-user: If loading fails, print error as string, not numberPeter Maydell2-5/+5
If the attempt to load the guest executable fails, print the error message as a string, not a number. This requires us to fix a couple of places in loader_exec() where we were returning -1 instead of a valid negative errno. The change allows us to drop the "Unknown binary format" message because the strerror-enhanced message is now a more self-explanatory "Error while loading $guest-binary: Exec format error". Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-10-12linux-user: Fix siginfo handlingRichard Henderson3-20/+44
Compare signal numbers in the proper domain. Convert all of the fields for SIGIO and SIGCHLD. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-10-12alpha-linux-user: Fix sigaltstack structure definitionRichard Henderson1-3/+4
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-10-12linux-user: Implement gethostnameRichard Henderson1-0/+13
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-10-12linux-user: Perform more checks on iovec listsRichard Henderson1-60/+102
Validate count between 0 and IOV_MAX. Limit total length of operation in the same way the kernel does. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-10-12linux-user: fix multi-threaded /proc/self/mapsAlexander Graf1-2/+2
When reading our faked /proc/self/maps from a secondary thread, we get an invalid stack entry. This is because ts->stack_base is not initialized in non-primary threads. However, ts->info is, and the stack layout information we're looking for is there too. So let's use that one instead! Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-10-12linux-user: fix statfsAlexander Graf1-0/+4
The statfs syscall should always memset(0) its full struct extent before writing to it. Newer versions of the syscall use one of the reserved fields for flags, which would otherwise get stale values from uncleaned memory. This fixes libarchive for me, which got confused about the return value of pathconf("/", _PC_REC_XFER_ALIGN) otherwise, as it some times gave old pointers as return value. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-10-12arm_gic: Rename gic_state to GICStatePeter Maydell4-43/+43
Rename the gic_state struct to match QEMU's coding style conventions for structure names, since the impending KVM-for-ARM patches will create another subclass of it. This patch was created using: sed -i 's/gic_state/GICState/g' hw/arm_gic.c hw/arm_gic_common.c \ hw/arm_gic_internal.h hw/armv7m_nvic.c Acked-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-12zynq_slcr: Fixed ResetValues enumPeter A. G. Crosthwaite1-1/+1
There is a gap in the reset region of the address space at offset 0x208. This throws out all these enum values by one when translating them to address offsets. Fixed by putting the corresponding gap in the enum as well. Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-12versatilepb: add gpio pl061 supportJean-Christophe PLAGNIOL-VILLARD1-0/+5
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-12hw/ds1338: Implement state save/restorePeter Maydell1-5/+22
Implement state save/restore for the DS1338. This requires the usual minor adjustment of types in the state struct to get fixed-width ones with vmstate macros. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-12hw/ds1338: Remove 'now' field from state structPeter Maydell1-20/+21
The 'struct tm now' field in the state structure is in fact only ever used as a temporary (the actual RTC state is held in 'offset'). Remove it from the state structure in favour of using local variables to avoid confusion about whether it needs to be saved on migration. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-12hw/ds1338: Recapture current time when register pointer wraps aroundPeter Maydell1-17/+42
The DS1338 datasheet documents that the current time is captured into the secondary registers when the register pointer wraps round to zero as well as at a START condition. Implement this. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-12hw/ds1338: Fix mishandling of register pointerPeter Maydell1-7/+13
Correct several deficiencies in the handling of the register pointer: * it should wrap around after 0x3f, not 0xff * guard against the caller handing us an out of range pointer (on h/w this can never happen, because only a 7 bit value is transferred over the I2C bus) * there was confusion over whether nvram[] holds only the 56 bytes of guest-accessible NVRAM, or also the secondary registers which hold the value of the clock captured at the start of a multibyte read. Correct to consistently be the latter, by fixing the array size and the offset used for NVRAM writes. * ds1338_send was attempting to use 'data' as both the data and the register offset simultaneously, which meant that writes to any register were broken; fix to use the register pointer. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-12hw/arm_gic.c: Fix improper DPRINTF output.Evgeny Voevodin1-1/+1
s->cpu_enabled is an array, so s->cpu_enabled ? "En" : "Dis" returns "En" always. We should use s->cpu_enabled[cpu] here. Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-12cadence_ttc: Fix 'clear on read' behaviorSoren Brinkmann1-1/+1
A missing call to qemu_set_irq() when reading the IRQ register required SW to write to the IRQ register to acknowledge an interrupt. With this patch the behavior is fixed: - Reading the interrupt register clears it and updates the timers interrupt status - Writes to the interrupt register are ignored Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-12vnc: fix "info vnc" with "-vnc ..., reverse=on"Paolo Bonzini1-0/+4
When reverse connection is in use, there is no active VNC server socket. Because of this, getsockopt(-1, ...) is attempted and the following error is emitted: $ socat TCP-LISTEN:5900,reuseaddr TCP-LISTEN:5901,reuseaddr & $ x86_64-softmmu/qemu-system-x86_64 -vnc localhost:5900,reverse -monitor stdio QEMU 1.2.50 monitor - type 'help' for more information (qemu) info vnc An undefined error has occurred Because however the host, family, service and auth fields are optional, we can just exit if there is no active server socket. $ x86_64-softmmu/qemu-system-x86_64 -vnc localhost:5900,reverse -monitor stdio QEMU 1.2.50 monitor - type 'help' for more information (qemu) info vnc Server: Client: address: 127.0.0.1:5900 x509_dname: none username: none Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2012-10-12sheepdog: use bool for boolean variablesMORITA Kazutaka1-35/+35
This improves readability. Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2012-10-12configure: Tidy up remnants of non-64-bit physaddrsPeter Maydell1-2/+0
Tidy up some remnants of code to support non-64-bit physaddrs which were accidentally omitted from commit 4be403c8. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2012-10-11uhci: Raise interrupt when requested even for non active tdsHans de Goede1-1/+9
According to the spec we must raise an interrupt when one is requested even for non active tds. Linux depends on this, for bulk transfers it runs an inactivity timer to work around a bug in early uhci revisions, when we take longer then 200 ms to process a packet, this timer goes of, and as part of the handling Linux then unlinks the qh, and relinks it after the frindex has increased by atleast 1, the problem is Linux only checks for the frindex increases on an interrupt, and we don't send that, causing the qh to go inactive for more then 32 frames, at which point we consider the packet cancelled. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-10-11usb-redir: Don't make migration fail in none seamless caseHans de Goede1-4/+9
Instead simple disconnect the device like host redirection does on migration. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-10-11usb-redir: Change usbredir_open_chardev into usbredir_create_parserHans de Goede1-6/+5
As we need to create the parser at more places. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-10-10ssi: Add slave autoconnect helperPeter Crosthwaite4-3/+44
Added helper function to automatically connect SPI slaves based on the QOM child nodes of a device. A SSI master device can call this routine to automatically hook-up all child nodes to its SPI bus. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-10MAINTAINERS: Added maintainerships for SSIPeter A. G. Crosthwaite1-0/+8
Added maintainership for SSI, M25P80 and the Xilinx SPI controllers. Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-10xilinx_zynq: Added SPI controllers + flashesPeter A. G. Crosthwaite1-0/+34
Added the two SPI controllers to the zynq machine model. Attached two SPI flash devices to each controller. Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Acked-by: Peter Maydell <peter.maydell@linaro.org>