summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-04-17usb_packet_set_state: handle p->ep == NULLGerd Hoffmann1-6/+11
usb_packet_set_state can be called with p->ep = NULL. The tracepoint there tries to log endpoint information, which leads to a segfault. This patch makes usb_packet_set_state handle the NULL pointer properly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb-host: add property to turn off pipeliningGerd Hoffmann1-1/+9
Add a property to usb-host to disable the bulk endpoint pipelining. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb-host: add usb packet to request tracepointsGerd Hoffmann2-17/+19
Add pointer to USBPacket to all tracepoints tracking requests to make it easier to identify them when multiple requests are in flight. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb-host: trace canceled requestsGerd Hoffmann2-1/+5
Add tracepoints to track canceled requests. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb-host: trace emulated requestsGerd Hoffmann2-3/+10
Add tracepoint to track completion of emulated control requests. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17Add bootindex support to usb-host and usb-redirGerd Hoffmann2-0/+6
When passing through a usb pendrive seabios will present it in the F12 boot menu and will happily boot from it. This patch adds bootorder support so you can even make it the default boot device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb-uhci: queuing fixGerd Hoffmann1-3/+10
When we queue up usb packets we may happen to find a already queued packet, which also might be finished at that point already. We don't want continue processing the packet at this point though, so lets just signal back we've found a in-flight packet when in queuing mode. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb-uhci: stop queue filling when we find a in-flight tdGerd Hoffmann1-0/+3
Not only QHs can form rings, but TDs too. With the new queuing/pipelining support we are following TD chains and can actually walk in circles. An assert() prevents us from entering an endless loop then. Fix is easy: Just stop queuing when we figure the TD we are about to queue up is in flight already. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-17usb/vmstate: add parent dev pathGerd Hoffmann3-1/+25
... to make vmstate id string truely unique with multiple host controllers, i.e. move from "1/usb-ptr" to "0000:00:01.3/1/usb-ptr" (usb tabled connected to piix3 uhci). This obviously breaks migration. To handle this the usb bus property "full-path" is added. When setting this to false old behavior is maintained. This way current qemu will be compatible with old versions when started using '-M pc-$oldversion'. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-04-16qemu-timer.c: Remove 250us timeoutsPeter Portante1-5/+5
Basically, the main wait loop calls qemu_run_all_timers() unconditionally. The first thing this routine used to do is to see if a timer had been serviced, and then reset the loop timeout to the next deadline. However, the new deadlines had not been calculated at that point, as qemu_run_timers() had not been called yet for each of the clocks. So qemu_rearm_alarm_timer() would end up with a negative or zero deadline, and default to setting a 250us timeout for the loop. As qemu_run_timers() is called for each clock, the real deadlines would be put in place, but because a loop timeout was already set, the loop timeout would not be changed. Once that 250us timeout fired, the real deadline would be used for the subsequent timeout. For idle VMs, this effectively doubles the number of times through the loop, doubling the number of select() system calls, timer calls, etc. putting added scheduling pressure on the kernel. And under cgroups, this really causes a big problem because the cgroup code does not scale well. By simply running the timers before trying to rearm the timer, we always rearm with a non-zero deadline, effectively halving the number of system calls. Signed-off-by: Peter Portante <pportant@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-04-16Merge remote-tracking branch 'kiszka/queues/pending' into stagingAnthony Liguori7-47/+59
* kiszka/queues/pending: vapic: Disable for pre-1.1 machines Kick io-thread on qemu_chr_accept_input pcnet: Properly handle TX requests during Link Fail pcnet: Clear ERR in CSR0 on stop signrom: Rewrite as python script Conflicts: hw/pc_piix.c Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-04-16Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori8-299/+217
* mst/tags/for_anthony: pci: fix corrupted pci conf index register by unaligned write acpi: explicitly account for >1 device per slot acpi_piix4: Re-define PCI hotplug eject register read acpi_piix4: Remove PCI_RMV_BASE write code acpi_piix4: Fix PCI hotplug race acpi_piix4: Disallow write to up/down PCI hotplug registers virtio-pci: change virtio balloon PCI class code ivshmem: add missing msix calls vhost: readd assert statement vhost: Fix size of dirty log sync on resize pc: reduce duplication in compat machine types piix_pci: fix typo in i400FX chipset init code
2012-04-16Merge remote-tracking branch 'sstabellini/for_anthony' into stagingAnthony Liguori9-20/+171
* sstabellini/for_anthony: xen: introduce an event channel for buffered io event notifications xen-mapcache: don't unmap locked entry during mapcache invalidation Xen, mapcache: Fix the compute of the size of bucket. xen: handle backend deletion from xenstore Xen: Add xen-apic support and hook it up. Xen: basic HVM MSI injection support.
2012-04-16vapic: Disable for pre-1.1 machinesJan Kiszka1-10/+33
The kvmvapic was not present in older QEMU versions, thus must be disabled in compat machines. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-04-16Kick io-thread on qemu_chr_accept_inputJan Kiszka1-0/+1
Once a chr frontend is able to receive input again, we need to inform the io-thread about this fact. Otherwise, main_loop_wait may continue to select without the related backend file descriptor in its set. This can cause high input latencies if only low-rate events arrive otherwise. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-04-16pcnet: Properly handle TX requests during Link FailJan Kiszka2-0/+12
As long as we have no link and we aren't in internal loopback mode, no packet must be sent. Instead, LCAR needs to be set in any active TX descriptor and also CERR in CSR0. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-04-16pcnet: Clear ERR in CSR0 on stopJan Kiszka1-1/+1
pcnet_stop already clears any reason (BABL, CERR, MISS, MERR) why ERR (bit 15) should be set in CRS0. So we have to clear that bit as well. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-04-16signrom: Rewrite as python scriptJan Kiszka3-46/+41
Now that we have a hard dependency on python anyway, we can replace the slow shell script to calculate the option ROM checksum with a fast AND portable python version. Tested both with python 2.7 and 3.1. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-04-15Merge branch 'w64' of git://qemu.weilnetz.de/qemuBlue Swirl15-112/+152
* 'w64' of git://qemu.weilnetz.de/qemu: w64: Fix time conversion for some versions of MinGW-w64 nbd: Fix compiler warning (w64) disas: Replace 'unsigned long' by 'uintptr_t' cpu-exec: Remove non-portable type cast and fix format string target-mips: Fix type cast for w64 (uintptr_t) w64: Fix type cast in os_host_main_loop_wait w64: Fix data types in softmmu*.h w64: Use uintptr_t in exec.c softmmu: Use uintptr_t for physaddr and rename it w64: Fix struct CPUTLBEntry w64: Fix definition of setjmp w32: Move defines for socket specific errors to qemu-os-win32.h w64: Use larger alignment for section with generated code w64: Fix data types in cpu-all.h, exec.c w64: Fix type casts used in some macros in cpu-all.h tcg/i386: Add support for w64 ABI tcg/i386: Use GDB JIT debugging interface only for hosts with ELF
2012-04-15target-alpha: QOM'ify CPU initAndreas Färber2-11/+21
Move code from cpu_alpha_init() into a CPU initializer. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Richard Henderson <rth@twiddle.net>
2012-04-15target-alpha: QOM'ify CPUAndreas Färber5-1/+114
Embed CPUAlphaState as first member of AlphaCPU. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Richard Henderson <rth@twiddle.net>
2012-04-15w64: Fix time conversion for some versions of MinGW-w64Stefan Weil1-1/+2
tb.time is a time value, but not necessarily of the same size as time_t: while time_t is 64 bit for w64, tb.time still is 32 bit only. Therefore we need en explicit conversion. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15nbd: Fix compiler warning (w64)Stefan Weil1-1/+1
Portable printing of dev_offset (data type off_t) needs a type cast. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15disas: Replace 'unsigned long' by 'uintptr_t'Stefan Weil1-4/+4
This is needed for w64. It changes nothing for other hosts. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15cpu-exec: Remove non-portable type cast and fix format stringStefan Weil1-2/+2
This change is needed for w64, but also changes the code for other hosts. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15target-mips: Fix type cast for w64 (uintptr_t)Stefan Weil1-1/+1
This changes nothing for other hosts. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15w64: Fix type cast in os_host_main_loop_waitStefan Weil1-1/+1
Casting a pointer to an integer must use (DWORD_PTR) instead of (DWORD). This also matches the definition of 'fd' (gint for w32, gint64 for w64). Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15w64: Fix data types in softmmu*.hStefan Weil2-13/+15
w64 requires uintptr_t. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15w64: Use uintptr_t in exec.cStefan Weil1-37/+40
Replace all type casts to 'long' or 'unsigned long' by 'intptr_t' or 'uintptr_t'. For type casts which are only used to extract the lower bits of an address or to modify those bits, signedness does not matter. There I always use 'uintptr_t'. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15softmmu: Use uintptr_t for physaddr and rename itStefan Weil1-9/+6
Variable physaddr is a host address which should be represented by data type 'uintptr_t'. This is needed for w64 and changes nothing for other hosts. v2: Rename physaddr -> hostaddr (suggested by Blue Swirl). Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15w64: Fix struct CPUTLBEntryStefan Weil1-5/+5
For w64, some entries need 'uintptr_t' instead of 'unsigned long'. For other host systems, both data types are identical, so nothing changes. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15w64: Fix definition of setjmpStefan Weil1-0/+9
The default definition of setjmp which is implemented in MinGW-w64 cannot be used with programs like QEMU which call longjmp from code without structured exception handling (SEH). This code therefore disables stack unwinding. We could also implement SEH for QEMU's generated JIT code, but that is much more difficult. Stack unwinding would also cost execution time. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15w32: Move defines for socket specific errors to qemu-os-win32.hStefan Weil3-18/+26
As those defines are only used for w32, they should be in the header file for w32. All files which include slirp.h or qemu_socket.h also include qemu-os-win32.h. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15w64: Use larger alignment for section with generated codeStefan Weil1-2/+1
The MinGW-w64 compiler allows __attribute__((aligned (32)). Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15w64: Fix data types in cpu-all.h, exec.cStefan Weil2-7/+7
w64 needs uintptr_t instead of unsigned long. For other hosts, nothing changes. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15w64: Fix type casts used in some macros in cpu-all.hStefan Weil1-2/+2
Instead of type casts to long, w64 needs type casts to intptr_t. For other hosts, this changes nothing. Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15tcg/i386: Add support for w64 ABIStefan Weil1-11/+28
w64 uses the registers rcx, rdx, r8 and r9 for function arguments, so it needs a different declaration of tcg_target_call_iarg_regs. rax, rcx, rdx, r8, r9, r10 and r11 may be changed by function calls. rbx, rbp, rdi, rsi, r12, r13, r14 and r15 remain unchanged by function calls. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15tcg/i386: Use GDB JIT debugging interface only for hosts with ELFStefan Weil1-1/+5
Not all i386 / x86_64 hosts use ELF. Ask the compiler whether ELF is used. On w64, gdb crashes when ELF_HOST_MACHINE is defined. Cc: Blue Swirl <blauwirbel@gmail.com> Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Stefan Weil <sw@weilnetz.de>
2012-04-15Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agrafBlue Swirl16-180/+396
* 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf: pseries: Fix reset of VIO network device pseries: Reset vscsi properly pseries: Correctly use the device model reset hooks pseries: Remove old hcalls hook stub pseries: Remove old debug leftovers from spapr_vscsi pseries: Fix RTAS based config access target-ppc/machine.c: Drop unnecessary ifdefs target-ppc: Init dcache and icache size for e500 user mode target-ppc: Fix type casts for w64 (uintptr_t) target-ppc: QOM'ify CPU reset target-ppc: Start QOM'ifying CPU init target-ppc: QOM'ify CPU target-ppc: Add hooks for handling tcg and kvm limitations target-ppc: Drop cpu_ppc_close() pseries: Consolidate hack for RTAS display-character usage pseries: Remove unused fields from VIOsPAPRBus structure pseries: Implement RTAS system-reboot call pseries: Fix bug with reset of VIO CRQs pseries: Clean up hcall_dprintf() debugging messages PPC: Fix TLB invalidation bug within the PPC interrupt handler.
2012-04-15pseries: Fix reset of VIO network deviceDavid Gibson1-3/+11
Currently, the PAPR VIO network device does not have a reset handler. This means that after a hard reset, H_REGISTER_LOGICAL_LAN will return an error when the new guest boot attempts to initialize the device. This patch corrects this, adding a suitable reset hook. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-04-15pseries: Reset vscsi properlyDavid Gibson1-2/+7
Currently the PAPR vscsi implementation does not properly clear its table of request tags when the system is reset. This patch adds a reset hook to do so. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-04-15pseries: Correctly use the device model reset hooksDavid Gibson2-4/+9
Recently we added code to properly clean away VIO CRQs on reset However, this directly uses qemu_register, rather than the existing device model reset callbacks. This patch cleans this up by adding proper use of the reset hook to the VIO bus model. The existing CRQ reset code is converted to the new method. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-04-15pseries: Remove old hcalls hook stubDavid Gibson1-1/+0
Some time ago we removed all use of the 'hcalls' callback in the pseries VIO code, which was used to workaround an ordering problem which has since been solved properly. However, the function pointer for the hook remains. This patch cleans it away. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-04-15pseries: Remove old debug leftovers from spapr_vscsiDavid Gibson1-6/+0
The PAPR VSCSI emulation contains a few lines of code which were once used for debug but now do nothing at all. This patch removes them. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-04-15pseries: Fix RTAS based config accessDavid Gibson1-38/+79
On the pseries platform, access to PCI config space is via RTAS calls( which go to the hypervisor) rather than MMIO. This means we don't use the same code path as nearly everyone else which goes through pci_host.c and we're missing some of the parameter checking along the way. We do have some parameter checking in the RTAS calls, but it's not enough. It checks for overruns, but does not check for unaligned accesses, oversized accesses (which means the guest could trigger an assertion failure from pci_host_config_{read,write}_common(). Worse it doesn't do the basic checking for the number of RTAS arguments and results before accessing them. This patch fixes these bugs. Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [AF: Fix typos spotted by mst] Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-04-15target-xtensa: add license to core-fsf.cMax Filippov1-0/+27
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-04-15target-xtensa: add license to core-dc232b.cMax Filippov1-0/+27
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-04-15target-xtensa: add dc233c coreMax Filippov4-0/+675
This is Diamond 233L Standard Core Rev.C (LE), implemented through linux/gdb overlay. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-04-15linux-user: Fix exit syscall with QOM CPUAndreas Färber1-0/+4
For QOM'ified CPUs we cannot g_free() CPUArchState, we must object_delete() the object it is embedded into. Fixes LP#982321 (invalid free() while executing pacman with qemu-arm). Reported-by: Serge Schneider <serge@xecdesign.com> Reported-by: Russell Keith Davis <russell@russelldavis.org> Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Serge Schneider <serge@xecdesign.com> Tested-by: Russell Keith Davis <russell@russelldavis.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-04-15target-ppc/machine.c: Drop unnecessary ifdefsJuan Quintela1-8/+0
machine.c is only compiled for softmmu targets, so checks for !defined(CONFIG_USER_ONLY) are unnecessary and can be dropped. Signed-off-by: Juan Quintela <quintela@redhat.com> [AF: Use more verbose commit message suggested by PMM] Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de>