aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-03-21rbd: don't link with -lcryptoAurelien Jarno1-1/+1
rbd support tries to both link with -lrados and -lcrypto. While the first one is of course necessary, the second is not necessary (only librados ifself needs to link with libcrypto). This fixes a licensing issue: qemu as a whole is GPL v2, and thus can't be linked with OpenSSL without an exception in the license, which seems difficult to get given the number of persons involved. Cc: Christian Brunner <chb@muc.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-03-21hw/arm_sysctl.c: Add the Versatile Express system registersPeter Maydell1-1/+63
Add support for the Versatile Express SYS_CFG registers, which provide a generic means of reading or writing configuration information from various parts of the board. We only implement shutdown and reset. Also make the RESETCTL register RAZ/WI on Versatile Express rather than reset the board. Other system registers are generally the same as Versatile and Realview. This includes a VMState version number bump for arm_sysctl, since we have new register state to preserve. It also adds sys_mci to the VMState while we're bumping the version number (an accidental omission from commit b50ff6f5). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-03-20Fix conversions from pointer to int and vice versaStefan Weil4-10/+10
Here the int values fds[0], sigfd, s, sock and fd are converted to void pointers which are later converted back to an int value. These conversions should always use intptr_t instead of unsigned long. They are needed for environments where sizeof(long) != sizeof(void *). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-19petalogix_ml605_mmu: remove unused variableBlue Swirl1-3/+2
Remove a write-only variable, spotted by GCC 4.6.0: /src/qemu/hw/petalogix_ml605_mmu.c: In function 'petalogix_ml605_init': /src/qemu/hw/petalogix_ml605_mmu.c:153:11: error: variable 'serial' set but not used [-Werror=unused-but-set-variable] Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-19qemu-thread: delete unused functionsBlue Swirl2-40/+0
qemu_mutex_timedlock() and qemu_cond_timedwait() are no longer used. Remove them and their helper timespec_add_ms(). Reported-by: François Revol <revol@free.fr> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-19w32: Add missing functions qemu_mutex_destroy, qemu_cond_destroyStefan Weil1-0/+21
These functions were missing in commit 9257d46d55f1fe4e8209be9a6870e339ac3266fe. Both functions are needed for compilations with configuration --enable-vnc-thread. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-19i8254: Fix migration from older versionsJan Kiszka1-0/+2
qdev conversion broke migration as the previous version used vmstate instance IDs derived from the iobase. Fix it by registering a legacy alias. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-16microblaze: Add PetaLogix ml605 MMU little-endian ref designMichal Simek5-1/+308
Add the first Microblaze little endian platform. Platform uses uart16550, axi ethernet, timer, intc. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2011-03-16xilinx: Add AXIENET & DMA modelsEdgar E. Iglesias4-0/+1448
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2011-03-16microblaze: Compile uart 16550 serial driverMichal Simek2-0/+2
Upcomming little endian platform will use 16550 serial driver. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2011-03-15win32: implement missing timersubBlue Swirl2-5/+20
Implement and wrap timersub() for Win32. Acked-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-15simpletrace: Move st_init() error reportingStefan Hajnoczi3-8/+9
User emulator builds do not have error_report() so it should not be used by simpletrace.c. In fact, error reporting inside simpletrace.c is inappropriate and should be done by the caller instead. This patch moves st_init() error reporting out to its caller, vl.c:main(). Reported-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13add Win32 IPI servicePaolo Bonzini3-13/+22
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13protect qemu_cpu_kick_self for Win32Paolo Bonzini1-0/+4
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13provide dummy signal init functions for win32Paolo Bonzini1-70/+73
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13merge all signal initialization with qemu_signalfd_init, renamePaolo Bonzini1-51/+36
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13iothread stops the vcpu thread via IPIPaolo Bonzini1-0/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13do not use timedwait on qemu_cpu_condPaolo Bonzini1-2/+2
Whenever env->created becomes true, qemu_cpu_cond is signaled by {kvm,tcg}_cpu_thread_fn. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13do not use timedwait on qemu_pause_condPaolo Bonzini1-1/+1
all_vcpus_paused can start returning true after penv->stopped changes from 0 to 1. When this is done, qemu_pause_cond is always signaled. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13do not use timedwait on qemu_system_condPaolo Bonzini1-2/+2
qemu_main_loop_start is the only place where qemu_system_ready is set to 1. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13do not use timedwait on qemu_halt_condPaolo Bonzini1-2/+2
The following conditions can cause cpu_has_work(env) to become true: - env->queued_work_first: run_on_cpu is already kicking the VCPU - env->stop = 1: pause_all_vcpus is already kicking the VCPU - env->stopped = 0: resume_all_vcpus is already kicking the VCPU - vm_running = 1: vm_start is calling resume_all_vcpus - env->halted = 0: see previous patch - qemu_cpu_has_work(env): when it becomes true, board code should set env->halted = 0 too. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13always signal pause_cond after stopping a VCPUPaolo Bonzini1-0/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13exit round-robin vcpu loop if cpu->stopped is truePaolo Bonzini1-1/+1
Sometimes vcpus are stopped directly without going through ->stop = 1. Exit the VCPU execution loop in this case as well. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13always qemu_cpu_kick after unhalting a cpuPaolo Bonzini4-4/+13
This ensures env->halt_cond is broadcast, and the loop in qemu_tcg_wait_io_event and qemu_kvm_wait_io_event is exited naturally rather than through a timeout. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13inline cpu_halted into sole callerPaolo Bonzini12-124/+7
All implementations are now the same, and there is only one caller, so inline the function there. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13remove CONFIG_THREADPaolo Bonzini1-2/+0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13add assertions on the owner of a QemuMutexPaolo Bonzini1-1/+5
These are already present in the Win32 implementation, add them to the pthread wrappers as well. Use PTHREAD_MUTEX_ERRORCHECK for mutex operations. Later we'll add tracking of the owner for cond_signal/broadcast. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13include qemu-thread.h earlyPaolo Bonzini1-2/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13add win32 qemu-thread implementationPaolo Bonzini6-17/+313
For now, qemu_cond_timedwait and qemu_mutex_timedlock are left as POSIX-only functions. They can be removed later, once the patches that remove their uses are in. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13Refactor thread retrieval and checkJan Kiszka7-24/+18
We have qemu_cpu_self and qemu_thread_self. The latter is retrieving the current thread, the former is checking for equality (using CPUState). We also have qemu_thread_equal which is only used like qemu_cpu_self. This refactors the interfaces, creating qemu_cpu_is_self and qemu_thread_is_self as well ass qemu_thread_get_self. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13use win32 timer queuesPaolo Bonzini1-51/+35
Multimedia timers are only useful for compatibility with Windows NT 4.0 and earlier. Plus, the implementation in Wine is extremely heavyweight. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13implement win32 dynticks timerPaolo Bonzini1-1/+6
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13unlock iothread during WaitForMultipleObjectsPaolo Bonzini1-0/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13hw/fmopl: Fix buffer access out-of-bounds errorsStefan Weil1-1/+5
Index 75 is one too large for AR_TABLE[75], DR_TABLE[75]. This error was reported by cppcheck. hw/fmopl.c:600: error: Buffer access out-of-bounds: OPL.AR_TABLE hw/fmopl.c:601: error: Buffer access out-of-bounds: OPL.DR_TABLE Fix this by limiting the access to the allowed range. MultiArcadeMachineEmulator has newer versions of fmopl, but using these requires more efforts. Cc: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: malc <av1474@comtv.ru> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13moving eeprom initializationWilliam Dauchy2-41/+41
The initialization should not be only on reset but also when initializing the device. It resolves a bug when hot plugging a pci network device: the mac address was always null. Signed-off-by: William Dauchy <wdauchy@gmail.com> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-12pc: fix wrong CMOS values for floppy drivesBlue Swirl1-1/+1
Before commit 63ffb564dca94f8bda01ed6d209784104630a4d2, states for floppy drives were calculated in fdc.c:fd_revalidate(). There it is also considered whether a disk is inserted or not. The commit didn't copy the logic completely to pc.c, which caused a regression. Fix by adding the same check also to pc.c. Reported-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Tested-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-11microblaze: Add PVR for writeback cache, endiansMichal Simek1-0/+4
Specify PVR for writeback cache, endians and others. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2011-03-11microblaze: Fix PetaLogix company nameMichal Simek1-1/+1
trivial fix. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2011-03-11Merge remote branch 'stefanha/tracing' into stagingAnthony Liguori8-122/+229
2011-03-10vmstate: move timers to use test instead of versionJuan Quintela1-3/+12
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-03-10vmstate: be able to store/save a pci device from a pointerJuan Quintela1-0/+8
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-03-10vmstate: Add a way to send a partial arrayJuan Quintela1-0/+9
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-03-10vmstate: add VMSTATE_STRUCT_VARRAY_UINT32Juan Quintela1-0/+10
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-03-10vmstate: add VMSTATE_INT64_ARRAYJuan Quintela1-0/+6
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-03-10vmstate: add VMSTATE_STRUCT_VARRAY_INT32Juan Quintela1-0/+10
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-03-10vmstate: add UINT32 VARRAYSJuan Quintela2-0/+13
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-03-10vmstate: Fix varrays with uint8 indexesJuan Quintela2-2/+5
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-03-10vmstate: add VMSTATE_UINT32_EQUALJuan Quintela2-0/+25
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-03-10vnc: Fix stack corruption and other bitmap related bugsStefan Weil2-8/+7
Commit bc2429b9174ac2d3c56b7fd35884b0d89ec7fb02 introduced a severe bug (stack corruption). bitmap_clear was called with a wrong argument which caused out-of-bound writes to the local variable width_mask. This bug was detected with QEMU running on windows. It also occurs with wine: *** stack smashing detected ***: terminated wine: Unhandled illegal instruction at address 0x6115c7 (thread 0009), starting debugger... The bug is not windows specific! Instead of fixing the wrong parameter value, bitmap_clear(), bitmap_set and width_mask were removed, and bitmap_intersect() was replaced by !bitmap_empty(). The new operation is much shorter and equivalent to the old operations. The declarations of the dirty bitmaps in vnc.h were also wrong for 64 bit hosts because of a rounding effect: for these hosts, VNC_MAX_WIDTH is no longer a multiple of (16 * BITS_PER_LONG), so the rounded value of VNC_DIRTY_WORDS was too small. Fix both declarations by using the macro which is designed for this purpose. Cc: Corentin Chary <corentincj@iksaif.net> Cc: Wen Congyang <wency@cn.fujitsu.com> Cc: Gerhard Wiesinger <lists@wiesinger.com> Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-03-10hmp-commands.hx: fix badly merged client_migrate_info commandJes Sorensen1-16/+16
client_migrate_info was merged badly, placing it between the command and the documentation for another command. In addition it did not respect the general rule of hmp-commands.hx, of having command definition before the documentation. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>