- 11 12月, 2010 14 次提交
-
-
由 Alexander Graf 提交于
This patch converts the ISA MMIO bridge code to always use little endian mmio. All bswap code that existed was only there to convert from native cpu endianness to little endian ISA devices. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Alexander Graf 提交于
This patch replaces explicit bswaps with endianness hints to the mmio layer. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Alexander Graf 提交于
This patch replaces explicit bswaps with endianness hints to the mmio layer. Because we don't depend on the target endianness anymore, we can also move the driver over to Makefile.objs. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Alexander Graf 提交于
This patch replaces explicit bswaps with endianness hints to the mmio layer. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Alexander Graf 提交于
This patch replaces explicit bswaps with endianness hints to the mmio layer. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Alexander Graf 提交于
This patch replaces explicit bswaps with endianness hints to the mmio layer. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Alexander Graf 提交于
This patch replaces explicit bswaps with endianness hints to the mmio layer. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Alexander Graf 提交于
The e1000 has compatibility code to handle big endianness which makes it mandatory to be recompiled on different targets. With the generic mmio endianness solution, there's no need for that anymore. We just declare all mmio to be little endian and call it a day. Because we don't depend on the target endianness anymore, we can also move the driver over to Makefile.objs. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Alexander Graf 提交于
There's no need to bswap once we correctly set the mmio to be little endian. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Alexander Graf 提交于
The only reason we have bswap versions of the pci host code is that most pci host devices are little endian. The ppc e500 is the only odd one here, being big endian. So let's directly pass the endianness down to the mmio layer and not worry about it on the pci host layer. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Alexander Graf 提交于
The device is only used on big endian systems, but always byte swaps. That's a very good indicator that it's actually a little endian device ;-). Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Alexander Graf 提交于
As an alternative to the 3 individual handlers, there is also a simplified io mem hook function. To be consistent, let's add an endianness parameter there too. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Alexander Graf 提交于
As stated before, devices can be little, big or native endian. The target endianness is not of their concern, so we need to push things down a level. This patch adds a parameter to cpu_register_io_memory that allows a device to choose its endianness. For now, all devices simply choose native endian, because that's the same behavior as before. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Alexander Graf 提交于
The way we're currently modeling mmio is too simplified. We assume that every device has the same endianness as the target CPU. In reality, most devices are little endian (all PCI and ISA ones I'm aware of). Some are big endian (special system devices) and a very little fraction is target native endian (fw_cfg). So instead of assuming every device to be native endianness, let's move to a model where the device tells us which endianness it's in. That way we can compile the devices only once and get rid of all the ugly swap will be done by the underlying layer. For the same of readability, this patch only introduces the helper framework but doesn't allow the registering code to set its endianness yet. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 10 12月, 2010 1 次提交
-
-
由 Michael Walle 提交于
Read should return bytes instead of samples. Signed-off-by: NMichael Walle <michael@walle.cc> Signed-off-by: Nmalc <av1474@comtv.ru>
-
- 09 12月, 2010 1 次提交
-
-
由 Alexander Graf 提交于
I get a warning on a signed comparison with an unsigned variable, so let's make the variable signed and be happy. Signed-off-by: NAlexander Graf <agraf@suse.de> Signed-off-by: NEdgar E. Iglesias <edgar@axis.com>
-
- 05 12月, 2010 7 次提交
-
-
由 Kirill Batuzov 提交于
Move the last found TB to the head of the list so it will be found more quickly next time it will be looked for. Signed-off-by: NKirill Batuzov <batuzovk@ispras.ru> Signed-off-by: NPavel Yushchenko <pau@ispras.ru> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Peter Maydell 提交于
Remove the spin_trylock() function, as it is not used anywhere, and is not even implemented if CONFIG_USE_NPTL is defined. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Stefan Weil 提交于
The redundant forward declaration of qerror in machload.c is removed because it should be taken from qemu.h. Please note that this patch is untested because I have no matching environment to compile it. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Stefan Weil 提交于
Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Stefan Weil 提交于
This change was missing in commit 9a78eead. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Stefan Weil 提交于
This patch adds more printf format checking. Additional modifications were needed for this code change: * alpha-dis.c: The local definition of MAX conflicts with a previous definition from osdep.h, so add an #undef. * dis-asm.h: Add include for fprintf_function (qemu-common.h). The standard (now redundant) includes are removed. * mis-dis.c: The definition of ARRAY_SIZE is no longer needed and must be removed (conflict with previous definition from qemu-common.h). * sh4-dis.c: Remove some unneeded forward declarations. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Blue Swirl 提交于
ffsl() is not universally available, so there are these warnings on both mingw32 and OpenBSD: /src/qemu/hw/pcie_aer.c: In function 'pcie_aer_update_log': /src/qemu/hw/pcie_aer.c:399: warning: implicit declaration of function 'ffsl' Since status field in PCIEAERErr is uint32_t, we can just use ffs() instead. Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 04 12月, 2010 2 次提交
-
-
git://gitorious.org/qemu-maemo/qemu由 Edgar E. Iglesias 提交于
* 'linux-user-for-upstream' of git://gitorious.org/qemu-maemo/qemu: linux-user: fix mips and ppc to use UID16 update binfmt conf linux-user: fix compiler error on nptl ARM: linux-user: Restore iWMMXT state from ucontext on sigreturn ARM: linux-user: Expose iWMMXT registers to signal handlers ARM: linux-user: Restore VFP state from ucontext on sigreturn ARM: linux-user: Expose VFP registers to signal handlers ARM: Expose vfp_get_fpscr() and vfp_set_fpscr() to C code ARM: linux-user: Correct size of padding in target_ucontext_v2 target-sparc: remove unused functions cpu_lock(), cpu_unlock() ARM: enable XScale/iWMMXT in linux-user mode linux-user: Translate getsockopt level option linux-user: remove unnecessary local from __get_user(), __put_user() linux-user: fix memory leaks with NPTL emulation linux-user: mmap_reserve() not controlled by RESERVED_VA [PATCH] target-arm: remove unused functions cpu_lock(), cpu_unlock()
-
由 Stefan Hajnoczi 提交于
Remove the debugging fprintf() slipped in via the following commit: commit b2e0a138 Author: Michael S. Tsirkin <mst@redhat.com> Date: Mon Nov 22 19:52:34 2010 +0200 migration: stable ram block ordering Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 03 12月, 2010 15 次提交
-
-
由 Martin Mohring 提交于
Signed-off-by: NMartin Mohring <martin.mohring@5edatasoft.com> Signed-off-by: NJan-Simon Möller <jsmoeller@linuxfoundation.org> Signed-off-by: NRiku Voipio <riku.voipio@nokia.com>
-
由 Riku Voipio 提交于
1) dont register i386 qemu on x86_64 host 2) widen sparc and arm match 3) add sh4, based on patch by David Kozub <zub@linux.fjfi.cvut.cz> Rest based on patch by Jan-Simon Möller <jsmoeller@linuxfoundation.org>
-
由 Riku Voipio 提交于
Some compilers detect that new_stack isnt used after dd75d784 Signed-off-by: NRiku Voipio <riku.voipio@nokia.com>
-
由 Peter Maydell 提交于
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@nokia.com>
-
由 Peter Maydell 提交于
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@nokia.com>
-
由 Peter Maydell 提交于
Restore the VFP registers from the ucontext on return from a signal handler in linux-user mode. This means that signal handlers cannot accidentally corrupt the interrupted code's VFP state, and allows them to deliberately modify the state via the ucontext structure. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@nokia.com>
-
由 Peter Maydell 提交于
For ARM linux-user mode signal handlers, fill in the ucontext with VFP register contents in the same way that the kernel does. We only do this for v2 format sigframe (2.6.12 and above); this is actually bug-for-bug compatible with the older kernels, which don't save and restore VFP registers either. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@nokia.com>
-
由 Peter Maydell 提交于
Expose the vfp_get_fpscr() and vfp_set_fpscr() functions to C code as well as generated code, so we can use them to read and write the FPSCR when saving and restoring VFP registers across signal handlers in linux-user mode. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@nokia.com>
-
由 Peter Maydell 提交于
The padding in the target_ucontext_v2 is defined by the size of the target's sigset_t type, not the host's. (This bug only causes problems when we start using the uc_regspace[] array to expose VFP registers to userspace signal handlers.) Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@nokia.com>
-
由 Peter Maydell 提交于
-
由 Peter Maydell 提交于
In linux-user mode, the XScale/iWMMXT coprocessors must be enabled at reset so that we can run code that uses these instructions. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Jamie Lentin 提交于
n setsockopt, the socket level options are translated to the hosts' architecture before the real syscall is called, e.g. TARGET_SO_TYPE -> SO_TYPE. This patch does the same with getsockopt. Tested on a x86 host emulating MIPS. Without it:- $ grep getsockopt host.strace 31311 getsockopt(3, SOL_SOCKET, 0x1007 /* SO_??? */, 0xbff17208, 0xbff17204) = -1 ENOPROTOOPT (Protocol not available) With:- $ grep getsockopt host.strace 25706 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 Whitespace cleanup: Riku Voipio Signed-off-by: NJamie Lentin <jm@lentin.co.uk> Signed-off-by: NRiku Voipio <riku.voipio@iki.fi>
-
由 Peter Maydell 提交于
Remove an unnecessary local variable from the __get_user() and __put_user() macros. This avoids confusing compilation failures if the name of the local variable ('size') happens to be the same as the variable the macro user is trying to read/write. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@nokia.com>
-
由 Nathan Froyd 提交于
Running programs that create large numbers of threads, such as this snippet from libstdc++'s pthread7-rope.cc: const int max_thread_count = 4; const int max_loop_count = 10000; ... for (int j = 0; j < max_loop_count; j++) { ... for (int i = 0; i < max_thread_count; i++) pthread_create (&tid[i], NULL, thread_main, 0); for (int i = 0; i < max_thread_count; i++) pthread_join (tid[i], NULL); } in user-mode emulation will quickly run out of memory. This is caused by a failure to free memory in do_syscall prior to thread exit: /* TODO: Free CPU state. */ pthread_exit(NULL); The first step in fixing this is to make all TaskStates used by QEMU dynamically allocated. The TaskState used by the initial thread was not, as it was allocated on main's stack. So fix that, free the cpu_env, free the TaskState, and we're home free, right? Not exactly. When we create a thread, we do: ts = qemu_mallocz(sizeof(TaskState) + NEW_STACK_SIZE); ... new_stack = ts->stack; ... ret = pthread_attr_setstack(&attr, new_stack, NEW_STACK_SIZE); If we blindly free the TaskState, then, we yank the current (host) thread's stack out from underneath it while it still has things to do, like calling pthread_exit. That causes problems, as you might expect. The solution adopted here is to let the C library allocate the thread's stack (so the C library can properly clean it up at pthread_exit) and provide a hint that we want NEW_STACK_SIZE bytes of stack. With those two changes, we're done, right? Well, almost. You see, we're creating all these host threads and their parent threads never bother to check that their children are finished. There's no good place for the parent threads to do so. Therefore, we need to create the threads in a detached state so the parent thread doesn't have to call pthread_join on the child to release the child's resources; the child does so automatically. With those three major changes, we can comfortably run programs like the above without exhausting memory. We do need to delete 'stack' from the TaskState structure. Signed-off-by: NNathan Froyd <froydnj@codesourcery.com> Signed-off-by: NRiku Voipio <riku.voipio@nokia.com>
-
由 amateur 提交于
mmap_reserve() should be called only when RESERVED_VA is enabled. Otherwise, unmaped virtual address space will never be reusable. This bug will exhaust virtual address space in extreme conditions. Signed-off-by: NRiku Voipio <riku.voipio@nokia.com>
-