aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-09-16cris: Avoid spurios hw_abort on recursive bus faultsEdgar E. Iglesias1-1/+7
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-09-15PPC: Redesign interrupt trigger pathAlexander Graf1-51/+29
According to the Book3S spec, the interrupt context starts with an MSR value that is rather simple. If we leave out the HV case, it's almost always 0. To reflect this, let's redesign the way that MSR value gets calculated. Using this, we also squash the bug where MSR_POW can slip through into the interrupt handler MSR. Reported-by: Thomas Monjalon <thomas.monjalon@openwide.fr> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-09-15PPC: Enable hint bits for lwarx/ldarxAlexander Graf1-2/+2
The lwarx and ldarx instructions have a bit to give some hint to the CPU which is safe to ignore. We currently refuse to accept any instruction with that bit set, as it used to be declared MBZ. Let's remove the reserved bit and make the instruction work as expected. This fixes Linux boot for ppc64. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-09-15serial: Update parameters after loadMichal Novotny1-0/+1
This is the patch to update serial port parameters after guest is already loaded. Signed-off-by: Michal Novotny <minovotn@redhat.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-09-14Remove wrong semicolon in macro definitionStefan Weil2-3/+3
Macros normally should not end with a semicolon, otherwise their usage results in two statements where only one statement was expected. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-09-13serial: Wrap debug prints around a DPRINTF macroMichal Novotny1-12/+13
Signed-off-by: Michal Novotny <minovotn@redhat.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-09-11ESP: fix ESP DMA access when DMA is not enabledBlue Swirl5-18/+88
Sending ESP a command caused it to trigger DMA immediately even if DMA was not enabled at the DMA controller. Add a signal from DMA controller to ESP to tell ESP about changes in DMA enable bit. Also use the correct function for setting up GPIO outputs. This fixes NetBSD 1.6.1 through 3.0 boot. Thanks to Artyom Tarasenko for extensive debugging of the problem. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-11powerpc: Avoid TLB related log spammingEdgar E. Iglesias1-1/+0
Invalid TLB entries are normal and should not spam the log. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-09-11trace: fix a regex portability problemBlue Swirl1-1/+1
The /bin/sh in Milax has problems with the regex: Error: invalid trace backend Please choose a supported trace backend. Fix it by escaping ')' like the regexes with '('. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-10trace: fix a typoBlue Swirl1-1/+1
There is no qemu_valloc() but qemu_vmalloc(). Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-10HACKING: add rules for printf-like functionsBlue Swirl1-0/+13
Add rules for printf-like functions, based on libvirt HACKING. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-10HACKING: add string management rulesBlue Swirl1-0/+24
Add string management rules, somewhat like libvirt HACKING. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-10HACKING: add memory management rulesBlue Swirl1-0/+14
Add memory management rules, somewhat like libvirt HACKING. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-10HACKING: add C type rulesBlue Swirl2-3/+68
Add C type rules, adapted from libvirt HACKING. Also include a description of special QEMU scalar types. Move typedef rule from CODING_STYLE rule 3 to HACKING rule 6 where it belongs. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-10HACKING: add preprocessor rulesBlue Swirl1-0/+6
Add a new file, HACKING, in order to collect recurring issues with submitted patches. Start with preprocessor rules, adapted from libvirt HACKING. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-10vmware_vga: Replace the few tab-indents with spaces (clean-up).Andrzej Zaborowski1-9/+9
Use 4 spaces instead of 2, too.
2010-09-10vmware_vga: Add checks to deal with non-atomic fifo writes.Andrzej Zaborowski1-8/+56
Janne Huttunen noticed that the FIFO end pointer is updated by the guest after writing each word to the FIFO, at least the X.org driver which is open does this. This means that there's no way for the host to know if the guest is in the middle a write operation. Qemu thus needs to read the beginning of the command up to when it's able to tell how many words are expected for the given command. It will abort reading and rewind the FIFO if there aren't enough words yet, this should be relatively rare but it is suspected to have been the cause of the occasional FIFO overrun that killed the display.
2010-09-10hw/omap: Fix default setup for OMAP UART devicesStefan Weil4-8/+19
Character devices created by qemu_chr_open don't allow duplicate device names, so naming all UART devices "null" no longer works. Running "qemu-system-arm -M n800" (and some other machines) results in this error message: qemu-system-arm: Duplicate ID 'null' for chardev Can't create serial device, empty char device This is fixed by setting a default label "uart1", "uart2" or "uart3". Cc: Andrzej Zaborowski <andrew.zaborowski@intel.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
2010-09-09trace: Trace entry point of balloon request handlerPrerna Saxena2-0/+6
Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Trace port IOPrerna Saxena2-0/+11
Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Trace virtqueue operationsStefan Hajnoczi2-0/+16
This patch adds trace events for virtqueue operations including adding/removing buffers, notifying the guest, and receiving a notify from the guest. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Trace virtio-blk, multiwrite, and paio_submitStefan Hajnoczi4-0/+31
This patch adds trace events that make it possible to observe virtio-blk. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Trace qemu_malloc() and qemu_vmalloc()Stefan Hajnoczi3-8/+38
It is often useful to instrument memory management functions in order to find leaks or performance problems. This patch adds trace events for the memory allocation primitives. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Add user documentationStefan Hajnoczi1-0/+177
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Add LTTng Userspace Tracer backendStefan Hajnoczi2-3/+102
This patch adds LTTng Userspace Tracer (UST) backend support. The UST system requires no kernel support but libust and liburcu must be installed. $ ./configure --trace-backend ust $ make Start the UST daemon: $ ustd & List available tracepoints and enable some: $ ustctl --list-markers $(pgrep qemu) [...] {PID: 5458, channel/marker: ust/paio_submit, state: 0, fmt: "acb %p opaque %p sector_num %lu nb_sectors %lu type %lu" 0x4b32ba} $ ustctl --enable-marker "ust/paio_submit" $(pgrep qemu) Run the trace: $ ustctl --create-trace $(pgrep qemu) $ ustctl --start-trace $(pgrep qemu) [...] $ ustctl --stop-trace $(pgrep qemu) $ ustctl --destroy-trace $(pgrep qemu) Trace results can be viewed using lttv-gui. More information about UST: http://lttng.org/ust Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> trace: Check for LTTng Userspace Tracer headers When using the 'ust' backend, check if the relevant headers are available at host. Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Add trace file name command-line optionPrerna Saxena3-0/+50
This patch adds an optional command line switch '-trace' to specify the filename to write traces to, when qemu starts. Eg, If compiled with the 'simple' trace backend, [temp@system]$ qemu -trace FILENAME IMAGE Allows the binary traces to be written to FILENAME instead of the option set at config-time. Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Add trace-file command to open/close/flush trace fileStefan Hajnoczi4-13/+88
This patch adds the trace-file command: trace-file [on|off|flush] Open, close, or flush the trace file. If no argument is given, the status of the trace file is displayed. The trace file is turned on by default but is only written out when the trace buffer becomes full. The flush operation can be used to force write out at any time. Turning off the trace file does not change the state of trace events; tracing will continue to the trace buffer. When the trace file is off, use "info trace" to display the contents of the trace buffer in memory. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> This commit also contains the trace-file sub-command from the following commit: commit 5ce8d1a957afae2c52ad748944ce72848ccf57bd Author: Prerna Saxena <prerna@linux.vnet.ibm.com> Date: Wed Aug 4 16:23:54 2010 +0530 trace: Add options to specify trace file name at startup and runtime This patch adds an optional command line switch '-trace' to specify the filename to write traces to, when qemu starts. Eg, If compiled with the 'simple' trace backend, [temp@system]$ qemu -trace FILENAME IMAGE Allows the binary traces to be written to FILENAME instead of the option set at config-time. Also, this adds monitor sub-command 'set' to trace-file commands to dynamically change trace log file at runtime. Eg, (qemu)trace-file set FILENAME This allows one to set trace outputs to FILENAME from the default specified at startup. Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Specify trace file namePrerna Saxena2-4/+29
Allow users to specify a file for trace-outputs at configuration. Also, allow trace files to be annotated by <pid> so each qemu instance has unique traces. The trace file name can be passed as a config option: --trace-file=/path/to/file (Default: trace ) At runtime, the pid of the qemu process is appended to the filename so that mutiple qemu instances do not have overlapping logs. Eg : trace-1234 for qemu launched with pid 1234. I have yet to test this on windows. getpid() is used at many places in code(including vnc.c), so I'm hoping this would be okay too. Edited-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Support disabled events in trace-eventsStefan Hajnoczi2-6/+45
Sometimes it is useful to disable a trace event. Removing the event from trace-events is not enough since source code will call the trace_*() function for the event. This patch makes it easy to build without specific trace events by marking them disabled in trace-events: disable multiwrite_cb(void *mcb, int ret) "mcb %p ret %d" This builds without the multiwrite_cb trace event. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> trace: Allow bulk enabling/disabling of trace events at compile time For 'simple' trace backend, allow bulk enabling/disabling of trace events at compile time. Trace events that are preceded by 'disable' keyword are compiled in, but turned off by default. These can individually be turned on using the monitor. All other trace events are enabled by default. TODO : This could be enhanced when the trace-event namespace is partitioned into a group and an ID within that group. In such a case, marking a group as enabled would automatically enable all trace-events listed under it. Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Support for dynamically enabling/disabling trace eventsPrerna Saxena6-4/+149
This patch adds support for dynamically enabling/disabling of trace events. This is done by internally maintaining each trace event's state, and permitting logging of data from a trace event only if it is in an 'active' state. Monitor commands added : 1) info trace-events : to view all available trace events and their state. 2) trace-event NAME on|off : to enable/disable data logging from a given trace event. Eg, trace-event paio_submit off disables logging of data when paio_submit is hit. By default, all trace-events are disabled. One can enable desired trace-events via the monitor. Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> trace: Monitor command 'info trace' Monitor command 'info trace' to display contents of trace buffer Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> trace: Remove monitor.h dependency from simpletrace User-mode targets don't have a monitor so the simple trace backend currently does not build on those targets. This patch abstracts the monitor printing interface so there is no direct coupling between simpletrace and the monitor. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Add simple built-in tracing backendStefan Hajnoczi8-4/+360
This patch adds a simple tracer which produces binary trace files. To try out the simple backend: $ ./configure --trace-backend=simple $ make After running QEMU you can pretty-print the trace: $ ./simpletrace.py trace-events trace.log The output of simpletrace.py looks like this: qemu_realloc 0.699 ptr=0x24363f0 size=0x3 newptr=0x24363f0 qemu_free 0.768 ptr=0x24363f0 ^ ^---- timestamp delta (us) |____ trace event name Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> trace: Make trace record fields 64-bit Explicitly use 64-bit fields in trace records so that timestamps and magic numbers work for 32-bit host builds. Includes fixes from Prerna Saxena <prerna@linux.vnet.ibm.com>. Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09trace: Add trace-events file for declaring trace eventsStefan Hajnoczi7-4/+238
This patch introduces the trace-events file where trace events can be declared like so: qemu_malloc(size_t size) "size %zu" qemu_free(void *ptr) "ptr %p" These trace event declarations are processed by a new tool called tracetool to generate code for the trace events. Trace event declarations are independent of the backend tracing system (LTTng User Space Tracing, ftrace markers, DTrace). The default "nop" backend generates empty trace event functions. Therefore trace events are disabled by default. The trace-events file serves two purposes: 1. Adding trace events is easy. It is not necessary to understand the details of a backend tracing system. The trace-events file is a single location where trace events can be declared without code duplication. 2. QEMU is not tightly coupled to one particular backend tracing system. In order to support tracing across QEMU host platforms and to anticipate new backend tracing systems that are currently maturing, it is important to be flexible and not tied to one system. This commit includes fixes from Prerna Saxena <prerna@linux.vnet.ibm.com> and Blue Swirl <blauwirbel@gmail.com>. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2010-09-09microblaze: Add support for fcmp.unEdgar E. Iglesias1-2/+16
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-09-09elf: Calculate symbol size if neededStefan Weil1-0/+5
Symbols with a size of 0 are unusable for the disassembler. Example: While running an arm linux kernel, no symbolic names are used in qemu.log when the cpu is executing an assembler function. Assume that the size of such symbols is the difference to the next symbol value. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-09Fix OpenBSD build warningBlue Swirl1-1/+2
Fix this warning: CC savevm.o /src/qemu/savevm.c: In function `do_savevm': /src/qemu/savevm.c:1900: warning: passing arg 1 of `localtime_r' from incompatible pointer type It looks like on OpenBSD the type of tv_sec in struct timeval is still 'long' instead of time_t as in most other OS. Fix by adding a cast. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-09-09microblaze: User-mode emulation of hw-excp signalsEdgar E. Iglesias1-0/+31
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-09-09microblaze: Add basic FPU emulationEdgar E. Iglesias4-9/+358
Missing: * fcmp.un insn * Denormalized exceptions * Exception model is not accurate Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-09-09microblaze: Add definitions for FSR reg fieldsEdgar E. Iglesias1-0/+7
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-09-08Revert "Make default invocation of block drivers safer (v3)"Anthony Liguori3-135/+0
This reverts commit 79368c81bf8cf93864d7afc88b81b05d8f0a2c90. Conflicts: block.c I haven't been able to come up with a solution yet for the corruption caused by unaligned requests from the IDE disk so revert until a solution can be written. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-09-08Revert "PPC: Qdev'ify e500 pci"Anthony Liguori1-73/+33
This reverts commit 13b7fdeffa68e3382231a70308593ae6a75d96c3. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-09-08Revert "PPC: Make e500 pci byte swap config data"Anthony Liguori1-1/+1
This reverts commit cfb207e643d94e3e96d456b1df14c5e36f6aa9e5. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-09-08Merge remote branch 'agraf/ppc-next' into stagingAnthony Liguori5-39/+136
2010-09-08Merge remote branch 'kwolf/for-anthony' into stagingAnthony Liguori22-134/+427
2010-09-08Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori17-46/+287
2010-09-08virtio-9p: Change handling of flags in open() path for 9P2000.LSripathi Kodi1-13/+1
This patch applies on top of 9P2000.L patches that we have on the list. I took a look at how 9P server is handling open() flags in 9P2000.L path. I think we can do away with the valid_flags() function and simplify the code. The reasoning is as follows: O_NOCTTY: (If the file is a terminal, don't make it the controlling terminal of the process even though the process does not have a controlling terminal) By the time the control reaches 9P client it is clear that what we have is not a terminal device. Hence it does not matter what we do with this flag. In any case 9P server can filter this flag out before making the syscall. O_NONBLOCK: (Don't block if i) Can't read/write to the file ii) Can't get locks) This has an impact on FIFOs, but also on file locks. Hence we can pass it down to the system call. O_ASYNC: From the manpage: O_ASYNC Enable signal-driven I/O: generate a signal (SIGIO by default, but this can be changed via fcntl(2)) when input or output becomes pos- sible on this file descriptor. This feature is only available for terminals, pseudo-terminals, sockets, and (since Linux 2.6) pipes and FIFOs. See fcntl(2) for further details. Again, this does not make any impact on regular files handled by 9P. Also, we don't want 9P server to receive SIGIO. Hence I think 9P server can filter this flag out before making the syscall. O_CLOEXEC: This flag makes sense only on the client. If guest user space sets this flag the guest VFS will take care of calling close() on the fd if an exec() happens. Hence 9P client need not be bothered with this flag. Also I think QEMU will not do an exec, but if it does, it makes sense to close these fds. Hence we can pass this flag down to the syscall. O_CREAT: Since we are in open() path it means we have confirmed that the file exists. Hence there is no need to pass O_CREAT flag down to the system. In fact on some versions of glibc this causes problems, because we pass O_CREAT flag, but don't have permission bits. Hence we can just mask this flag out. So in summary: Mask out: O_NOCTTY O_ASYNC O_CREAT Pass-through: O_NONBLOCK O_CLOEXEC Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08[virtio-9p] This patch implements TLERROR/RLERROR on the qemu 9P server.Arun R Bharadwaj2-6/+15
Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08[virtio-9p] Remove all instances of unnecessary dotu variable.Arun R Bharadwaj3-82/+62
Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
2010-09-08virtio-9p: Add support for removing xattrAneesh Kumar K.V3-5/+38
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2010-09-08virtio-9p: Fix the memset usageAneesh Kumar K.V1-2/+1
The arguments are wrong. Use qemu_mallocz directly Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2010-09-08virtio-9p: Use lchown which won't follow symlinkAneesh Kumar K.V1-1/+1
We should always use functions which don't follow symlink on the server Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>