summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* linux-user: Add syscall numbers from kernel 2.6.39.2Peter Maydell2011-07-1116-5/+253
| | | | | | | | Add syscall numbers for new syscall numbers; this brings us into line with Linux 2.6.39.2. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* linux-user: Add support for even more FB ioctlsCédric VINCENT2011-07-113-0/+23
| | | | | | | | | This patch was validated with programs from DirectFB-1.0 and WebKit/DirectFB. Signed-off-by: Cédric VINCENT <cedric.vincent@st.com> Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* linux-user: Add support for more VT ioctlsCédric VINCENT2011-07-113-0/+15
| | | | | | | | | | DirectFB-1.0 uses at least two of the four added ioctls, and the two others were added for completeness. This patch was validated with the program "vlock -all/-new". Signed-off-by: Cédric VINCENT <cedric.vincent@st.com> Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* linux-user: Add support for KD...LED ioctlsCédric VINCENT2011-07-112-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DirectFB-1.0 uses at least one of the four added ioctls, and the three others were added for completeness. This patch was validated with the program "setleds" and the following Makefile: SETLEDS_INIT = setleds -v -num -caps -scroll SETLEDS_TESTS = sh -c ' \ setleds -v +num +caps +scroll; \ setleds -v -num -caps -scroll; \ setleds -v +num -caps -scroll; \ setleds -v +num +caps -scroll; \ setleds -v +num +caps +scroll; \ setleds -v -num +caps +scroll; \ setleds -v -num -caps +scroll; \ setleds -v -num -caps -scroll' SETLEDS_HOST = setleds SETLEDS_QEMU = "SETLEDS_QEMU not set" .PHONY: setleds_tests setleds_tests: rm -f setleds.host setleds.target $(SETLEDS_INIT:setleds=$(SETLEDS_HOST)) $(SETLEDS_TESTS:setleds=$(SETLEDS_HOST)) >> setleds.host $(SETLEDS_INIT:setleds=$(SETLEDS_QEMU)) $(SETLEDS_TESTS:setleds=$(SETLEDS_QEMU)) >> setleds.target cmp setleds.host setleds.target Signed-off-by: Cédric VINCENT <cedric.vincent@st.com> Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* arm-semi: Provide access to CLI arguments passed through the "-append" optionCédric VINCENT2011-07-111-46/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch basically adapts the new semi-hosting command-line support -- introduced by Wolfgang Schildbach in the commit 2e8785ac -- for use in system-mode. Note that the "arm_cmdline_len" and "host_cmdline_len" variables were renamed respectively "input_size" and "output_size" because: * in C, the term "length" is generally used to count the number of character in a string, not to count the number of bytes in a buffer (as it is the case here). * in QEMU, the term "host" is used to name variables that are in the host address space, not to name variables in the target address space (as it is the case here). * in the case of this system-call, the terms "input" and "output" fit the semantic of the official ARM semi-hosting specification quite well. I know renaming can be considered harmful but I do think in this case the semantic really matters to keep this code more understandable. Signed-off-by: Cédric VINCENT <cedric.vincent@st.com> Reviewed-by: Christophe Lyon <christophe.lyon@st.com> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Paul Brook <paul@codesourcery.com> Cc: Wolfgang Schildbach <wschi@dolby.com> Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* pxa2xx_lcd: add proper rotation supportVasily Khoruzhick2011-07-045-22/+144
| | | | | | | | Until now, pxa2xx_lcd only supported 90deg rotation, but some machines (for example Zipit Z2) needs 270deg rotation. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* arm: Add const attribute to some arm_boot_info pointersStefan Weil2011-07-044-7/+7
| | | | | | | | | | | | | Parameter 'info' is const, so add the missing attribute. v2: Add 'const' to the local variable info in do_cpu_reset() and to the boot_info field in CPUARMState (suggested by Peter Maydell). Cc: Andrzej Zaborowski <balrogg@gmail.com> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
* esp: correctly fill bus id with requested lunHervé Poussineau2011-07-021-1/+1
| | | | | | | | | This bug showed up after 1455084ea2c48abf23c4e4e15e378ee43457f381, and may be seen only on operating systems *not* using DMA to give commands to SCSI adapter. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* TCG/PPC: use stack for TCG tempsBlue Swirl2011-07-022-4/+10
| | | | | | Use stack instead of temp_buf array in CPUState for TCG temps. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* fix cpu_cc_src and cpu_cc_src2 corruption in udivx and sdivxArtyom Tarasenko2011-07-011-10/+22
| | | | | | | | udivx and sdvix don't modify condition flags, so they shall not overwrite cpu_cc_* Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge branch 'ppc-next' of git://repo.or.cz/qemu/agrafBlue Swirl2011-07-0118-207/+493
|\ | | | | | | | | | | | | | | | | | | | | | | | | * 'ppc-next' of git://repo.or.cz/qemu/agraf: PPC: move TLBs to their own arrays PPC: 440: Use 440 style MMU as default, so Qemu knows the MMU type PPC: E500: Use MAS registers instead of internal TLB representation PPC: Only set lower 32bits with mtmsr PPC: update openbios firmware PPC: mpc8544ds: Add hypervisor node PPC: calculate kernel,initrd,cmdline locations dynamically target-ppc: Handle memory-forced I/O controller access PPC: E500: Implement reboot controller
| * PPC: move TLBs to their own arraysAlexander Graf2011-06-176-37/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, we've created a union over multiple different TLB types and allocated that union. While it's a waste of memory (and cache) to allocate TLB information for a TLB type with much information when you only need little, it also inflicts another issue. With the new KVM API, we can now share the TLB between KVM and qemu, but for that to work we need to have both be in the same layout. We can't just stretch it over to fit some internal different TLB representation. Hence this patch moves all TLB types to their own array, allowing us to only address and allocate exactly the boundaries required for the specific TLB type at hand. Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: 440: Use 440 style MMU as default, so Qemu knows the MMU typeAlexander Graf2011-06-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | We have some KVM interaction code in Qemu that tries to be clever and ignore some capabilities when running on BookE style MMUs. Unfortunately, the default CPU bamboo was defaulting to was not a BookE-style MMU, resulting in the check to fail. With this patch, guests can run again on 440 with -enable-kvm. Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: E500: Use MAS registers instead of internal TLB representationAlexander Graf2011-06-174-143/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The natural format for e500 cores to do TLB manipulation with are the MAS registers. Instead of converting them into some internal representation and back again when the guest reads them, we can just keep the data identical to the way the guest passed it to us. The main advantage of this approach is that we're getting closer to being able to share MMU data with KVM using shared memory, so that we don't need to copy lots of MMU data back and forth all the time. For this to work however, another patch is required that gets rid of the TLB union, as that destroys our memory layout that needs to be identical with the kernel one. Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: Only set lower 32bits with mtmsrAlexander Graf2011-06-171-11/+6
| | | | | | | | | | | | | | | | | | | | | | As Nathan pointed out correctly, the mtmsr instruction does not modify the high 32 bits of MSR. It also doesn't matter if SF is set or not, the instruction always behaves the same. This patch moves it a bit closer to the spec. Reported-by: Nathan Whitehorn <nwhitehorn@freebsd.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: update openbios firmwareAlexander Graf2011-06-172-2/+4
| | | | | | | | | | | | | | | | There were some changes upstream to account for broken usage of mtmsr, so before applying the mtmsr patch we need to update OpenBIOS, otherwise the PPC target would break. Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: mpc8544ds: Add hypervisor nodeAlexander Graf2011-06-173-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | When running a PPC guest with KVM that can do PV operations, we need to indicate the guest which instructions to use for a hypercall and that it is running as KVM guest. This logic was available on openbios based machines already. This patch also adds said functionality to the mpc8544ds machine. Signed-off-by: Alexander Graf <agraf@suse.de> Acked-by: Scott Wood <scottwood@freescale.com>
| * PPC: calculate kernel,initrd,cmdline locations dynamicallyAlexander Graf2011-06-173-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | During testing, I was generating a vmlinux binary that easily occupied more than 20MB of RAM. Since the current -kernel code loads the initrd at a fixed address behind the kernel, we were overwriting kernel data when the kernel got too big. To finally get rid of the issue, let's calculate the initrd and cmdline addresses relative to the kernel size, so we can have kernels and initrds that are as big as they want to - as long as they fit in RAM. Signed-off-by: Alexander Graf <agraf@suse.de>
| * target-ppc: Handle memory-forced I/O controller accessHervé Poussineau2011-06-171-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On at least the PowerPC 601, a direct-store (T=1) with bus unit ID 0x07F is special-cased as memory-forced I/O controller access. It is supposed to be checked immediately if T=1, bypassing all protection mechanisms and acting cache-inhibited and global. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Simplified by avoiding reindentation. Added explanatory comments. Cc: Alexander Graf <agraf@suse.de> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: E500: Implement reboot controllerAlexander Graf2011-06-175-1/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | When Linux reboots an e500 VM, it writes to a magic register in the "global-utilities" device indicated by the device tree. We were not emulating that device so far, rendering the VM reboot-less. This patch implements that device with only the reboot functionality implemented and adds it to the device tree. With this patch applied, I can successfully reboot a -M mpc8544ds VM. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Andreas Färber <andreas.faerber@web.de>
* | tcg-hppa: Support deposit opcode.Richard Henderson2011-07-012-4/+21
| | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | hppa: Fix printf warnings in hppa-dis.c.Richard Henderson2011-07-011-3/+3
| | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | TCG/HPPA: use stack for TCG tempsBlue Swirl2011-07-011-2/+7
| | | | | | | | | | | | | | Use stack instead of temp_buf array in CPUState for TCG temps. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | TCG/HPPA: use TCG_REG_CALL_STACK instead of TCG_REG_SPBlue Swirl2011-07-011-14/+16
| | | | | | | | | | | | | | Use TCG_REG_CALL_STACK instead of TCG_REG_SP for consistency. Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | etraxfs-ser: Correct default value for RW_REC_CTRLEdgar E. Iglesias2011-06-301-5/+19
| | | | | | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* | user: Fix -d debug logging for usermode emulationEdgar E. Iglesias2011-06-283-3/+3
| | | | | | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* | cris: Handle opcode zeroEdgar E. Iglesias2011-06-281-3/+0
| | | | | | | | | | | | It's a valid branch pc + 2. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* | tcg/ppc64: Remove tcg_out_addimalc2011-06-281-5/+0
| | | | | | | | | | | | The only user (within tcg.c) was removed Signed-off-by: malc <av1474@comtv.ru>
* | tcg/ppc: Remove tcg_out_addimalc2011-06-281-5/+0
| | | | | | | | | | | | The only user (within tcg.c) was removed Signed-off-by: malc <av1474@comtv.ru>
* | Merge remote-tracking branch 'kraxel/usb.17' into stagingAnthony Liguori2011-06-279-64/+191
|\ \
| * | usb: ignore USB_DT_DEBUGGerd Hoffmann2011-06-232-0/+5
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-storage: Turn drive serial into a qdev property usb-storage.serialMarkus Armbruster2011-06-231-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It needs to be a qdev property, because it belongs to the drive's guest part. Precedence: commit a0fef654 and 6ced55a5. Bonus: info qtree now shows the serial number. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | hw/usb-ohci.c: Fix handling of remote wakeup corner casesPeter Maydell2011-06-231-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct a number of minor errors in the OHCI wakeup implementation: * when the port is suspended but the controller is not, raise RHSC * when the controller is suspended but the port is not, raise RD * when the controller is suspended, move it to resume state These fix some edge cases where a USB device might not successfully get the attention of the guest OS if it tried to do so at the wrong time. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-bus: Don't allow speed mismatch while attaching devicesHans de Goede2011-06-231-0/+5
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-linux: allow "compatible" high speed devices to connect at fullspeedHans de Goede2011-06-231-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | Some usb2 highspeed devices, like usb-msd devices, work fine when redirected to a usb1 virtual controller. Allow this to avoid the new speedhecks causing regressions for users who do not enable the new experimental ehci code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb: Add a speedmask to devicesHans de Goede2011-06-235-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is used to indicate at which speed[s] the device can operate, so that this can be checked to match the ports capabilities when it gets attached to a bus. Note that currently all usb1 emulated device claim to be fullspeed, this seems to not cause any problems, but still seems wrong, because with real hardware keyboards, mice and tablets usually are lo-speed, so reporting these as fullspeed devices seems wrong. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb: Proper error propagation for usb_device_attach errorsHans de Goede2011-06-233-15/+21
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-bus: Don't allow attaching a device to a bus with no free portsHans de Goede2011-06-231-0/+5
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | ehci: switch to nanosecondsGerd Hoffmann2011-06-231-18/+11
| | | | | | | | | | | | | | | | | | | | | Make ehci use nanoseconds everywhere. Simplifies time calculations. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | ehci: add freq + maxframes propertiesGerd Hoffmann2011-06-231-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add properties for the wakeup rate and the max number of frames ehci will process at once. The wakeup rate defaults to 1000 which equals the usb frame rate. This can be reduced to make qemu wake up less often when ehci is active. In case the wakeup rate is reduced or the ehci timer is delayed due to latency issues elsewhere in qemu ehci will process multiple frames at once. The maxframes property specifies the upper limit for this. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-linux: track inflight iso urb countGerd Hoffmann2011-06-231-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | Track the number of iso urbs which are currently in flight. Log a message in case the count goes down to zero. Also warn in case many urbs are returned at the same time. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-linux: make iso urb count contigurableGerd Hoffmann2011-06-231-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a qdev property for the number of iso urbs which usb-linux keeps in flight, so it can be configured at runtime. Make it default to four (old hardcoded value used to be three). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | usb-linux: add get_endp()Gerd Hoffmann2011-06-231-18/+21
| | | | | | | | | | | | | | | | | | | | | Add a helper function to get the endpoint data structure and put it into use. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | Merge remote-tracking branch 'amit/for-anthony' into stagingAnthony Liguori2011-06-271-10/+14
|\ \ \
| * | | virtio-serial: Fix segfault on guest bootLuiz Capitulino2011-06-271-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If I start qemu with: # qemu -hda disks/test.img -enable-kvm -m 1G -snapshot \ -device virtio-serial \ -chardev socket,host=localhost,port=1234,server,nowait,id=foo \ -device virtserialport,chardev=foo,name=org.qemu.guest_agent I get a segfault when booting a Fedora 14 guest. The backtrace says: Program terminated with signal 11, Segmentation fault. #0 0x0000000000420850 in handle_control_message (vser=0x3732bd0, buf=0x2c173e0, len=8) at /home/lcapitulino/src/qmp-unstable/hw/virtio-serial-bus.c:335 335 info = DO_UPCAST(VirtIOSerialPortInfo, qdev, port->dev.info); What's happening is VIRTIO_CONSOLE_DEVICE_READY is a message for the whole device, not for an individual port. So port is NULL. This bug was introduced by commit a15bb0d6a981de749452a5180fc8084d625671da. This commit fixes that by making the port returned by find_port_by_id() be used only by the VIRTIO_CONSOLE_PORT_READY and VIRTIO_CONSOLE_PORT_OPEN messages. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
* | | | Merge remote-tracking branch 'riku/linux-user-for-upstream' into stagingAnthony Liguori2011-06-279-175/+354
|\ \ \ \
| * | | | linux-user: Fix sync_file_range on 32bit mipsRiku Voipio2011-06-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As noticed while looking at "Bump do_syscall() up to 8 syscall arguments" patch, sync_file_range uses a pad argument on 32bit mips. Deal with it by reading the correct arguments when on mips. Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
| * | | | linux-user/signal.c: Remove unused fenabPeter Maydell2011-06-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove fenab as it is only written, never used. Add a FIXME comment about the discrepancy between our behaviour and that of the Linux kernel for this routine. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
| * | | | linux-user/signal.c: Remove only-ever-set variable fpu_save_addrPeter Maydell2011-06-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the access of fpu_save into the commented out skeleton code for restoring FPU registers on SPARC sigreturn, thus silencing a gcc 4.6 "variable set but never used" warning. (This doesn't affect the calculation of 'err' because in fact __get_user() can never fail.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
| * | | | linux-user: Bump do_syscall() up to 8 syscall argumentsPeter Maydell2011-06-213-17/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On 32 bit MIPS a few syscalls have 7 arguments, and so to call them via NR_syscall the guest needs to be able to pass 8 arguments to do_syscall(). Raise the number of arguments do_syscall() takes accordingly. This fixes some gcc 4.6 compiler warnings about arg7 and arg8 variables being set and never used. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
OpenPOWER on IntegriCloud